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
Returns an array of tokens this test wants to listen for.
final public function register() { return [ T_ARRAY, T_OPEN_SHORT_ARRAY, ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTokens(): array\n {\n return $this->tokens;\n }", "public function getAvailableTokens()\n {\n return array_keys( $this->tokens );\n }", "public function getTokens() {\n\t\treturn array_keys($this->tokens);\n\t}", "public function get_tokens()\n\t{\n\t\treturn $this->tokens;\n\t}", "public function getTokens();", "private function RequestTokens() {\n return (array)$this->oauth->getRequestToken();\n }", "public function getTokens()\n {\n return $this->tokens;\n }", "public function getToken()\n {\n return array($this->_token, $this->_token_secret);\n }", "public function register()\n {\n return array_merge(\n\t\t\tPHP_CodeSniffer_Tokens::$assignmentTokens,\n\t\t\tPHP_CodeSniffer_Tokens::$comparisonTokens,\n\t\t\tPHP_CodeSniffer_Tokens::$booleanOperators,\n\t\t\tarray(\n\t\t\t\tT_WHILE,\n\t\t\t\tT_FOR,\n\t\t\t\tT_FOREACH,\n\t\t\t\tT_SWITCH,\n\t\t\t\tT_IF,\n\t\t\t\tT_ELSE,\n\t\t\t\tT_ELSEIF,\n\t\t\t\tT_CATCH,\n\t\t\t\tT_ARRAY,\n\t\t\t)\n\t\t);\n\n }", "public function register()\n {\n $tokens = array();\n foreach ($this->deprecatedTypeCasts as $token => $versions) {\n $tokens[] = constant($token);\n }\n\n return $tokens;\n }", "public function getTokens()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('tokens');\n }", "public function getUserTokens();", "public function register()\n {\n $tokens = array(\n T_FUNCTION,\n );\n\n if (version_compare(PHP_CodeSniffer::VERSION, '2.3.4') >= 0) {\n $tokens[] = T_RETURN_TYPE;\n }\n\n return $tokens;\n\n }", "public function register()\n {\n return [\n T_FUNCTION,\n T_CLOSURE,\n T_FN,\n ];\n\n }", "public function signalTokens()\n {\n return [\"'\", '\"', '=', ')'];\n }", "public function register()\n {\n return [\n \\T_VARIABLE,\n \\T_FUNCTION,\n ];\n }", "public function getUsersToNotifyOfTokenGiven() {\n return array(\n $this->getAuthorPHID(),\n );\n }", "public function register()\n {\n $tokens = Tokens::$functionNameTokens;\n\n $tokens[] = T_VARIABLE;\n $tokens[] = T_CLOSE_CURLY_BRACKET;\n $tokens[] = T_CLOSE_SQUARE_BRACKET;\n $tokens[] = T_CLOSE_PARENTHESIS;\n\n return $tokens;\n\n }", "public function getListeners(): array;", "public function getProviderTokens()\n {\n return $this->provider_tokens;\n }", "public static function get_tokens()\n\t{\n\t\treturn static::$client->get_tokens();\n\t}", "public function register()\n {\n return array(\n T_FUNCTION,\n T_VARIABLE\n );\n\n }", "public static function getWhitelist(): array\n {\n return static::pluck('word')->toArray();\n }", "public function register()\n {\n return [\n T_IS_EQUAL,\n T_IS_NOT_EQUAL,\n T_IS_IDENTICAL,\n T_IS_NOT_IDENTICAL,\n ];\n }", "public function register() {\n\n return [\n T_IF,\n T_WHILE,\n T_FOREACH,\n T_FOR,\n T_SWITCH,\n T_DO,\n T_ELSE,\n T_ELSEIF,\n T_TRY,\n T_CATCH\n ];\n\n }", "public static function getApplicableListener(): array;", "public function register() : array {\n\t\treturn [\n\t\t\tT_PRIVATE,\n\t\t];\n\t}", "public function signalTokens()\n {\n return [\"'\", '\"', '\\\\'];\n }", "protected function getStartingTrashTokens(): array\n {\n return [\n 'может'\n ];\n }", "public function getStaticTokens()\n {\n $tokens = [];\n $sites = [];\n if (!$this->getValid()) {\n return $sites;\n }\n foreach ($this->xml->children() as $child) {\n if ($child->getName() == \"token\") {\n $token = $this->parseToken($child);\n if ($token !== false) {\n $tokens[$token['token']] = $token;\n }\n }\n }\n return $tokens;\n }", "private function registered_events () {\n\n\t\t$triggers = array();\n\n\t\tforeach( get_option( 'nce_triggers' ) as $trigger => $enabled ) {\n\n\t\t\tif( $enabled == \"1\" ) {\n\n\t\t\t\t$triggers[] = $trigger;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn $triggers;\n\n\t}", "public function tokensDataProvider(): array\n {\n return [\n 'PHP 7' => [\n [\n 0 => [T_WHITESPACE, ' '],\n 1 => [T_NS_SEPARATOR, '\\\\'],\n 2 => [T_STRING, 'Object'],\n 3 => [T_PAAMAYIM_NEKUDOTAYIM, '::'],\n ]\n ],\n 'PHP 8' => [\n [\n 0 => [T_WHITESPACE, ' '],\n 1 => [T_NAME_FULLY_QUALIFIED, '\\\\Object'],\n 2 => [T_PAAMAYIM_NEKUDOTAYIM, '::'],\n ]\n ]\n ];\n }", "public function get_access_tokens() {\n\t\t$tokens = get_user_meta($this->user->ID, self::META_TYK_ACCESS_TOKENS_KEY, true);\n\t\tif (!is_array($tokens)) {\n\t\t\treturn array();\n\t\t}\n\n\t\t// lambda to add an 'is_valid' attribute to each token\n\t\t$map_is_valid = function ($token) {\n\t\t\treturn array_merge($token, array(\n\t\t\t\t'is_valid' => $this->has_token($token['hash']),\n\t\t\t\t));\n\t\t};\n\n\t\treturn array_map($map_is_valid, $tokens);\n\t}", "public function getTokens(Context $context);", "public function register()\n {\n $tokens = parent::register();\n $tokens[] = T_ECHO;\n return $tokens;\n\n }", "private function get_token() \n {\n if ($this->last_token === 'TK_TAG_SCRIPT' || $this->last_token === 'TK_TAG_STYLE') { //check if we need to format javascript\n $type = substr($this->last_token, 7);\n $token = $this->get_contents_to($type);\n if (!is_string($token)) {\n return $token;\n }\n return array($token, 'TK_' . $type);\n }\n if ($this->current_mode === 'CONTENT') {\n $token = $this->get_content();\n \n if (!is_string($token)) {\n return $token;\n } else {\n return array($token, 'TK_CONTENT');\n }\n }\n\n if ($this->current_mode === 'TAG') {\n $token = $this->get_tag();\n\n if (!is_string($token)) {\n return $token;\n } else {\n $tag_name_type = 'TK_TAG_' . $this->tag_type;\n return array($token, $tag_name_type);\n }\n }\n }", "public function register()\n {\n return [\n T_CLOSE_PARENTHESIS,\n T_CLOSE_SHORT_ARRAY,\n T_OPEN_CURLY_BRACKET,\n T_SEMICOLON\n ];\n }", "public static function register()\n\t{\n\t\tglobal $modSettings;\n\n\t\tif (empty($modSettings['emoji_selection']) || $modSettings['emoji_selection'] === 'noemoji')\n\t\t{\n\t\t\treturn [];\n\t\t}\n\n\t\t// $hook, $function, $file\n\t\treturn [\n\t\t\t[\n\t\t\t\t'integrate_pre_bbc_parser',\n\t\t\t\t'\\\\ElkArte\\\\EmojiIntegrate::integrate_pre_bbc_parser'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'integrate_editor_plugins',\n\t\t\t\t'\\\\ElkArte\\\\EmojiIntegrate::integrate_editor_plugins'\n\t\t\t],\n\t\t];\n\t}", "public function providerDeviceToken()\n {\n return array(\n array('foo_bar', true),\n array(str_repeat('aq', 32), true),\n array(str_repeat('af', 32), false),\n array(str_repeat('AF', 32), false)\n );\n }", "public function getLookahead(): array\n {\n return $this->lookahead;\n }", "public static function registeredSignals(): array\n {\n return array_keys(self::$callbacks);\n }", "public function register()\n {\n return [\n T_OPEN_TAG,\n T_OPEN_TAG_WITH_ECHO,\n ];\n\n }", "public function register()\n {\n return [\n T_IS_EQUAL,\n T_IS_NOT_EQUAL,\n ];\n }", "private function tokensOf($in) {\n $l= $this->newLexer('<?php '.$in.'?>');\n $tokens= [];\n do {\n try {\n if ($r= $l->advance()) {\n $tokens[]= [$l->token, $l->value, $l->position];\n }\n } catch (Throwable $e) {\n $tokens[]= [nameof($e), $e->getMessage()];\n $r= false;\n }\n } while ($r);\n return $tokens;\n }", "public function getSubscriptions()\n {\n return [\n self::NAME.'.command.message',\n self::NAME.'.command.part',\n self::NAME.'.command.join',\n self::NAME.'.command.quit',\n self::NAME.'.command.kick',\n self::NAME.'.command.invite',\n ];\n }", "public function extractTokens()\n {\n // Prepare the opening and closing tags for the regex\n $openingTag = sprintf( '\\\\%s', implode( '\\\\', str_split( $this->openingTag ) ) );\n $closingTag = sprintf( '\\\\%s', implode( '\\\\', str_split( $this->closingTag ) ) );\n\n // Build the regex\n $regex = sprintf( '/%s([A-Z-_0-9]+)%s/i', $openingTag, $closingTag );\n\n // Find all the tokens in the string\n preg_match_all( $regex, $this->content, $matches, PREG_PATTERN_ORDER );\n\n // If there are no matches, simply return an empty array\n if ( empty( $matches[1] ) )\n {\n return [];\n }\n\n // Return a unique list of tokens\n return array_unique( $matches[ 1 ] );\n }", "public function register()\n {\n return [T_OPEN_SQUARE_BRACKET, T_OPEN_SHORT_ARRAY, T_OPEN_PARENTHESIS];\n }", "public function getTokenParsers()\n {\n return array();\n }", "public function getTokenParsers()\n {\n return array();\n }", "public function provides()\n {\n return [\n 'tts',\n ];\n }", "public function register()\n {\n return array(T_VARIABLE);\n\n }", "function exportTokens() {\n\t\treturn $this->tokens;\n\t}", "protected function connections()\n {\n return [\n 'tokens' => [\n 'to' => 'OAuthToken',\n 'description' => 'A list of all the access tokens of this client.'\n ]\n ];\n }", "public function enumCommands()\n {\n $rVal = [];\n foreach ($this->xml->xpath('command') as $node) {\n $rVal[] = (string)$node[0]->attributes()->name;\n }\n\n return $rVal;\n }", "public static function getListeners() : array\n {\n return Event::$listeners;\n }", "protected static function allowedEvents()\n\t{\n\t\treturn array();\n\t}", "public static function get_token_times()\n {\n $timer = &self::$timer;\n $session_start = $timer->__get('session_start');\n $session_checkpoint = $timer->__get('session_checkpoint');\n\n $times = array(\n 'session_start' => $session_start,\n 'session_checkpoint' => $session_checkpoint,\n );\n return $times;\n }", "public function register(): array\n {\n return [\n T_CLASS, T_INTERFACE,\n ];\n }", "public function register()\n {\n $this->assignment_tokens = \\Dekode\\GravityForms\\Vendor\\PHP_CodeSniffer\\Util\\Tokens::$assignmentTokens;\n unset($this->assignment_tokens[\\T_DOUBLE_ARROW]);\n $starters = \\Dekode\\GravityForms\\Vendor\\PHP_CodeSniffer\\Util\\Tokens::$booleanOperators;\n $starters[\\Dekode\\GravityForms\\Vendor\\T_SEMICOLON] = \\Dekode\\GravityForms\\Vendor\\T_SEMICOLON;\n $starters[\\Dekode\\GravityForms\\Vendor\\T_OPEN_PARENTHESIS] = \\Dekode\\GravityForms\\Vendor\\T_OPEN_PARENTHESIS;\n $starters[\\Dekode\\GravityForms\\Vendor\\T_INLINE_ELSE] = \\Dekode\\GravityForms\\Vendor\\T_INLINE_ELSE;\n $this->condition_start_tokens = $starters;\n return array(\\T_IF, \\T_ELSEIF, \\T_FOR, \\T_SWITCH, \\T_CASE, \\T_WHILE, \\Dekode\\GravityForms\\Vendor\\T_INLINE_THEN);\n }", "public static function get_statuses() {\n return array(\n self::GUEST,\n self::REGISTERED\n );\n }", "public function register()\n {\n return array(T_ARRAY);\n }", "public static function getSubscribedEvents()\n {\n return array(\n SubscriptionNotificationCenterBridgeEvents::BUILD_TOKENS_FROM_RECIPIENT => array(\n array('buildRecipientTokens'),\n ),\n );\n }", "public function getWhitelistedCSRFActions()\n {\n return array(\n 'notify'\n );\n }", "private function getAppMentionEventData(): array {\n return [\n 'type' => 'app_mention',\n 'user' => 'W021FGA1Z',\n 'text' => 'You can count on <@U0LAN0Z89> for an honorable mention.',\n 'ts' => '1515449483.000108',\n 'channel' => 'C0LAN2Q65',\n 'event_ts' => '1515449483000108',\n ];\n }", "public function getListeners($eventName): array;", "protected static function getHeaderToken()\n {\n return [];\n }", "protected static function getHeaderToken()\n {\n return [];\n }", "public function register()\n {\n return array(\n T_WHITESPACE\n );\n }", "public function register() {\n\t\treturn array(T_BACKTICK);\n\t}", "function &get_xoops_token()\n{\n\tif ( class_exists('XoopsMultiTokenHandler') )\n\t{\n\t\t$token =& XoopsMultiTokenHandler::quickCreate( $this->_TOKEN_NAME );\n\t\t$name = $token->getTokenName();\n\t\t$value = $token->getTokenValue();\n\t}\n\telse\n\t{\n\t\t$name = 'token';\n\t\t$value = 0;\n\t}\n\t$arr = array($name, $value);\n\treturn $arr;\n}", "public function getTokenClassNames() {\n\t\treturn array(TwitterOAuthToken::class);\n\t}", "public function dataProviderCheckTokens()\n {\n return static::testTokens();\n }", "public function getCallbacks(): array;", "public function register() {\n\n return [\n T_OPEN_SQUARE_BRACKET,\n T_CLOSE_SQUARE_BRACKET,\n ];\n\n }", "public function register() {\n return array(\n T_FUNCTION,\n );\n }", "private function registeredCommands(): array\n {\n return [\n $this->container->get(SpinUpCommand::class),\n $this->container->get(RemoveCommand::class),\n $this->container->get(InitConfigCommand::class),\n $this->container->get(ReplaceParametersCommand::class),\n $this->container->get(GetFileGroupCommand::class),\n $this->container->get(RunWebhookGroupCommand::class),\n ];\n }", "public function getListeners($event): array;", "public static function getTags(): array\n {\n return static::$tags;\n }", "public static function getSubscribedEvents(): array\n {\n return [\n WsServerEvent::HANDSHAKE_SUCCESS => 'handshakeOk',\n WsServerEvent::MESSAGE_RECEIVE => 'messageReceive',\n WsServerEvent::CLOSE_BEFORE => 'messageReceive',\n ];\n }", "public static function getSubscribedEvents() {\n return [];\n }", "public function getAcceptExtensions();", "public function userCommands(): array\n {\n if (!array_key_exists('commands', $this->config)) {\n //Legacy config support\n return [];\n }\n\n return $this->config['commands'];\n }", "public function register()\n {\n return Collections::arrayOpenTokensBC();\n }", "public function provides()\n {\n $i = [];\n foreach ($this->commands as $key => $value) {\n array_push($i, 'command.forever.' . $key);\n }\n\n return $i;\n }", "public function register()\n {\n return array(\n T_ARRAY,\n T_OPEN_SHORT_ARRAY,\n );\n }", "public function register()\n {\n $this->assignment_tokens = Tokens::$assignmentTokens;\n unset($this->assignment_tokens[\\T_DOUBLE_ARROW]);\n $starters = Tokens::$booleanOperators;\n $starters[\\T_SEMICOLON] = \\T_SEMICOLON;\n $starters[\\T_OPEN_PARENTHESIS] = \\T_OPEN_PARENTHESIS;\n $starters[\\T_INLINE_ELSE] = \\T_INLINE_ELSE;\n $this->condition_start_tokens = $starters;\n return array(\\T_INLINE_THEN);\n }", "public function register()\n\t{\n\t\treturn array(T_WHITESPACE);\n\t}", "public function register()\n\t{\n\t\treturn array(T_WHITESPACE);\n\t}", "public function register()\n {\n return array(\n T_FUNCTION,\n );\n }", "public function getWords(): array\n {\n return $this->getWordList();\n }", "public function getAccepted(): array\n {\n return $this->accept;\n }", "protected function getTrimTokens(): array\n {\n return [\n 'или', 'и'\n ];\n }", "public function getIdTokens()\n {\n return $this->idtokens;\n }", "protected function getScanCommands()\n {\n $files = Finder::create()\n ->in($this->app['path.commands'])\n ->name('*Command.php');\n\n $commands = [];\n\n foreach ($files as $file) {\n if ($command = $this->getCommandFromSource($file)) {\n $commands = array_merge($commands, $command);\n }\n }\n\n return $commands;\n }", "public function register()\n {\n return [\n T_COMMENT,\n T_DOC_COMMENT_OPEN_TAG,\n ];\n\n }", "public function register()\n {\n return [\\T_FOREACH];\n }", "public function subscribeOn(): array\n {\n }", "public function gameTokens();", "public function getFeedback()\n {\n $feedbackResponses = array();\n\n while ($fbCon = fread($this->getConnection(), 38)) {\n $arr = unpack(\"H*\", $fbCon);\n $rawhex = trim(implode(\"\", $arr));\n $token = substr($rawhex, 12, 64);\n\n if (!empty($token)) {\n $feedbackResponses[] = sprintf('Token was not registered anymore: %s', $token);\n }\n }\n\n fclose($this->getConnection());\n\n return $feedbackResponses;\n }", "public function getEventNames()/*# : array */;" ]
[ "0.68133146", "0.6487653", "0.6397045", "0.6326093", "0.627041", "0.6262117", "0.6258998", "0.6237562", "0.6207032", "0.6150431", "0.6053098", "0.5986526", "0.5863179", "0.5846821", "0.5831157", "0.5811848", "0.5811663", "0.5777088", "0.57391036", "0.57198495", "0.57187", "0.57060534", "0.5692008", "0.56691366", "0.56670034", "0.565774", "0.5613328", "0.55961156", "0.5593078", "0.55904895", "0.55634683", "0.5554095", "0.5549648", "0.5526373", "0.5515866", "0.55009735", "0.5498305", "0.549334", "0.54842275", "0.54709214", "0.54315823", "0.5420605", "0.5395375", "0.5384074", "0.5374977", "0.5374221", "0.5325195", "0.532137", "0.532137", "0.531613", "0.53122795", "0.5304745", "0.529658", "0.5289909", "0.52882886", "0.5283571", "0.5275629", "0.5275206", "0.52744514", "0.5269542", "0.5249899", "0.52475715", "0.52421606", "0.52351534", "0.52345616", "0.52330786", "0.52330786", "0.52306944", "0.5227183", "0.52233577", "0.5222905", "0.52204937", "0.5219813", "0.5213527", "0.5213094", "0.5204568", "0.5198176", "0.5189073", "0.51827705", "0.51816314", "0.5181315", "0.5175759", "0.5172787", "0.51717335", "0.51635224", "0.5161388", "0.514346", "0.514346", "0.5142336", "0.51401263", "0.5135007", "0.5131889", "0.51203173", "0.5119602", "0.5115788", "0.5113096", "0.5104394", "0.51019645", "0.510129", "0.509797" ]
0.5449075
40
end register() Processes this sniff, when one of its tokens is encountered.
public function process(File $phpcsFile, $stackPtr) { $tokens = $phpcsFile->getTokens(); if ($tokens[$stackPtr]['code'] === T_ARRAY) { $phpcsFile->recordMetric($stackPtr, 'Short array syntax used', 'no'); $arrayStart = $tokens[$stackPtr]['parenthesis_opener']; if (isset($tokens[$arrayStart]['parenthesis_closer']) === false) { // Incomplete array. return; } $arrayEnd = $tokens[$arrayStart]['parenthesis_closer']; } else { $phpcsFile->recordMetric($stackPtr, 'Short array syntax used', 'yes'); $arrayStart = $stackPtr; $arrayEnd = $tokens[$stackPtr]['bracket_closer']; } $lastContent = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($arrayEnd - 1), null, true); if ($tokens[$lastContent]['code'] === T_COMMA) { // Last array item ends with a comma. $phpcsFile->recordMetric($stackPtr, 'Array end comma', 'yes'); $lastArrayToken = $lastContent; } else { $phpcsFile->recordMetric($stackPtr, 'Array end comma', 'no'); $lastArrayToken = $arrayEnd; } if ($tokens[$stackPtr]['code'] === T_ARRAY) { $lastToken = $tokens[$stackPtr]['parenthesis_opener']; } else { $lastToken = $stackPtr; } $keyUsed = false; $indices = []; for ($checkToken = ($stackPtr + 1); $checkToken <= $lastArrayToken; $checkToken++) { // Skip bracketed statements, like function calls. if ($tokens[$checkToken]['code'] === T_OPEN_PARENTHESIS && (isset($tokens[$checkToken]['parenthesis_owner']) === false || $tokens[$checkToken]['parenthesis_owner'] !== $stackPtr) ) { $checkToken = $tokens[$checkToken]['parenthesis_closer']; continue; } if ($tokens[$checkToken]['code'] === T_ARRAY || $tokens[$checkToken]['code'] === T_OPEN_SHORT_ARRAY || $tokens[$checkToken]['code'] === T_CLOSURE ) { // Let subsequent calls of this test handle nested arrays. if ($tokens[$lastToken]['code'] !== T_DOUBLE_ARROW) { $indices[] = ['value_start' => $checkToken]; $lastToken = $checkToken; } if ($tokens[$checkToken]['code'] === T_ARRAY) { $checkToken = $tokens[$tokens[$checkToken]['parenthesis_opener']]['parenthesis_closer']; } else if ($tokens[$checkToken]['code'] === T_OPEN_SHORT_ARRAY) { $checkToken = $tokens[$checkToken]['bracket_closer']; } else { // T_CLOSURE. $checkToken = $tokens[$checkToken]['scope_closer']; } $checkToken = $phpcsFile->findNext(T_WHITESPACE, ($checkToken + 1), null, true); if ($tokens[$checkToken]['code'] !== T_COMMA) { $checkToken--; } else { $lastToken = $checkToken; } continue; }//end if if ($tokens[$checkToken]['code'] !== T_DOUBLE_ARROW && $tokens[$checkToken]['code'] !== T_COMMA && $checkToken !== $arrayEnd ) { continue; } if ($tokens[$checkToken]['code'] === T_COMMA || $checkToken === $arrayEnd ) { $stackPtrCount = 0; if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) { $stackPtrCount = count($tokens[$stackPtr]['nested_parenthesis']); } $commaCount = 0; if (isset($tokens[$checkToken]['nested_parenthesis']) === true) { $commaCount = count($tokens[$checkToken]['nested_parenthesis']); if ($tokens[$stackPtr]['code'] === T_ARRAY) { // Remove parenthesis that are used to define the array. $commaCount--; } } if ($commaCount > $stackPtrCount) { // This comma is inside more parenthesis than the ARRAY keyword, // so it is actually a comma used to do things like // separate arguments in a function call. continue; } if ($keyUsed === false) { $valueContent = $phpcsFile->findNext( Tokens::$emptyTokens, ($lastToken + 1), $checkToken, true ); $indices[] = ['value_start' => $valueContent]; } $lastToken = $checkToken; $keyUsed = false; continue; }//end if if ($tokens[$checkToken]['code'] === T_DOUBLE_ARROW) { $keyUsed = true; // Find the start of index that uses this double arrow. $indexEnd = $phpcsFile->findPrevious(T_WHITESPACE, ($checkToken - 1), $arrayStart, true); $indexStart = $phpcsFile->findStartOfStatement($indexEnd); // Find the value of this index. $nextContent = $phpcsFile->findNext( Tokens::$emptyTokens, ($checkToken + 1), $arrayEnd, true ); $indices[] = [ 'index_start' => $indexStart, 'index_end' => $indexEnd, 'arrow' => $checkToken, 'value_start' => $nextContent, ]; $lastToken = $checkToken; }//end if }//end for if ($tokens[$arrayStart]['line'] === $tokens[$arrayEnd]['line']) { $this->processSingleLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd, $indices); } else { $this->processMultiLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd, $indices); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register() {\n\t\t// Nothing to do here, we're after the (de)activation hook.\n\t}", "public function register()\n\t{\n\t\t// @noop\n\t}", "abstract public function register ( );", "abstract public function register();", "abstract public function register();", "abstract public function register();", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t//\n\t}", "public function register()\n\t{\n\t\t\n\t}", "public function register()\r\n\t{\r\n\r\n\t}", "public function register()\r\n\t{\r\n\r\n\t}", "public function register()\r\n\t{\r\n\r\n\t}", "public function register() {\n\t\t//\n\t}", "public function register() {\n\t\t//\n\t}", "public function register() {\n\t\t//\n\t}", "public function register()\n\t{\n //\n\t}", "public function register()\n\t{\n\t}", "public function register()\n\t{\n\t}", "public function register()\n\t{\n\t}", "public function register()\n\t{\n\t}", "protected static function register() {}", "public function _register()\n {\n }", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register()\r\n {\r\n //\r\n\t}", "public function register(): void\n {\n }", "public function register(): void\n {\n }", "public function register(): void\n {\n }", "public function register(): void\n {\n }", "public function register(): void\n {\n }", "public function register()\n {\n $this->registerZmop();\n }", "public function register(): void;", "public function register()\n {\n\t\t\t//\n }", "public function register()\n\t{\n\n\t}", "public function register()\n\t{\n\n\t}", "public function register()\n\t{\n\n\t}", "public function register()\n\t{\n\n\t}", "public function register(){}", "public function register(): void\n {\n //\n }", "public function register(): void\n {\n //\n }", "public function register(): void\n {\n //\n }", "public function register(): void\n {\n //\n }", "public function register(): void\n {\n //\n }", "public function register(): void\n {\n\n }", "public function register() {}", "public function register(){\n\t\t$this->registerOptimusAsAlias();\n\t\t$this->registerCommand();\n\t}", "public function register()\n { }", "public function register()\n {\n // Nothing is registered at this time\n }", "public function register()\n {\n // Nothing is registered at this time\n }", "public function register()\r\n {\r\n //\r\n }", "public function register()\r\n {\r\n //\r\n }", "public function register()\r\n {\r\n //\r\n }", "public function register()\r\n {\r\n //\r\n }", "public function register()\n {\n //\n\t\t\n }", "public function register()\n {\n $this->registerFinite();\n }", "public function register()\n {\n }", "public function register()\r\n {\r\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n \n }", "public function register()\n {\n \n }", "public function register()\n {\n $this->assignment_tokens = \\Dekode\\GravityForms\\Vendor\\PHP_CodeSniffer\\Util\\Tokens::$assignmentTokens;\n unset($this->assignment_tokens[\\T_DOUBLE_ARROW]);\n $starters = \\Dekode\\GravityForms\\Vendor\\PHP_CodeSniffer\\Util\\Tokens::$booleanOperators;\n $starters[\\Dekode\\GravityForms\\Vendor\\T_SEMICOLON] = \\Dekode\\GravityForms\\Vendor\\T_SEMICOLON;\n $starters[\\Dekode\\GravityForms\\Vendor\\T_OPEN_PARENTHESIS] = \\Dekode\\GravityForms\\Vendor\\T_OPEN_PARENTHESIS;\n $starters[\\Dekode\\GravityForms\\Vendor\\T_INLINE_ELSE] = \\Dekode\\GravityForms\\Vendor\\T_INLINE_ELSE;\n $this->condition_start_tokens = $starters;\n return array(\\T_IF, \\T_ELSEIF, \\T_FOR, \\T_SWITCH, \\T_CASE, \\T_WHILE, \\Dekode\\GravityForms\\Vendor\\T_INLINE_THEN);\n }", "public function register()\n {\n $tokens = parent::register();\n $tokens[] = T_ECHO;\n return $tokens;\n\n }", "public function register()\r\n {\r\n \r\n }", "public function register() {\n\t}", "public function register() {\n //\n }", "public function register()\n { \n \n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }" ]
[ "0.6339625", "0.6269645", "0.6247827", "0.6196842", "0.6196842", "0.6196842", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.61084336", "0.6104712", "0.6102213", "0.6102213", "0.6102213", "0.60836416", "0.60836416", "0.60836416", "0.6047151", "0.60437787", "0.60437787", "0.60437787", "0.60437787", "0.60290015", "0.6009898", "0.6009662", "0.6009662", "0.6009662", "0.6009662", "0.6009662", "0.6009662", "0.6009662", "0.6009662", "0.60063446", "0.59934473", "0.59934473", "0.59934473", "0.59934473", "0.59934473", "0.59917647", "0.5982151", "0.5972188", "0.59713525", "0.59713525", "0.59713525", "0.59713525", "0.59389824", "0.593185", "0.593185", "0.593185", "0.593185", "0.593185", "0.5911503", "0.58995324", "0.58948606", "0.58842975", "0.5863758", "0.5863758", "0.5852466", "0.5852466", "0.5852466", "0.5852466", "0.5839049", "0.58373135", "0.58222914", "0.5821764", "0.581502", "0.58143955", "0.58143955", "0.581163", "0.581163", "0.58056056", "0.58014745", "0.57965857", "0.5785191", "0.5742836", "0.57348377", "0.5729226", "0.5729226", "0.5729226", "0.5729226", "0.5729226", "0.5729226" ]
0.0
-1
end process() Processes a singleline array definition.
abstract protected function processSingleLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd, $indices);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function processMultiLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd, $indices);", "private function returnPlainArray($line) {\n\t//--\n\treturn $this->_toType($line);\n\t//--\n}", "abstract public function definition(): array;", "public function process(array $event);", "abstract protected function process();", "abstract protected function process();", "abstract protected function process();", "abstract protected function process();", "function process() ;", "abstract protected function _process();", "abstract protected function _process();", "abstract public function process();", "abstract public function process();", "abstract public function process();", "function process() {\r\n }", "protected abstract function process();", "public function parseFromArray()\n {\n $this->value = $this->reader->next();\n }", "public abstract function process();", "private function returnArrayElement($line) {\n\t//--\n\tif(strlen($line) <= 1) {\n\t\treturn array(array()); // weird ...\n\t} //end if\n\t//--\n\t$array = array();\n\t$value = trim(substr($line, 1));\n\t$value = $this->_toType($value);\n\t$array[] = $value;\n\t//--\n\treturn $array;\n\t//--\n}", "public function process();", "public function process();", "public function process();", "public function process();", "public function parse()\n {\n $raw = $this->getRaw();\n $count = count($raw);\n for ($i = 7; $i < $count; $i++) {\n $line = $raw[$i];\n\n $process = new Process(\n $line[11],\n $line[0],\n floatval($line[8]),\n floatval($line[9])\n );\n\n $this->processes[] = $process;\n }\n }", "public function processParameterless()\n {\n $this->process([]);\n }", "private function isPlainArray($line) {\n\t//--\n\treturn (($line[0] == '[') && (substr($line, -1, 1) == ']'));\n\t//--\n}", "public function process(array $arguments): array;", "public static function process() {}", "abstract public function parseInput(array $input): array;", "public function getProcessedData(): object|array;", "abstract protected function inputs(): array;", "public function aArray() {}", "function process($value);", "public function ParseFromArray() {\n $this->value = $this->reader->next();\n $this->clean();\n }", "private function process_array($value) {\n return is_array($value);\n }", "private function processline($line)\n {\n\t\t\t\t\t//save data from parsed inputstring to array\n\t\t\t\t\t$productname=$line[1];\n\t\t\t\t\t$object=Fetcher::fetchOne(\"Product\",array('name'=>'\"'.$productname.'\"'));\n\t\t\t\t\t$producttype=$this->main->producttypedata->items[$line[3]][\"object\"];\n\t\t\t\t\t\n\t\t\t\t\t$this->hydrate($productname, $line, $object, $producttype);\n }", "function processData() ;", "private function _parseLine($line) {\n\t//--\n\tif(!$line) {\n\t\treturn array();\n\t} //end if\n\t//--\n\t$line = trim($line);\n\t//--\n\tif(!$line) {\n\t\treturn array();\n\t} //end if\n\t//--\n\t$array = array();\n\t//--\n\t$group = $this->nodeContainsGroup($line);\n\tif($group) {\n\t\t$this->addGroup($line, $group);\n\t\t$line = $this->stripGroup ($line, $group);\n\t} //end if\n\t//--\n\tif($this->startsMappedSequence($line)) {\n\t\treturn $this->returnMappedSequence($line);\n\t} //end if\n\tif($this->startsMappedValue($line)) {\n\t\treturn $this->returnMappedValue($line);\n\t} //end if\n\tif($this->isArrayElement($line)) {\n\t\treturn $this->returnArrayElement($line);\n\t} //end if\n\tif($this->isPlainArray($line)) {\n\t\treturn $this->returnPlainArray($line);\n\t} //end if\n\t//--\n\treturn $this->returnKeyValuePair($line);\n\t//--\n}", "public function processDatamap_postProcessFieldArray($status, $table, $id, &$fieldArray, &$reference) {\n\t\t$this->handleCommand($status, $table, $id);\n\t}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "public function normalizeData() : array;", "function procInstrArray($lineSplit) {\n\t$lineSplit[6] = mysql_real_escape_string($lineSplit[6]);\n\t$lineSplit[7] = mysql_real_escape_string($lineSplit[7]);\n\treturn $lineSplit;\n}", "public function process($data);", "function procClassArray($lineSplit) {\n\t$lineSplit[7] = mysql_real_escape_string($lineSplit[7]);\t// Class title\n\t$lineSplit[22] = mysql_real_escape_string($lineSplit[22]);\t// Class description\n\tpreg_match('/(\\d)+\\.\\d\\d/', $lineSplit[10], $match);\n\t$lineSplit[14] = $match[1];\n\treturn $lineSplit;\n}", "public function parseLine(string $line): array;", "public function getProcessedElements(): array;", "#[ArrayShape(['label' => \"array|string\"])]\n public function definition(): array\n {\n $array = [\n 'label' => 'Check installation',\n 'menu_code' => 'my-space-installer',\n 'package' => 'my-space',\n 'route' => 'setup.installation.my-space',\n 'is_active' => true\n ];\n return $array;\n }", "function yy_r150(){ $this->_retvalue = 'array('.$this->yystack[$this->yyidx + -1]->minor.')'; }", "public function processData() {}", "public function process() {}", "public function process() {}", "public function process() {}", "public function process() {}", "public function testProcessReturnsArrayOfArraysContainingSingleTestDataContainerInstance(string $json): void\n {\n $dataProcessor = new WrapperDataProcessor();\n\n $processed = $dataProcessor->process($json);\n\n $result = true;\n foreach ($processed as $value) {\n $result = $result && is_array($value) && (1 === count($value)) &&\n ($value[0] instanceof TestDataContainer);\n }\n static::assertTrue($result, 'Process should return array of arrays with single element');\n }", "protected function process()\n {}", "public function process() {\n }", "public function process() {\n }", "public function process() {\n }", "public function setParsedInput(array $input);", "public function process()\n {\n\n }", "public function doProcessData() {}", "public function maker(): array;", "public function parse(array $description);", "public function processField($arr){\n\t\t$return = array();\n\t\t$parts = explode(',', $arr);\n\t\t$seq = 0;\n\t\tfor($i=0; $i<count($parts); $i++){\n\t\t\tif('blank' == substr($parts[$i],0,5)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tlist(,$list) = explode('_', $parts[$i])\t;\n\t\t\t//$list = str_replace('item_', '',$parts[$i]);\n\t\t\tlist($type, $fieldId) = explode('-',$list);\n\t\t\t$return[$type][$fieldId] = \tintval($seq);\n\t\t\t$seq++;\n\t\t}\n\n\t\treturn $return;\n\t}", "function qa_post_array($field)\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\tif (!isset($_POST[$field]) || !is_array($_POST[$field])) {\n\t\treturn null;\n\t}\n\n\t$result = array();\n\tforeach ($_POST[$field] as $key => $value)\n\t\t$result[$key] = preg_replace('/\\r\\n?/', \"\\n\", trim(qa_gpc_to_string($value)));\n\n\treturn $result;\n}", "public function process(array $processRequests);", "public function process(ParserInterface $parser, string $file, array $data): array;", "abstract public function get__do_process ( $data );", "public function parse(array $source, array $definitions);", "protected function _postarray($output) { \n return $output; \n }", "public function parse() {\n\t\t$pointer = 0;\n\t\t$ar_line = array();\n\n\t\tforeach ($this->structure as $key => $length) {\n\t\t\t$ar_line[$key] = trim(substr($this->line, $pointer, $length), \"\\n\\r \");\n\t\t\t$pointer += $length;\n\t\t}\n\t\t$ar_line['stamp'] = md5(serialize($ar_line));\n\n\t\tif ($this->return == 'array') {\n\t\t\treturn $ar_line;\n\t\t}\n\t\treturn (object) $ar_line;\n\t}", "public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)\n {\n $tokens = $phpcsFile->getTokens();\n $arrayStart = DWS_Helpers_Bracket::bracketStart($phpcsFile, $stackPtr);\n $arrayEnd = DWS_Helpers_Bracket::bracketEnd($phpcsFile, $stackPtr);\n\n if (!in_array($arrayStart, [$stackPtr, $stackPtr + 1])) {\n $phpcsFile->addError('No whitespace allowed between the array keyword and the opening parenthesis', $stackPtr, 'SpaceAfterKeyword');\n }\n\n $firstMember = $phpcsFile->findNext(T_WHITESPACE, $arrayStart + 1, $arrayEnd, true);\n if ($firstMember === false && $arrayEnd - $arrayStart !== 1) {\n $phpcsFile->addError('Empty array declaration must have no space between the brackets', $stackPtr, 'SpaceInEmptyArray');\n }\n }", "public function __invoke() : array;", "public function __invoke() : array;", "public function output(): array;", "public function convertPlainArrayToTypoScriptArrayTestdata() {}", "function process_data($data) {\n }", "public function process(array $files);", "private function isArrayElement($line) {\n\t//--\n\tif(!$line) {\n\t\treturn false;\n\t} //end if\n\t//--\n\tif($line[0] != '-') {\n\t\treturn false;\n\t} //end if\n\t//--\n\tif(strlen($line) > 3) {\n\t\tif(substr($line, 0, 3) == '---') {\n\t\t\treturn false;\n\t\t} //end if\n\t} //end if\n\t//--\n\treturn true;\n\t//--\n}", "abstract function extract(): array;", "private function returnMappedValue($line) {\n\t//--\n\t$array = array();\n\t$key = $this->unquote(trim(substr($line, 0, -1)));\n\t$array[$key] = '';\n\t//--\n\treturn $array;\n\t//--\n}", "public function process($value);", "public function processArray($input){\n\t\tforeach (static::$columns as $column) {\n\t\t\tif(isset($input[$column])){\n\t\t\t\t$this->$column = $input[$column];\n \t\t\t}\n\t\t}\n\t}", "public function beforeCompile(): ?array;", "public function read(): array;", "public function process(): \\Generator;", "function pg_array_parse($array, $asText = true) {\n $s = $array;\n if ($asText) {\n $s = str_replace(\"{\", \"array('\", $s);\n $s = str_replace(\"}\", \"')\", $s); \n $s = str_replace(\",\", \"','\", $s); \n } else {\n $s = str_replace(\"{\", \"array(\", $s);\n $s = str_replace(\"}\", \")\", $s);\n }\n\t$ss = \"\\$retval = $s;\";\n eval($ss);\n\treturn $retval;\n}", "abstract protected function _preProcess();", "static function Process($itemID,$reqData) { return array(); }", "public function processAll();", "static function readArray($inputs, $flag = 1)\n\t{\n\t\t$result = array();\n\t\tforeach($inputs as $input) {\n\t\t\t$element = self::readNummer($input); \n\t\t\tif($element->isException()) {self::handleException($element, $result, $flag); }\n\t\t\telse \n\t\t\t\t$result[] = $element;\t\n\t\t}\n\t\treturn $result;\n\t}", "abstract public function getArray();", "public static function process(array &$response)\r\n {\r\n if ( ! isset($_GET['fields']) || empty($response))\r\n {\r\n return;\r\n }\r\n\r\n $fields = explode(',', $_GET['fields']);\r\n\r\n $temporaryResponse = [];\r\n\r\n foreach ($response as &$entry)\r\n {\r\n $temporaryEntry = [];\r\n\r\n foreach ($fields as $field)\r\n {\r\n $field = trim($field);\r\n if (isset($entry[$field]))\r\n {\r\n $temporaryEntry[$field] = $entry[$field];\r\n }\r\n }\r\n\r\n $temporaryResponse[] = $temporaryEntry;\r\n }\r\n\r\n $response = $temporaryResponse;\r\n }", "public static function pre_process() {}", "protected function processArrayArgument($val, $option) {\n\t\tif ('@' == $val[0]) {\n\t\t\t$val = file(substr($val, 1), FILE_IGNORE_NEW_LINES);\n\t\t}\n\n\t\tif (is_string($val)) {\n\t\t\t$val = [ $val ];\n\t\t}\n\n\t\treturn $val;\n\t}", "function yy_r156()\n {\n $this->_retvalue = 'array(' . $this->yystack[$this->yyidx + - 1]->minor . ')';\n }", "public function getDefinition(): array;" ]
[ "0.5833234", "0.578845", "0.5637359", "0.54452986", "0.5385143", "0.5385143", "0.5385143", "0.5385143", "0.5369", "0.53541183", "0.53541183", "0.5309428", "0.5309428", "0.5309428", "0.5281433", "0.525203", "0.5249123", "0.5181106", "0.5166805", "0.5131105", "0.5131105", "0.5131105", "0.5131105", "0.5099173", "0.5090796", "0.5071093", "0.5058449", "0.5048863", "0.50409305", "0.50330037", "0.5025934", "0.50182766", "0.50131273", "0.5002799", "0.50006264", "0.49623492", "0.49152026", "0.48901126", "0.48632324", "0.48494372", "0.48494372", "0.48494372", "0.48494372", "0.4842321", "0.48121572", "0.48070195", "0.47852603", "0.47753283", "0.47675738", "0.47596073", "0.47464895", "0.47288644", "0.47189078", "0.47178864", "0.47178864", "0.47178864", "0.47043455", "0.46746045", "0.46656016", "0.46656016", "0.46656016", "0.46635726", "0.4651706", "0.46436015", "0.46284392", "0.4626373", "0.46221608", "0.4619803", "0.46142092", "0.46134573", "0.4610704", "0.4602895", "0.46022388", "0.46003178", "0.45890722", "0.4581977", "0.4581977", "0.45496932", "0.45496207", "0.45409966", "0.4540828", "0.4533044", "0.45310003", "0.45249602", "0.45190808", "0.45186502", "0.45183447", "0.45113638", "0.4506574", "0.4506456", "0.44954082", "0.44876003", "0.4482458", "0.4480322", "0.44718826", "0.4471762", "0.44698292", "0.4446957", "0.44422007", "0.44404265" ]
0.65887547
0
Processes a multiline array definition.
abstract protected function processMultiLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd, $indices);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function processSingleLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd, $indices);", "public function testMultiline()\n {\n $doc = <<<DOC\n/**\n * Summery should be ignored.\n *\n * General description\n * spanning a few lines\n * of doc-comment. Should be ignored.\n *\n * @bar Some\n * bar value.\n * @foo This one\n * also has multiline\n * value.\n * @qux Single line value\n */\nDOC;\n $expected = [\n 'bar' => 'Some bar value.',\n 'foo' => 'This one also has multiline value.',\n 'qux' => 'Single line value'\n ];\n\n $this->tags['bar']->expects($this->once())->method('process')->with([], 'Some bar value.')->willReturn(['bar' => 'Some bar value.']);\n $this->tags['foo']->expects($this->once())->method('process')->with(['bar' => 'Some bar value.'], 'This one also has multiline value.')->willReturn([\n 'bar' => 'Some bar value.',\n 'foo' => 'This one also has multiline value.'\n ]);\n $this->tags['qux']->expects($this->once())->method('process')->with([\n 'bar' => 'Some bar value.',\n 'foo' => 'This one also has multiline value.'\n ], 'Single line value')->willReturn($expected);\n\n $result = $this->parser->parse($doc);\n\n $this->assertSame($expected, $result);\n }", "protected function parseArray($lines) {\n $recordset = array();\n\n // Do any cleaning and normalizing.\n $this->cleanData($lines);\n\n $record = array();\n $lastTag = NULL;\n foreach ($lines as $line) {\n $line = trim($line);\n $matches = array();\n\n preg_match(self::LINE_REGEX, $line, $matches);\n if (!empty($matches[3])) {\n $lastTag = $matches[2];\n $record[$matches[2]][] = trim($matches[3]);\n }\n // End record and prep a new one.\n elseif (!empty($matches[2]) && $matches[2] == 'ER') {\n $lastTag = NULL;\n $recordset[] = $record;\n $record = array();\n }\n elseif (!empty($matches[4])) {\n // Append to the last one.\n // We skip leading info (like BOMs).\n if (!empty($lastTag)) {\n $lastEntry = count($record[$lastTag]) - 1;\n // We trim because some encoders add tabs or multiple spaces.\n // Standard is silent on how this should be handled.\n $record[$lastTag][$lastEntry] .= ' ' . trim($matches[4]);\n }\n }\n }\n if (!empty($record)) $recordset[] = $record;\n\n $this->data = $recordset;\n }", "public function isMultiline() {}", "public function setMultiline($multiline = true) {}", "public function isArrayMultiLine(int $index): bool\n {\n if (!$this->isArray($index)) {\n throw new \\InvalidArgumentException(sprintf('Not an array at given index %d.', $index));\n }\n\n $tokens = $this->tokens;\n\n // Skip only when it's an array, for short arrays we need the brace for correct\n // level counting\n if ($tokens[$index]->isGivenKind(T_ARRAY)) {\n $index = $tokens->getNextMeaningfulToken($index);\n }\n\n return $this->isBlockMultiline($tokens, $index);\n }", "private function isPlainArray($line) {\n\t//--\n\treturn (($line[0] == '[') && (substr($line, -1, 1) == ']'));\n\t//--\n}", "abstract public function definition(): array;", "public function testGetLinesFromFileReturnsArrayWithLines(): void\n {\n $tmpfile = (string) tempnam(sys_get_temp_dir(), 'browscaptest');\n\n $in = <<<'HERE'\n; comment\n\n[test]\ntest=test\nHERE;\n\n file_put_contents($tmpfile, $in);\n\n $parser = new IniParser($tmpfile);\n\n $out = $parser->getLinesFromFile();\n\n unlink($tmpfile);\n\n $expected = [\n '; comment',\n '[test]',\n 'test=test',\n ];\n\n self::assertSame($expected, $out);\n }", "public function getLinesToArray($multilines){\n $arrayTmp = array();\n $array = array();\n \n $arrayTmp = explode(\"\\n\", $multilines);\n foreach($array AS $item){\n $array[] = ereg_replace(\"[[:cntrl:]]\", \"\", $item);\n }\n return $array;\n }", "function inline($line){\n \n $line = $this->premark_inline($line);\n \n //echo $line,\"\\n\";\n $line = preg_split('/\\{\\@MARK\\@([a-z0-9]+)_(.+?)_\\@KRAM\\@\\}/', $line, -1, PREG_SPLIT_DELIM_CAPTURE);\n //print_r($line);\n \n foreach($line as $k=>$v){\n switch($k%3){\n case 0:\n $this->part[] = array(DOC_CODE_TEXT,$v);\n break;\n \n case 1:\n $cmd = $v;\n break;\n \n case 2:\n $this->part[] = array(DOC_CODE_INLINE,$cmd,$v);\n break;\n }\n }\n }", "public function dataNormalizeLineEndings() {\n\t\treturn [\n\t\t\t'already-lf' => [ \"foo\\n\\nbar\\n\", \"foo\\n\\nbar\\n\" ],\n\t\t\t'windows-crlf' => [ \"foo\\r\\n\\r\\nbar\\r\\n\", \"foo\\n\\nbar\\n\" ],\n\t\t\t'old-mac-cr-only' => [ \"foo\\r\\rbar\\r\", \"foo\\n\\nbar\\n\" ],\n\t\t\t'reversed-manual-input' => [ \"foo\\n\\r\\n\\rbar\\n\\r\", \"foo\\n\\n\\nbar\\n\\n\" ],\n\t\t];\n\t}", "public function parseLines(array $rawLines = array())\n\t{\n\t\t$this->_currLine = 0;\n\t\t$this->_lines = $this->removeEmptyLines($rawLines);\n\t\t$rootNode = new RootNode();\n\t\t$rootNode->setCompiler($this);\n\t\t$rootNode->setLineNumber(0);\n\t\t$nodeFactory = $this->_hamlphp->getNodeFactory();\n\t\t\n\t\tfor($len = count($this->_lines); $this->_currLine < $len; ++$this->_currLine)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$rootNode->addNode($nodeFactory->createNode($this->_lines[$this->_currLine], $this->_currLine, $this));\n\t\t\t}\n\t\t\tcatch(Exception $e)\n\t\t\t{\n\t\t\t\t$line = isset($rawLines[$this->_currLine]) ? $rawLines[$this->_currLine] : isset($rawLines[$this->_currLine-1]) ? $rawLines[$this->_currLine-1] : \"UNKNOWN\";\n\t\t\t\tthrow new SyntaxErrorException(\"Error parsing line:\\n{$line}\\n\" . $e->getMessage(), $e->getCode());\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $rootNode->render();\n\t}", "private function returnPlainArray($line) {\n\t//--\n\treturn $this->_toType($line);\n\t//--\n}", "public function setLines( mixed $lines );", "public function isMultiLine(): bool;", "function getLines()\n\t{\n\t\t//echo 'font file = ' . $this->calculateFontFile() . ' ' . $this->textFont . '<br>';\n\t\tif(isset($this->lines) && $this->width == $this->lines[\"width\"] && $this->textSize == $this->lines[\"textSize\"])\n\t\t{\n\t\t\treturn $this->lines;\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$rawPars = explode(\"\\r\\n\", $this->contents);\n\t\t\t\n\t\t\t//\tgo through each paragraph and find the line breaks\n\t\t\t//\t\twhen we're done we should have an array processed\n\t\t\t//\t\tparagraphs. Each paragraph should be an array of \n\t\t\t//\t\tlines.\n\t\t\t//echo \"the font it is selecting \" . $this->calculateFontFile() . '<br>';\n\t\t\t$this->pdf->selectFont($this->calculateFontFile());\n\t\t\t$lines = array();\n\t\t\t$lines2 = array();\n\t\t\t$lines[\"longest\"] = 0;\n\t\t\t$lines[\"width\"] = $this->width;\n\t\t\t$lines[\"textSize\"] = $this->textSize;\n\t\t\tif(strlen($this->contents) == 1)\n\t\t\t{\n\t\t\t\t$lines[\"longest\"] = $this->pdf->getTextWidth($this->textSize, $this->contents);\n\t\t\t\t$lines[\"length\"][] = $lines[\"longest\"];\n\t\t\t\t$lines[\"text\"][] = $this->contents;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twhile( list($parNum, $thisPar) = each($rawPars) )\n\t\t\t\t{\n\t\t\t\t\t//\tinit your data\n\n\t\t\t\t\t$len = strlen($thisPar);\n\t\t\t\t\t$last = $len - 1;\n\t\t\t\t\t$lastEnd = -1;\n\t\t\t\t\t$curStart = 0;\n\t\t\t\t\t$curLen = 0;\n\n\t\t\t\t\tif( strlen($thisPar) == 0 )\n\t\t\t\t\t{\n\t\t\t\t\t\t$lines[\"text\"][] = \"\";\n\t\t\t\t\t\t$lines[\"length\"][] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor($i = 1; $i < $len; $i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t//\tif we are at a breaking point.\n\t\t\t\t\t\t//\t\ta breaking point is either\n\t\t\t\t\t\t//\t\t\ta real char before a space or\n\t\t\t\t\t\t//\t\t\tthe last char in the string\n\n\t\t\t\t\t\tif( (($thisPar[$i] == \" \") && ($thisPar[$i - 1] != \" \")) || ($i == $last) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$word = substr($thisPar, $lastEnd + 1, ($i) - $lastEnd);\n\n\t\t\t\t\t\t\t$wordLen = ($this->pdf->getTextWidth($this->textSize, $word));\n\n\t\t\t\t\t\t\t//\tdid we find a line break yet\n\n\t\t\t\t\t\t\tif($i == $last)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif( $curLen + $wordLen > $this->width )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$line = substr($thisPar, $curStart, $lastEnd - $curStart + 1);\n\n\t\t\t\t\t\t\t\t\t$lines[\"text\"][] = $line;\n\t\t\t\t\t\t\t\t\t$lines[\"length\"][] = $curLen;\n\t\t\t\t\t\t\t\t\tif($curLen > $lines[\"longest\"])\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$lines[\"longest\"] = $curLen;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$line = substr($thisPar, $lastEnd + 1, $i - $lastEnd);\n\t\t\t\t\t\t\t\t\t$word = trim($word);\n\t\t\t\t\t\t\t\t\t$this->pdf->getTextWidth($this->textSize, $word);\n\n\t\t\t\t\t\t\t\t\t$lines[\"text\"][] = $line;\n\t\t\t\t\t\t\t\t\t$lines[\"length\"][] = $wordLen;\n\t\t\t\t\t\t\t\t\tif($wordLen > $lines[\"longest\"])\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$lines[\"longest\"] = $wordLen;\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\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$line = substr($thisPar, $curStart, $i - $curStart + 1);\n\t\t\t\t\t\t\t\t\t$lines[\"text\"][] = $line;\n\t\t\t\t\t\t\t\t\t$lines[\"length\"][] = $curLen + $wordLen;\n\t\t\t\t\t\t\t\t\tif($curLen + $wordLen > $lines[\"longest\"])\n\t\t\t\t\t\t\t\t\t\t$lines[\"longest\"] = $curLen + $wordLen;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if( $curLen + $wordLen > $this->width )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$line = substr($thisPar, $curStart, $lastEnd - $curStart + 1);\n\t\t\t\t\t\t\t\t$lines[\"text\"][] = $line;\n\t\t\t\t\t\t\t\t$lines[\"length\"][] = $curLen;\n\t\t\t\t\t\t\t\tif($curLen > $lines[\"longest\"])\n\t\t\t\t\t\t\t\t\t$lines[\"longest\"] = $curLen;\n\n\t\t\t\t\t\t\t\t$curLen = $wordLen;\n\t\t\t\t\t\t\t\t$curStart = $lastEnd + 1;\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$curLen += $wordLen;\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t$lastEnd = $i;\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->lines = $lines;\n\t\t\t//$this->pdf->selectFont(ZOOP_DIR . \"/pdf/fonts/Helvetica-Bold.afm\");\n\t\t\t//echo_r($lines);\n\t\t\t//echo 'font = ' . $this->textFont . ' bold = ' . ($this->bold ? 1 : 0) . ' italics = ' . ($this->italics ? 1 : 0) . ' size = ' . $this->textSize . ' ' . $this->bold . ' ' . $this->bold . '<br>';\n\t\t\t//echo 'true length = ' . $this->pdf->getTextWidth($this->textSize, 'asdfkla sdfklasdfjlkas;dfgj aslkfj alkw[sfjeoifjsa fi;awesfil;ifas efjilse;filaws eji iiiiiiiiiiiiiii') . '<br>';\n\t\t\treturn $this->lines;\n\t\t}\n\t}", "public function setMultiline($value)\n {\n $this->multiline = $value;\n }", "public function addLines( mixed $lines );", "public function setLineItems(array $line_items);", "private function isArrayElement($line) {\n\t//--\n\tif(!$line) {\n\t\treturn false;\n\t} //end if\n\t//--\n\tif($line[0] != '-') {\n\t\treturn false;\n\t} //end if\n\t//--\n\tif(strlen($line) > 3) {\n\t\tif(substr($line, 0, 3) == '---') {\n\t\t\treturn false;\n\t\t} //end if\n\t} //end if\n\t//--\n\treturn true;\n\t//--\n}", "public function parseFromArray()\n {\n $this->value = $this->reader->next();\n }", "public function getBodyLines() : array\n {\n return $this->lineCount < 3 ? [] : array_slice($this->lines, 2);\n }", "protected function _explodeToLines($value, $layoutType = self::ONE_COLUMN_LAYOUT)\r\n {\r\n $valueLines = array();\r\n if ($layoutType == self::ONE_COLUMN_LAYOUT) {\r\n $lineLength = 85;\r\n } else {\r\n $lineLength = 50;\r\n }\r\n\r\n $value['value'] = preg_replace('/<br[^>]*>/i', \"\\n\", $value['value']);\r\n $value['value'] = explode(\"\\n\", $value['value']);\r\n foreach ($value['value'] as $valueLine) {\r\n foreach (Mage::helper('core/string')->str_split($valueLine, $lineLength, true, true) as $preparedValueLine) {\r\n $valueLines[] = array(\r\n 'value' => $preparedValueLine,\r\n 'type' => $value['type'],\r\n );\r\n }\r\n }\r\n\r\n return $valueLines;\r\n }", "protected function customFormatLines(array $lines, int $op): array\n {\n if (!$this->changesAreRaw) {\n return $lines;\n }\n\n static $closureMap = [\n SequenceMatcher::OP_DEL => RendererConstant::HTML_CLOSURES_DEL,\n SequenceMatcher::OP_INS => RendererConstant::HTML_CLOSURES_INS,\n ];\n\n $lines = $this->formatLines($lines);\n\n $htmlClosures = $closureMap[$op] ?? null;\n\n foreach ($lines as &$line) {\n if ($htmlClosures) {\n $line = str_replace(RendererConstant::HTML_CLOSURES, $htmlClosures, $line);\n }\n // fixes https://github.com/jfcherng/php-diff/issues/34\n $line = str_replace(\"\\r\\n\", \"\\n\", $line);\n }\n\n return $lines;\n }", "public function parse() {\n\t\t$pointer = 0;\n\t\t$ar_line = array();\n\n\t\tforeach ($this->structure as $key => $length) {\n\t\t\t$ar_line[$key] = trim(substr($this->line, $pointer, $length), \"\\n\\r \");\n\t\t\t$pointer += $length;\n\t\t}\n\t\t$ar_line['stamp'] = md5(serialize($ar_line));\n\n\t\tif ($this->return == 'array') {\n\t\t\treturn $ar_line;\n\t\t}\n\t\treturn (object) $ar_line;\n\t}", "protected function _getLines() {}", "private function calculate_lines_mixed(){\n\n\t\t$single_lines = min($this->female_count, $this->male_count, $this->event->single_women_lines, $this->event->single_men_lines);\n\t\t$women_left_after_singles = $this->female_count - $single_lines;\n\t\t$men_left_after_singles = $this->male_count - $single_lines;\n\t\t$most_of_gender_available_for_doubles = min($women_left_after_singles, $men_left_after_singles);\n\t\t$extra_women = $women_left_after_singles - $most_of_gender_available_for_doubles;\n\t\t$extra_men = $men_left_after_singles - $most_of_gender_available_for_doubles;\n\t\t$double_lines = floor($most_of_gender_available_for_doubles / 2);\n\t\t$this->total_lines = $single_lines + $double_lines;\n\t\t$women_and_men_left_after_doubles = $most_of_gender_available_for_doubles % 2;\n\t\t$additional_women = $extra_women + $women_and_men_left_after_doubles;\n\t\t$additional_men = $extra_men + $women_and_men_left_after_doubles;\n\t\t$this->per_team_lines = array(array(\n\t\t\t'total_teams' => 1,\n\t\t\t'women_lines' => '-',\n\t\t\t'men_lines' => '-',\n\t\t\t'additional_women' => $additional_women,\n\t\t\t'additional_men' => $additional_men,\n\t\t\t'comb_lines' => '-',\n\t\t\t'total_lines' => $this->total_lines,\n\t\t\t'additional_players' => $additional_women + $additional_men,\n\t\t\t'mixed_singles' => $single_lines,\n\t\t\t'mixed_doubles' => $double_lines\n\t ), array(\n\t \t'total_teams' => 2\n\t\t), array(\n\t \t'total_teams' => 4\n\t\t), array(\n\t \t'total_teams' => 6\n\t\t), array(\n\t \t'total_teams' => 8\n\t\t), array(\n\t \t'total_teams' => 9\n\t\t), array(\n\t \t'total_teams' => 16\n\t\t), array(\n\t \t'total_teams' => 25\n\t\t));\n\n\t}", "public function parse(array $source, array $definitions);", "public function convert()\n\t{\n\t\t$lines = explode(PHP_EOL, $this->string);\n\n\t\tarray_shift($lines);\n\n\t\t$labels = explode(self::INLINE_SEPARATOR, $lines[0]);\n\t\t$labelledMultiLineDo = new LabelledMultiLineDo();\n\t\t$labelledMultiLineDo->setLabels($labels);\n\n\t\tarray_shift($lines);\n\t\tforeach ($lines as $line) {\n\t\t\t$dataRow = explode(self::INLINE_SEPARATOR, $line);\n\t\t\tif (count($dataRow) != count($labels))\n\t\t\t{\n\t\t\t\tthrow new LabelAndDataMismatchException();\n\t\t\t}\n\t\t\t$labelledMultiLineDo->appendDataRow($dataRow);\n\t\t}\n\n\t\treturn $labelledMultiLineDo;\n\t}", "public function parseLine(string $line): array;", "public function readLines();", "public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) {\n\t\t$tokens = $phpcsFile->getTokens();\n\t\t$arrayStart = $tokens[$stackPtr]['bracket_opener'];\n\t\t$arrayEnd = $tokens[$arrayStart]['bracket_closer'];\n\n\t\t// Check for empty arrays.\n\t\t$content = $phpcsFile->findNext([T_WHITESPACE], ($arrayStart + 1), ($arrayEnd + 1), true);\n\t\tif ($content === $arrayEnd) {\n\t\t\t// Empty array, but if the brackets aren't together, there's a problem.\n\t\t\tif (($arrayEnd - $arrayStart) !== 1) {\n\t\t\t\t$error = 'Empty array declaration must have no space between the brackets.';\n\t\t\t\t$fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceInEmptyArray');\n\t\t\t\tif ($fix === true) {\n\t\t\t\t\t$phpcsFile->fixer->beginChangeset();\n\n\t\t\t\t\tfor ($i = ($arrayStart + 1); $i < $arrayEnd; $i++) {\n\t\t\t\t\t\t$phpcsFile->fixer->replaceToken($i, '');\n\t\t\t\t\t}\n\n\t\t\t\t\t$phpcsFile->fixer->endChangeset();\n\t\t\t\t}\n\n\t\t\t\t// We can return here because there is nothing else to check. All code\n\t\t\t\t// below can assume that the array is not empty.\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t$lastItem = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($arrayEnd - 1), $stackPtr, true);\n\n\t\t// Empty array.\n\t\tif ($lastItem === $arrayStart) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Inline array.\n\t\t$isInlineArray = $tokens[$arrayStart]['line'] === $tokens[$arrayEnd]['line'];\n\n\t\t// Check if the last item in a multiline array has a \"closing\" comma.\n\t\tif ($tokens[$lastItem]['code'] !== T_COMMA && $isInlineArray === false) {\n\t\t\t$error = 'A comma must follow the last multiline array item.';\n\t\t\t$fix = $phpcsFile->addFixableError($error, $lastItem, 'NoLastComma');\n\t\t\tif ($fix === true) {\n\t\t\t\t$phpcsFile->fixer->beginChangeset();\n\t\t\t\t$phpcsFile->fixer->addContent($lastItem, ',');\n\t\t\t\t$phpcsFile->fixer->endChangeset();\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tif ($isInlineArray === true) {\n\t\t\tif ($tokens[$lastItem]['code'] === T_COMMA) {\n\t\t\t\t$error = 'Comma not allowed after last value in single-line array declaration';\n\t\t\t\t$fix = $phpcsFile->addFixableWarning($error, $lastItem, 'LastComma');\n\t\t\t\tif ($fix === true) {\n\t\t\t\t\t$phpcsFile->fixer->beginChangeset();\n\t\t\t\t\t$phpcsFile->fixer->replaceToken($lastItem, '');\n\t\t\t\t\t$phpcsFile->fixer->endChangeset();\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Inline array must not have spaces within brackets.\n\t\t\tif ($content !== ($arrayStart + 1)) {\n\t\t\t\t$error = 'Space found after opening bracket of array';\n\t\t\t\t$fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterOpen');\n\t\t\t\tif ($fix === true) {\n\t\t\t\t\t$phpcsFile->fixer->beginChangeset();\n\n\t\t\t\t\tfor ($i = ($arrayStart + 1); $i < $content; $i++) {\n\t\t\t\t\t\t$phpcsFile->fixer->replaceToken($i, '');\n\t\t\t\t\t}\n\n\t\t\t\t\t$phpcsFile->fixer->endChangeset();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($lastItem !== ($arrayEnd - 1)) {\n\t\t\t\t$error = 'Space found before closing bracket of array';\n\t\t\t\t$fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeClose');\n\t\t\t\tif ($fix === true) {\n\t\t\t\t\t$phpcsFile->fixer->beginChangeset();\n\n\t\t\t\t\tfor ($i = ($lastItem + 1); $i < $arrayEnd; $i++) {\n\t\t\t\t\t\t$phpcsFile->fixer->replaceToken($i, '');\n\t\t\t\t\t}\n\n\t\t\t\t\t$phpcsFile->fixer->endChangeset();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected function parse(): void\n {\n $lines = preg_split('/\\r\\n|\\r|\\n/', $this->content);\n\n foreach ($lines as $line) {\n if (mb_strlen(trim($line)) && ! (mb_strpos(trim($line), '#') === 0)) {\n [$key, $value] = explode('=', (string) $line);\n $this->variables[$key] = $this->formatValue($value);\n }\n }\n }", "protected function arrayHandler(ParsingState $state, $arrayText)\n {\n $arrayNode = new ArrayNode($arrayText);\n $state->getNodeFromStack()->addChildNode($arrayNode);\n }", "function cfgArray2CfgString($cfgArr) {\r\n\r\n // Initialize:\r\n $inLines = array();\r\n\r\n // Traverse the elements of the form wizard and transform the settings into configuration code.\r\n foreach($cfgArr as $vv) {\r\n if ($vv['comment']) {\r\n // If \"content\" is found, then just pass it over.\r\n $inLines[] = trim($vv['comment']);\r\n } else {\r\n // Begin to put together the single-line configuration code of this field:\r\n\r\n // Reset:\r\n $thisLine = array();\r\n\r\n // Set Label:\r\n $thisLine[0] = str_replace('|', '', $vv['label']);\r\n\r\n // Set Type:\r\n if ($vv['type']) {\r\n $thisLine[1] = ($vv['required']?'*':'').str_replace(',', '', ($vv['fieldname']?$vv['fieldname'].'=':'').$vv['type']);\r\n\r\n // Default:\r\n $tArr = array('', '', '', '', '', '');\r\n switch((string)$vv['type']) {\r\n case 'textarea':\r\n if (intval($vv['cols'])) $tArr[0] = intval($vv['cols']);\r\n if (intval($vv['rows'])) $tArr[1] = intval($vv['rows']);\r\n if (trim($vv['extra'])) $tArr[2] = trim($vv['extra']);\r\n if (strlen($vv['specialEval'])) {\r\n $thisLine[2] = '';\r\n // Preset blank default value so position 3 can get a value...\r\n $thisLine[3] = $vv['specialEval'];\r\n }\r\n break;\r\n case 'input':\r\n case 'password':\r\n if (intval($vv['size'])) $tArr[0] = intval($vv['size']);\r\n if (intval($vv['max'])) $tArr[1] = intval($vv['max']);\r\n if (strlen($vv['specialEval'])) {\r\n $thisLine[2] = '';\r\n // Preset blank default value so position 3 can get a value...\r\n $thisLine[3] = $vv['specialEval'];\r\n }\r\n break;\r\n case 'file':\r\n if (intval($vv['size'])) $tArr[0] = intval($vv['size']);\r\n break;\r\n case 'select':\r\n if (intval($vv['size'])) $tArr[0] = intval($vv['size']);\r\n if ($vv['autosize']) $tArr[0] = 'auto';\r\n if ($vv['multiple']) $tArr[1] = 'm';\r\n\r\n }\r\n $tArr = $this->cleanT($tArr);\r\n if (count($tArr)) $thisLine[1] .= ','.implode(',', $tArr);\r\n\r\n $thisLine[1] = str_replace('|', '', $thisLine[1]);\r\n\r\n // Default:\r\n if ($vv['type'] == 'select' || $vv['type'] == 'radio') {\r\n $thisLine[2] = str_replace(chr(10), ', ', str_replace(',', '', $vv['options']));\r\n } elseif ($vv['type'] == 'checkbox') {\r\n if ($vv['default']) $thisLine[2] = 1;\r\n } elseif (strcmp(trim($vv['default']), '')) {\r\n $thisLine[2] = $vv['default'];\r\n }\r\n if (isset($thisLine[2])) $thisLine[2] = str_replace('|', '', $thisLine[2]);\r\n }\r\n\r\n // Compile the final line:\r\n $inLines[] = ereg_replace(\"[\\n\\r]*\", '', implode(' | ', $thisLine));\r\n }\r\n }\r\n // Finally, implode the lines into a string, and return it:\r\n return implode(chr(10), $inLines);\r\n }", "private function makeLines()\n\t{\n\t\t$line = 1;\n\t\t/** @var Token $token */\n\t\tforeach ($this->tokens as $token)\n\t\t{\n\t\t\t$token->line = $line;\n\t\t\tif (preg_match_all(\"/\\\\n/\", $token->text, $m))\n\t\t\t{\n\t\t\t\t$line += count($m[0]);\n\t\t\t}\n\t\t}\n\t}", "function readFileLinesIntoArray( $fileHandle, $inputArray ){\r\n\twhile (!feof($fileHandle)) { //feof - file, end of file\r\n\t\t$line_of_text = fgets($fileHandle);\r\n\t\tarray_push( $inputArray, $line_of_text );\r\n\t}//end while\r\n\treturn $inputArray;\r\n}", "function procInstrArray($lineSplit) {\n\t$lineSplit[6] = mysql_real_escape_string($lineSplit[6]);\n\t$lineSplit[7] = mysql_real_escape_string($lineSplit[7]);\n\treturn $lineSplit;\n}", "public function getLines();", "public function getLines();", "private function parseData($rawFile){\n\t\t$rows_data = array();\n\t\tif(!empty($rawFile)){\n\t\t\t$rows = explode(\"\\n\", $rawFile);\n\t\t\tforeach($rows as $row){\n\t\t\t\t$row = trim($row,' ');\n\t\t\t\tif(empty($row)) continue;\n\t\t\t\t\t$columns = explode(',',$row);\n\t\t\t\t\t$explodedData [] = $columns; //all the rows and columns exploded\t\n\t\t\t}//for each \n\t\t\t\n\t\t\t\n\t\t\t//strip away quotes and blank spaces\n\t\t\t$tempData = array();\n\t\t\tfor($i = 0; $i < count($explodedData); $i++){\n\t\t\t\tfor($j = 0; $j < count($explodedData[$i]); $j++){\n\t\t\t\t\t$tempData[$i][$j] = trim ( str_replace ( '\"', '', $explodedData[$i][$j] ), ' ' );\n\t\t\t\t}//for\n\t\t\t}//for'\n\t\t\t$this->parsedFileData=$tempData;\n\t\t}\t\n }", "public function lines()\n {\n $array = preg_split('/[\\r\\n]{1,2}/u', $this->str);\n /** @noinspection CallableInLoopTerminationConditionInspection */\n for ($i = 0; $i < count($array); $i++) {\n $array[$i] = static::create($array[$i], $this->encoding);\n }\n\n return $array;\n }", "public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)\n {\n $tokens = $phpcsFile->getTokens();\n $arrayStart = DWS_Helpers_Bracket::bracketStart($phpcsFile, $stackPtr);\n $arrayEnd = DWS_Helpers_Bracket::bracketEnd($phpcsFile, $stackPtr);\n\n if (!in_array($arrayStart, [$stackPtr, $stackPtr + 1])) {\n $phpcsFile->addError('No whitespace allowed between the array keyword and the opening parenthesis', $stackPtr, 'SpaceAfterKeyword');\n }\n\n $firstMember = $phpcsFile->findNext(T_WHITESPACE, $arrayStart + 1, $arrayEnd, true);\n if ($firstMember === false && $arrayEnd - $arrayStart !== 1) {\n $phpcsFile->addError('Empty array declaration must have no space between the brackets', $stackPtr, 'SpaceInEmptyArray');\n }\n }", "#[ArrayShape(['label' => \"array|string\"])]\n public function definition(): array\n {\n $array = [\n 'label' => 'Check installation',\n 'menu_code' => 'my-space-installer',\n 'package' => 'my-space',\n 'route' => 'setup.installation.my-space',\n 'is_active' => true\n ];\n return $array;\n }", "public function lineHeightProvider()\n {\n return [[1]];\n }", "abstract protected function getIgnoredLines(): array;", "private function build_lines_aggregate_array(){\n\n\t\t$this->lines_aggregate_array = array();\n\t\tforeach($this->per_team_lines[0] as $key => $value){\n\t\t\t$line_play_type = null;\n\t\t\tif($key === 'women_doubles'){\n\t\t\t\t$line_play_type = 'wd';\n\t\t\t}\n\t\t\telse if($key === 'men_doubles'){\n\t\t\t\t$line_play_type = 'md';\n\t\t\t}\n\t\t\telse if($key === 'women_singles'){\n\t\t\t\t$line_play_type = 'ws';\n\t\t\t}\n\t\t\telse if($key === 'men_singles'){\n\t\t\t\t$line_play_type = 'ms';\n\t\t\t}\n\t\t\telse if($key === 'mixed_doubles'){\n\t\t\t\t$line_play_type = 'xd';\n\t\t\t}\n\t\t\telse if($key === 'mixed_singles'){\n\t\t\t\t$line_play_type = 'xs';\n\t\t\t}\n\t\t\tif($line_play_type !== null){\n\t\t\t\tarray_push($this->lines_aggregate_array, array(\n\t\t\t\t\t'line_play_type' => $line_play_type,\n\t\t\t\t\t'count' => $value\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\n\t}", "public function testLineIntrospectionWithCRLFLineEndings() {\n\t\t$tmpPath = Libraries::get(true, 'resources') . '/tmp/tests/inspector_crlf';\n\t\t$contents = implode(\"\\r\\n\", ['one', 'two', 'three', 'four', 'five']);\n\t\tfile_put_contents($tmpPath, $contents);\n\n\t\t$result = Inspector::lines($tmpPath, [2]);\n\t\t$expected = [2 => 'two'];\n\t\t$this->assertEqual($expected, $result);\n\n\t\t$result = Inspector::lines($tmpPath, [1,5]);\n\t\t$expected = [1 => 'one', 5 => 'five'];\n\t\t$this->assertEqual($expected, $result);\n\n\t\t$this->_cleanUp();\n\t}", "public function parse(array $description);", "public function getLinesTemplate(int $start, int $end, array $arrayLinesTemplate): array\n {\n\n $lines = [];\n\n for ($i = $start; $i <= $end; $i++) {\n $lines[$i] = $arrayLinesTemplate[$i];\n }\n\n return $lines;\n\n }", "public function splitLine() {\n $this->words = preg_split('/[\\' \\',\\t]+/', $this->line);\n }", "public function validArrayForArrayConfigurationProvider() {}", "private function addLineItemsToInvoice($data){\n $lineItems = [];\n $counter = 1;\n foreach($data as $lineData) {\n $lineItem = [];\n $lineItem['LineNum'] = $counter;\n $lineItem['Description'] = IndexSanityCheckHelper::indexSanityCheck('description', $lineData);\n\n if (array_key_exists('item_id', $lineData)) {\n $lineItem['Amount'] = IndexSanityCheckHelper::indexSanityCheck('amount', $lineData);\n $lineItem['DetailType'] = 'SalesItemLineDetail';\n $lineItem['SalesItemLineDetail'] = [];\n $lineItem['SalesItemLineDetail']['Qty'] = IndexSanityCheckHelper::indexSanityCheck('quantity', $lineData);\n $lineItem['SalesItemLineDetail']['UnitPrice'] = IndexSanityCheckHelper::indexSanityCheck('unit_amount', $lineData);\n $lineItem['SalesItemLineDetail']['ItemRef']['value'] = IndexSanityCheckHelper::indexSanityCheck('item_id', $lineData);\n $lineItem['SalesItemLineDetail']['TaxCodeRef']['value'] = IndexSanityCheckHelper::indexSanityCheck('tax_id', $lineData);\n $lineItem['SalesItemLineDetail']['DiscountRate'] = IndexSanityCheckHelper::indexSanityCheck('discount_rate', $lineData);\n $lineItem['SalesItemLineDetail']['TaxInclusiveAmt'] = IndexSanityCheckHelper::indexSanityCheck('tax_inclusive_amount', $lineData);\n } else {\n $lineItem['Amount'] = IndexSanityCheckHelper::indexSanityCheck('amount', $lineData);\n $lineItem['DetailType'] = 'SalesItemLineDetail';\n $lineItem['SalesItemLineDetail'] = [];\n $lineItem['SalesItemLineDetail']['Qty'] = IndexSanityCheckHelper::indexSanityCheck('quantity', $lineData);\n $lineItem['SalesItemLineDetail']['UnitPrice'] = IndexSanityCheckHelper::indexSanityCheck('unit_amount', $lineData);\n $lineItem['SalesItemLineDetail']['TaxCodeRef']['value'] = IndexSanityCheckHelper::indexSanityCheck('tax_id', $lineData);\n $lineItem['SalesItemLineDetail']['DiscountRate'] = IndexSanityCheckHelper::indexSanityCheck('discount_rate', $lineData);\n $lineItem['SalesItemLineDetail']['TaxInclusiveAmt'] = IndexSanityCheckHelper::indexSanityCheck('tax_inclusive_amount', $lineData);\n }\n $counter++;\n array_push($lineItems, $lineItem);\n }\n if ($this->getDiscountRate()) {\n if ($this->getDiscountRate() > 0) {\n $discountLineItem = [];\n $discountLineItem['LineNum'] = $counter;\n $discountLineItem['Description'] = '';\n $discountLineItem['Amount'] = $this->getDiscountAmount();\n $discountLineItem['DetailType'] = 'DiscountLineDetail';\n $discountLineItem['DiscountLineDetail']['PercentBased'] = true;\n $discountLineItem['DiscountLineDetail']['DiscountPercent'] = $this->getDiscountRate();\n array_push($lineItems, $discountLineItem);\n }\n }\n else if ($this->getDiscountAmount()) {\n if ($this->getDiscountAmount() > 0) {\n $discountLineItem = [];\n $discountLineItem['LineNum'] = $counter;\n $discountLineItem['Description'] = '';\n $discountLineItem['Amount'] = $this->getDiscountAmount();\n $discountLineItem['DetailType'] = 'DiscountLineDetail';\n $discountLineItem['DiscountLineDetail']['PercentBased'] = false;\n array_push($lineItems, $discountLineItem);\n }\n }\n return $lineItems;\n }", "private function _RenderLineTXT($arrLine, $bolRenderToFile = TRUE, $strDelimiterOverride = NULL)\n \t{\n \t\t//Debug($arrLine);\n \t\t\n \t\t$arrOutput = Array();\n \t\tforeach ($this->_arrDefine[$arrLine['**Type']] as $strField=>$arrField)\n \t\t{\n \t\t\t\n \t\t\t//CliEcho(\"{$arrField['PadType']}; {$arrField['PadChar']}\\t\", FALSE);\n \t\t\t// Put in default values\n \t\t\t$arrField['Value']\t\t= ($arrLine[$strField] !== NULL)\t? $arrLine[$strField]\t\t\t\t\t\t\t: $arrField['Value'];\n \t\t\t$arrField['PadChar']\t= ($arrField['PadChar'] !== NULL)\t? $arrField['PadChar']\t\t\t\t\t\t\t: ' ';\n \t\t\t$arrField['PadType']\t= ($arrField['PadType'] !== NULL)\t? $arrField['PadType']\t\t\t\t\t\t\t: STR_PAD_RIGHT;\n \t\t\t$arrField['Value']\t\t= ($arrField['Config'])\t\t\t\t? $this->GetConfigField($arrField['Config'])\t: $arrField['Value'];\n \t\t\t\n \t\t\t//Debug($arrField['Value']);\n \t\t\t\n \t\t\t// Prepare field\n \t\t\tif (!trim($arrField['Value']) && isset($arrField['Optional']))\n \t\t\t{\n\t\t\t\t// Optional field is empty\n\t\t\t\t$mixValue\t= $arrField['Optional'];\n \t\t\t}\n \t\t\telse\n \t\t\t{\n\t \t\t\t$arrType = explode('::', $arrField['Type']);\n\t \t\t\tswitch ($arrType[0])\n\t \t\t\t{\n\t \t\t\t\tcase 'Integer':\n\t \t\t\t\t\t$mixValue\t= (int)$arrField['Value'];\n\t \t\t\t\t\t//Debug($mixValue);\n\t \t\t\t\t\tbreak;\n\t \t\t\t\t\n\t \t\t\t\tcase 'Date':\n\t \t\t\t\t\t$strDate\t= $arrField['Value'];\n\t \t\t\t\t\tswitch ($arrType[1])\n\t \t\t\t\t\t{\n\t \t\t\t\t\t\tcase 'YYYYMMDD':\n\t \t\t\t\t\t\t\t$strParse\t= $strDate;\n\t \t\t\t\t\t\t\tbreak;\n\t \t\t\t\t\t\t\t\n\t \t\t\t\t\t\tcase 'YYYY-MM-DD':\n\t \t\t\t\t\t\t\t$strParse\t= $strDate;\n\t \t\t\t\t\t\t\tbreak;\n\t \t\t\t\t\t\t\n\t \t\t\t\t\t\tcase 'DD-MM-YYYY':\n\t \t\t\t\t\t\t\t$strParse\t= substr($strDate, -4, 4);\n\t \t\t\t\t\t\t\t$strParse\t.= substr($strDate, 4, 2);\n\t \t\t\t\t\t\t\t$strParse\t.= substr($strDate, 0, 2);\n\t \t\t\t\t\t\t\tbreak;\n\t \t\t\t\t\t}\n\t \t\t\t\t\t\n\t \t\t\t\t\t// Is it a valid date?\n\t \t\t\t\t\tif (!strtotime($strParse))\n\t \t\t\t\t\t{\n\t\t\t\t\t\t\t$strMessage\t= \"Request #{$arrLine['**Request']}; Field '$strField' with value '$strDate' is not a valid {$arrType[1]} date\";\n\t\t\t\t\t\t\treturn Array('Pass' => FALSE, 'Line' => $strMessage);\n\t \t\t\t\t\t}\n\t \t\t\t\t\t$mixValue\t= $strDate;\n\t \t\t\t\t\tbreak;\n\t \t\t\t\t\n\t \t\t\t\tdefault:\n\t \t\t\t\t\t// String\n\t \t\t\t\t\t$mixValue\t= $arrField['Value'];\n\t \t\t\t\t\tbreak;\n\t \t\t\t}\n \t\t\t}\n \t\t\t\n\t\t\t// Is this fixed-width?\n\t\t\tif ($arrField['Length'])\n\t\t\t{\n\t\t\t\tif (($intLength = strlen($mixValue)) > $arrField['Length'])\n\t\t\t\t{\n\t\t\t\t\t// Field is too long, fail out\n\t\t\t\t\tCliEcho(\"Request #{$arrLine['**Request']}; Field '$strField' is $intLength chars, truncated to max of {$arrField['Length']} chars\");\n\t\t\t\t\t//return Array('Pass' => FALSE, 'Line' => $strMessage);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Pad the field\n\t\t\t\t$mixValue\t= str_pad(substr($mixValue, 0, $arrField['Length']), $arrField['Length'], $arrField['PadChar'], $arrField['PadType']);\n\t\t\t}\n\t\t\t\n\t\t\t$arrOutput[]\t= $mixValue;\n \t\t}\n \t\t\n \t\t// Implode Plaintext line\n \t\t$strDelimiter\t= ($strDelimiterOverride !== NULL) ? $strDelimiterOverride : $this->_strDelimiter;\n \t\t$strLine\t\t= implode($strDelimiter, $arrOutput);\n \t\t\n \t\t//DebugBackTrace();\n \t\t\n \t\t// Write to file\n \t\tif ($bolRenderToFile)\n \t\t{\n \t\t\tfwrite($this->_ptrFile, $strLine.$this->_strNewLine);\n \t\t}\n \t\t\n \t\t//Debug(\"Line: $strLine\");\n \t\t\n \t\treturn Array('Pass' => TRUE, 'Line' => $strLine);\n \t}", "static function parse_ini_file_php($file, $process_sections = false, $rawdata = false)\n\t{\n\t\t$process_sections = ($process_sections !== true) ? false : true;\n\n\t\tif (!$rawdata)\n\t\t{\n\t\t\t$ini = file($file);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$file = str_replace(\"\\r\", \"\", $file);\n\t\t\t$ini = explode(\"\\n\", $file);\n\t\t}\n\n\t\tif (!is_array($ini))\n\t\t{\n\t\t\treturn [];\n\t\t}\n\n\t\tif (count($ini) == 0)\n\t\t{\n\t\t\treturn [];\n\t\t}\n\n\t\t$sections = [];\n\t\t$values = [];\n\t\t$result = [];\n\t\t$globals = [];\n\t\t$i = 0;\n\t\tforeach ($ini as $line)\n\t\t{\n\t\t\t$line = trim($line);\n\t\t\t$line = str_replace(\"\\t\", \" \", $line);\n\n\t\t\t// Comments\n\t\t\tif (!preg_match('/^[a-zA-Z0-9[]/', $line))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Sections\n\t\t\tif ($line[0] == '[')\n\t\t\t{\n\t\t\t\t$tmp = explode(']', $line);\n\t\t\t\t$sections[] = trim(substr($tmp[0], 1));\n\t\t\t\t$i++;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Key-value pair\n\t\t\t$lineParts = explode('=', $line, 2);\n\t\t\tif (count($lineParts) != 2)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$key = trim($lineParts[0]);\n\t\t\t$value = trim($lineParts[1]);\n\t\t\tunset($lineParts);\n\n\t\t\tif (strstr($value, \";\"))\n\t\t\t{\n\t\t\t\t$tmp = explode(';', $value);\n\t\t\t\tif (count($tmp) == 2)\n\t\t\t\t{\n\t\t\t\t\tif ((($value[0] != '\"') && ($value[0] != \"'\")) ||\n\t\t\t\t\t\tpreg_match('/^\".*\"\\s*;/', $value) || preg_match('/^\".*;[^\"]*$/', $value) ||\n\t\t\t\t\t\tpreg_match(\"/^'.*'\\s*;/\", $value) || preg_match(\"/^'.*;[^']*$/\", $value)\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\t$value = $tmp[0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif ($value[0] == '\"')\n\t\t\t\t\t{\n\t\t\t\t\t\t$value = preg_replace('/^\"(.*)\".*/', '$1', $value);\n\t\t\t\t\t}\n\t\t\t\t\telseif ($value[0] == \"'\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$value = preg_replace(\"/^'(.*)'.*/\", '$1', $value);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$value = $tmp[0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$value = trim($value);\n\t\t\t$value = trim($value, \"'\\\"\");\n\n\t\t\tif ($i == 0)\n\t\t\t{\n\t\t\t\tif (substr($line, -1, 2) == '[]')\n\t\t\t\t{\n\t\t\t\t\t$globals[$key][] = $value;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$globals[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (substr($line, -1, 2) == '[]')\n\t\t\t\t{\n\t\t\t\t\t$values[$i - 1][$key][] = $value;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$values[$i - 1][$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor ($j = 0; $j < $i; $j++)\n\t\t{\n\t\t\tif ($process_sections === true)\n\t\t\t{\n\t\t\t\tif (isset($sections[$j]) && isset($values[$j]))\n\t\t\t\t{\n\t\t\t\t\t$result[$sections[$j]] = $values[$j];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (isset($values[$j]))\n\t\t\t\t{\n\t\t\t\t\t$result[] = $values[$j];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $result + $globals;\n\t}", "function strToArray(&$string, &$array){\r\n $array = explode(\"\\n\", $string);\r\n }", "public function wktGenerateMultilinestring();", "public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)\n {\n $tokens = $phpcsFile->getTokens();\n\n // Array keyword should be lower case\n if (strtolower($tokens[$stackPtr]['content']) !== $tokens[$stackPtr]['content']) {\n $error = 'Array keyword should be lower case; expected \"array\" but found \"'\n . $tokens[$stackPtr]['content'] . '\"';\n $phpcsFile->addError($error, $stackPtr);\n }\n\n $arrayStart = $tokens[$stackPtr]['parenthesis_opener'];\n $arrayEnd = $tokens[$arrayStart]['parenthesis_closer'];\n $keywordStart = $tokens[$stackPtr]['column'];\n\n if ($arrayStart !== ($stackPtr + 1)) {\n $error = 'There must be no space between the Array keyword and the opening parenthesis';\n $phpcsFile->addError($error, $stackPtr);\n }\n\n // Check for empty arrays\n $content = $phpcsFile->findNext(array(T_WHITESPACE), ($arrayStart + 1), ($arrayEnd + 1), true);\n if ($content === $arrayEnd) {\n // Empty array, but if the brackets aren't together, there's a problem\n if (($arrayEnd - $arrayStart) !== 1) {\n $error = 'Empty array declaration must have no space between the parentheses';\n $phpcsFile->addError($error, $stackPtr);\n\n // We can return here because there is nothing else to check. All code\n // below can assume that the array is not empty\n return;\n }\n }\n\n // @todo: Deeper Array checking\n }", "#[ArrayShape(['text' => 'string[]'])]\n public function rules(): array\n {\n return [\n 'text' => ['required']\n ];\n }", "public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)\n {\n // Only perform this check on a .features.field_base.inc file.\n $fileExtension = strtolower(substr($phpcsFile->getFilename(), -24));\n if ($fileExtension !== '.features.field_base.inc') {\n return;\n }\n\n $tokens = $phpcsFile->getTokens();\n\n // Support long and short syntax.\n $parenthesis_opener = 'parenthesis_opener';\n $parenthesis_closer = 'parenthesis_closer';\n if ($tokens[$stackPtr]['code'] === T_OPEN_SHORT_ARRAY) {\n $parenthesis_opener = 'bracket_opener';\n $parenthesis_closer = 'bracket_closer';\n }\n\n $lastItem = $phpcsFile->findPrevious(\n PHP_CodeSniffer_Tokens::$emptyTokens,\n ($tokens[$stackPtr][$parenthesis_closer] - 1),\n $stackPtr,\n true\n );\n\n // Empty array.\n if ($lastItem === $tokens[$stackPtr][$parenthesis_opener]) {\n return;\n }\n\n // Inline array.\n if ($tokens[$tokens[$stackPtr][$parenthesis_opener]]['line'] === $tokens[$tokens[$stackPtr][$parenthesis_closer]]['line']) {\n return;\n }\n\n $arrayStart = $tokens[$stackPtr][$parenthesis_opener];\n $arrayEnd = $tokens[$stackPtr][$parenthesis_closer];\n\n // Loop over array tokens.\n while ($arrayStart = $phpcsFile->findNext(T_CONSTANT_ENCAPSED_STRING, ($arrayStart + 1), $arrayEnd)) {\n // Find the field_name key.\n if ($tokens[$arrayStart]['content'] === \"'field_name'\") {\n $fieldName = $phpcsFile->findNext(T_CONSTANT_ENCAPSED_STRING, ($arrayStart + 1), ($arrayStart + 5));\n // If it's longer than 32 chars trow an error.\n if ((strlen($tokens[$fieldName]['content']) - 2) > 32) {\n $error = 'Field name ' . str_replace(\"'\", '\"', $tokens[$fieldName]['content']) . ' may not exceed 32 characters.';\n $phpcsFile->addError($error, $fieldName, 'TooLong');\n }\n // Exit the array.\n return $arrayEnd;\n }\n }\n\n // If we have checked level one, exit the array.\n return $arrayEnd;\n }", "public function newLine() {\n\t\t$this->_section=0;\n\t\t$this->_lineNumber++;\n\t\t$this->_text[$this->_lineNumber]=array();\n\t\t$this->_text[$this->_lineNumber][0]['text']='';\n\t\t$this->_text[$this->_lineNumber][0]['encoding']='';\n\t\t$this->_text[$this->_lineNumber][0]['font']=$this->_font;\n\t\t$this->_text[$this->_lineNumber][0]['fontSize']=$this->_fontSize;\n\t\t$this->_text[$this->_lineNumber][0]['width']=0;\n\n\t\t\n\t\t$this->_initializeLine();\n\t\t\n\t\t$this->_text[$this->_lineNumber]['alignment']=$this->_text[$this->_lineNumber-1]['alignment'];\n\t\t//add the last cell's height to the auto height if we have an auto-height box.\n\t\tif ($this->isAutoHeight()) {\n\t\t\t$this->_autoHeight+=$this->_text[$this->_lineNumber-1]['height'];\n\t\t}\n\t}", "function getEOL()\n {\n return [[\"\\n\"],[\"\\r\\n\"]];\n }", "public function getBodyArray($body){\n $bodyArray = explode(\"\\n\", $body);\n return $bodyArray;\n }", "private function snippetArrayToLines($snips)\n\t{\n\t\t$lines = array();\n\n\t\tforeach ($snips as $snip) {\n\t\t\t$snip = explode(\"\\n\", $snip);\n\t\t\t$lines = array_merge($lines, $snip);\n\t\t}\n\n\t\treturn $lines;\n\t}", "private function add_new_line() {\n\n\t\t$this->fields[] = array( 'newline' => true );\n\n\t}", "function fillFileArrays(){\r\n\tglobal $infile, $lineArray, $numLines, $targetLines, $numTargets;\r\n\techo \"\\nfillFileArrays: infile is '\" . $infile . \"'\\n\";\r\n\t$lineArray \t\t= file($infile);\r\n\t$numLines \t\t= count($lineArray);\r\n\t$numTargets \t= count($targetLines);\r\n\techo \"\\nfillFileArrays: numLines='\" . $numLines . \"'; numTargets='\" . $numTargets . \"'\\n\";\r\n}", "public function comment_sections()\n {\n /*\n if (count($this->comment_sections) > 0) {\n return $this->comment_sections;\n }\n else {\n $this->comment_sections = ($this->attr_raw != '') ? explode(\"\\n\",$this->attr_raw) : array();\n return $this->comment_sections;\n }\n */\n return ($this->attr_raw != '') ? explode(\"\\n\\n\",$this->attr_raw) : array();\n }", "function procClassArray($lineSplit) {\n\t$lineSplit[7] = mysql_real_escape_string($lineSplit[7]);\t// Class title\n\t$lineSplit[22] = mysql_real_escape_string($lineSplit[22]);\t// Class description\n\tpreg_match('/(\\d)+\\.\\d\\d/', $lineSplit[10], $match);\n\t$lineSplit[14] = $match[1];\n\treturn $lineSplit;\n}", "function pg_array_parse($array, $asText = true) {\n $s = $array;\n if ($asText) {\n $s = str_replace(\"{\", \"array('\", $s);\n $s = str_replace(\"}\", \"')\", $s); \n $s = str_replace(\",\", \"','\", $s); \n } else {\n $s = str_replace(\"{\", \"array(\", $s);\n $s = str_replace(\"}\", \")\", $s);\n }\n\t$ss = \"\\$retval = $s;\";\n eval($ss);\n\treturn $retval;\n}", "public function compileRuleArray(Format $target)\n {\n $target->newline();\n $this->compileHeader($target, false);\n $target->code(\"public function matchNode{$this->name}(\\$previous, &\\$errorResult){\\n\")\n ->indent()\n ->code(\"\\$ruleArrayParser = \\$this->parser->instanceRuleArrayParser();\\n\");\n $ruleArray = $this->buildRuleArray();\n $code = new Format;\n $this->rule->compileRuleArray($code);\n $this->rule = null;\n $ruleArray['rule'] = $code;\n $target->code(\"return \\$ruleArrayParser->matchArrayNode (\\$previous, \\$errorResult, \")\n ->repr($ruleArray)\n ->raw(\", \\$this);\\n\")\n ->code(\"}\\n\", - 1);\n $target->formatCode();\n // compile actions\n $this->compileActions($target);\n }", "public function readerGetLines();", "protected function addPolylineSection(ArrayNodeDefinition $node)\n {\n $node\n ->children()\n ->arrayNode('polyline')->addDefaultsIfNotSet()\n ->children()\n ->scalarNode('class')->end()\n ->scalarNode('helper_class')->end()\n ->scalarNode('prefix_javascript_variable')->end()\n ->arrayNode('options')\n ->useAttributeAsKey('options')\n ->prototype('scalar')->end()\n ->end()\n ->end()\n ->end()\n ->end();\n }", "protected function fixLineSpacing($lines)\n {\n $propertiesOnly = false;\n // remove blank lines between properties\n $skip = true;\n $level = 0;\n foreach ($lines as $i => $line) {\n if (strpos($line, 'class ') !== false) {\n $skip = false;\n }\n if ($skip) {\n continue;\n }\n\n // keep spaces in multi line arrays\n if (strpos($line, '*') === false && strncmp(trim($line), \"'SQLSTATE[\", 10) !== 0) {\n $level += substr_count($line, '[') - substr_count($line, ']');\n }\n\n if (trim($line) === '') {\n if ($level == 0) {\n unset($lines[$i]);\n }\n } elseif (ltrim($line)[0] !== '*' && strpos($line, 'function ') !== false) {\n break;\n } elseif (trim($line) === '}') {\n $propertiesOnly = true;\n break;\n }\n }\n $lines = array_values($lines);\n\n // add back some\n $endofUse = false;\n $endofConst = false;\n $endofPublic = false;\n $endofProtected = false;\n $endofPrivate = false;\n $skip = true;\n $level = 0; // track array properties\n $property = '';\n foreach ($lines as $i => $line) {\n if (strpos($line, 'class ') !== false) {\n $skip = false;\n }\n if ($skip) {\n continue;\n }\n\n // check for multi line array\n if ($level > 0) {\n ${'endof' . $property} = $i;\n }\n\n $line = trim($line);\n if (strncmp($line, 'public $', 8) === 0 || strncmp($line, 'public static $', 15) === 0) {\n $endofPublic = $i;\n $property = 'Public';\n $level = 0;\n } elseif (strncmp($line, 'protected $', 11) === 0 || strncmp($line, 'protected static $', 18) === 0) {\n $endofProtected = $i;\n $property = 'Protected';\n $level = 0;\n } elseif (strncmp($line, 'private $', 9) === 0 || strncmp($line, 'private static $', 16) === 0) {\n $endofPrivate = $i;\n $property = 'Private';\n $level = 0;\n } elseif (strpos($line, 'const ') === 0) {\n $endofConst = $i;\n $property = false;\n } elseif (strpos($line, 'use ') === 0) {\n $endofUse = $i;\n $property = false;\n } elseif (strpos($line, '*') === 0) {\n $property = false;\n } elseif (strpos($line, '*') !== 0 && strpos($line, 'function ') !== false || $line === '}') {\n break;\n }\n\n // check for multi line array\n if ($property !== false && strncmp($line, \"'SQLSTATE[\", 10) !== 0) {\n $level += substr_count($line, '[') - substr_count($line, ']');\n }\n }\n\n $endofAll = false;\n foreach (['Private', 'Protected', 'Public', 'Const', 'Use'] as $var) {\n if (${'endof' . $var} !== false) {\n $endofAll = ${'endof' . $var};\n break;\n }\n }\n\n// $this->checkPropertyOrder($lineInfo);\n $result = [];\n foreach ($lines as $i => $line) {\n $result[] = $line;\n if (!($propertiesOnly && $i === $endofAll)) {\n if ($i === $endofUse || $i === $endofConst || $i === $endofPublic ||\n $i === $endofProtected || $i === $endofPrivate) {\n $result[] = '';\n }\n if ($i === $endofAll) {\n $result[] = '';\n }\n }\n }\n\n return $result;\n }", "public function getAllLines();", "public function getAllLines();", "abstract public function getLinesOfCode();", "function _getLines(&$text_lines, &$line_no, $end = \\false)\n {\n }", "public function getLineItems(): array;", "public function getLineMatrix() {}", "protected function get_lines()\n {\n }", "public function aArray() {}", "private function parseBlockData($ln,$blkData) {\n\tif (!is_array($blkData)) {\n\t\t// newly created block\n\t\t$blkData=array();\n\t}\n\t$state=0; // start by skipping whitespace\n\tfor ($i=0; $i<strlen($ln); ++$i) {\n\t\t$char=$ln[$i];\n\t\tswitch ($state) {\n\t\t\tcase 0:\t// skipping whitespace before keyword\n\t\t\t\tif ($char == ' ' || $char == \"\\t\")\n\t\t\t\t\tcontinue;\n\t\t\t\tif ($char == '}') {\n\t\t\t\t\t$state=4;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\t\n\t\t\t\t$state=1;\n\t\t\t\t$keyword=$char;\n\t\t\t\tif ($char == '=')\n\t\t\t\t\tthrow new exception(\"unexpected =\");\n\t\t\tbreak;\n\t\t\tcase 1:\t// building keyword\n\t\t\t\tif ($char == '=') {\n\t\t\t\t\t$state=2;\n\t\t\t\t} else\n\t\t\t\t\t$keyword .= $char;\n\t\t\tbreak;\n\t\t\tcase 2: // skipping white space before value\n\t\t\t\tif ($char == ' ' || $char == \"\\t\")\n\t\t\t\t\tcontinue;\n\t\t\t\t$state=3;\n\t\t\t\tif ($char == '\"' || $char == \"'\") {\n\t\t\t\t\t$value='';\n\t\t\t\t\t$delimiter=$char;\n\t\t\t\t} else {\n\t\t\t\t\t$delimiter=' ';\n\t\t\t\t\t$value=$char;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 3: // building value\n\t\t\t\tif ($char == $delimiter || $char == '}') {\n\t\t\t\t\t$blkData[$keyword]=$value;\n\t\t\t\t\t$state=($char == '}') ? 4 : 0;\t\n\t\t\t\t} else\n\t\t\t\t\t$value .= $char;\n\t\t\tbreak;\n\t\t\tcase 4: // past end delimiter\n\t\t\t\tif ($char == ' ' || $char == \"\\t\")\n\t\t\t\t\tcontinue;\n\t\t\t\tthrow new exception(\"illegal character after closing brace\");\t\t\t\t\n\t\t\tbreak;\t\t\t\t\t\t\n\t\t} // state machine case\n\t} // loop for all keyword chars\n\t\n\tif ($state==3) {\n\t\t$blkData[$keyword]=$value;\n\t\t$state=0;\n\t}\n\tif ($state != 0 && $state != 4)\n\t\tthrow new exception(\"cannot split key/value pairs across lines\");\n\treturn array($blkData,$state != 4);\n}", "public function add($line) {\r\n if(is_string($line)) $line .= \"\\n\";\r\n $this->body[]=$line;\r\n }", "public function ParseFromArray() {\n $this->value = $this->reader->next();\n $this->clean();\n }", "function __getExecutableLines($content) {\n\t\tif (is_array($content)) {\n\t\t\t$manager =& CodeCoverageManager::getInstance();\n\t\t\t$result = array();\n\t\t\tforeach ($content as $file) {\n\t\t\t\t$result[$file] = $manager->__getExecutableLines(file_get_contents($file));\n\t\t\t}\n\t\t\treturn $result;\n\t\t}\n\t\t$content = h($content);\n\t\t// arrays are 0-indexed, but we want 1-indexed stuff now as we are talking code lines mind you (**)\n\t\t$content = \"\\n\" . $content;\n\t\t// // strip unwanted lines\n\t\t$content = preg_replace_callback(\"/(@codeCoverageIgnoreStart.*?@codeCoverageIgnoreEnd)/is\", array('CodeCoverageManager', '__replaceWithNewlines'), $content);\n\t\t// strip php | ?\\> tag only lines\n\t\t$content = preg_replace('/[ |\\t]*[&lt;\\?php|\\?&gt;]+[ |\\t]*/', '', $content);\n\n\t\t// strip lines that contain only braces and parenthesis\n\t\t$content = preg_replace('/[ |\\t]*[{|}|\\(|\\)]+[ |\\t]*/', '', $content);\n\t\t$result = explode(\"\\n\", $content);\n\t\t// unset the zero line again to get the original line numbers, but starting at 1, see (**)\n\t\tunset($result[0]);\n\t\treturn $result;\n\t}", "public function testArrayValue() {\n $comment = <<<'EOT'\n/**\n * This is a comment to test that array value are parsed properly.\n *\n * @HasArray(array = [ one, two, three ])\n * @HasTwoArrays(array1 = [ four, five, six ], array2 = [ seven, eight, nine ])\n * @HasThreeArrays(array1 = [ ten, eleven, twelve ], array2 = [ thirteen, fourteen, fifteen ], array3 = [ sixteen, seventeen, eighteen ])\n */\nEOT;\n\n $annotations = new Annotations($comment);\n $msg = print_r($annotations, true);\n\n $this->assertTrue(isset($annotations['hasarray']), $msg);\n $this->assertTrue(isset($annotations['hastwoarrays']), $msg);\n $this->assertTrue(isset($annotations['hasthreearrays']), $msg);\n\n $hasArray = $annotations['hasarray'];\n $this->assertInternalType('array', $hasArray, $msg);\n $this->assertArrayHasKey('array', $hasArray, $msg);\n $this->assertInternalType('array', $hasArray['array'], $msg);\n $this->assertContains('one', $hasArray['array'], $msg);\n $this->assertContains('two', $hasArray['array'], $msg);\n $this->assertContains('three', $hasArray['array'], $msg);\n\n $hasTwoArrays = $annotations['hastwoarrays'];\n $this->assertInternalType('array', $hasTwoArrays, $msg);\n $this->assertArrayHasKey('array1', $hasTwoArrays, $msg);\n $this->assertArrayHasKey('array2', $hasTwoArrays, $msg);\n $this->assertInternalType('array', $hasTwoArrays['array1'], $msg);\n $this->assertInternalType('array', $hasTwoArrays['array2'], $msg);\n $this->assertContains('four', $hasTwoArrays['array1'], $msg);\n $this->assertContains('five', $hasTwoArrays['array1'], $msg);\n $this->assertContains('six', $hasTwoArrays['array1'], $msg);\n $this->assertContains('seven', $hasTwoArrays['array2'], $msg);\n $this->assertContains('eight', $hasTwoArrays['array2'], $msg);\n $this->assertContains('nine', $hasTwoArrays['array2'], $msg);\n\n $hasThreeArrays = $annotations['hasthreearrays'];\n $this->assertInternalType('array', $hasThreeArrays, $msg);\n $this->assertArrayHasKey('array1', $hasThreeArrays, $msg);\n $this->assertArrayHasKey('array2', $hasThreeArrays, $msg);\n $this->assertArrayHasKey('array3', $hasThreeArrays, $msg);\n $this->assertInternalType('array', $hasThreeArrays['array1'], $msg);\n $this->assertInternalType('array', $hasThreeArrays['array2'], $msg);\n $this->assertInternalType('array', $hasThreeArrays['array3'], $msg);\n $this->assertContains('ten', $hasThreeArrays['array1'], $msg);\n $this->assertContains('eleven', $hasThreeArrays['array1'], $msg);\n $this->assertContains('twelve', $hasThreeArrays['array1'], $msg);\n $this->assertContains('thirteen', $hasThreeArrays['array2'], $msg);\n $this->assertContains('fourteen', $hasThreeArrays['array2'], $msg);\n $this->assertContains('fifteen', $hasThreeArrays['array2'], $msg);\n $this->assertContains('sixteen', $hasThreeArrays['array3'], $msg);\n $this->assertContains('seventeen', $hasThreeArrays['array3'], $msg);\n $this->assertContains('eighteen', $hasThreeArrays['array3'], $msg);\n\n }", "private static function parseArray($val)\n {\n $result = array();\n $openBrackets = 0;\n $openString = false;\n $openCurlyBraces = 0;\n $openLString = false;\n $buffer = '';\n\n $strLen = strlen($val);\n for($i = 0; $i < $strLen; $i++)\n {\n if($val[$i] == '[' && !$openString && !$openLString)\n {\n $openBrackets++;\n\n if($openBrackets == 1)\n {\n // Skip first and last brackets.\n continue;\n }\n }\n elseif($val[$i] == ']' && !$openString && !$openLString)\n {\n $openBrackets--;\n\n if($openBrackets == 0)\n {\n // Allow terminating commas before the closing bracket\n if(trim($buffer) != '')\n {\n $result[] = self::parseValue( trim($buffer) );\n }\n\n if (!self::checkDataType($result))\n {\n throw new Exception('Data types cannot be mixed in an array: ' . $buffer);\n }\n // Skip first and last brackets. We're finish.\n return $result;\n }\n }\n elseif($val[$i] == '\"' && $val[$i - 1] != \"\\\\\" && !$openLString)\n {\n $openString = !$openString;\n }\n elseif($val[$i] == \"'\" && !$openString) {\n $openLString = !$openLString;\n }\n elseif($val[$i] == \"{\" && !$openString && !$openLString) {\n $openCurlyBraces++;\n }\n elseif($val[$i] == \"}\" && !$openString && !$openLString) {\n $openCurlyBraces--;\n }\n \n if( ($val[$i] == ',' || $val[$i] == '}') && !$openString && !$openLString && $openBrackets == 1 && $openCurlyBraces == 0)\n {\n if ($val[$i] == '}') {\n $buffer .= $val[$i];\n }\n\n $buffer = trim($buffer);\n if (!empty($buffer)) {\n $result[] = self::parseValue($buffer);\n\n if (!self::checkDataType($result))\n {\n throw new Exception('Data types cannot be mixed in an array: ' . $buffer);\n }\n }\n $buffer = '';\n }\n else\n {\n $buffer .= $val[$i];\n }\n }\n\n // If we're here, something went wrong.\n throw new Exception('Wrong array definition: ' . $val);\n }", "function _createLineRegEx() {\n\t\tswitch ($this->_listVersion) {\n\t\t\tcase 1:\n\t\t\t\t$this->_lineRegEx = '/^' . \n\t\t\t\t\timplode(preg_quote($this->_delim), array(\n\t\t\t\t\t\t'[dflcbpu]',\n\t\t\t\t\t\t'[0-9]{4}-[0-9]{2}-[0-9]{2}', // Date\n\t\t\t\t\t\t'[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?', // Time\n\t\t\t\t\t\t'[0-9]+', // Size\n\t\t\t\t\t\t'[0-9]+' // Depth\n\t\t\t\t\t)) . preg_quote($this->_delim) . '/';\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 2:\n\t\t\t\t$this->_lineRegEx = '/^' . \n\t\t\t\t\timplode(preg_quote($this->_delim), array(\n\t\t\t\t\t\t'[dflcbpus\\-]',\n\t\t\t\t\t\t'[0-9]{4}-[0-9]{2}-[0-9]{2}', // Date\n\t\t\t\t\t\t'[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?', // Time\n\t\t\t\t\t\t'[0-9]+', // Size\n\t\t\t\t\t)) . preg_quote($this->_delim) . '/';\n\t\t\t\tbreak;\n\t\t}\n\t}", "protected function get_line_break()\n {\n $this->buffer = fgets($this->filePointer);\n $this->lineCount++;\n\n if($this->buffer == FALSE)\n {\n $this->buffer = [];\n array_push($this->buffer, Instructions::EOF);\n return;\n }\n \n $this->buffer = trim(preg_replace(\"/\\s+/\", \" \", $this->buffer));\n $this->buffer = explode(\" \", $this->buffer);\n \n $this->check_comments();\n\n\n if($this->buffer[0] == NULL)\n {\n $this->buffer = [];\n array_push($this->buffer, Instructions::EMPTY);\n return;\n }\n\n }", "private function loadFromString($input) {\n\t//--\n\t$lines = explode(\"\\n\", (string)$input);\n\t//--\n\tforeach($lines as $k => $v) {\n\t\t$lines[$k] = (string) rtrim((string)$v, \"\\r\");\n\t} //end foreach\n\t//--\n\treturn (array) $lines;\n\t//--\n}", "function f($p1, // NOK {{Either split this list into multiple lines, aligned at column \"4\" or put all arguments on line \"51\".}}\n $p2\n) {\n}", "public function getMultiline()\n {\n return $this->multiline;\n }", "private function write_lines($array)\n {\n $array = implode(PHP_EOL, $array);\n file_put_contents($this->filename, $array);\n }", "public function i_set_the_multiline_field_to($field, $value) {\n $string = str_replace('\\n', \"\\n\", $value);\n $this->execute('behat_forms::set_field_value', [$field, (string)$string]);\n }", "public function getLines(): array\n {\n return $this->lines;\n }", "public function get_as_array() {\n return $this->lines;\n }", "public function setData($val)\n {\n $this->_lines = is_array($val)\n ? $val\n : preg_split('/[\\r\\n]+/', $str);\n\n return $this;\n }", "private static function normalize($toml)\n {\n // Cleanup EOL chars.\n $toml = str_replace(array(\"\\r\\n\", \"\\n\\r\"), \"\\n\", $toml);\n\n // Cleanup TABs\n $toml = str_replace(\"\\t\", \" \", $toml);\n\n // Run, char by char.\n $normalized = '';\n $openString = false;\n $openLString = false;\n $openMString = false;\n $openMLString = false;\n $openBrackets = 0;\n $openKeygroup = false;\n $lineBuffer = '';\n\n $strLen = strlen($toml);\n for($i = 0; $i < $strLen; $i++)\n {\n $keep = true;\n\n if($toml[$i] == '[' && !$openString && !$openLString && !$openMString && !$openMLString)\n {\n // Keygroup or array definition start outside a string\n $openBrackets++;\n\n // Keygroup\n if($openBrackets == 1 && trim($lineBuffer) == '')\n {\n $openKeygroup = true;\n }\n }\n elseif($toml[$i] == ']' && !$openString && !$openLString && !$openMString && !$openMLString)\n {\n // Keygroup or array definition end outside a string\n if($openBrackets > 0)\n {\n $openBrackets--;\n\n if($openKeygroup)\n {\n $openKeygroup = false;\n }\n }\n else\n {\n throw new Exception(\"Unexpected ']' on: \" . $lineBuffer);\n }\n }\n elseif($openBrackets > 0 && $toml[$i] == \"\\n\")\n {\n // Multi-line keygroup definition is not alowed.\n if($openKeygroup)\n {\n throw new Exception('Multi-line keygroup definition is not allowed on: ' . $lineBuffer);\n }\n\n // EOLs inside array definition. We don't want them.\n $keep = false;\n }\n elseif(($openString || $openLString) && $toml[$i] == \"\\n\")\n {\n // EOLs inside string should throw error.\n throw new Exception(\"Multi-line string not allowed on: \" . $lineBuffer);\n }\n elseif($toml[$i] == '\"' && $toml[$i - 1] != \"\\\\\" && !$openLString && !$openMLString) // String handling, allow escaped quotes.\n {\n // Check multi-line strings\n if(substr($toml, $i, 3) == '\"\"\"')\n {\n // Include the token inmediately.\n $i += 2;\n $normalized .= '\"\"\"';\n $lineBuffer .= '\"\"\"';;\n $keep = false;\n\n $openMString = !$openMString;\n }\n elseif(!$openMString) // Simple strings\n {\n $openString = !$openString;\n }\n }\n elseif($toml[$i] == \"'\" && !$openString && !$openMString) // Literal string handling.\n {\n // Check multi-line strings\n if(substr($toml, $i, 3) == \"'''\")\n {\n // Include the token inmediately.\n $i += 2;\n $normalized .= \"'''\";\n $lineBuffer .= \"'''\";\n $keep = false;\n\n $openMLString = !$openMLString;\n }\n elseif(!$openMLString) // Simple strings\n {\n $openLString = !$openLString;\n }\n }\n elseif($toml[$i] == \"\\\\\" && $toml[$i-1] != \"\\\\\" && !in_array($toml[$i+1], array('b', 't', 'n', 'f', 'r', 'u', 'U', '\"', \"\\\\\", ' ')))\n {\n // Reserved special characters inside strings should produce error\n if($openString)\n {\n \tthrow new Exception('Reserved special characters inside strings are not allowed: ' . $toml[$i] . $toml[$i+1]);\n }\n\n // Cleanup escaped new lines and whitespaces from multi-line strings\n if($openMString)\n {\n while($toml[$i+1] == \"\\n\" || $toml[$i+1] == \" \")\n {\n $i++;\n $keep = false;\n }\n }\n }\n elseif($toml[$i] == '#' && !$openString && !$openKeygroup)\n {\n // Remove comments only at the end of the line. Doesn't catch comments inside array definition.\n while(isset($toml[$i]) && $toml[$i] != \"\\n\")\n {\n $i++;\n }\n\n // Last char we know it's EOL.\n $keep = ($openBrackets == 0);\n }\n\n // Raw Lines\n if(isset($toml[$i])) {\n $lineBuffer .= $toml[$i];\n if($toml[$i] == \"\\n\")\n {\n $lineBuffer = '';\n }\n\n if($keep)\n {\n $normalized .= $toml[$i];\n }\n }\n }\n\n // Something went wrong.\n if($openBrackets)\n {\n throw new Exception('Syntax error found on TOML document. Missing closing bracket.');\n }\n if($openString)\n {\n throw new Exception('Syntax error found on TOML document. Missing closing string delimiter.');\n }\n if($openMString)\n {\n throw new Exception('Syntax error found on TOML document. Missing closing multi-line string delimiter.');\n }\n if($openLString)\n {\n throw new Exception('Syntax error found on TOML document. Missing closing literal string delimiter.');\n }\n if($openMLString)\n {\n throw new Exception('Syntax error found on TOML document. Missing closing multi-line literal string delimiter.');\n }\n if($openKeygroup)\n {\n throw new Exception('Syntax error found on TOML document. Missing closing key group delimiter.');\n }\n\n return $normalized;\n }", "private function returnArrayElement($line) {\n\t//--\n\tif(strlen($line) <= 1) {\n\t\treturn array(array()); // weird ...\n\t} //end if\n\t//--\n\t$array = array();\n\t$value = trim(substr($line, 1));\n\t$value = $this->_toType($value);\n\t$array[] = $value;\n\t//--\n\treturn $array;\n\t//--\n}" ]
[ "0.6517206", "0.54502034", "0.5444431", "0.5438063", "0.54275566", "0.54160976", "0.5408537", "0.53047884", "0.5280753", "0.52607656", "0.51509815", "0.5137147", "0.50036913", "0.49824205", "0.49154153", "0.49138665", "0.49121988", "0.48910573", "0.48597828", "0.47841817", "0.47716066", "0.47709605", "0.47700733", "0.47605413", "0.47476426", "0.47392192", "0.47387233", "0.4709075", "0.46989357", "0.46774706", "0.46680853", "0.46645963", "0.46417904", "0.46287698", "0.46275535", "0.46251622", "0.46220058", "0.4617193", "0.46140277", "0.46124506", "0.46124506", "0.46100038", "0.46049032", "0.46012732", "0.45990264", "0.45960787", "0.45902497", "0.45789585", "0.45746514", "0.4568614", "0.45664254", "0.4554375", "0.45446596", "0.45344803", "0.45276955", "0.45262837", "0.45245814", "0.45210978", "0.45192567", "0.45125875", "0.45089886", "0.44969913", "0.44939014", "0.44931728", "0.44863892", "0.44825685", "0.44812596", "0.447814", "0.44777215", "0.44581556", "0.44568554", "0.44420248", "0.44378376", "0.44369718", "0.4433184", "0.4433184", "0.44288334", "0.44288105", "0.442634", "0.44221422", "0.44211808", "0.44204652", "0.44070634", "0.44009534", "0.4385573", "0.43836665", "0.43744007", "0.43710724", "0.4365193", "0.43579438", "0.43577853", "0.43577155", "0.43464068", "0.43448958", "0.43422958", "0.43410128", "0.4336619", "0.43326363", "0.43289214", "0.4327667" ]
0.7126296
0
Constructor for the class parser
public function __construct() { $this->links = array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n $this->parser = Parser::create();\n\n parent::__construct();\n }", "function __construct() {\n\t\t// This is a hacky approach, elaborate on that\n\t\tif (isset(\\PHPParser_NodeAbstract::$reservedProperties['ignorables'])) {\n\t\t\tunset(\\PHPParser_NodeAbstract::$reservedProperties['ignorables']);\n\t\t}\n\t\t$this->parser = new \\PHPParser_Parser;\n\t\t$this->traverser = new \\PHPParser_NodeTraverser;\n\t\t$this->transactionBuilder = new TransactionBuilder;\n\t}", "public function __construct(Parser $parser)\n {\n $this->parser = $parser;\n }", "public function __construct(Parser $parser)\n {\n $this->parser = $parser;\n }", "function __construct($xmlparser)\r\n {\r\n //List of parents to provide a stack\r\n $this->_parents=new Collection();\r\n\r\n //TODO: Develop a TStringList class\r\n $this->_properties=array();\r\n\r\n //Root members, to initialize them with the right components\r\n $this->_rootvars=array();\r\n\r\n //Last component read\r\n $this->_lastread=null;\r\n\r\n\r\n //Last property read\r\n $this->_lastproperty=null;\r\n\r\n //The xml parser\r\n $this->_xmlparser=$xmlparser;\r\n xml_set_object($this->_xmlparser, $this);\r\n xml_set_element_handler($this->_xmlparser, \"tagOpen\", \"tagClose\");\r\n xml_set_character_data_handler($this->_xmlparser, \"cData\");\r\n }", "abstract protected function newParser();", "public function __construct() {\n $this->_configPassword = $this->parseConfig(2);\n $this->_configClass = $this->parseConfig(5);\n $this->_time = time();\n\t}", "function __construct() {\n debug (\"Yay class afMarkupParser loaded!\",0);\n }", "public function createParser();", "public function __construct() {\r\n $this->moveText = \"\";\r\n $this->tags = array();\r\n $this->parseErrors = array();\r\n }", "public function fn_construct_class() {\n\t}", "public function __construct() {\n $this->analyzerURI = new AnalyzerURI();\n $this->analyzerInnerPath = new AnalyzerInnerPath();\n }", "public function __construct(){\n $this->parser = new Parser\\LL1_Parser(CustomQueryColumnGenerator::TOKEN_SYMBOLS, CustomQueryColumnGenerator::GRAMMAR, 'EXPR');\n $this->parser->SetExpressionTreeGenerator(new Parser\\TreeGenerators\\CustomQueryTreeGenerator(CustomQueryColumnGenerator::TOKEN_SYMBOLS));\n $this->context = new ContextEngine();\n }", "public function __construct() {\n $this->symfony_yaml = new Parser();\n }", "function __construct(){\r\n $parser = new Shumvc_RouteParser();\r\n $this->routes = $parser->getRoutes();\r\n }", "public function __construct()\n\t{\n\t\t$this->parser = xml_parser_create('UTF-8');\n\t\txml_set_object($this->parser,$this);\n\t\txml_set_element_handler($this->parser, 'tag_open', 'tag_close');\n\t\txml_set_character_data_handler($this->parser, 'cdata');\n\t\txml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false);\n\t\t\n\t\t$this->removeTags(\n\t\t\t'applet','base','basefont','body','center','dir','font',\n\t\t\t'frame','frameset','head','html','isindex',\n\t\t\t'link','menu','meta','noframes','script','style'\n\t\t);\n\t\t\n\t\t$this->removeAttributes(\n\t\t\t'onclick','ondblclick','onfocus','onkeydown','onkeypress',\n\t\t\t'onkeyup','onload','onmousedown','onmousemove','onmouseout',\n\t\t\t'onmouseover','onmouseup','onreset','onselect','onsubmit',\n\t\t\t'onunload'\n\t\t);\n\t}", "public function __construct() {\n $this->parseRequest();\n }", "public function __construct()\n {\n $this->tokenizer = new Tokenizer();\n }", "private function __construct()\t{}", "function __construct()\n\t\t{\n\t\t\t$this->db = new Database();\n\t\t\t$this->fm = new Format();\n\t\t}", "private function __construct( )\n {\n\t}", "public function __construct( $class )\r\n {\r\n $this->class = new ReflectionClass( $class );\r\n \r\n if ( $modifiers = $this->class->getModifiers() )\r\n {\r\n $this->modifiers = '<small>' . implode( ' ', Reflection::getModifierNames( $modifiers ) ) . '</small> ';\r\n }\r\n \r\n if ( $constants = $this->class->getConstants() )\r\n {\r\n foreach ( $constants as $name => $value )\r\n {\r\n $this->constants[$name] = Docs::debug( $value );\r\n }\r\n }\r\n \r\n $parent = $this->class;\r\n \r\n do\r\n {\r\n if ( $comment = $parent->getDocComment() )\r\n {\r\n // Found a description for this class\n break;\r\n }\r\n }\r\n while ( $parent = $parent->getParentClass() );\r\n \r\n list ( $this->description, $this->tags ) = Docs::parse( $comment );\r\n }", "public function __construct()\n\t{\n\t\t// Initialize reflectionClass with information about the target class\n\t\t$this->reflectionClass = new \\ReflectionClass($this);\n\t}", "private function __construct()\r\n\t{\r\n\t\r\n\t}", "public function construct()\n\t\t{\n\t\t}", "public function set_parser_class($class = 'SimplePie_Parser')\n {\n }", "function __construct(){\n\t\t\t$this->db = new Database();\n\t\t\t$this->fm = new Format();\n\t}", "function CardinalXMLParser() {\n\t\t $this->xml_parser = xml_parser_create();\n\t\t}", "private function __construct()\n\t{\n\t\t\n\t}", "public function __construct()\n {\n $fullClassName = explode('\\\\', get_class($this));\n $this->type = (string)array_pop($fullClassName);\n }", "final private function __construct()\n\t{\n\t}", "private function __construct() { \n\t\t\n\n\t}", "final private function __construct() {\n\t\t\t}", "private function __construct() {\r\n\t\r\n\t}", "public function __construct(AsteriskFileParser $parser)\n {\n $this->parser = $parser;\n }", "private function __construct()\n\t{\n\n\t}", "public function testClassInstantiation()\n {\n $object = new FileBasedParser(RoboFile::SOURCE_ROOT);\n $this->assertInstanceOf(\n 'WPCoreBootstrap\\DocumentationParser\\Parser',\n $object\n );\n }", "function __constructor(){}", "private function __construct() {\n\t\t}", "private function __construct()\r\n\t{\r\n\t}", "public function __construct(array $args=array()) {\n $this->parsers = $this->initParsers();\n $this->fields = $this->fields();\n $this->defaultParser = new DefaultParser();\n foreach ($args as $key => $val)\n $this->set($key, $val);\n }", "function _construct() {\n \t\n\t\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() {\r\n\t\t\r\n\t}", "public function __construct()\n\t{\n\t\t$this->options = array(\n\t\t\t'class.first' => 'first',\n\t\t\t'class.last' => 'last',\n\t\t\t'class.single' => 'single',\n\t\t);\n\t}", "function create_parser() {}", "public function __construct(){\r\n $this->db = new Database(); // I crate Object for Database Class\r\n $this->fm = new Format(); // I crate Object for Format Class \r\n\t}", "public function __construct()\n {\n $this->regex = '/(' . implode(')|(', array_values($this->tokens)) . ')/u';\n $this->name_cache = array_keys($this->tokens);\n }", "private function __construct () \n\t{\n\t}", "private function __construct()\r\r\n\t{\r\r\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "public function _construct()\n\t{\n\n\t}", "private function __construct() {\r\n\t}", "private function __construct() {\r\n\t}", "private function __construct(){\n\t\n\t}", "private function __construct()\r\n {}", "function __construct( $ini_file = NULL ){\n if( is_null($ini_file)){\n $this->set_ini_file(NULL);\n $this->ini_file_array = NULL;\n } else {\n if( file_exists( $ini_file )){\n $this->set_ini_file( $ini_file );\n $this->parse();\n } else {\n $this->set_ini_file(NULL);\n $this->ini_file_array = NULL;\n }\n }\n }", "public function __construct()\n\t{\n\t\t/* Use a Lazy - Loading strategy to set the data type of the $namespaces variable to an array */\n\t\t$this->namespaces = array();\n\t}", "public function __construct()\n {\n $this->handler = new XMLReader();\n }", "function _construct(){ }", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}" ]
[ "0.7394894", "0.72628075", "0.6819975", "0.6819975", "0.6763667", "0.67584085", "0.6607774", "0.658792", "0.6538309", "0.6522356", "0.65198874", "0.65045226", "0.6496189", "0.6471273", "0.6457216", "0.64302635", "0.64244646", "0.64195293", "0.64192843", "0.6404202", "0.63953215", "0.6369124", "0.6326605", "0.63116986", "0.6309462", "0.6300628", "0.6286872", "0.62712365", "0.6266455", "0.62579435", "0.6257557", "0.62546015", "0.62525386", "0.62506783", "0.6250091", "0.6238515", "0.62382257", "0.6221775", "0.6219952", "0.62197936", "0.62140167", "0.6201972", "0.6195398", "0.6195398", "0.6195398", "0.6195398", "0.6195398", "0.6195398", "0.6195398", "0.6195398", "0.6195398", "0.6195398", "0.6195398", "0.6195398", "0.6195398", "0.6195398", "0.6195398", "0.6195398", "0.6195398", "0.6194472", "0.61921364", "0.61874014", "0.61832255", "0.6171279", "0.6166211", "0.6165812", "0.6165445", "0.6165445", "0.6165445", "0.6165445", "0.6165445", "0.6165445", "0.6165445", "0.6165445", "0.6165445", "0.61629546", "0.61542535", "0.61542535", "0.61475223", "0.6146566", "0.6145014", "0.61401385", "0.6131343", "0.6130225", "0.61223805", "0.61223805", "0.61223805", "0.61223805", "0.61223805", "0.61223805", "0.61223805", "0.61223805", "0.61223805", "0.61223805", "0.61223805", "0.61223805", "0.61223805", "0.61223805", "0.61223805", "0.61223805", "0.61223805" ]
0.0
-1
Callback function, berechnet die eingabe von Links
private function rep_links_callback($match) { $query = substr($match[0],2,-2); $db_Article = Article::getArticle()->select($query); if($db_Article != FALSE) { $query = ' <a href="' . urlencode($query) . '">' . $query . '</a> '; $this->links[$this->linkCount] = $db_Article; $this->linkCount++; } return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function addLinks()\n {\n }", "public function getLinkFun() {}", "private static function links()\n {\n $files = ['Link'];\n $folder = static::$root.'Http/Links'.'/';\n\n self::call($files, $folder);\n\n $files = ['LinkKeyNotFoundException'];\n $folder = static::$root.'Http/Links/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "function feed_links($args = array())\n {\n }", "public function getLink() {}", "public function link();", "public function getLink();", "public function getLink();", "function url_to_link_callback($matches)\n{\n return '<a href=\"' . htmlspecialchars($matches[1]) . '\">' . $matches[1] . '</a>';\n}", "public function get_links()\n {\n }", "protected function getLinkHandlers() {}", "protected function getLinkHandlers() {}", "function _make_url_clickable_cb($matches)\n {\n }", "function redlinks($_) {\n return preg_replace_callback(\"/<a href=\\\"?\\/([^'\\\">]+)\\\"?>/\", function($matches){\n if (is_link(filename($matches[1])))\n return $matches[0];\n else\n return preg_replace(\"/<a/\", \"<a class=redlink\", $matches[0]);\n }, $_);\n}", "protected static function link()\n {\n foreach (self::fetch('links') as $file) {\n Bus::need($file);\n }\n }", "function wp_targeted_link_rel_callback($matches)\n {\n }", "function feed_links_extra($args = array())\n {\n }", "public function href();", "public static function link_to(){\n echo call_user_func_array('Laika::link_to', func_get_args() );\n }", "function links() {\n return array(\n\n );\n }", "function url ($link) {\r\n\treturn $link;\r\n}", "function getLink() {return $this->_link;}", "function getLink() {return $this->_link;}", "function permalink_link()\n {\n }", "public function links() {\n\t\t?>\n\t\t<ul>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/15uoww1\" target=\"_blank\"><?php echo __( 'Installation manual', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/W9GDQT\" target=\"_blank\"><?php echo __( 'Frequently Asked Questions', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/WW93Sk\" target=\"_blank\"><?php echo __( 'Report a bug', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/11UE2lF\" target=\"_blank\"><?php echo __( 'Request a function', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/XkivOW\" target=\"_blank\"><?php echo __( 'Submit a translation', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"http://bit.ly/UlDG4t\" target=\"_blank\"><?php echo __( 'More cool stuff by WPBuddy', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t\t</li>\n\t\t</ul>\n\t<?php\n\t}", "function getLink(): string;", "function self_link()\n {\n }", "function the_feed_link($anchor, $feed = '')\n {\n }", "protected function isLink() {}", "function wp_dashboard_incoming_links()\n {\n }", "public function links_load($settings);", "function comments_link_feed()\n {\n }", "public static function wp_link_dialog()\n {\n }", "function wp_get_links($args = '')\n {\n }", "protected function updateBrokenLinks() {}", "function wp_dashboard_incoming_links_output()\n {\n }", "abstract public function links(): JsonApiParser\\Collections\\Links;", "function wp_dashboard_incoming_links_control()\n {\n }", "public function maping() {\n\n if(count($this->parse->domHtml->find('a'))){\n foreach ($this->parse->domHtml->find('a') as $element) {\n $link = new LinkBot(new HrefBot($element->href));\n\n if(!empty($link->link->getParseUrl()['host'])) {\n $host = $link->link->getParseUrl()['host'];\n } else {\n $host = false;\n }\n\n if (BotUrlHelper::isSameSite($host, $this->parse->request->getHost()) &&\n !BotUrlHelper::isRepeat($element->href, $this->parse->request->getUrls())) {\n\n //start connect\n $this->parse->request->setConnectTimeout(time());\n $link->startConnect($this->parse->request->getConnectTimeout());\n\n $countImg = 0;\n if (BotUrlHelper::url_exists($link->link->getLink())) {\n $countImg = count($this->parse->domHtml->getImgs());\n }\n\n //end connect\n $this->parse->request->setTimeout(time());\n $link->endConnect($this->parse->request->getTimeout());\n\n $this->parse->request->addUrl($element->href);\n\n $this->data[] = (object)[\n 'url' => $link->link->getLink(),\n 'countImg' => $countImg,\n 'end' => $link->end,\n 'start' => $link->start\n ];\n }\n unset($link);\n }\n }\n\n foreach ($this->parse->request->getUrls() as $url) {\n $this->analise($url);\n }\n \n }", "function getLinkTarget() {return $this->_linktarget;}", "function popuplinks($text)\n {\n }", "function automatic_feed_links($add = \\true)\n {\n }", "function rsd_link()\n {\n }", "function _fix_links_callback_member($m)\n\t{\n\t\treturn 'index.php?page=members&type=view&id='.strval(import_id_remap_get('member',strval($m[2]),true));\n\t}", "function _wp_link_page($i)\n {\n }", "public function add_links($links)\n {\n }", "function replace_links($content) {\r\n\tpreg_match_all(\"/<a\\s*[^>]*>(.*)<\\/a>/siU\", $content, $matches);\r\n\t//preg_match_all(\"/<a\\s[^>]*>(.*?)(</a>)/siU\", $content, $matches);\t\r\n\t$foundLinks = $matches[0];\r\n\t$wpbar_options = get_option(\"wpbar_options\");\r\n\t\r\n\tforeach ($foundLinks as $theLink) {\r\n\t\t$uri = getAttribute('href',$theLink);\r\n\t\tif($wpbar_options[\"validateURL\"]) {\r\n\t\t\tif(!isWhiteListed(get_domain($uri)) && !isSociable($theLink) && isValidURL($uri)) {\r\n\t\t\t\t$uid = isInDB($uri);\r\n\t\t\t\t$nofollow = is_nofollow($uid) ? \"rel='nofollow'\" : \"\";\r\n\t\t\t\t$content=str_replace(\"href=\\\"\".$uri.\"\\\"\",\"title='Original Link: \".$uri.\"' \".$nofollow.\" href=\\\"\".get_option('home').\"/?\".$uid.\"\\\"\",$content);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif(!isWhiteListed(get_domain($uri)) && !isSociable($theLink)) {\r\n\t\t\t\t$uid = isInDB($uri);\r\n\t\t\t\t$nofollow = is_nofollow($uid) ? \"rel='nofollow'\" : \"\";\r\n\t\t\t\t$content=str_replace(\"href=\\\"\".$uri.\"\\\"\",\"title='Original Link: \".$uri.\"' \".$nofollow.\" href=\\\"\".get_option('home').\"/?\".$uid.\"\\\"\",$content);\r\n\t\t\t}\r\n\t\t}\r\n\t}\t\r\n\treturn $content;\r\n}", "function auto_discovery_link_tags()\n{\n $html = '<link rel=\"alternate\" type=\"application/rss+xml\" title=\"'. __('Omeka RSS Feed') . '\" href=\"'. html_escape(items_output_url('rss2')) .'\" />';\n $html .= '<link rel=\"alternate\" type=\"application/atom+xml\" title=\"'. __('Omeka Atom Feed') .'\" href=\"'. html_escape(items_output_url('atom')) .'\" />';\n return $html;\n}", "function setLinks($links) \r\n {\r\n\r\n $this->activity_list->setLinks($links); \r\n \t\t \r\n// \t\t echo print_r($this->linkValues,true);\t \r\n \t parent::setLinks($links);\r\n \r\n }", "public static function bar_link() {\n }", "function trans_link()\n{\n // --- mylinks ---\n // --- link table ---\n // lid int(11)\n // cid int(5) => multi\n // title varchar(100)\n // url varchar(250)\n // logourl varchar(60)\n // submitter int(11)\n // status tinyint(2) => not use\n // date int(10)\n // hits int(11)\n // rating double(6,4)\n // votes int(11)\n // comments int(11)\n\n // --- mylinks_text table ---\n // lid int(11)\n // description text\n\n // --- weblinks ---\n // lid int(11)\n // cids varchar(100) : use catlink\n // title varchar(100)\n // url varchar(255)\n // banner varchar(255) : full url\n // uid int(5) : submitter\n // time_create int(10)\n // time_update int(10)\n // hits int(11)\n // rating double(6,4)\n // votes int(11)\n // comments int(11)\n // description text\n //\n // search text default\n // passwd varchar(255)\n //\n // name varchar(255)\n // nameflag tinyint(2)\n // mail varchar(255)\n // mailflag tinyint(2)\n // company varchar(255)\n // addr varchar(255)\n // tel varchar(255)\n // admincomment text\n // width int(5)\n // height int(5)\n // recommend tinyint(2)\n // mutual tinyint(2)\n // broken int(11)\n // rss_url varchar(255)\n // rss_flag tinyint(3)\n // rss_xml mediumtext\n // rss_update int(10)\n // usercomment text\n // zip varchar(100)\n // state varchar(100)\n // city varchar(100)\n // addr2 varchar(255)\n // fax varchar(255)\n\n global $xoopsDB;\n global $LIMIT;\n global $cat_title_arr;\n\n echo '<h4>STEP 3: link table</h3>';\n\n global $MODULE_DIRNAME;\n $table_link = $xoopsDB->prefix($MODULE_DIRNAME . '_link');\n\n global $MODULE_URL;\n $shots_url_web = $MODULE_URL . '/images/shots/';\n\n $offset = 0;\n if (isset($_POST['offset'])) {\n $offset = $_POST['offset'];\n }\n $next = $offset + $LIMIT;\n\n $table = $xoopsDB->prefix('mylinks_links');\n $sql1 = \"SELECT count(*) FROM $table\";\n $res1 = sql_exec($sql1);\n $row1 = $xoopsDB->fetchRow($res1);\n $total = $row1[0];\n\n echo \"There are $total links <br />\\n\";\n echo \"Transfer $offset - $next th link <br /><br />\";\n\n $sql2 = \"SELECT * FROM $table ORDER BY lid\";\n $res2 = sql_exec($sql2, $LIMIT, $offset);\n\n while ($row = $xoopsDB->fetchArray($res2)) {\n $lid = $row['lid'];\n $uid = $row['submitter'];\n $cid = $row['cid'];\n $url = $row['url'];\n $hits = $row['hits'];\n $rating = $row['rating'];\n $votes = $row['votes'];\n $logourl = $row['logourl'];\n $comments = $row['comments'];\n $time_create = $row['date'];\n $time_update = $time_create;\n\n $title = addslashes($row['title']);\n\n $banner = '';\n $width = 0;\n $height = 0;\n\n if ($logourl) {\n $banner = $shots_url_web . $logourl;\n $size = getimagesize($banner);\n\n if ($size) {\n $width = (int)$size[0];\n $height = (int)$size[1];\n } else {\n echo \"<font color='red'>image size error: $banner</font><br />\";\n }\n\n $banner = addslashes($banner);\n }\n\n $desc = get_desc($lid);\n $desc = addslashes($desc);\n\n $cat = addslashes($cat_title_arr[$cid]);\n $search = \"$url $title $cat $desc\";\n\n $passwd = md5(rand(10000000, 99999999));\n\n echo \"$lid: $title <br />\";\n\n $sql = 'INSERT INTO ' . $table_link . ' (';\n $sql .= 'lid, uid, title, url, description, ';\n $sql .= 'search, passwd, time_create, time_update, ';\n $sql .= 'hits, rating, votes, comments, ';\n $sql .= 'banner, width, height';\n $sql .= ') VALUES (';\n $sql .= \"$lid, $uid, '$title', '$url', '$desc', \";\n $sql .= \"'$search', '$passwd', $time_create, $time_update, \";\n $sql .= \"$hits, $rating, $votes, $comments, \";\n $sql .= \"'$banner', $width, $height\";\n $sql .= ')';\n\n sql_exec($sql);\n\n insert_catlink($cid, $lid);\n }\n\n if ($total > $next) {\n form_next_link($next);\n } else {\n form_votedate();\n }\n}", "public function plugin_meta_links( $links, $file, $data, $status ) {\n\t\t\tif ( $file == plugin_basename( __FILE__ ) ) {\n\t\t\t\t$author1 = '<a href=\"' . $data[ 'AuthorURI' ] . '\">' . $data[ 'Author' ] . '</a>';\n\t\t\t\t$author2 = '<a href=\"http://jameskoster.co.uk/\">James Koster</a>';\n\t\t\t\t$author3 = '<a href=\"https://bradgriffin.me/\">Brad Griffin</a>';\n\t\t\t\t$links[ 1 ] = sprintf( __( 'By %s' ), sprintf( __( '%s and %s and %s' ), $author1, $author2, $author3 ) );\n\t\t\t}\n\t\t\treturn $links;\n\t\t}", "function callbackAddLinks($hookName, $args) {\n\t\t$request =& $this->getRequest();\n\t\tif ($this->getEnabled() && is_a($request->getRouter(), 'PKPPageRouter')) {\n\t\t\t$templateManager = $args[0];\n\t\t\t$currentJournal = $templateManager->get_template_vars('currentJournal');\n\t\t\t$announcementsEnabled = $currentJournal ? $currentJournal->getSetting('enableAnnouncements') : false;\n\n\t\t\tif (!$announcementsEnabled) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$displayPage = $currentJournal ? $this->getSetting($currentJournal->getId(), 'displayPage') : null;\n\n\t\t\t// Define when the <link> elements should appear\n\t\t\t$contexts = 'frontend';\n\t\t\tif ($displayPage == 'homepage') {\n\t\t\t\t$contexts = array('frontend-index', 'frontend-announcement');\n\t\t\t} elseif ($displayPage == 'announcement') {\n\t\t\t\t$contexts = 'frontend-' . $displayPage;\n\t\t\t}\n\n\t\t\t$templateManager->addHeader(\n\t\t\t\t'announcementsAtom+xml',\n\t\t\t\t'<link rel=\"alternate\" type=\"application/atom+xml\" href=\"' . $request->url(null, 'gateway', 'plugin', array('AnnouncementFeedGatewayPlugin', 'atom')) . '\">',\n\t\t\t\tarray(\n\t\t\t\t\t'contexts' => $contexts,\n\t\t\t\t)\n\t\t\t);\n\t\t\t$templateManager->addHeader(\n\t\t\t\t'announcementsRdf+xml',\n\t\t\t\t'<link rel=\"alternate\" type=\"application/rdf+xml\" href=\"'. $request->url(null, 'gateway', 'plugin', array('AnnouncementFeedGatewayPlugin', 'rss')) . '\">',\n\t\t\t\tarray(\n\t\t\t\t\t'contexts' => $contexts,\n\t\t\t\t)\n\t\t\t);\n\t\t\t$templateManager->addHeader(\n\t\t\t\t'announcementsRss+xml',\n\t\t\t\t'<link rel=\"alternate\" type=\"application/rss+xml\" href=\"'. $request->url(null, 'gateway', 'plugin', array('AnnouncementFeedGatewayPlugin', 'rss2')) . '\">',\n\t\t\t\tarray(\n\t\t\t\t\t'contexts' => $contexts,\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\treturn false;\n\t}", "protected function generateLinks()\n {\n if ( ! is_null($this->links) ) {\n foreach ( $this->links as $link ) {\n $this->addLine('<url>');\n $this->addLine('<loc>');\n $this->addLine($this->helpers->url(\n $link->link,\n $this->protocol,\n $this->host\n ));\n $this->addLine('</loc>');\n $this->addLine('<lastmod>' . date_format($link->updated_at, 'Y-m-d') . '</lastmod>');\n $this->addLine('</url>');\n }\n }\n }", "protected function prepare_links($item)\n {\n }", "function _fix_links_callback_forum($m)\n\t{\n\t\treturn 'index.php?page=forumview&id='.strval(import_id_remap_get('forum',strval($m[2]),true));\n\t}", "public function getFeedLink();", "protected function prepare_links($theme)\n {\n }", "function index_rel_link()\n {\n }", "function add_links_page($page_title, $menu_title, $capability, $menu_slug, $callback = '', $position = \\null)\n {\n }", "public function getLink(): string;", "public function getLink(): string;", "function amazon_get_links() {\n\t// sanitze the url link.\n\t$sanitized_link = esc_url_raw( ( $_POST['amazon_link'] ) );\n\n\t// cache duration logic.\n\t$cache_duration = sanitize_text_field( ( $_POST['cache_duration_option'] ) );\n\n\t// URL Validation.\n\tif ( ! isset( $sanitized_link ) ) {\n\t\treturn;\n\t}\n\tif ( ! wp_http_validate_url( $sanitized_link ) ) {\n\t\treturn;\n\t}\n\n\t// gets the data from the sanitized link.\n\t$amazon_data = wp_remote_retrieve_body( wp_safe_remote_get( $sanitized_link ) );\n\t// sets the cache.\n\tset_transient( 'amazon_cached_data', $amazon_data, (int) $cache_duration );\n\n\t// sends the data back to js to append it (the html).\n\twp_send_json_success( $amazon_data );\n}", "public abstract function prepare_item_links($id);", "function link_target_meta_box($link)\n {\n }", "function onAcesefIlinks(&$text) {\r\n\t\tif (ACESEF_PACK == 'pro' && $this->AcesefConfig->ilinks_mode == '1') {\r\n\t\t\t$component = JRequest::getCmd('option');\r\n\t\t\t$ext_params\t= AcesefCache::getExtensionParams($component);\r\n\t\t\t\r\n\t\t\tif ($ext_params && class_exists('AcesefIlinks')) {\r\n\t\t\t\tAcesefIlinks::plugin($text, $ext_params, 'trigger', $component);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function get_self_link()\n {\n }", "public function setLink($link);", "function _links_add_target($m)\n {\n }", "function callback_url(array $args)\n {\n }", "public function linkPass()\n {\n }", "function getAdminLinks()\n {\n }", "public function maybe_make_link($url)\n {\n }", "public function getLinks()\n\t{\n\t\t$data = $this->curl->curlGetReq($this->baseURL);\n\t\t$query = \"//a/@href\";\n\t\t$links = $this->curl->getDOMData($data,$query);\n\t\t\n\n\t\t//var_dump($links[0]);\n\n\t\tforeach ($links as $link)\n\t\t{\n\t\t\t\n\t\t\tif($link->value == \"/calendar\")\n\t\t\t{\n\t\t\t\t$this->calendarLink = $this->baseURL. str_replace(\"/\", \"\", $link->value).\"/\";\n\t\t\t\t\n\t\t\t}\n\t\t\tif($link->value == \"/cinema\")\n\t\t\t{\n\t\t\t\t$this->cinemaLink = $this->baseURL. str_replace(\"/\", \"\", $link->value).\"/\";\n\t\t\t}\n\t\t\tif($link->value == \"/dinner\")\n\t\t\t{\n\t\t\t\t$this->dinnerLink = $this->baseURL. str_replace(\"/\", \"\", $link->value).\"/\";\n\t\t\t\t$this->dinnerLoginLink = $this->dinnerLink.\"login\";\n\t\t\t}\n\n\t\t\n\t\t\n\t\t}\n\t}", "public function lanman_link_callback($matches) {\n $x0 = $matches[0];\n $n0 = $matches[1]; # lan,16,4 or wg,1235\n $txt = $matches[2]; # text of <ls> tag}\n $parts = explode(\",\",$n0);\n if ($parts[0] == \"lan\") {\n $page = $parts[1];\n $linenum = $parts[2];\n $url = 'https://www.sanskrit-lexicon.uni-koeln.de/scans/csl-apidev/servepdf.php?dict=LAN'; #&page=111-a\n # This ampersand causes problems in basicdisplay parsing!\n #$href = \"$url\" . \"&page=$page\";\n $href = \"$url\" . \"_page=$page\";\n # It is useful to also have the line number visible in the url of the displayed url\n $href = \"$href\" . \"_line=$linenum\";\n $tooltip = \"Lanman Sanskrit Reader, page $page, line $linenum\";\n $x = \"<lanlink href='$href' n='$tooltip' target='_lanlink'>$txt</lanlink>\";\n }else if ($parts[0] == \"wg\") {\n // https://funderburkjim.github.io/WhitneyGrammar/step1/pages2c.html#section_1234\n $section = $parts[1];\n $url = 'https://funderburkjim.github.io/WhitneyGrammar/step1/pages2c.html';\n $href = \"$url#section_$section\";\n $tooltip = \"Whitney Grammar, section $section\";\n $x = \"<lanlink href='$href' n='$tooltip' target='_wglink'>$txt</lanlink>\";\n }else { // $n0 mal-formed\n $x = $x0; // return unchanged\n }\n return $x;\n}", "public function detect_links()\r\n\t{\r\n\t\t$this->loop_text_nodes(function($child) {\r\n\t\t\tpreg_match_all(\"/(?:(?:https?|ftp):\\/\\/|(?:www|ftp)\\.)(?:[a-zA-Z0-9\\-\\.]{1,255}\\.[a-zA-Z]{1,20})(?::[0-9]{1,5})?(?:\\/[^\\s'\\\"]*)?(?:(?<![,\\)\\.])|[\\S])/\",\r\n\t\t\t$child->get_text(),\r\n\t\t\t$matches,\r\n\t\t\tPREG_PATTERN_ORDER | PREG_OFFSET_CAPTURE);\r\n\r\n\t\t\tif(count($matches[0]) == 0)\r\n\t\t\t\treturn;\r\n\r\n\t\t\t$replacment = array();\r\n\t\t\t$last_pos = 0;\r\n\r\n\t\t\tforeach($matches[0] as $match)\r\n\t\t\t{\r\n\t\t\t\tif(substr($match[0], 0, 3) === 'ftp' && $match[0][3] !== ':')\r\n\t\t\t\t\t$url = 'ftp://' . $match[0];\r\n\t\t\t\telse if($match[0][0] === 'w')\r\n\t\t\t\t\t$url = 'http://' . $match[0];\r\n\t\t\t\telse\r\n\t\t\t\t\t$url = $match[0];\r\n\r\n\t\t\t\t$url = new SBBCodeParser_TagNode('url', array('default' => htmlentities($url, ENT_QUOTES | ENT_IGNORE, \"UTF-8\")));\r\n\t\t\t\t$url_text = new SBBCodeParser_TextNode($match[0]);\r\n\t\t\t\t$url->add_child($url_text);\r\n\r\n\t\t\t\t$replacment[] = new SBBCodeParser_TextNode(substr($child->get_text(), $last_pos, $match[1] - $last_pos));\r\n\t\t\t\t$replacment[] = $url;\r\n\t\t\t\t$last_pos = $match[1] + strlen($match[0]);\r\n\t\t\t}\r\n\r\n\t\t\t$replacment[] = new SBBCodeParser_TextNode(substr($child->get_text(), $last_pos));\r\n\t\t\t$child->parent()->replace_child($child, $replacment);\r\n\t\t}, $this->get_excluded_tags(SBBCodeParser_BBCode::AUTO_DETECT_EXCLUDE_URL));\r\n\r\n\t\treturn $this;\r\n\t}", "private function links()\n {\n foreach ($this->controller->links as $value)\n echo \"\\t<link rel='stylesheet' href='\" . DOMAIN . $value . \"' />\\n\";\n }", "function _make_url_clickable_cb($matches)\n{\n\t$ret = '';\n\t$url = $matches[2];\n\t$url = clean_url($url);\n\tif ( empty($url) )\n\t\treturn $matches[0];\n\t// removed trailing [.,;:] from URL\n\tif ( in_array(substr($url, -1), array('.', ',', ';', ':')) === true ) {\n\t\t$ret = substr($url, -1);\n\t\t$url = substr($url, 0, strlen($url)-1);\n\t}\n\treturn $matches[1] . '<a href=\"'.$url.'\"'.COMMENT_NOFOLLOW.'>'.$url.'</a>' . $ret;\n}", "function links_popup_script($text = 'Links', $width = 400, $height = 400, $file = 'links.all.php', $count = \\true)\n {\n }", "function comments_rss_link($link_text = 'Comments RSS')\n {\n }", "function lean_links($links, $attributes = array('class' => 'links')) {\n \n // Link 'Add a comment' link to node page instead of comments reply page\n if($links['comment_add']['href']){\n $arr_linkparts = explode('/', $links['comment_add']['href']);\n $links['comment_add']['href'] = 'node/'.$arr_linkparts[2];\n }\n // Don't show 'reply' link for comments\n unset($links['comment_reply']);\n \n return theme_links($links, $attributes);\n}", "function getLink() {\r\n return $this->_link;\r\n }", "function getLink() {\r\n return $this->_link;\r\n }", "function createLinks($content = '') {\n // get the post ID\n global $post;\n $postID = $post->ID;\n // create the blink class instance\n $blinkClass = new blink();\n // get the maximum number of links per page\n //$options = $this->getAdminOptions();\n $admin_options = get_option('BlinkPluginAdminOptions');\n $maxLinks = $admin_options['maxLinks'];\n $cssClass = get_option('css_class');\n // get an array of current links\n $current_links = $this->getCurrentLinks($postID);\n $current_links_gids = array();\n foreach($current_links as $link) {\n $current_links_gids[] = $link['gid'];\n }\n $existing_link_count = count($current_links);\n // no pre-existing links\n if ($existing_link_count == 0) {\n // get goal links\n $goal_links = $this->getLinkGoals();\n // add them to content\n if (count($goal_links)) {$currentLinks = $blinkClass->markup_text(&$content, $goal_links, $maxLinks, $cssClass);}\n // if any were added update database\n if (count($currentLinks)>0) {\n $this->insertBlinks($currentLinks, $postID);\n }\n } else { // if links allready exist\n // add existing links\n $stillCurrentLinks = $blinkClass->markup_text(&$content, $current_links, $existing_link_count, $cssClass);\n $stillCurrentLinks_gids = array();\n foreach ($stillCurrentLinks as $link) {\n $stillCurrentLinks_gids[] = $link['gid'];\n }\n $existing_link_count = count($stillCurrentLinks);\n // delete removed links\n $deleted_links = array();\n foreach ($current_links as $key => $link) {\n if (!in_array($link['gid'], $stillCurrentLinks_gids)) {\n $deleted_links[] = $link;\n }\n }\n if (count($deleted_links)) $this->removeBlinks($deleted_links, $postID);\n // check if there is room for more links\n if ($existing_link_count < $maxLinks) {\n // get an array of all goal links\n $linkGoals = $this->getLinkGoals();\n //remove current links from link goals\n // build lookup hash\n $cur_gids = array();\n foreach ($stillCurrentLinks as $link) {$cur_gids[] = $link['gid']; }\n // strip out the exising links\n foreach ($linkGoals as $key=>$link) {if (in_array($link['gid'], $cur_gids)) {unset($linkGoals[$key]);}}\n //new link amounts\n $links_available = $maxLinks - $existing_link_count;\n // add new links\n $new_links = $blinkClass->markup_text(&$content, $linkGoals, $links_available, $cssClass);\n // update the existing links in the table\n // combine the old links with the newly added links\n $this->insertBlinks($new_links,$postID);\n }\n }\n return $content;\n }", "function addLink($link){\r\n if(!$this->isURLExistingInLinkArry($link->getURL())){\r\n $this->crawlPage($link);\r\n }\r\n \r\n }", "protected function prepare_links($user)\n {\n }", "public function linkAction() : object\n {\n $title = \"Markdown\";\n $text = file_get_contents(__DIR__ . \"/textfiles/clickable.txt\");\n // $filter = new MyTextFilter();\n\n // Deal with the action and return a response.\n $this->app->page->add(\"textfilter/clickable\", [\n \"text\" => $text,\n \"html\" => $this->filter->parse($text, [\"link\"])\n ], \"main\");\n return $this->app->page->render([ \"title\" => $title ]);\n }", "function get_choices_links (array &$links) {\n //Adds a link to /push\n $links[] = [lang_get(\"PushMessage\"), get_url('push')];\n }", "private function convertLinks(){\n\t\tif(!isset($this->course['course_links']))\n\t\t\treturn;\n\t\t\n\t\t//Create folder in tmp for links\n mkdir('./tmp/links');\n\t\t$sectionCounter = 0;\n\n\t\t//Add section to manifest\n\t\tHelper::addIMSSection($this->manifest, $this->currentSectionCounter, $this->identifierCounter, 'Links');\n\n $section = $this->manifest->organizations->organization->item->item[$this->currentSectionCounter];\n \n\t\t//First add all general links\n\t\t\n\t\tforeach($this->course['course_links'] as $link_url)\n\t\t{\n\t\t\tif(intval($link_url['category'])==0)\n\t\t\t{\n\t\t\t\t//Create the xml\n\t\t\t\tHelper::createLinkXML($link_url);\t\t\t\t\n\t\n\t\t\t\t//Edit the manifest\n\t\t\t\tHelper::addIMSItem($section, $this->manifest, $sectionCounter, $this->identifierCounter, $this->resourceCounter, 'link', $link_url, 0);\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tforeach($this->course['course_link_categories'] as $cat)\n\t\t{\n\t\t\t//Add the label to the manifest\n\t\t\tHelper::addIMSLabel($section, $sectionCounter, $this->identifierCounter, $cat['name'], 0);\n\n\t\t\t//Add links below the label\n\t\t\tforeach($this->course['course_links'] as $link_url)\n\t\t\t{\n\t\t\t\tif(intval($link_url['category'])==$cat['id'])\n\t\t\t\t{\n\t\t\t\t\t//Create the xml\n\t Helper::createLinkXML($link_url); \n\t\t\t\t\t\n \t\t//Edit the manifest\n\t\t\t\t\tHelper::addIMSItem($section, $this->manifest, $sectionCounter, $this->identifierCounter, $this->resourceCounter, 'link', $link_url, 1);\n \t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Proceed to next section\n\t\t$this->currentSectionCounter++;\n\t\t\t\n\t\t\n\t}", "function bps_plugin_extra_links($links, $file) {\n\tstatic $this_plugin;\n\tif ( ! current_user_can('install_plugins') )\n\t\treturn $links;\n\tif ( ! $this_plugin ) $this_plugin = plugin_basename(__FILE__);\n\tif ( $file == $this_plugin ) {\n\t\t$links[2] = '<a href=\"http://forum.ait-pro.com/forums/topic/bulletproof-security-pro-version-release-dates/\" target=\"_blank\" title=\"BulletProof Security Pro Version Release Dates and Whats New\">' . __('Version Release Dates|Whats New', 'bulleproof-security').'</a>';\n\t\t$links[] = '<a href=\"http://forum.ait-pro.com/\" target=\"_blank\" title=\"BulletProof Security Pro Forum\">' . __('Forum|Support', 'bulleproof-security').'</a>';\n\t\t$links[] = '<a href=\"admin.php?page=bulletproof-security/admin/tools/tools.php#bps-tabs-15\" title=\"Pro Tools Plugin Update Check tool\">' . __('Manual Upgrade Check', 'bulleproof-security') . '</a>';\n\n/*\techo '<pre>';\n\tprint_r($links);\n\techo '</pre>';\n*/\t\n\t}\n\n\treturn $links;\n}", "public function getLinksList(){\n return $this->_get(9);\n }", "public function processExternalLinks($matches)\n {\n // create $data object with all results from $matches\n $data = new \\stdClass();\n $data->link = $matches[2];\n $data->shortname = $matches[3];\n $data->board = $this->radix_coll->getByShortname($data->shortname);\n $data->query = $matches[4];\n\n $build_href = [\n // this will wrap the <a> element with a container element [open, close]\n 'tags' => ['open' => '', 'close' => ''],\n\n // external links; defaults to 4chan\n 'short_link' => '//boards.4chan.org/'.$data->shortname.'/',\n 'query_link' => '//boards.4chan.org/'.$data->shortname.'/res/'.$data->query,\n\n // additional attributes + backlinking attributes\n 'attributes' => '',\n 'backlink_attr' => ' class=\"backlink\" data-function=\"highlight\" data-backlink=\"true\" data-board=\"'\n .(($data->board)?$data->board->shortname:$data->shortname).'\" data-post=\"'.$data->query.'\"'\n ];\n\n $build_href = Hook::forge('Foolz\\Foolslide\\Model\\Comment::processExternalLinks.result.html')\n ->setObject($this)\n ->setParam('data', $data)\n ->setParam('build_href', $build_href)\n ->execute()\n ->get($build_href);\n\n if (!$data->board) {\n if ($data->query) {\n return implode('<a href=\"'.$build_href['query_link'].'\"'.$build_href['attributes'].'>&gt;&gt;&gt;'.$data->link.'</a>', $build_href['tags']);\n }\n\n return implode('<a href=\"'.$build_href['short_link'].'\">&gt;&gt;&gt;'.$data->link.'</a>', $build_href['tags']);\n }\n\n if ($data->query) {\n return implode('<a href=\"'.$this->uri->create([$data->board->shortname, 'post', $data->query]).'\"'\n .$build_href['attributes'].$build_href['backlink_attr'].'>&gt;&gt;&gt;'.$data->link.'</a>', $build_href['tags']);\n }\n\n return implode('<a href=\"' . $this->uri->create($data->board->shortname) . '\">&gt;&gt;&gt;' . $data->link . '</a>', $build_href['tags']);\n }", "function noticias_links(){\n \t\n $html=site('http://www.jornalnoticias.co.mz/');\n\t\n\tforeach($html->find('.items-row')as $elms){\n\t\t\n\t\t\n\t\tforeach($elms->find ('.jn-postheader a') as $elms2){\n\t\t\n\t $j[]=mb_convert_encoding( \"http://www.jornalnoticias.co.mz\".$elms2->href, \"HTML-ENTITIES\", \"UTF-8\");\n\t\n\t\n\t\t\n\t\t}\n\t\t\n\t}\n\t\n\treturn $j;\n }", "function G3Client_PluginMetaLinks($links, $file){\n if($file == plugin_basename(__FILE__)) {\n\n }\n\n return $links;\n}", "function bookmark_tools_forward_old_link($hook, $type, $return, $params) {\n \n $result = $return;\n $parts = $return['segments'];\n \n switch ($parts[0]) {\n case 'list':\n default:\n $owner = get_entity($parts[1]);\n if (!$owner) {\n return $result; // 404\n }\n $url = elgg_get_site_url() . 'bookmarks/owner/' . $owner->username;\n if (elgg_instanceof($owner, 'group', '', 'ElggGroup')) {\n $url = elgg_get_site_url() . 'bookmarks/group/' . $owner->guid . '/all';\n }\n \n forward($url);\n return FALSE;\n break;\n }\n }", "function _fix_links_callback_topic($m)\n\t{\n\t\treturn 'index.php?page=topicview&id='.strval(import_id_remap_get('topic',strval($m[2]),true));\n\t}", "public function test_links_parse(): void\n {\n $request = GroupRequest::ofUserName(self::DEFAULT_GROUP_DEEPLINK);\n $this->resolve($request, function (?int $groupId, ?int $accessHash) {\n $count = 0;\n $handler = function (?MessageModel $message = null) use (&$count) {\n if ($message) {\n $this->assertEquals('qweq', $message->getText());\n $count++;\n }\n };\n $client = new LinkParseScenario(\n new GroupId($groupId, $accessHash),\n $this->clientGenerator,\n new OptionalDateRange(),\n $handler,\n self::USERNAME\n );\n $client->setTimeout(self::TIMEOUT);\n $client->startActions();\n $this->assertEquals(1, $count);\n });\n }", "protected function prepare_links($plugin)\n {\n }", "public function makeClickableLinks()\n {\n $this->texte = trim(preg_replace(\n \"#(<a( [^>]+?>|>))<a [^>]+?>([^>]+?)</a></a>#i\",\n \"$1$3</a>\",\n preg_replace_callback(\n '#([\\s>])((www|ftp)\\.[\\w\\\\x80-\\\\xff\\#$%&~/.\\-;:=,?@\\[\\]+]*)#is',\n function ($matches) {\n return $this->makeClickableUrlCallback($matches, 'http://');\n },\n preg_replace_callback(\n '#([\\s>])([\\w]+?://[\\w\\\\x80-\\\\xff\\#$%&~/.\\-;:=,?@\\[\\]+]*)#is',\n function ($matches) {\n return $this->makeClickableUrlCallback($matches);\n },\n ' '.$this->texte\n )\n )\n ));\n\n return $this;\n }", "protected static function doInternalAnchorsCallback($matches)\n {\n $whole_match = $matches[1];\n\n $text = trim($matches[2], '/');\n\n if(count($matches) > 3)\n {\n $url = $matches[3] == '' ? $matches[4] : $matches[3];\n $title =& $matches[7];\n }\n else\n {\n $url = $matches[2];\n $title = '';\n }\n\n $url = self::encodeAttribute($url);\n\n $red =(self::isLink($url)) ? '' : ' redlink';\n\n $attribs = 'class=\"internal'.$red.'\"';\n\n $url = self::encodeAttribute(self::getLink($url));\n\n $redAdvise =($red) ? jgettext('Click to create this page...') : '';\n\n $attribs .=((isset($title) && $title) || $redAdvise)\n ? ' title=\"'.$redAdvise.$title.'\"'\n : '';\n\n return JHtml::link($url, $text, $attribs);\n }" ]
[ "0.7269679", "0.7185538", "0.68854636", "0.6841672", "0.67582935", "0.6750871", "0.67384475", "0.67384475", "0.67361623", "0.6686169", "0.66398823", "0.66398823", "0.66368014", "0.66105616", "0.6588183", "0.6555275", "0.6547349", "0.6538612", "0.6515774", "0.65001607", "0.6492833", "0.6425041", "0.6425041", "0.64074045", "0.6399784", "0.63692594", "0.6367142", "0.6357804", "0.63422835", "0.63050056", "0.6274781", "0.62695724", "0.62585115", "0.62486434", "0.6213468", "0.62133825", "0.6212202", "0.6202579", "0.61884856", "0.6184811", "0.6170197", "0.6155334", "0.6140517", "0.611523", "0.6108361", "0.6080787", "0.6076178", "0.606523", "0.6059879", "0.60420156", "0.603941", "0.6033235", "0.60266095", "0.6022892", "0.60210323", "0.598225", "0.5978854", "0.5977087", "0.59716356", "0.5971472", "0.59671706", "0.59671706", "0.59621656", "0.5962067", "0.59537756", "0.59469634", "0.5945056", "0.59378225", "0.5937679", "0.59337187", "0.5931055", "0.5930579", "0.5928531", "0.59242195", "0.5913951", "0.5899307", "0.58916456", "0.5879523", "0.5871939", "0.5868678", "0.58616793", "0.58610624", "0.58610624", "0.58596325", "0.58540803", "0.5850687", "0.58476824", "0.5846394", "0.58383256", "0.5836038", "0.5827962", "0.5817831", "0.5817449", "0.5814566", "0.58134925", "0.58088845", "0.5807584", "0.58075804", "0.58054614", "0.57954824" ]
0.6383457
25
Callback function, berechnet die eingabe von Titeln
private function rep_title_callback($match) { $query = substr($match[0],3,-3); $title = '<h2>'.$query.'</h2>'; return $title; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function callback();", "abstract protected function registerCallback();", "function completeCallback()\r\n { }", "private function onCompletion()\n {\n }", "function handle_callback() {\r\n }", "function callback_text(array $args)\n {\n }", "public function getDefaultCallback();", "public function callback() {\n\t\t$this->load->library('twconnect');\n\n\t\t$ok = $this->twconnect->twprocess_callback();\n\t\t\n\t\tif ( $ok ) { redirect('twtest/success'); }\n\t\telse redirect ('twtest/failure');\n\t}", "public function active_callback()\n {\n }", "public function active_callback()\n {\n }", "public function active_callback()\n {\n }", "public function active_callback()\n {\n }", "public function active_callback()\n {\n }", "function example_callback( $example ) {\n echo \"HAI\";\n return $example;\n}", "function myCallback($data)\r\n\r\n{\r\n\techo 'ant builded'.$data;\r\n\t\r\n//\tt3lib_div::debug($this->model->compilerView);\r\n//\t\tif($this->model->compilerView==5) {\r\n//\t\t\t\t\t return $this->compiler();\r\n//\t\t\t\t} else {\r\n//\t\t\t\t\t return $this->compiler();\r\n//\t\t\t\t}\r\n\t\r\n\t// echo '<script>document.location.href=\"'.t3lib_div::getIndpEnv('TYPO3_SITE_URL').'fileadmin/flexfiles/swf/index_'.$this->model->projectStartingRecord['uid'].'.html\" </script>';\r\n\t//\r\n\techo $this->compiler();\r\n \t// \r\n\r\n}", "function callback_html(array $args)\n {\n }", "function callback_file(array $args)\n {\n }", "public function trasnaction(){\n\n\t}", "function trancos_admin_callback() {\n\ttrancos_editor_callback();\n\ttrancos_author_callback();\n}", "function reserv_cb() {\n\n $fields = array();\n $errors = new WP_Error();\n\n // Buffer output\n ob_start();\n\n // Custom registration, go!\n reserv($fields, $errors);\n\n // Return buffer\n// return ob_get_clean();\n}", "public function onloadCallback();", "function tideways_span_callback($name, $callback)\n{\n}", "final public function view($callback){\r\n if(is_callable($callback)){\r\n \\call_user_func($callback, $this->tpml_control);\r\n }else{\r\n print(\"Lo siento, pero nesecitas una funcion anonima que obtenga el controlador de plantillas.\");\r\n }\r\n }", "private function callCallback() {\n\t\tif ($this->callback !== null) {\n\t\t\t$response = $this->buildResponse();\n\t\t\tcall_user_func($this->callback, $response, $this->data);\n\t\t}\n\t}", "public function take_action()\n {\n }", "public function take_action()\n {\n }", "public function callbackSuccess()\r\n {\r\n $this->redirectTo('question/user/'.$this->Value('uid') . \"/infouppdaterat\");\r\n }", "function callback_select(array $args)\n {\n }", "public function after_run(){}", "public function defaultCallback()\n {\n return func_get_arg(0);\n }", "public function kong_inbox_callback() { \n\n\n \n $kong_inbox_list_table = new Kong_Inbox_List_Table();\n\n // Fetch, prepare, sort, and filter our data.\n $kong_inbox_list_table->prepare_items();\n\n if(strpos($_REQUEST['page'],'konginbox' ) !== false){\n $taxonomy = 'ticket_status';\n $terms_slug = substr(strstr($_REQUEST['page'], '-'),1); \n \n }\n if(strpos($_REQUEST['page'],'kongfolder') !== false){\n $taxonomy = 'ticket_system';\n $terms_slug = substr(strstr($_REQUEST['page'], '-'),1);\n }\n\n\n ?>\n <div class=\"wrap\">\n <h2><?php echo ucwords($terms_slug);?></h2>\n <!-- Forms are NOT created automatically, so you need to wrap the table in one to use features like bulk actions -->\n <form id=\"inbox-filter\" method=\"get\" class=\"inbox-filter\">\n <!-- For plugins, we also need to ensure that the form posts back to our current page -->\n <input type=\"hidden\" name=\"page\" value=\"<?php echo $_REQUEST['page'] ?>\" />\n <!-- Now we can render the completed list table -->\n <?php $kong_inbox_list_table->display(); ?>\n </form>\n\n </div>\n <?php \n \n }", "abstract protected function after();", "public function _get_update_callback()\n {\n }", "public function done();", "public function testEventCallBackGetItem()\n {\n }", "public function INTincScript_processCallback() {}", "public function callbackSuccess()\n { \n /*$xmlfile = ANAX_APP_PATH . 'rss/' . $this->id . \"_rss.xml\";\n if(file_exists($xmlfile)) {\n $rss = new \\Anax\\Rss\\RssFeed();\n $rss->setDI($this->di);\n $xml = $rss->getFeed($this->tag);\n $fh = fopen($xmlfile, 'w') or die(\"can't open file\");\n fwrite($fh, $xml);\n fclose($fh);\n }*/\n \n $this->redirectTo($this->redirect);\n }", "public function anotify() {\n\n\t$result = null;\n\tforeach( $this->callback_array as $callback ) {\n\t $result = $callback->do_callback( array(\n\t\t \n\t\t 'user_email_template' => $this->user_email_template ,\n\t\t 'user_email_field' => $this->user_email_field ,\n\t\t 'admin_email_template' => $this->admin_email_template,\n\t\t 'user_email_subject' => $this->user_email_subject,\n\t\t 'admin_email_subject' => $this->admin_email_subject,\n\t\t 'send_to_user'\t => $this->send_to_user,\n\t\t 'recipient'\t\t => $this->recipient,\n\t\t 'request'\t\t => $this->get_request()\n\t\t),\n\t\t $result\n\t );\n\t}\n\treturn $result;\n }", "public function setCallback($callback);", "public function onSuccess();", "public function onSuccess();", "function callBackUpdate($_TELEGRAM, $th, $tc){\n // YOUR BOT CODE GOES HERE\n if ($_TELEGRAM['text'] == \"/start\")\n {\n send($_TELEGRAM['cid'], \"Hi! Welcome on MTgBot Example!\\nThis message was sent by Thread #$th.\\nThe Thread #$th sent $tc messages.\");\n }\n\n}", "function callback($input=NULL,$function='empty')\n\t{\n\t\treturn $this->waterfall($input,array($function));\n\t}", "function complete();", "abstract function after();", "public function getCallbackAction() {}", "public function getCallbackAction() {}", "public function testEventCallBackGet()\n {\n }", "abstract public function handler() : void;", "public function getCallback($option);", "public function callback()\n {\n $this->jsonResponse([\n 'ok' => true\n ]);\n }", "protected function after(){}", "protected function after(){}", "protected function after(){}", "function render_callback() {\n\t\t$callback = NULL === $this->render_callback\n\t\t\t? array( $this, 'render' )\n\t\t\t: $this->render_callback;\n\n\t\tcall_user_func( $callback, $this );\n\t}", "public function CallBack($response) {\n\t\n\t}", "public abstract function onSuccess();", "protected abstract function onExecute();", "private static function tt($ttbl, $callback, $pid=0, $z=0){\n\n\t\tif($rows = select::_($ttbl, self::CI_PID, $pid)){\n\n\t\t\tsort::_($rows, self::CI_IDX, true, true);\n\n\t\t\tforeach($rows as $row){\n\n\t\t\t\tlist($id, $pid, $idx) = $row;\n\n\t\t\t\t$callback($id, $pid, $idx, $z, array_slice($row, 3));\n\n\t\t\t\tself::tt($ttbl, $callback, $id, $z + 1);\n\t\t\t}\n\t\t}\n\t}", "function tb_section_callback() {\n echo \"<p>Theme settings for Tickets Broadway</p>\";\n}", "function after_update() {}", "function render_callback() {\n\t\t$callback = NULL === $this->render_callback\n\t\t\t? array( $this, 'render_page' )\n\t\t\t: $this->render_callback;\n\n\t\tcall_user_func( $callback, $this );\n\t}", "protected function done()\n {\n }", "public function callNow()\n {\n $c = $this->callback;\n $c();\n }", "function training_text_message_callback() {\n $header = array(\n array('data' => t('Num'), 'field' => 'id'),\n array('data' => t('Author'), 'field' => 'name'),\n array('data' => t('Title'), 'field' => 'title'),\n array('data' => t('Text'), 'field' => 'body'),\n array('data' => t('Edit')),\n );\n $rows = array();\n $query = db_select('text_message', 'tm');\n $query->innerJoin('users', 'u', 'tm.uid = u.uid');\n $query\n ->fields('tm', array('id', 'title', 'body'))\n ->fields('u', array('name'));\n $result = $query\n ->extend('PagerDefault')\n ->limit(5)\n ->extend('TableSort')\n ->orderByHeader($header)\n ->execute()->fetchAll();\n if (!empty($query)) {\n foreach ($result as $value) {\n $rows[] = array(\n $value->id,\n $value->name,\n check_plain($value->title),\n check_plain($value->body),\n l(t('Edit'), 'training/message/edit/' . $value->id),\n );\n }\n }\n\n return array(\n array(\n '#theme' => 'table',\n '#header' => $header,\n '#rows' => $rows,\n ),\n array(\n '#theme' => 'pager',\n '#quantity' => 5,\n '#tags' => array('<<', '<', '', '>', '>>'),\n ),\n );\n}", "function handle() ;", "function callback_url(array $args)\n {\n }", "function cb_init(){\n\t}", "function callback_textarea(array $args)\n {\n }", "function callback_number(array $args)\n {\n }", "public function get_callback() {\n\t\treturn array( $this, 'render' );\n\t}", "function callback_checkbox(array $args)\n {\n }", "protected function getUpdateAfterFunction()\n {\n \n }", "public function runSuccess();", "public function after_insert() {}", "public function doneAction()\n\t{\n\t\n\t}", "public function onRun()\n {\n }", "public function callbackSuccess()\n {\n $this->AddOutput(\"<p><i>Välkommen till Allt Om Landskapsfotografering! Ditt användare id är: \" . $this->acronym . \" </i></p>\");\n $this->redirectTo();\n }", "function OnAfterApply(){\n }", "public function callback(Supplier $supplier);", "function lokalkoenig_merkliste_ajax_callback_rename($tid){\n \n $newname = trim($_POST[\"name\"]);\n $manager = new \\LK\\Merkliste\\UserMerkliste();\n $merkliste = $manager->loadMerkliste($tid);\n \n if(!$merkliste){\n drupal_set_message(\"aaaa\"); \n drupal_goto($manager ->getUrl());\n }\n \n if(!$newname){\n drupal_set_message(\"Bitte vergeben Sie einen eindeutigen Merklisten-Titel.\"); \n drupal_goto($merkliste ->getUrl());\n } \n \n $new_merkliste = $manager->renameMerkliste($merkliste, $newname);\n \n if(!$new_merkliste){\n drupal_set_message('Es ist ein Fehler passiert.');\n drupal_goto($manager ->getUrl());\n }\n \n drupal_set_message(\"Die Merkliste wurde in <b>\". $new_merkliste ->getName() .\"</b> umbenannt.\");\n drupal_goto($new_merkliste ->getUrl());\n}", "function viewEvent($req, &$t) {\n\n\t}", "public function success();", "public function onCallback($param)\n\t{\n\t\t$this->raiseEvent('OnCallback', $this, $param);\n\t}", "public function onCallback($param)\n\t{\n\t\t$this->raiseEvent('OnCallback', $this, $param);\n\t}", "function setCallback($c) {\n\t\t$this->_callback = $c ;\n\t}", "public function onDownloaded()\n {\n }", "public function onDownloaded()\n {\n }", "function truc() {\n}", "public function callback_number( $args ) {\n $this->callback_text( $args );\n }", "public function act()\n\t{\n\t\n\t}", "function after_save() {}", "public function complete();", "public function complete();", "public function myCallbackMethod() {\n $content = 'Hola';\n $element = array(\n '#markup' => $content\n );\n return $element;\n }", "public function after_run() {}", "abstract function selectHook();", "function callBack (&$controller, &$request, &$context) {\n\t}", "public function add_callback($callback)\n {\n }", "function render_callback() {\n\t\tif ( NULL === $this->render_callback ) {\n\t\t\t$sub_render_method = 'render_' . $this->field_type;\n\t\t\tcall_user_func( array( $this, $sub_render_method ) );\n\t\t} else {\n\t\t\tcall_user_func( $this->render_callback, $this );\n\t\t}\n\t}", "abstract protected function renderComplete();" ]
[ "0.71250165", "0.6251414", "0.59976673", "0.5967255", "0.59317905", "0.58461964", "0.5845245", "0.5803567", "0.5783698", "0.5783698", "0.5783554", "0.5783554", "0.5783543", "0.57716006", "0.57363135", "0.56781137", "0.56378245", "0.5530718", "0.55252326", "0.5490038", "0.5467808", "0.54631805", "0.54524887", "0.54521704", "0.54421306", "0.54421306", "0.54275817", "0.54244083", "0.5402343", "0.53842705", "0.53740925", "0.5368958", "0.5356823", "0.53552777", "0.5353038", "0.53516114", "0.5342936", "0.5340435", "0.53376377", "0.5331219", "0.5331219", "0.53123075", "0.53032637", "0.52939904", "0.5292558", "0.5286703", "0.52861613", "0.52802587", "0.5274333", "0.5265486", "0.52625227", "0.52532524", "0.52532524", "0.52532524", "0.5252747", "0.5251092", "0.524826", "0.5242383", "0.52206904", "0.5216379", "0.5214121", "0.52112246", "0.5205616", "0.5202903", "0.52004325", "0.51984084", "0.51890635", "0.518352", "0.5176697", "0.5172493", "0.51714796", "0.51571774", "0.5154217", "0.5151038", "0.5150558", "0.51473165", "0.514557", "0.51416695", "0.51349205", "0.5110668", "0.5103704", "0.5093997", "0.5085982", "0.5084094", "0.5084094", "0.5082892", "0.5075197", "0.5075197", "0.50683373", "0.5067324", "0.5064762", "0.50580066", "0.505231", "0.505231", "0.50447214", "0.5043663", "0.50414866", "0.50338113", "0.5028963", "0.50249135", "0.5024626" ]
0.0
-1
Retrieve all navigation menus for that website.
public function getNavigation() { $search = $this->search(); $menuObjects = $search->getRecords(); $result = array(); $fields = $this->definition->fields(); $menuItemField = FieldService::instance()->getFieldByName($fields, "menuItems"); //$search->getRelationsForObjects("menuItems", $menuObjects); foreach($menuObjects as $menuObject) { $result[$menuObject->name] = $search->getRelations($menuItemField, $menuObject->id); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMenus() {}", "function api_list_menus() {\n\t\t$menus = array();\n\t\tforeach ( get_nav_menu_locations() as $menu_slug => $menu_id ) {\n\n\t\t\t$menu = $menu_id?self::get_menu_object($menu_id):false;\n\t\t\t$menus[ $menu_slug ] = $menu;\n\t\t}\n\n\t\treturn $menus;\n\t}", "public static function get_all_registered_navmenus(){\r\n return get_registered_nav_menus(); //create nav menu by ie: register_nav_menu( 'primary', __( 'Primary Menu', 'hoangweb' ) );\r\n }", "function GetMenu()\n {\n $sql = \"SELECT\n title,\n slug,\n id\n FROM\n pages\";\n $this->setSql($sql);\n return $this->getAll();\n }", "protected function getSiteLinks() {\n\t\t$menu = new MenuBuilder();\n\n\t\t// About link\n\t\t$title = Title::newFromText( $this->msg( 'aboutpage' )->inContentLanguage()->text() );\n\t\t$msg = $this->msg( 'aboutsite' );\n\t\tif ( $title && !$msg->isDisabled() ) {\n\t\t\t$menu->insert( 'about' )\n\t\t\t\t->addComponent( $msg->text(), $title->getLocalUrl() );\n\t\t}\n\n\t\t// Disclaimers link\n\t\t$title = Title::newFromText( $this->msg( 'disclaimerpage' )->inContentLanguage()->text() );\n\t\t$msg = $this->msg( 'disclaimers' );\n\t\tif ( $title && !$msg->isDisabled() ) {\n\t\t\t$menu->insert( 'disclaimers' )\n\t\t\t\t->addComponent( $msg->text(), $title->getLocalUrl() );\n\t\t}\n\n\t\t// Allow other extensions to add or override tools\n\t\tHooks::run( 'MobileMenu', [ 'sitelinks', &$menu ] );\n\t\treturn $menu->getEntries();\n\t}", "function get_registered_nav_menus()\n {\n }", "public function getMenus()\n\t{\n\n\t}", "public static function getMenus()\n\t{\n\t\t$sql = \"SELECT * FROM mod_menu\";\n\t\t$query = \\SimplCMS::$app->getDbConnection()->query($sql);\n\t\treturn $query->fetchAll( \\PDO::FETCH_ASSOC );\t\t\n\t}", "public function get_navs()\n\t{\n\t\t return $this->db->get($this->_table['navigation'])->result();\n\n\t}", "public function getQueryMenus();", "public static function menus()\n {\n return [];\n }", "public function getSiteLinks()\n {\n $menufile = $GLOBALS['registry']->get('fileroot') . '/config/menu.php';\n\n if (is_readable($menufile)) {\n include $menufile;\n if (isset($_menu) && is_array($_menu)) {\n return $_menu;\n }\n }\n\n return array();\n }", "public function getMenus()\n {\n\n $menus = array();\n\n $CoreMenuObject = new CoreMenuObject();\n $CoreMenuObject->setId('adminlessvariables');\n $CoreMenuObject->setName(CoreLanguage::get('admin:system:adminlessvars:link:name'));\n $CoreMenuObject->setHref('/admin/system/lessvariables');\n $CoreMenuObject->setTitle(CoreLanguage::get('admin:system:adminlessvars:link:title'));\n $CoreMenuObject->setTemplate('adminnavsection');\n $CoreMenuObject->setZIndex(20);\n $CoreMenuObject->setParentId(AdminModule::ADMIN_NAV_ID_SYSTEM);\n $CoreMenuObject->setTarget(AdminModule::ADMIN_NAV_ID);\n array_push($menus, $CoreMenuObject);\n\n return $menus;\n\n }", "public function getMenus()\n\t{\n\t\treturn $this->menus;\n\t}", "public static function getMenus()\n\t{\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true)\n\t\t\t->select('a.*, SUM(b.home) AS home')\n\t\t\t->from('#__menu_types AS a')\n\t\t\t->join('LEFT', '#__menu AS b ON b.menutype = a.menutype AND b.home != 0')\n\t\t\t->select('b.language')\n\t\t\t->join('LEFT', '#__languages AS l ON l.lang_code = language')\n\t\t\t->select('l.image')\n\t\t\t->select('l.sef')\n\t\t\t->select('l.title_native')\n\t\t\t->where('(b.client_id = 0 OR b.client_id IS NULL)');\n\n\t\t// Sqlsrv change\n\t\t$query->group('a.id, a.menutype, a.description, a.title, b.menutype,b.language,l.image,l.sef,l.title_native');\n\n\t\t$db->setQuery($query);\n\n\t\ttry\n\t\t{\n\t\t\t$result = $db->loadObjectList();\n\t\t}\n\t\tcatch (RuntimeException $e)\n\t\t{\n\t\t\t$result = array();\n\t\t\tJFactory::getApplication()->enqueueMessage(JText::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error');\n\t\t}\n\n\t\treturn $result;\n\t}", "public function navigation() {\n\t\t$menu = $this->data['nav_menu'] ?: 'main_menu';\n\t\t$navi = (new Navi())->build($menu);\n\n\t\tif ($navi->isEmpty()) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn $navi->toArray();\n\t}", "function get_menu() {\n return wp_get_nav_menu_items(9);\n }", "public function getMenus()\n {\n $menus = array();\n\n $CoreMenuObject = new CoreMenuObject();\n $CoreMenuObject->setId('performanceutils');\n $CoreMenuObject->setName('admin.performance.utils.link.name');\n $CoreMenuObject->setTitle('admin.performance.utils.link.title');\n $CoreMenuObject->setHref('/admin/performanceutils');\n $CoreMenuObject->setParentId(AdminModule::ADMIN_NAV_ID_SYSTEM);\n $CoreMenuObject->setTarget(AdminModule::ADMIN_NAV_ID);\n array_push($menus, $CoreMenuObject);\n\n return $menus;\n }", "public function index()\n {\n // get all Menus\n $Menus = Menu::all();\n\n return $Menus;\n }", "public function getLinksForMenu() : array\n {\n return $this->db->query(\"SELECT page_title, page_link FROM pages\");\n }", "function get_nav_menu_locations()\n {\n }", "public function getAllMenus()\n {\n $menus = $this->find('all', array(\n 'conditions' => array(\n 'Menu.active' => true,\n ),\n 'order' => array(\n 'Menu.order' => 'asc',\n ),\n 'joins' => array(\n array(\n 'table' => 'product_categories',\n 'alias' => 'ProductCategory',\n 'type' => 'left',\n 'conditions' => array(\n 'Menu.type = \"ProductCategory\"',\n 'Menu.child = ProductCategory.id'\n )\n ),\n array(\n 'table' => 'blog_categories',\n 'alias' => 'BlogCategory',\n 'type' => 'left',\n 'conditions' => array(\n 'Menu.type = \"BlogCategory\"',\n 'Menu.child = BlogCategory.id'\n )\n ),\n array(\n 'table' => 'pages',\n 'alias' => 'Page',\n 'type' => 'left',\n 'conditions' => array(\n 'Menu.type = \"Page\"',\n 'Menu.child = Page.id'\n )\n )\n ),\n 'fields' => array(\n 'Menu.id',\n 'Menu.introduction',\n 'Menu.name',\n 'Menu.image',\n 'Menu.type',\n 'Menu.parent_id',\n 'Menu.child',\n 'ProductCategory.slug',\n 'Page.slug',\n 'BlogCategory.slug'\n )\n ));\n\n return $menus;\n }", "function getNavs() {\n\t$pageData = getPageData();\n\t$li = '';\n\tforeach($pageData as $k => $v) {\n\t\t$li .= '<li><a href=\"' . COVER_PAGE . '?show=' . $k .'\">' . $k . '</a></li>' . \"\\n\";\n\t}\n\treturn $li;\n}", "public function index()\n {\n return $this->menu->all();\n }", "public function getSiteNavigation()\n\t{\n\t\t$navigation = Element::getSiteNavigation(Input::get('apiKey'));\n\n\t\treturn Response::json($navigation);\t\n\t}", "public function getAllMenuItems()\n\t{\n\t\t$out = array();\n\t\n\t\t$sql = \"SELECT\n\t\t\t\t\t`menu`.`link_id`,\n\t\t\t\t\t`menu_tree`.`parent_id`,\n\t\t\t\t\t`menu`.`redirect_url`,\n\t\t\t\t\t`menu_tree`.`sequence_no`,\n\t\t\t\t\t`menu`.`title_menu`,\n\t\t\t\t\t`menu`.`title_page`,\n\t\t\t\t\t`menu`.`template_name`,\n\t\t\t\t\t`menu`.`module_id`,\n\t\t\t\t\t`menu`.`security_level_id`,\n\t\t\t\t\t`menu`.`group_id`,\n\t\t\t\t\t`menu_tree`.`main_link`,\n\t\t\t\t\t`menu_tree`.`quick_link`,\n\t\t\t\t\t`menu_tree`.`bottom_link`,\n\t\t\t\t\t`menu`.`sitemap`,\n\t\t\t\t\t`menu`.`status`\n\t\t\t\tFROM\n\t\t\t\t\t`menu_tree`\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t`menu`\n\t\t\t\tON\n\t\t\t\t\t`menu`.`link_id` = `menu_tree`.`link_id`\n\t\t\t\tORDER BY \n\t\t\t\t\t`menu_tree`.`parent_id`,`menu_tree`.`sequence_no`\n\t\t\t\t\";\n\t\t$stmt = $this->db->prepare($sql);\n\t\t$stmt->bind_result($link_id,$parent_id,$redirect_url,$sequence_no,$title_menu,$title_page,$template_name,$module_id,$security_level_id,$group_id,$main_link,$quick_link,$bottom_link,$sitemap,$status);\n\n\t\t$stmt->execute();\n\t\twhile($stmt->fetch())\n\t\t{\n\t\t\t$out[] = array(\n\t\t\t\t'link_id' => $link_id,\n\t\t\t\t'parent_id' => $parent_id,\n\t\t\t\t'redirect_url' => $redirect_url,\n\t\t\t\t'sequence_no' => $sequence_no,\n\t\t\t\t'title_menu' => $title_menu,\n\t\t\t\t'title_page' => $title_page,\n\t\t\t\t'template_name' => $template_name,\n\t\t\t\t'module_id' => $module_id,\n\t\t\t\t'security_level_id' => $security_level_id,\n\t\t\t\t'group_id' => $group_id,\n\t\t\t\t'main_link' => $main_link,\n\t\t\t\t'quick_link' => $quick_link,\n\t\t\t\t'bottom_link' => $bottom_link,\n\t\t\t\t'sitemap' => $sitemap,\n\t\t\t\t'status' => $status\n\t\t\t);\n\t\t}\n\t\t$stmt->close();\n\t\t\n\t\treturn $out;\n\t}", "public function getMenus(){\n\n }", "public static function get_registered_nav_menu_locations()\n {\n }", "function theme_menu() {\n global $theme;\n $content = new UN_Content();\n $cAll = $content->getMenuContent($theme->langid);\n if (is_array($cAll)) {\n $out = '<ul>';\n if ($theme->indexlink == 1) {\n $out .= '<li><a href=\"index.php'.theme_global_url(true).'\"><span>'._('Main Page').'</span></a></li>';\n }\n foreach($cAll as $c) {\n $link = ($c['pagelink']!=\"\") ? $c['pagelink'] : 'index.php?t=page&amp;id='.$c['pageid'];\n $title = ($c['pagelink']!=\"\") ? $c['pagedetail'] : $c['pagetitle'];\n $out .= '<li><a href=\"'.$link.theme_global_url().'\" title=\"'.strip_tags($title).'\"><span>'.$c['pagetitle'].'</span></a></li>';\n }\n $out .= '</ul>';\n }\n echo $out;\n}", "public function findAll()\n {\n $menus['active_menu'] = $this->buildMenu(\n Menu::where('status', 1)\n ->orderBy('order')\n ->get()\n );\n $menus['inactive_menu'] = $this->buildMenu(\n Menu::where('status', 0)\n ->orderBy('order', 'created_at')\n ->get()\n );\n\n return $menus;\n }", "private function PH_PageMenu(){\n $site_menu = self::$xvi_api->GetSiteMenu();\n $page_menu = self::$xvi_api->GetPageMenu();\n \n $menu =\"\";\n foreach($site_menu as $menu_item=>$menu_path) {\n if (strcmp($menu_item,$page_menu[\"item\"])) { /*not selected menu item*/\n $menu .= \"<li><a href=\\\"\".$menu_path.\"\\\"<span></span>\".$menu_item.\"</a></li>\";\n } else { /* it is selected menu*/\n $menu .= \"<li><a class=\\\"sel\\\" href=\\\"\".$menu_path.\"\\\"<span></span>\".$menu_item.\"</a></li>\";\n }\n }\n return $menu;\n }", "function getMainMenu() {\r\n $links = array();\r\n\r\n //Get nav menu id by name\r\n $menu_name = 'primary';\r\n $locations = get_nav_menu_locations();\r\n $menu_id = (isset($locations[$menu_name])) ? $locations[$menu_name] : 0;\r\n\r\n //Get nav menu items\r\n $items = wp_get_nav_menu_items( $menu_id, array(\r\n 'order' => 'ASC',\r\n 'orderby' => 'menu_order',\r\n 'post_type' => 'nav_menu_item',\r\n 'post_status' => 'publish',\r\n 'output' => ARRAY_A,\r\n 'output_key' => 'menu_order',\r\n 'nopaging' => true,\r\n 'update_post_term_cache' => false )\r\n );\r\n\r\n if(!empty($items)) {\r\n foreach($items as $item) {\r\n //active class for pages, categories\r\n $active = false;\r\n\r\n if( ($item->object == 'page') && (is_page($item->object_id)) ) {\r\n $active = 'active';\r\n } \r\n \r\n $links[$item->ID] = array(\r\n 'title' => $item->title,\r\n 'href' => $item->url,\r\n 'class' => $active\r\n );\r\n }\r\n }\r\n\r\n return $links;\r\n}", "public function getmenu( ) {\n \t$parent = $this->find('all', array(\n 'conditions' => array(\n 'Page.parent_id IS NULL',\n 'Page.is_menu' => 1,\n 'Page.is_active' => 1\n ),\n 'contain'=>array(\n ),\n 'fields'=>array('Page.lft', 'Page.rght'),\n 'order'=>array('Page.lft' => 'ASC')\n ));\n\t\t\n\t\t$recs = array(); \n foreach($parent as $v){\n \t$info = $this->find('threaded', array(\n\t 'conditions' => array(\n\t 'Page.lft >=' => $v['Page']['lft'], \n\t 'Page.rght <=' => $v['Page']['rght'],\n\t 'Page.is_menu' => 1,\n\t 'Page.is_active' => 1\n\t ),\n\t 'contain'=>array()\n\t ));\n\t \n\t $recs = array_merge($recs, $info);\n\t }\n\t\t\n\t\treturn $recs;\n }", "public function getMenuItems()\n {\n $sql = \"\n SELECT\n menu.uid,\n parent_uid,\n sort_order,\n nofollow,\n target,\n class,\n label,\n uri_uid,\n uri,\n menu.archived,\n menu.archived_datetime\n FROM menu\n LEFT JOIN uri\n ON uri.uid = menu.uri_uid\n WHERE menu.archived = '0'\n AND (uri.archived = '0' OR uri.archived IS NULL)\n \";\n\n $sql .= \"\n ORDER BY sort_order;\n \";\n\n $db = new Query($sql);\n $results = $db->fetchAllAssoc();\n\n return $results;\n }", "public function getMenu();", "public function getMenuItems()\n {\n return $this->adminMenu->all();\n }", "public static function menus(): array\n {\n return [];\n }", "function pearl_get_menus()\r\r\n{\r\r\n $menus = array();\r\r\n $existing_menus = get_terms('nav_menu');\r\r\n if (!empty($existing_menus)) {\r\r\n foreach ($existing_menus as $menu) {\r\r\n $menus[$menu->term_id] = $menu->name;\r\r\n }\r\r\n }\r\r\n\r\r\n /*Locations*/\r\r\n $locations = get_registered_nav_menus();\r\r\n $menus = $menus + $locations;\r\r\n\r\r\n return $menus;\r\r\n}", "public static function getAllMenu()\n {\n $rows = Yii::$app->cache->get(\"BackendMenu:all\");\n if (false === is_array($rows)) {\n $rows = static::find()\n ->orderBy('parent_id ASC, sort ASC')\n ->asArray()\n ->all();\n Yii::$app->cache->set(\n \"BackendMenu:all\",\n $rows,\n 86400,\n new TagDependency([\n 'tags' => [\n ActiveRecordHelper::getCommonTag(static::className()),\n ],\n ])\n );\n }\n // rebuild rows to tree $all_menu_items\n $all_menu_items = Tree::rowsArrayToMenuTree($rows, 0, 0, false);\n\n return $all_menu_items;\n }", "public function get_list_of_menus(){\n\n $items = array();\n\n $args = array(\n 'post_type' => 'erm_menu',\n 'orderby' => 'menu_order',\n 'order' => 'ASC',\n 'post_status' => 'publish',\n 'posts_per_page' => -1 \n );\n\n $menu_posts = get_posts($args);\n\n if ( !empty($menu_posts) ) {\n\n foreach ( $menu_posts as $menu_post ){\n $items[] = array(\n 'title' => $menu_post -> post_title,\n 'url' => $menu_post -> post_name\n );\n }\n\n }\n else{\n return new WP_Error( 'no_menus', 'No menus found', array( 'status' => 404 ) );\n }\n\n return $items;\n\n }", "public function getMenus()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('menus');\n\t\t$this->db->order_by('order', 'ASC');\n\t\t//$this->db->where('post_type', 'menu');\n\t\t$query = $this->db->get();\n\n\t\treturn $query->result();\n\t}", "protected function navigations(): iterable\n {\n return [\n Menu::make('Basic Elements')\n ->route('platform.example.fields'),\n\n Menu::make('Advanced Elements')\n ->route('platform.example.advanced'),\n\n Menu::make('Text Editors')\n ->route('platform.example.editors'),\n\n Menu::make('Run Actions')\n ->route('platform.example.actions'),\n ];\n }", "function getSiteMenuHTML(&$data, $page_name = null)\n {\n\n $html = \"<nav class=\\\"navbar navbar-default\\\">\n <div class=\\\"container-fluid\\\">\n <div class=\\\"navbar-header\\\">\n <button type=\\\"button\\\" class=\\\"navbar-toggle collapsed\\\" data-toggle=\\\"collapse\\\" data-target=\\\".navbar-collapse\\\" aria-expanded=\\\"false\\\">\n <span class=\\\"sr-only\\\">Toggle navigation</span>\n <span class=\\\"icon-bar\\\"></span>\n <span class=\\\"icon-bar\\\"></span>\n <span class=\\\"icon-bar\\\"></span>\n </button>\n </div>\n <div class=\\\"collapse navbar-collapse\\\" id=\\\"bs-example-navbar-collapse-1\\\">\n <ul class=\\\"nav navbar-nav\\\">\";\n $cnt = count($data);\n for ($i = 0; $i < $cnt; $i++) {\n $mi = $data[$i];\n if ($mi[\"default_body_menu\"]) $this->body_menu = $mi;\n if ($mi[\"visible\"] == \"0\") continue;\n if ($mi[\"access_mode\"] == \"admin\" && $this->dialog->usertype < USERTYPE_ADMIN) continue;\n\n\n // li\n $html .= \"<li \";\n $li_class = $mi[\"url\"] == $page_name ? \" active\" : \"\";\n\n if ($li_class) {\n $html .= \"class='\" . $li_class . \"' \";\n }\n $html .= \">\";\n\n // a || span\n $html .= $this->getSiteMenuItemHTML($mi, $page_name);\n\n\n // submenu\n if (count($mi[\"childs\"])) {\n $sub_html = \"\";\n for ($j = 0; $j < count($mi[\"childs\"]); $j++) {\n $sub_html .= $this->getSiteMenuItemHTML($mi[\"childs\"][$j], $page_name);\n }\n if ($sub_html != \"\") {\n $html .= \"<ul id='site_submenu' class=\\\"dropdown-menu submenu\\\" role=\\\"menu\\\"\" . $this->item_num . \"'>\" . $sub_html . \"</ul>\";\n }\n }\n\n // li\n $html .= \"</li>\";\n\n $this->item_num++;\n }\n return $html . \"</ul></div></div></nav>\";\n }", "public static function getSiteMenu() {\n $menu = Yii::$app->cacheManage->site_menu;\n if (!$menu) {\n $context = new ViewHelper();\n $config = [\n 'model' => 'app\\models\\action\\Nav',\n 'parentKey' => 'parentid',\n 'primaryKey' => 'id',\n 'rootParent' => 0,\n 'orderBy' => 'listorder desc',\n ];\n $obj = new Tree($config);\n $tree = $obj->getTree(true);\n $menu = $context->getMenuChild($tree);\n Yii::$app->cacheManage->site_menu = $menu;\n }\n return $menu;\n }", "public function getNavigation ($showAll = false)\n\t{\n\t\t$text = Core_Text::__getInstance ();\n\t\t\n\t\t$o = array ();\n\t\t$o['main'] = new Logic_NavContainer ($this->objCMS, 'main', $text->get ('navigation', 'admin', 'navigation'));\n\t\t\n\t\t// Navigation\n\t\t$o['main']->appendChild\n\t\t(\n\t\t\tnew Logic_Navigation\n\t\t\t(\n\t\t\t\tarray\n\t\t\t\t(\n\t\t\t\t\t'id' => 'nav',\n\t\t\t\t\t'sName' => 'Navigation',\n\t\t\t\t\t'sUrl' => $this->objCMS->getAdminUrl ('navigation')\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t\n\t\tforeach ($this->objCMS->getAllModules () as $item => $module)\n\t\t{\n\t\t\tif ($module->showAdminTab ())\n\t\t\t{\n\t\t\t\t$o['main']->appendChild\n\t\t\t\t(\n\t\t\t\t\tnew Logic_Navigation\n\t\t\t\t\t(\n\t\t\t\t\t\tarray\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t'id' => $item,\n\t\t\t\t\t\t\t'sName' => $text->get ($item, 'navigation', 'admin'),\n\t\t\t\t\t\t\t'sUrl' => $this->objCMS->getAdminUrl ($item)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Logout\t\t\n\t\t$o['main']->appendChild\n\t\t(\n\t\t\tnew Logic_Navigation\n\t\t\t(\n\t\t\t\tarray\n\t\t\t\t(\n\t\t\t\t\t'id' => 'logout',\n\t\t\t\t\t'sName' => 'Logout',\n\t\t\t\t\t'sUrl' => $this->objCMS->getAdminUrl ('logout', null, null, 'logout=yes')\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t\n\t\t// Settings\n\t\t$o['main']->appendChild\n\t\t(\n\t\t\tnew Logic_Navigation\n\t\t\t(\n\t\t\t\tarray\n\t\t\t\t(\n\t\t\t\t\t'id' => 'settings',\n\t\t\t\t\t'sName' => 'Settings',\n\t\t\t\t\t'sUrl' => $this->objCMS->getAdminUrl ('settings')\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t\n\t\treturn $o;\n\t}", "public static function menu(){\n $sql = \"select * from pageweb where id_parent = 1 AND menu = 1 ORDER BY ordre\";\n $parents = DB::get_sql_tab($sql);\n for($i=0;$i<count($parents);$i++) {\n $sql2 = \"select * from pageweb where id_parent = '\".$parents[$i][\"id\"].\"'AND menu = 1\";\n $enfants = DB::get_sql_tab($sql2);\n $parents[$i][\"enfants\"] = $enfants;\n }\n return $parents;\n }", "function listNavigationItems()\n{\n include('models/navigation.php');\n $items = getAllNavigationItems();\n return [\n 'page' => 'admin/lists/navigation.php',\n 'items' => $items,\n 'edit_link' => 'index.php?p=admin&module=navigation&action=edit&id=',\n 'delete_link' => 'index.php?p=admin&module=navigation&action=delete&id=',\n ];\n}", "public function get()\n\t{\n\t\t$url = WEIXIN_GET_MENU_URL;\n\t\t$access_token = Weixin_Class_AccessToken::getInstance()->load_access_token();\n\t\t$params = array(\n\t\t\t'access_token' => !empty($access_token->access_token) ? $access_token->access_token : 'false',\n\t\t);\n\n\t\t$url .= \"?\" . http_build_query($params);\n\n\t\t$xcurl = new Lib_Curl($url);\n\t\t$ret = $xcurl->get();\n\n\t\tif (!empty($ret)) {\n\t\t\t$result = json_decode($ret);\n\t\t\tvar_dump($result);\n\t\t} else {\n\t\t\techo 'Get Menu Failed!' . PHP_EOL;\n\t\t}\n\t}", "public function menus($filter = null)\n {\n return $this->contentManager->listMenus($filter);\n }", "public function menu_list_system_menus()\n {\n return menu_list_system_menus();\n }", "function wp_get_nav_menus($args = array())\n {\n }", "function _getNav()\n {\n }", "function getNavigation()\n\t{\n\n\n\t\treturn;\n\n\t\tglobal $gMysql;\n\t\tglobal $member_id;\n\t\t# grab these items\n\t\t$num_views\t\t\t=\t$gMysql->queryItem(\"select count(*) from sm_views where member_id='$member_id'\",__FILE__,__LINE__);\n\t\t$num_winks\t\t\t=\t$gMysql->queryItem(\"select count(*) from sm_winks where member_id='$member_id'\",__FILE__,__LINE__);\n\t\t$num_favs\t\t\t=\t$gMysql->queryItem(\"select count(*) from sm_fav where member_id='$member_id'\",__FILE__,__LINE__);\n\t\t$num_messages\t\t=\t$gMysql->queryItem(\"select count(*) from sm_messages where member_id='$member_id'\",__FILE__,__LINE__);\n\n\n\n\t\t$menuArray\t=\tarray(\n\t\tarray(\n\t\t\"title\"\t\t\t=>\t\"Profile\",\n\t\t\"bShowNumber\"\t=>\tfalse,\n\t\t\"number\"\t\t=>\t0,\n\t\t\"bHeader\"\t\t=>\ttrue,\n\t\t\"className\"\t\t=>\t\"icon-user\",\n\t\t\"link\" \t\t\t=>\t\"http://bbc.co.uk\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Search\",\n\t\t\"bShowNumber\"\t =>\tfalse,\n\t\t\"number\"\t\t =>\t0,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-search\",\n\t\t\"link\" \t\t\t =>\t\"search\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Messages\",\n\t\t\"bShowNumber\"\t =>\ttrue,\n\t\t\"number\"\t\t =>\t$num_messages,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-mail\",\n\t\t\"link\" \t\t\t =>\t\"inbox\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Views\",\n\t\t\"bShowNumber\"\t =>\ttrue,\n\t\t\"number\"\t\t =>\t$num_views,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-binoculars\",\n\t\t\"link\" \t\t\t =>\t\"views\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Winks\",\n\t\t\"bShowNumber\"\t =>\ttrue,\n\t\t\"number\"\t\t =>\t$num_winks,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-eye\",\n\t\t\"link\" \t\t\t =>\t\"winks\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Favourites\",\n\t\t\"bShowNumber\"\t =>\ttrue,\n\t\t\"number\"\t\t =>\t$num_favs,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-bookmarks\",\n\t\t\"link\" \t\t\t =>\t\"favourites\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Matches\",\n\t\t\"bShowNumber\"\t =>\tfalse,\n\t\t\"number\"\t\t =>\t0,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-heart\",\n\t\t\"link\" \t\t\t =>\t\"matches\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Membership\",\n\t\t\"bShowNumber\"\t =>\tfalse,\n\t\t\"number\"\t\t =>\t0,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-unlocked\",\n\t\t\"link\" \t\t\t =>\t\"membership\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Profile\",\n\t\t\"bShowNumber\"\t =>\tfalse,\n\t\t\"number\"\t\t =>\t0,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-user\",\n\t\t\"link\" \t\t\t =>\t\"profile\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t\t=>\t\"Logout\",\n\t\t\"bShowNumber\"\t\t=>\tfalse,\n\t\t\"number\"\t\t\t=>\t0,\n\t\t\"bHeader\"\t\t\t=>\ttrue,\n\t\t\"className\"\t\t\t=>\t\"icon-switch\",\n\t\t\"link\"\t\t\t\t=>\t\"javacript:confirm('app/m/login/logout');\",\n\t\t),\n\t\t);\n\n\t\t$selectedItem\t=\t3;\n\t\t$index\t\t\t=\t0;\n\n\n\t\t$menuString\t=\t' <ul> ';\n\n\n\t\tforeach ($menuArray as $menuItem)\n\t\t{\n\t\t\t# build html of menu\n\t\t\tif\t($selectedItem == $index)\n\t\t\t{\n\t\t\t\t$menu_line\t=\t'<li class=\"selected\">';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$menu_line\t=\t'<li>';\n\t\t\t}\n\n\n\t\t\t$menu_line\t.=\t'<a href=\"' . $menuItem['link'] . '\" class=\"' . $menuItem['className'] . '\" >' . $menuItem['title'];\n\t\t\t# numerics?\n\t\t\tif\t($menuItem['bShowNumber'] == true)\n\t\t\t{\n\t\t\t\t$menu_line\t.=\t\t' <span class=\"pip\">' . $menuItem['number'] . '</span>';\n\t\t\t}\n\t\t\t$menu_line .= \"</a></li>\\r\\n\";\n\n\t\t\t$menuString\t.=\t$menu_line;\n\n\t\t\t$index++;\n\t\t}\n\t\t$menuString\t.=\t\"</ul>\";\n\n\t\treturn\t$menuString;\n\t}", "public function index()\n {\n $sitenavigations = SiteNavigation::all()->sortByDesc(\"id\");\n // dd($sitenavigations);\n return view('backend.cms.site_navigation.list',compact('sitenavigations'));\n }", "function &getMenus() {\n\t\t$lines = explode(\"\\n\", $this->menus);\n\n\t\t$menus = array();\n\t\tforeach( $lines as $line ) {\n\t\t\tif ($line) {\n\t\t\t\tlist( $menutype, $ordering, $show, $showXML, $priority, $changefreq ) = explode(',', $line);\n\t\t\t\t$info = explode(',', $line);\n\t\t\t\t$menu = new stdclass;\n\t\t\t\t$menu->menutype \t= @$info[0];\n\t\t\t\t$menu->ordering \t= @$info[1];\n\t\t\t\t$menu->show \t\t= @$info[2];\n\t\t\t\t$menu->showXML \t= @$info[3];\n\t\t\t\t$menu->priority \t= (@$info[4]? $info[4] : '0.5');\n\t\t\t\t$menu->changefreq \t= (@$info[5]? $info[5] : 'weekly');\n\t\t\t\t$menu->module \t\t= (@$info[6]? $info[6] : 'mod_mainmenu');\n\t\t\t\t$menus[$menutype] \t= $menu;\n\t\t\t}\n\t\t}\n\t\treturn $menus;\n\t}", "function getMenuEntries()\n\t{\n\t\tglobal $rbacsystem, $lng, $tree, $ilUser, $ilSetting;\n\n\t\t// no menu during online tests\n\t\tif ($_SESSION[\"adn_online_test\"])\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\n\t\t$mm_tpl = new ilTemplate(\"tpl.adn_main_menu.html\", true, true, \"Services/ADN/UI\");\n\n\t\tforeach ($this->getAllMenuItems() as $menu => $items)\n\t\t{\n\t\t\t$this->renderSubMenu($mm_tpl, $menu);\n\t\t}\n\t\treturn $mm_tpl->get();\n\n\n\n\t\t$tpl->setCurrentBlock(\"cust_menu\");\n\t\t$tpl->setVariable(\"TXT_CUSTOM\",\n\t\t\tlfCustomMenu::lookupTitle(\"it\", $menu[\"id\"], $ilUser->getLanguage(), true));\n\t\t$tpl->setVariable(\"MM_CLASS\", \"MMInactive\");\n\n\t\tif (is_file(\"./templates/default/images/mm_down_arrow.png\"))\n\t\t{\n\t\t\t$tpl->setVariable(\"ARROW_IMG\", ilUtil::getImagePath(\"mm_down_arrow.png\"));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$tpl->setVariable(\"ARROW_IMG\", ilUtil::getImagePath(\"mm_down_arrow.gif\"));\n\t\t}\n\t\t$tpl->setVariable(\"CUSTOM_CONT_OV\", $gl->getHTML());\n\t\t$tpl->setVariable(\"MM_ID\", $menu[\"id\"]);\n\t\t$tpl->parseCurrentBlock();\n\t\t$tpl->setCurrentBlock(\"c_item\");\n\t\t$tpl->parseCurrentBlock();\n\n\t}", "public function getMenus($filter = null)\n {\n return $this->contentManager->listMenus($filter);\n }", "public function menu()\n\t{\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'name' => 'users',\n\t\t\t\t'href' => '#',\n\t\t\t\t'submenu' => TRUE,\n\t\t\t\t'menu' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'foo',\n\t\t\t\t\t\t'href' => '#',\n\t\t\t\t\t\t'submenu' => FALSE,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'bar',\n\t\t\t\t\t\t'href' => '#',\n\t\t\t\t\t\t'submenu' => TRUE,\n\t\t\t\t\t\t'menu' => array(\n\t\t\t\t\t\t\t'name' => 'this is a third submenu',\n\t\t\t\t\t\t\t'href' => '#',\n\t\t\t\t\t\t\t'submenu' => FALSE,\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\tarray(\n\t\t\t\t'name' => 'foobar',\n\t\t\t\t'href' => '#',\n\t\t\t\t'submenu' => FALSE,\n\t\t\t),\n\t\t);\n\t}", "static public function mainNavigation()\n {\n return self::where('parent_id', 0)\n ->where('is_main', 1)\n ->where('is_hidden', 0)\n ->orderBy('list_main_order')\n ->get();\n }", "private function _getCoreMenu(){\r\n\r\n if($this->hasLogin()){\r\n $settings = array_merge((array) $this->pageSettings, (array) $this->globalSettings);\r\n $params = array();\r\n foreach($settings as $key => $value){\r\n $params[\"[!$key]\"] = $value;\r\n }\r\n\r\n $nav = '';\r\n\r\n if(isset($this->navigationSettings)){\r\n\r\n foreach((array) $this->navigationSettings as $key => $value){\r\n $nav .= \"<li>\";\r\n $nav .= \"<span>$key</span>\";\r\n $nav .= \"<span>$value</span>\";\r\n $nav .= \"<input type='text' class='mrzpn-navigation-text' value='$key'/>\";\r\n $nav .= \"<input type='text' class='mrzpn-navigation-link' value='$value'/>\";\r\n $nav .= \"<input type='hidden' name='$key' value='$value' />\";\r\n $nav .= \"<a href='JavaScript:void(0);' class='mrzpn-menu-navigation-remove'></a>\";\r\n $nav .= \"</li>\";\r\n }\r\n\r\n }\r\n\r\n\r\n $params[\"[!main_nav]\"] = $nav;\r\n\r\n echo strtr(file_get_contents(ROOT.DS.'core'.DS.'settings.php'), $params);\r\n exit;\r\n }\r\n\r\n }", "public function obtenerElementosMenu();", "public function allmenus() {\n //$this->db->order_by('serialid');\n $query = $this->db->get('menu');\n return $query->result();\n }", "public function getMenus()\n {\n return $this->hasMany(Menu::className(), ['id' => 'menu_id'])->viaTable('menu_cook', ['cook_id' => 'id']);\n }", "protected function get_menu() {\n\t\t\n\t\tif ( ( $locations = get_nav_menu_locations() )\n\t\t\t&& isset( $locations[ $this->menu_name ] ) ){\n\t\t\t$this->menu_id = $locations[ $this->menu_name ];\n\t\t}else{\n\t\t\t$this->menu_id = null;\n\t\t}\n\n\t\t$this->menu = wp_get_nav_menu_items( $this->menu_id );\n\t}", "public function getMenuItems()\n\t{\n\t\treturn Settings_Vtiger_MenuItem_Model::getAll($this->getId());\n\t}", "function sc_menu(){\n\n\tglobal $post;\n\n\t$menu_array = array();\n\n\t//Query Args\n\t$args = array(\n\t\t\t'post_type' => array('page'),\n\t\t\t'post_status' => 'publish',\n\t\t\t'post_parent' => $post->ID,\n\t\t\t'orderby' => 'menu_order',\n\t\t\t'order' => 'ASC',\n\t\t\t'posts_per_page' => -1\n\t\t);\n\n\t//Top Level\n\tif( $post->post_parent == 0 ){\n\n\t\t$menu = new Wp_Query($args);\n\t\twp_reset_query();\n\n\t\t$menu_array[] = $post->ID;\n\t\tforeach( $menu->posts as $item ){\n\t\t\t$menu_array[] = $item->ID;\n\t\t}\n\n\t//Child Level\n\t} elseif( $post->post_parent > 0 ) {\n\n\t\t$args['post_parent'] = $post->post_parent;\n\t\t$menu = new Wp_Query($args);\n\t\twp_reset_query();\n\n\t\t$menu_array[] = $post->post_parent;\n\t\tforeach( $menu->posts as $item ){\n\t\t\t$menu_array[] = $item->ID;\n\t\t}\n\t}\n\n\treturn count($menu_array) > 1 ? $menu_array : false ;\n\n}", "public function getMenusListAttribute()\n {\n return Menu::orderBy('name')->get();\n }", "public static function get()\n {\n if(Session::get('sivoz_auth') !== false){\n return Menu::all();\n }else{\n return Menu::login();\n } \n }", "function build_menulistbyurl()\r\n\t{\r\n\t\t$url=$this->input->post('url');\r\n\t\t\r\n\t\t// check if url set \r\n\t\tif(!$url)\r\n\t\t\tdie(\"No referer found\");\r\n\t\t \r\n\t\t// get top most menu which has 0 has parent \r\n\t\t$menu_parent_id='';\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\t$menu_det=$this->erpm->get_menu_parent_id($url,$menu_parent_id);\r\n\t\t\t\r\n\t\t\tif($menu_det[0]['parent']==0)\r\n\t\t\t{\r\n\t\t\t\tbreak;\r\n\t\t\t}else{\r\n\t\t\t\t$menu_parent_id=$menu_det[0]['parent'];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//\r\n\t\t$parent_id=$menu_det[0]['id'];\r\n\t\t$menus=$this->erpm->get_menubyparentid($parent_id);\r\n\t\t\r\n\t\t/*if($menus)\r\n\t\t{\r\n\t\t\t$menu_list = '';\r\n\t\t\t\tforeach($menus as $menu)\r\n\t\t\t\t\t$menu_list .= '<li><a href=\"'.site_url($menu['link']).'\">'.$menu['name'].\"</a></li>\";\r\n\t\t\t\t\t\r\n\t\t\techo '<ul>'.$menu_list.'</ul>';\r\n\t\t}*/\r\n\t\techo $this->cm_generate_menu($this,$menus,'<ul class=\"left-main-menu\">','</ul>',$selected_ids=array());\r\n\t\t\r\n\t}", "function display_multisite_global_menu() {\n\t//that caching plugin really was ridiculous, wasn't it?\n\tif (is_multisite() && !is_main_site()) {\n\t\tswitch_to_blog(1); //should send us to the main site temporarily\n\t}\n\twp_nav_menu( array (\n\t\t\"theme_location\" => \"global_menu\"\n\t\t//these werent used, divs were created in the header and footer\n\t\t//\"container\" => \"nav\",\n\t\t//\"container_class\" => \"\",\n\t\t//\"container_id\" => \"global_menu\"\n\t) );\n\t//get the nav menu from the main site context\n\tif (is_multisite() && ms_is_switched()) {\n\t\trestore_current_blog(); //revert to the network site if we switched it above\n\t}\n}", "public function getPageMenu() {\n\t\t\tglobal $factory_impressive_page_menu;\n\n\t\t\treturn $factory_impressive_page_menu[ $this->getMenuScope() ];\n\t\t}", "public function menuLocations()\n {\n // TODO: add support for menu locations.\n return [];\n\n /*\n $list = ['main-navigation' => __('Main Navigation')];\n foreach ($this->items as $name => $title) {\n $index = Layout::index($name);\n\n $list += isset($index['menus']) ? $index['menus'] : [];\n }\n\n return $list;\n */\n }", "public function run()\n\t{\n\t\tDB::table('menus')->truncate();\n\n\t\t$menus = [\n\n\t\t\t[\n\t\t\t\t'slug' => 'home',\n\t\t\t\t'parent_slug' => null,\n\t\t\t\t'permission_id' => 1,\n\t\t\t\t'menu_group' => 'public',\n\t\t\t\t'menu_order' => 0,\n\t\t\t\t'title' => 'Home',\n\t\t\t\t'url' => '',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-home',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'dashboard',\n\t\t\t\t'parent_slug' => null,\n\t\t\t\t'permission_id' => 11,\n\t\t\t\t'menu_group' => 'main',\n\t\t\t\t'menu_order' => 0,\n\t\t\t\t'title' => 'Dashboard',\n\t\t\t\t'url' => 'dashboard',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-dashboard',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'reports',\n\t\t\t\t'parent_slug' => null,\n\t\t\t\t'permission_id' => 11,\n\t\t\t\t'menu_group' => 'main',\n\t\t\t\t'menu_order' => 1,\n\t\t\t\t'title' => 'Reports',\n\t\t\t\t'url' => '#',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-bar-chart',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'expenses',\n\t\t\t\t'parent_slug' => 'reports',\n\t\t\t\t'permission_id' => 11,\n\t\t\t\t'menu_group' => 'main',\n\t\t\t\t'menu_order' => 1,\n\t\t\t\t'title' => 'Expenses',\n\t\t\t\t'url' => '#',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-line-chart',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'membership',\n\t\t\t\t'parent_slug' => 'reports',\n\t\t\t\t'permission_id' => 11,\n\t\t\t\t'menu_group' => 'main',\n\t\t\t\t'menu_order' => 2,\n\t\t\t\t'title' => 'Membership',\n\t\t\t\t'url' => '#',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-line-chart',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'frequentation',\n\t\t\t\t'parent_slug' => 'reports',\n\t\t\t\t'permission_id' => 11,\n\t\t\t\t'menu_group' => 'main',\n\t\t\t\t'menu_order' => 3,\n\t\t\t\t'title' => 'Frequentation',\n\t\t\t\t'url' => '#',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-line-chart',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'membership',\n\t\t\t\t'parent_slug' => null,\n\t\t\t\t'permission_id' => 11,\n\t\t\t\t'menu_group' => 'main',\n\t\t\t\t'menu_order' => 2,\n\t\t\t\t'title' => 'Membership',\n\t\t\t\t'url' => '#',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-rocket',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'members',\n\t\t\t\t'parent_slug' => 'membership',\n\t\t\t\t'permission_id' => 11,\n\t\t\t\t'menu_group' => 'main',\n\t\t\t\t'menu_order' => 0,\n\t\t\t\t'title' => 'Members',\n\t\t\t\t'url' => '#',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-mortar-board',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'mentors',\n\t\t\t\t'parent_slug' => 'membership',\n\t\t\t\t'permission_id' => 11,\n\t\t\t\t'menu_group' => 'main',\n\t\t\t\t'menu_order' => 1,\n\t\t\t\t'title' => 'Mentors',\n\t\t\t\t'url' => '#',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-child',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'plans',\n\t\t\t\t'parent_slug' => 'membership',\n\t\t\t\t'permission_id' => 11,\n\t\t\t\t'menu_group' => 'main',\n\t\t\t\t'menu_order' => 2,\n\t\t\t\t'title' => 'Plans',\n\t\t\t\t'url' => '#',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-ticket',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'finances',\n\t\t\t\t'parent_slug' => null,\n\t\t\t\t'permission_id' => 11,\n\t\t\t\t'menu_group' => 'main',\n\t\t\t\t'menu_order' => 3,\n\t\t\t\t'title' => 'Finances',\n\t\t\t\t'url' => '#',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-money',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'transactions',\n\t\t\t\t'parent_slug' => 'finances',\n\t\t\t\t'permission_id' => 11,\n\t\t\t\t'menu_group' => 'main',\n\t\t\t\t'menu_order' => 0,\n\t\t\t\t'title' => 'Transactions',\n\t\t\t\t'url' => '#',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-exchange',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'billing',\n\t\t\t\t'parent_slug' => 'finances',\n\t\t\t\t'permission_id' => 11,\n\t\t\t\t'menu_group' => 'main',\n\t\t\t\t'menu_order' => 0,\n\t\t\t\t'title' => 'Billing',\n\t\t\t\t'url' => '#',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-dollar',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'accounts',\n\t\t\t\t'parent_slug' => 'finances',\n\t\t\t\t'permission_id' => 11,\n\t\t\t\t'menu_group' => 'main',\n\t\t\t\t'menu_order' => 0,\n\t\t\t\t'title' => 'Accounts',\n\t\t\t\t'url' => '#',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-user',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'stripe',\n\t\t\t\t'parent_slug' => 'finances',\n\t\t\t\t'permission_id' => 11,\n\t\t\t\t'menu_group' => 'main',\n\t\t\t\t'menu_order' => 0,\n\t\t\t\t'title' => 'Stripe',\n\t\t\t\t'url' => '#',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-cc-stripe',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'paypal',\n\t\t\t\t'parent_slug' => 'finances',\n\t\t\t\t'permission_id' => 11,\n\t\t\t\t'menu_group' => 'main',\n\t\t\t\t'menu_order' => 0,\n\t\t\t\t'title' => 'Paypal',\n\t\t\t\t'url' => '#',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-paypal',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'accesscontrol',\n\t\t\t\t'parent_slug' => null,\n\t\t\t\t'parent_slug' => null,\n\t\t\t\t'permission_id' => 11,\n\t\t\t\t'menu_group' => 'main',\n\t\t\t\t'menu_order' => 4,\n\t\t\t\t'title' => 'Access control',\n\t\t\t\t'url' => '#',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-lock',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'keys',\n\t\t\t\t'parent_slug' => 'accesscontrol',\n\t\t\t\t'permission_id' => 11,\n\t\t\t\t'menu_group' => 'main',\n\t\t\t\t'menu_order' => 0,\n\t\t\t\t'title' => 'Keys',\n\t\t\t\t'url' => '#',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-key',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'rfidcards',\n\t\t\t\t'parent_slug' => 'accesscontrol',\n\t\t\t\t'permission_id' => 11,\n\t\t\t\t'menu_group' => 'main',\n\t\t\t\t'menu_order' => 1,\n\t\t\t\t'title' => 'RFID Cards',\n\t\t\t\t'url' => '#',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-credit-card',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'alarmpins',\n\t\t\t\t'parent_slug' => 'accesscontrol',\n\t\t\t\t'permission_id' => 11,\n\t\t\t\t'menu_group' => 'main',\n\t\t\t\t'menu_order' => 2,\n\t\t\t\t'title' => 'Alarm Pins',\n\t\t\t\t'url' => '#',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-shield',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'haccsy',\n\t\t\t\t'parent_slug' => 'accesscontrol',\n\t\t\t\t'permission_id' => 11,\n\t\t\t\t'menu_group' => 'main',\n\t\t\t\t'menu_order' => 3,\n\t\t\t\t'title' => 'HACCSY',\n\t\t\t\t'url' => '#',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-server',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'settings_general',\n\t\t\t\t'parent_slug' => null,\n\t\t\t\t'permission_id' => 3,\n\t\t\t\t'menu_group' => 'settings',\n\t\t\t\t'menu_order' => 0,\n\t\t\t\t'title' => 'General',\n\t\t\t\t'url' => 'settings/general',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-gear',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'settings_emails',\n\t\t\t\t'parent_slug' => null,\n\t\t\t\t'permission_id' => 3,\n\t\t\t\t'menu_group' => 'settings',\n\t\t\t\t'menu_order' => 1,\n\t\t\t\t'title' => 'Emails',\n\t\t\t\t'url' => 'settings/emails',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-envelope',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'users',\n\t\t\t\t'parent_slug' => null,\n\t\t\t\t'permission_id' => 19,\n\t\t\t\t'menu_group' => 'settings',\n\t\t\t\t'menu_order' => 1,\n\t\t\t\t'title' => 'Users',\n\t\t\t\t'url' => 'settings/users',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-user',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'allusers',\n\t\t\t\t'parent_slug' => 'users',\n\t\t\t\t'permission_id' => 19,\n\t\t\t\t'menu_group' => 'settings',\n\t\t\t\t'menu_order' => 0,\n\t\t\t\t'title' => 'All Users',\n\t\t\t\t'url' => 'users',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-users',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'roles',\n\t\t\t\t'parent_slug' => 'users',\n\t\t\t\t'permission_id' => 7,\n\t\t\t\t'menu_group' => 'settings',\n\t\t\t\t'menu_order' => 1,\n\t\t\t\t'title' => 'Roles',\n\t\t\t\t'url' => 'roles',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-eye',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'permissions',\n\t\t\t\t'parent_slug' => 'users',\n\t\t\t\t'permission_id' => 2,\n\t\t\t\t'menu_group' => 'settings',\n\t\t\t\t'menu_order' => 2,\n\t\t\t\t'title' => 'Permissions',\n\t\t\t\t'url' => 'permissions',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-exclamation-triangle',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'modules',\n\t\t\t\t'parent_slug' => null,\n\t\t\t\t'permission_id' => 11,\n\t\t\t\t'menu_group' => 'settings',\n\t\t\t\t'menu_order' => 3,\n\t\t\t\t'title' => 'Modules',\n\t\t\t\t'url' => '#',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-plug',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'installedmodules',\n\t\t\t\t'parent_slug' => 'modules',\n\t\t\t\t'permission_id' => 11,\n\t\t\t\t'menu_group' => 'settings',\n\t\t\t\t'menu_order' => 0,\n\t\t\t\t'title' => 'Installed Modules',\n\t\t\t\t'url' => '#',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-inbox',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'modulesaddnew',\n\t\t\t\t'parent_slug' => 'modules',\n\t\t\t\t'permission_id' => 11,\n\t\t\t\t'menu_group' => 'settings',\n\t\t\t\t'menu_order' => 1,\n\t\t\t\t'title' => 'Add new',\n\t\t\t\t'url' => '#',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-plus',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'appearance',\n\t\t\t\t'parent_slug' => null,\n\t\t\t\t'permission_id' => 3,\n\t\t\t\t'menu_group' => 'settings',\n\t\t\t\t'menu_order' => 4,\n\t\t\t\t'title' => 'Appearance',\n\t\t\t\t'url' => '#',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-paint-brush',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'menus',\n\t\t\t\t'parent_slug' => 'appearance',\n\t\t\t\t'permission_id' => 11,\n\t\t\t\t'menu_group' => 'settings',\n\t\t\t\t'menu_order' => 0,\n\t\t\t\t'title' => 'Menus',\n\t\t\t\t'url' => 'settings/menus',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-bars',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'slug' => 'themes',\n\t\t\t\t'parent_slug' => 'appearance',\n\t\t\t\t'permission_id' => 3,\n\t\t\t\t'menu_group' => 'settings',\n\t\t\t\t'menu_order' => 1,\n\t\t\t\t'title' => 'Themes',\n\t\t\t\t'url' => '#',\n\t\t\t\t'description' => null,\n\t\t\t\t'icon' => 'fa-television',\n\t\t\t],\n\n\t\t];\n\n\t\tforeach ($menus as $menu) {\n\t\t\tMenu::create($menu);\n\t\t}\n\t}", "public function get_all()\n {\n\n $sql = \"SELECT * FROM `menu`\";\n $query = $this->db->prepare($sql);\n\n $query->execute();\n\n return $query->fetchAll();\n }", "public function getMenu()\r\n {\r\n $auth = $this->session->get('auth');\r\n if ($auth) {\r\n $this->_headerMenu['navbar-right']['session'] = array(\r\n 'caption' => 'Log Out',\r\n 'action' => 'end'\r\n );\r\n } else {\r\n unset($this->_headerMenu['navbar-left']['invoices']);\r\n }\r\n\r\n $controllerName = $this->view->getControllerName();\r\n foreach ($this->_headerMenu as $position => $menu) {\r\n echo '<div class=\"nav-collapse\">';\r\n echo '<ul class=\"nav navbar-nav ', $position, '\">';\r\n foreach ($menu as $controller => $option) {\r\n if ($controllerName == $controller) {\r\n echo '<li class=\"active\">';\r\n } else {\r\n echo '<li>';\r\n }\r\n echo $this->tag->linkTo($controller . '/' . $option['action'], $option['caption']);\r\n echo '</li>';\r\n }\r\n echo '</ul>';\r\n echo '</div>';\r\n }\r\n\r\n }", "function getAllMenus(){\n $data = array();\n $Q = $this->db->get('adminmenu');\n if ($Q->num_rows() > 0){\n foreach ($Q->result_array() as $row){\n $data[] = $row;\n }\n }\n $Q->free_result();\n return $data;\n }", "public function registerMenus() {\n $locations = array();\n foreach (Project::$menus as $slug => $name) {\n $locations[$slug] = __($name, Project::$projectNamespace);\n }\n register_nav_menus($locations);\n }", "function getMenuItems()\n {\n }", "public function index()\n {\n $menus = $this->menus->getMenusPaginated(config('core.site_building.menu.default_per_page'))->items();\n $res = [\n 'status' => $menus ? 'OK' : 'error',\n 'result' => $menus,\n ];\n return response()->json($res);\n }", "function getMenuItems()\n {\n $this->menuitem(\"xp\", \"\", \"main\", array(\"xp.story\", \"admin\"));\n $this->menuitem(\"stories\", dispatch_url(\"xp.story\", \"admin\"), \"xp\", array(\"xp.story\", \"admin\"));\n }", "function getListNavi()\n\t{\n\t\t$ret = \"\";\n\n\t\t$ret = $this->oMgr->makeListNavi($this->list_cnt, $this->list_max, $this->cur_page);\n\n\t\treturn $ret;\n\t}", "public function getMenu ()\n {\n # Monto a opção de escolha dos sistemas do Usuario\n try {\n $sess = Session::getLiveSession('sisicmbio','USER');\n SIALException::ThrowsExceptionIfParamIsNull($sess, 'Não foi encontrada a sessão para o objeto informado');\n } catch (SIALException $excp) {\n # Não foi encontrada a Sessão para Este Sistema\n header(\"Location: \" . $this->bootstrap()->config()->get('app')->get('authSystem'));\n }\n\n\n $count = 0;\n foreach ($sess->sistemas as $sistema) {\n $arrSistema[$count]['href'] = $sistema['sqSistema'];\n $arrSistema[$count]['text'] = $sistema['sgSistema'];\n $count++;\n }\n\n $Menuoptions = array('__DIVIDER_VERTICAL__',\n 'Início' => array(),\n '__DIVIDER_VERTICAL__' ,\n 'Sistemas' => $arrSistema,\n '__DIVIDER_VERTICAL__');\n\n $menuParam = new \\stdClass;\n $menuParam->options = $Menuoptions;\n $menuParam->type = 'h';\n\n $this->_SIALApplication->set('menuH',$this->getSAF()->create('menu', $menuParam));\n\n $this->_SIALApplication->set('param',array('nome' => $sess->noPessoa,\n 'perfil' => $sess->noPerfil,\n 'uorg' => $sess->noUnidadeOrg,\n 'help' => 'HTML',\n 'sysId' => $sess->sqSistema,\n 'sysAlias' => isset($sess->sistemas[$sess->sqSistema]['sgSistema']) ? $sess->sistemas[$sess->sqSistema]['sgSistema'] : '',\n 'multiProfile' => count($sess->allProfile) > 1 ? TRUE : FALSE,\n 'inPerfilExterno' => $sess->inPerfilExterno,\n )\n );\n\n # Monto os Menus\n $menu = $sess->MenuExterno;\n\n $count = 0;\n $countSon = 0;\n $arrMenu = array();\n foreach ($menu as $menuCadastro) {\n $arrMenu[$count]['text'] = $menuCadastro['MenuPai']['noMenu'];\n $arrMenu[$count]['href'] = $menuCadastro['Acao'];\n\n if (isset($menuCadastro['MenuFilho'])) {\n $arrTmpFilho = current($menuCadastro['MenuFilho']);\n if (empty($arrTmpFilho['MenuFilho']['noMenu'])) {\n // continue;\n }\n\n foreach ($menuCadastro['MenuFilho'] as $menuFilho) {\n\n if (!isset($arrMenu[$count])) {\n continue;\n }\n\n if (isset($menuFilho['Acao']) && NULL !== $menuFilho['Acao']) {\n $arrMenu[$count][$countSon]['href'] = $menuFilho['Acao'];\n }\n\n if (!empty($menuFilho['MenuFilho']['noMenu'])) {\n $arrMenu[$count][$countSon]['text'] = $menuFilho['MenuFilho']['noMenu'];\n }\n\n $countSon++;\n }\n }\n $count++;\n }\n\n $menuParam = new \\stdClass;\n $menuParam->title = 'Menu';\n $menuParam->options = $arrMenu;\n $menuParam->type = 'v';\n\n $this->_SIALApplication->set('menuV',$this->getSAF()->create('menu', $menuParam));\n }", "public function getMenu() {\r\n $sql = $this->db->query(\"SELECT * FROM ms_menu WHERE menu_isactive = 1 ORDER BY menu_urut\");\r\n if ($sql->num_rows() > 0) {\r\n return $sql->result_array();\r\n }\r\n return null;\r\n }", "public function getMenu(){\n\n\t\treturn $this->get();\n\t}", "function menu_Individuals()\n{\n\treturn wp_nav_menu(array(\n\n\t\t'echo' => false,\n\n\t\t'menu' => 'Individuals',\n\n\t\t'theme_location' => 'primary',\n\n\t\t'container' => true,\n\n\t\t'menu_class' => 'menu',\n\n\t));\n\n}", "function tacensi_get_menu ( $location ) {\n\t$locations = get_nav_menu_locations();\n\t$menu_id = $locations[$location];\n\n\t// bail out if can't find the menu or the items\n\tif ( ! $menu_id ) return false;\n\n\t$nav = wp_get_nav_menu_items( $menu_id );\n\tif ( ! $nav ) return false;\n\n\t// menu_output\n\t$menu_out = '<nav class=\"site-nav\">' . \"\\n\";\n\n\t// current URL for active class\n\t$current_url = home_url() . $_SERVER[\"REQUEST_URI\"];\n\n\t// actual nav items\n\tforeach ( $nav as $item ) {\n\t\t$menu_out .= '<a href=\"' . $item->url . '\" ' .\n\t\t\t'class=\"site-nav__item';\n\n\t\tif ( strstr( $current_url, $item->url ) ) {\n\t\t\t$menu_out .= ' current';\n\t\t}\n\n\t\t$menu_out .= '\">' . $item->title . '</a>' . \"\\n\";\n\t}\n\n\t$menu_out .= '</nav>' . \"\\n\";\n\n\techo $menu_out;\n}", "public function getMenuItems() {\n\n $url = $this->urlHelper;\n $items = [];\n\n //Links Visible always to everyone logged in or not.\n //default Home page - no login required. \n\n /* $items[] = [\n 'id' => 'home',\n 'label' => 'Home',\n 'link' => $url('home')\n ]; */\n\n //add links here for pages that will be visible for all users logged-in or not.\n //you must adjust User\\Module.php (~line 85) onDispatch method to ignore calls for \n //the associated Controller and action or you will end up with an infinite loop.\n /*\n $items[] = [\n 'id' => 'about',\n 'label' => 'About',\n 'link' => $url('about')\n ];\n */\n\n $user = $this->authManager->getLoggedInUser();\n\n //BEGIN Authentication/Rendering Logic\n // Display \"Login\" menu item for not authorized user only. On the other hand,\n // display \"Admin\" and \"Logout\" menu items only for authorized users and any other links \n // that should be visible by logged-in users.\n if (!$user) {\n\n $items[] = [\n 'id' => 'login',\n 'label' => 'Sign in',\n 'link' => $url('login'),\n 'float' => 'right'\n ];\n } else {\n\n //render Customers link for all users with sales_attr_id value in users table\n if (!empty($user->getSales_attr_id())) {\n $items[] = [\n 'id' => 'customers',\n 'label' => 'Customers',\n 'data-ffm-salesperson' => $user->getFullName(),\n 'float' => 'static',\n 'link' => $url('customer', ['action' => 'view', 'id' => $user->getSales_attr_id()])\n ];\n }\n //only display admin drop down for admin users.\n $isAdmin = $this->authManager->isAdmin();\n if ($isAdmin) {\n $items[] = [\n 'id' => 'admin',\n 'label' => '<i class=\"ion-gear-a\"></i>',\n 'float' => 'right',\n 'dropdown' => [\n [\n 'id' => 'users',\n 'label' => 'Manage Users',\n 'link' => $url('users')\n ]\n ]\n ];\n }\n\n $settingsDropDownManageAccount = [\n 'id' => 'manage_account',\n 'label' => 'Manage Account',\n 'link' => $url('users', ['action' => 'edit', 'id' => $user->getId()])\n ];\n\n $settingsDropDownViewAccount = [\n 'id' => 'view_account',\n 'label' => 'View Account',\n 'link' => $url('application', ['action' => 'settings'])\n ];\n\n $settingsDropDownLogout = [\n 'id' => 'logout',\n 'label' => 'Logout',\n 'link' => $url('logout')\n ];\n\n $settingsDropDown = [];\n\n //only add the Manage Account link for Admins.\n if ($isAdmin) {\n $settingsDropDown[] = $settingsDropDownManageAccount;\n }\n\n $settingsDropDown[] = $settingsDropDownViewAccount;\n\n $settingsDropDown[] = $settingsDropDownLogout;\n\n $items[] = [\n 'id' => 'settings',\n 'label' => '<i class=\"ion-person\"></i>' . $user->getUsername(),\n 'float' => 'right',\n 'dropdown' => $settingsDropDown\n ];\n\n $loggedInItems = $this->getLoggedInItems();\n\n if ($loggedInItems)\n array_merge($items, $loggedInItems);\n\n // add items to right of settings in top right corner only for logged-in users here\n //Show Salespeople link only to Admin users\n if ($isAdmin) {\n\n $items[] = [\n 'id' => 'salespeople',\n 'label' => 'Salespeople',\n 'float' => 'static',\n 'link' => $url('salespeople', ['action' => 'index']),\n ];\n }\n }\n\n return $items;\n }", "private function _getNavigation()\r\n\t{\r\n\t\tglobal $action, $whmcs;\r\n\t\t\r\n\t\t$uri\t= DunUri :: getInstance('SERVER', true );\r\n\t\t$uri->delVar( 'task' );\r\n\t\t$uri->delVar( 'submit' );\r\n\t\t\r\n\t\t$html\t= '<ul class=\"nav nav-pills\">';\r\n\t\t\r\n\t\tforeach( array( 'themes', 'config', 'license' ) as $item ) {\r\n\t\t\t\r\n\t\t\tif ( $item == $action ) {\r\n\t\t\t\tif ( array_key_exists( 'task', $whmcs->input ) ) {\r\n\t\t\t\t\tif ( $whmcs->input['task'] != 'edittheme' ) {\r\n\t\t\t\t\t\t$html .= '<li class=\"active\"><a href=\"#\">' . t( 'themer.admin.module.navbar.' . $item ) . '</a></li>';\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$html .= '<li class=\"active\"><a href=\"#\">' . t( 'themer.admin.module.navbar.' . $item ) . '</a></li>';\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$uri->setVar( 'action', $item );\r\n\t\t\t$html .= '<li><a href=\"' . $uri->toString() . '\">' . t( 'themer.admin.module.navbar.' . $item ) . '</a></li>';\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$html\t.= '</ul>';\r\n\t\treturn $html;\r\n\t}", "private function _getNavigation()\r\n\t{\r\n\t\t$input\t= dunloader( 'input', true );\r\n\t\t$action\t= $input->getVar( 'action', 'themes' );\r\n\t\t$task\t= $input->getVar( 'task', null );\r\n\t\t\r\n\t\t$uri\t= DunUri :: getInstance('SERVER', true );\r\n\t\t$uri->delVars();\r\n\t\t$uri->setVar( 'module', 'themer' );\r\n\t\t\r\n\t\t$html\t= '<ul class=\"nav nav-pills\">';\r\n\t\t\r\n\t\tforeach( array( 'themes', 'config', 'license' ) as $item ) {\r\n\t\t\t\r\n\t\t\tif ( $item == $action && $task != 'edittheme' ) {\r\n\t\t\t\t$html .= '<li class=\"active\"><a href=\"#\">' . t( 'themer.admin.module.navbar.' . $item ) . '</a></li>';\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$uri->setVar( 'action', $item );\r\n\t\t\t$html .= '<li><a href=\"' . $uri->toString() . '\">' . t( 'themer.admin.module.navbar.' . $item ) . '</a></li>';\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$html\t.= '</ul>';\r\n\t\treturn $html;\r\n\t}", "function get_navbar($menu) \n{\n\t$html = \"<nav class='navbar'>\\n\";\n\tforeach($menu['items'] as $item) \n\t{\n\t\tif(basename($_SERVER['SCRIPT_FILENAME']) == $item['url'])\n\t\t{\n\t\t\t$item['class'] .= ' selected'; \n\t\t}\n\t\t$html .= \"<p><a href='{$item['url']}' class='{$item['class']}'>{$item['text']}</a>\\n</p>\";\n\t}\n\t$html .= \"</nav>\";\n\treturn $html;\n}", "private function getMenuItems()\n {\n $menu = $this->getDoctrine()->getRepository('XvolutionsAdminBundle:Menu')->findBy([], array('position' => 'ASC'));\n $menuItems = null;\n foreach ($menu as $item) {\n $menuItems[$item->getPage()->getId()] = ['id' => $item->getPage()->getId(), 'title' => $item->getPage()->getTitle()];\n }\n\n return $menuItems;\n }", "function ks_nav() {\n\twp_nav_menu(\n\t\tarray(\n\t\t\t'theme_location' => 'header-menu',\n\t\t\t'menu' => '',\n\t\t\t'container' => 'div',\n\t\t\t'container_class' => 'menu-{menu slug}-container',\n\t\t\t'container_id' => '',\n\t\t\t'menu_class' => 'menu',\n\t\t\t'menu_id' => '',\n\t\t\t'echo' => true,\n\t\t\t'fallback_cb' => 'wp_page_menu',\n\t\t\t'before' => '',\n\t\t\t'after' => '',\n\t\t\t'link_before' => '',\n\t\t\t'link_after' => '',\n\t\t\t'items_wrap' => '<ul>%3$s</ul>',\n\t\t\t'depth' => 0,\n\t\t\t'walker' => ''\n\t\t)\n\t);\n}", "public function buildmenu()\n {\n $pages = Page::where('ispublished', 1)->where('ischild', '0')->get();\n foreach ($pages as $page) \n {\n if ($page->issection!=0)//checking if an object has subpages\n {\n if (Page::where('parent_id', $page->id)->get())\n {\n $children = Page::where('parent_id', $page->id)->get();\n }\n $count=0;\n foreach ($children as $child)//building array of subpages\n {\n if (Page::find($child->id))\n {\n if (Page::find($child->id)->published!=1)\n {\n unset($children[$count]);\n\n }\n }\n $count++;\n }\n $page->children = $children;\n }\n }\n return $pages;\n }", "function get_all_portal_menu() {\n $sql = \"SELECT a.*, COUNT(b.nav_id)'total_menu'\n FROM com_portal a\n LEFT JOIN com_menu b ON a.portal_id = b.portal_id\n GROUP BY a.portal_id\n ORDER BY a.portal_id ASC\";\n $query = $this->db->query($sql);\n if ($query->num_rows() > 0) {\n $result = $query->result_array();\n $query->free_result();\n return $result;\n } else {\n return array();\n }\n }", "public function main_navigation(){\r\n\r\n echo \"<ul>\";\r\n\r\n if(isset($this->navigationSettings)){\r\n\r\n foreach((array) $this->navigationSettings as $key => $value){\r\n echo \"<li>\";\r\n echo \"<a href='$value'>$key</a>\";\r\n echo \"</li>\";\r\n }\r\n\r\n }\r\n\r\n echo \"</ul>\";\r\n\r\n }", "function header_menu( $data ) {\n\t\t\t\t\t\tif (($locations = get_nav_menu_locations()) && isset($locations[ 'sgn_menu' ])) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Retrieve the menu in location sgn_menu */\n\t\t\t\t\t\t\t$menu = wp_get_nav_menu_object($locations['sgn_menu']);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Create an empty array to store our JSON */\n\t\t\t\t\t\t\t$menuItems = array();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* If the menu isn't empty, start process of building an array, otherwise return a 404 error */\n\t\t\t\t\t\t\tif (!empty($menu)) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/* Assign array of navigation items to $menu_items variable */\n\t\t\t\t\t\t\t\t$menu_items = wp_get_nav_menu_items($menu->term_id);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/* if $menu_items isn't empty */\n\t\t\t\t\t\t\t\tif ($menu_items) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t/* for each menu item, verify the menu item has no parent and then push the menu item to the $menuItems array */\n\t\t\t\t\t\t\t\t\tforeach ($menu_items as $key => $menu_item) {\n\t\t\t\t\t\t\t\t\t\tif ($menu_item->menu_item_parent == 0) {\n\t\t\t\t\t\t\t\t\t\t\tarray_push(\n\t\t\t\t\t\t\t\t\t\t\t\t$menuItems, array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'title' => $menu_item->title,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'url' => $menu_item->url,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'slug' => $menu_item->slug\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} else {\n\t\t\t\t\t\t\t\treturn new WP_Error(\n\t\t\t\t\t\t\t\t\t'no_menus',\n\t\t\t\t\t\t\t\t\t'Could not find any menus',\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'status' => 404\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\t\n\t\t\t\t\t\t\t\t/* Return array of list items with title and url properties */\n\t\t\t\t\t\t\t\treturn $menuItems;\n\t\t\t\t\t}", "protected function get_menu_links($content)\n {\n $crawler = new Crawler($content);\n\n $menu_links_filter = $crawler->filter('li.level2-li');\n $menu_links = $this->get_links_from_filter($menu_links_filter);\n\n return $menu_links;\n }", "private function get_items() {\n return $this->menuitems;\n }", "function template_navigation() {\n\t\t$_ENV['menu'] = array();\n\t\t$_ENV['menu']['Main'] = _URL_;\n\t\tModule::includes('menus');\n\t\t$_ENV['menu']['Preferences'] = '?module=prefs';\n\t\t$_ENV['menu']['Logout'] = '?logout=true';\n\n\t\t$buffer = '<ul><li><h2>';\n\t\t$buffer .= array_key_exists('Menu',$_ENV['imgs']['menu']) \n\t\t\t? '<img src=\"'.$_ENV['imgs']['menu']['Menu'].'\" border=\"0\" /> ' : ' ';\n\t\t$buffer .= ' Main Menu</h2><ul>';\n\t\tforeach ($_ENV['menu'] as $module => $items) {\n\t\t\tif (is_array($items)) {\n\t\t\t\t$buffer .= '<li><a href=\"#\">';\n\t\t\t\t$buffer .= array_key_exists($module,$_ENV['imgs']['menu'])\n\t\t\t\t\t? '<img src=\"'.$_ENV['imgs']['menu'][$module].'\" border=\"0\" /> ' : ' ';\n\t\t\t\t$buffer .= $module.'</a><ul>';\n\t\t\t\tforeach ($items as $label => $url) {\n\t\t\t\t\t$buffer .= '<li><a href=\"'.$url.'\">';\n\t\t\t\t\t$buffer .= array_key_exists($label,$_ENV['imgs']['menu'])\n\t\t\t\t\t\t? '<img src=\"'.$_ENV['imgs']['menu'][$label].'\" border=\"0\" /> ' : ' ';\n\t\t\t\t\t$buffer .= $label.'</a></li>';\n\t\t\t\t}\n\t\t\t\t$buffer .= '</ul></li>';\n\t\t\t} else {\n\t\t\t\t$buffer .= '<li><a href=\"'.$items.'\">';\n\t\t\t\t$buffer .= array_key_exists($module,$_ENV['imgs']['menu'])\n\t\t\t\t\t? '<img src=\"'.$_ENV['imgs']['menu'][$module].'\" border=\"0\" /> ' : ' ';\n\t\t\t\t$buffer .= $module.' </a></li>';\n\t\t\t}\t\n\t\t}\n\t\t$buffer .= '</ul></li></ul>';\n\t\treturn $buffer;\n\t}", "function wp_get_nav_menu_items($items, $menu, $args)\n {\n }" ]
[ "0.73089737", "0.7088451", "0.69841474", "0.6957719", "0.69031924", "0.6885977", "0.68505716", "0.6834121", "0.6721595", "0.67091465", "0.6613587", "0.6611821", "0.6611394", "0.6567057", "0.65570587", "0.6545959", "0.6545266", "0.6481662", "0.6478773", "0.6465719", "0.6457324", "0.6446305", "0.63798285", "0.63758445", "0.6367255", "0.63145924", "0.62896264", "0.6261425", "0.6260772", "0.62427646", "0.62360686", "0.6235021", "0.6227719", "0.6201203", "0.6198719", "0.6197783", "0.6150264", "0.61077166", "0.60774696", "0.6063948", "0.6061826", "0.6052166", "0.6050889", "0.6046915", "0.60412216", "0.60251355", "0.6023097", "0.6016732", "0.6006408", "0.5990612", "0.598842", "0.5948348", "0.59362614", "0.59154975", "0.5912821", "0.5904641", "0.59007293", "0.58869654", "0.5885881", "0.58702093", "0.5858754", "0.5857697", "0.5851792", "0.58512473", "0.5848808", "0.5842289", "0.5840641", "0.58367103", "0.58283955", "0.582194", "0.5818698", "0.58138627", "0.5812633", "0.5809989", "0.5808178", "0.5805876", "0.5797341", "0.5794492", "0.57943743", "0.57919866", "0.5790484", "0.57902694", "0.57899106", "0.5784129", "0.57833016", "0.57789934", "0.57780164", "0.5769043", "0.5761101", "0.5753743", "0.5745946", "0.573604", "0.5731523", "0.5726069", "0.5719941", "0.5719161", "0.57045716", "0.5702738", "0.56991434", "0.5698195" ]
0.6286168
27
get user data from client
public function oAuthSuccess($client) { $userAttributes = $client->getUserAttributes(); //var_dump($userAttributes); //exit(); if(empty($userAttributes['email'])){ Yii::$app->session->setFlash('error', 'กรุณากด Allow Access ใน Facebook เพื่อใช้งาน Facebook Login'); return $this->redirect('/site/login'); } $user = User::findOne(['email' => $userAttributes['email']]); if($user){//ถ้ามี user ในระบบแล้ว //echo 'user email'; if($user->status != User::STATUS_ACTIVE){//ถ้าสถานะไม่ active ให้ active $user->status = User::STATUS_ACTIVE; $user->save(); } $profile = Profile::find()->where(['user_id' => $user->id])->one(); if(!$profile){// ถ้าไม่มี profile ให้สร้างใหม่ $name = explode(" ", $userAttributes['name']);// แยกชื่อ นามสกุล $pf = new Profile(); $pf->firstname = $name[0]; $pf->lastname = $name[1]; $pf->save(); } Yii::$app->getUser()->login($user); }else{//ถ้าไม่มี user ในระบบ //echo 'none user'; //$generate = Yii::$app->security->generateRandomString(10); $uname = explode("@", $userAttributes['email']);// แยกอีเมลล์ด้วย @ $getuser = User::findOne(['username' => $uname[0]]); if($getuser){//มี username จาก username ที่ได้จาก email //echo 'exit user from username'; $rand = rand(10, 99); $username = $uname[0].$rand; }else{ //echo 'none user from username'; $username = $uname[0]; } //echo $username; $new_user = new User(); $new_user->username = $username; $new_user->auth_key = Yii::$app->security->generateRandomString(); $new_user->password_hash = Yii::$app->security->generatePasswordHash($username); $new_user->email = $userAttributes['email']; $new_user->status = User::STATUS_ACTIVE; if($new_user->save()){ //echo 'save user'; $name = explode(" ", $userAttributes['name']);// แยกชื่อ นามสกุล // $new_profile = new Profile(); // $new_profile->user_id = $new_user->id; // $new_profile->firstname = $name[0]; // $new_profile->lastname = $name[1]; // $new_profile->save()); Yii::$app->getUser()->login($new_user); }else{ //echo 'not save user'; } } //exit(); // do some thing with user data. for example with $userAttributes['email'] }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUserData() { \n // \"functions.php\";\n\n $response = $this->getRequest(\"me\");\n\n // Return an object of the JSON response\n return json_decode($response->getBody()->getContents());\n }", "public static function get_user_data()\n {\n }", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUserData()\n {\n exit(json_encode(['data' => $this->users_model->get_users()]));\n }", "public function getClient(){ return UserData::getById($this->client_id); }", "public function getMe()\n {\n return $this->_execute('/user/', self::METHOD_GET);\n }", "public function getUserData()\r\n \t{\r\n \t\tif ($this->_client->getUser())\r\n \t\t{\r\n \t\t\treturn $this->_client->api('/me');\r\n \t\t}\r\n \t\treturn null;\r\n \t}", "public static function getUser();", "public function getUserInfo() {}", "public function getUser() {\n\t\t$urlUser = \"{$this->apiHost}/me.json\";\n\t\treturn $this->runCurl ( $urlUser );\n\t}", "abstract public function getUserInfo();", "public function user()\n\t{\n\n\t\t$user = $this->current_user ? $this->current_user : $this->ion_auth->get_user();\n\n\t\techo json_encode($user);die;\n\t}", "public function getUser() {}", "function get_user()\n{\n$response = $GLOBALS['http']->request('GET', '/api/users/@me', [\n 'headers' => [\n 'Authorization' => 'Bearer ' . $_SESSION['auth_token']\n ]\n]);\n\n$responseBody = $response->getBody(true); \n$response = json_decode($responseBody, true);\n$_SESSION['username'] = $response['username'];\n$_SESSION['discrim'] = $response['discriminator'];\n$_SESSION['user_id'] = $response['id'];\n$_SESSION['user_avatar'] = $response['avatar'];\n}", "function REST_getClientData($fenixClient){\n\t$user = (array)$fenixClient->getPerson();\n\treturn $user; \n}", "function getUserInfo(){\n\n\t\t/* Fetch user info from Flickr */\n\t\t$user = $this->askFlickr('people.getinfo','user_id='.$this->user);\n\n\t\t/* Return User info */\n\t\treturn $user;\n\t}", "public function getUser(){\r\n $urlUser = \"{$this->apiHost}/api/v1/me\";\r\n // return $urlUser;\r\n return self::runCurl($urlUser);\r\n }", "public function userInfo()\n {\n $this->startBrokerSession();\n $user = null;\n\n $userId = $this->getSessionData('sso_user');\n\n if ($userId) {\n $user = $this->getUserInfo($userId);\n if (!$user) return $this->fail(\"User not found\", 500); // Shouldn't happen\n }\n\n header('Content-type: application/json; charset=UTF-8');\n echo json_encode($user);\n }", "public function user()\n {\n return $this->request('get', '/api/user');\n }", "public function getuserAction()\r\n {\r\n $User = $this->getUser();\r\n $data = $User;\r\n return $data;\r\n }", "public function getUser()\n {\n //Auth::checkAuthentication();\n \n $json = array(\n 'user_name' => Session::get('user_name'),\n 'user_email' => Session::get('user_email'),\n 'user_gravatar_image_url' => Session::get('user_gravatar_image_url'),\n 'user_avatar_file' => Session::get('user_avatar_file'),\n 'user_account_type' => Session::get('user_account_type')\n );\n \n header(\"Content-Type: application/json\");\n echo json_encode($json);\n }", "abstract protected function getUser();", "public function get(){\n\t\t\treturn Response::json(Auth::user());\n\t\t}", "public function get_userInfo()\n {\n return $this->call_method(\"get/userInfo\",\n array()\n );\n }", "public function getUserInfo()\n {\n }", "public function getUserData()\n {\n \n $user = MasterUser::latest()->get();\n return response([\n 'success' => true,\n 'message' => 'List All User',\n 'data' => $user\n ], 200);\n }", "public function getUserSession(){\n return $this->getParam('user-data', 'auth');\n }", "function getUserData($user){\r\n $data = new \\Cars\\Data\\Common($this->app);\r\n return $data->getUserData($user);\r\n }", "public function getUserData()\n {\n return $this->userData;\n }", "public function readUserAuth(){\n $user = new \\Filebase\\Database([\n 'dir' => $this->getDataSource()\n ]);\n\n if ($user->has($this->username)) {\n $item = $user->get($this->username);\n $data = [\n 'result' => $item->auth,\n 'attribute' => [\n 'username' => $this->username\n ],\n 'status' => 'success',\n 'message' => 'Data found!'\n ];\n } else {\n $data = [\n 'status' => 'error',\n 'message' => 'User not found!'\n ];\n }\n return $data;\n }", "public function getUserData()\n {\n return self::$facebook->api('/me');\n }", "public function get_user_info()\n\t{\n\t\tif ( function_exists('wp_remote_get') ) {\n\t\t\t$json = wp_remote_get($this->API_URL . '?username='. $this->user);\n\t\t\t$user_info = @json_decode($json['body'], true);\n\t\t} else {\n\t\t\t$json = @file_get_contents($this->API_URL . '?username='. $this->user);\n\t\t\t$user_info = @json_decode($json, true);\n\t\t}\n\t\t\n\t\treturn $user_info['resp'];\n\t}", "public function getUser()\n {\n $this->getParam('user');\n }", "public function getUserInfo()\r\n {\r\n return self::makeCall('getUserInfo', array(), null, false, $this->sessionID);\r\n }", "public function getUserAction()\n {\n $session = $this->getDeviceSession();\n\n if (!$session) {\n $this->setErrorResponse('This device has no running session');\n }\n\n $session->registerAction($_SERVER['REMOTE_ADDR']);\n\n $user = $session->getUser();\n\n $this->_helper->json($user);\n }", "public function getInfo()\n {\n if(Sentry::check())\n {\n $user = Sentry::getUser();\n $data = $this->app->json([\n \"username\" => $user->first_name,\n \"password\" => \" \",\n \"email\" => $user->email\n ]);\n return $data;\n } else {\n return false;\n }\n }", "function getUserInfo() {\n\t$page = $this -> get('http://vk.com/al_profile.php') -> body;\n\n\t$pattern = '/\"user_id\":([0-9]*),\"loc\":([\"a-z0-9_-]*),\"back\":\"([\\W ]*|[\\w ]*)\",.*,\"post_hash\":\"([a-z0-9]*)\",.*,\"info_hash\":\"([a-z0-9]*)\"/';\n\tpreg_match($pattern, $page, $matches);\n\tarray_shift($matches);\n\t\n\t$this -> user['id'] = $matches[0];\n\t$this -> user['alias'] = $matches[1];\n\t$this -> user['name'] = $matches[2];\n\t$this -> user['post_hash'] = $matches[3];\n\t$this -> user['info_hash'] = $matches[4];\n\n\treturn $this -> user;\n\t}", "public function getUserData($userId);", "public function getUser(ServerRequest $request);", "public function user()\n {\n return $this->response_json($this->guard()->user());\n }", "private function getUserInfo()\n {\n // TODO This could be cached\n return $this->userInfoApi->getUserInfo();\n }", "public function getUser()\n\t{\n\t\tif(isset($this->user))\n\t\t{\n\t\t\treturn $this->user;\n\t\t}\n\n\t\t$request = new ColoCrossing_Http_Request('/', 'GET');\n\t\t$executor = $this->getHttpExecutor();\n\t\t$response = $executor->executeRequest($request);\n\t\t$content = $response->getContent();\n\n\t\treturn $this->user = ColoCrossing_Object_Factory::createObject($this, null, $content['user'], 'user');\n\t}", "public function getUserData() {\r\n if (!$this->linkedService) $data = array();\r\n else $data = $this->linkedService->getUserData();\r\n\r\n return $data;\r\n }", "public function get_user()\n {\n $token = $this->CI->input->get_request_header('Authorization', TRUE);\n $token_json = base64_decode($token);\n $token = json_decode($token_json);\n $userid = $token->userId;\n $username = $token->userName;\n return ['id'=>$userid,'name'=>$username];\n }", "public function index_get()\n {\n return $this->lib_rest_users->getLoggedUser();\n }", "public function get_user()\n\t{\n\t\t$username = 'root';\n\t\t$password = md5('123');\n\n\t\t//将数据存储到数据中\n\t\t$arr = array(\n\t\t\t'username'\t=>\t$username,\n\t\t\t'psd' \t\t=>\t$password\n\t\t);\n\n\t\t$this->load->model('user_model','user');\n\t\t$data = $this->user->get_user($arr);\n\t\techo $this->_gen_userinfo_json($data);\n\t}", "function user_get()\n {\n $id = $this->get('id');\n if ($id == '') {\n $user = $this->db->get('auth_user')->result();\n } else {\n $this->db->where('id', $id);\n $user = $this->db->get('auth_user')->result();\n }\n $this->response($user, 200);\n }", "public function getUserInfo(): array;", "public function getUser()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t$user = D('User');\n\t\t\t$sql = \"select * from lib_user order by register_time desc\";\n\t\t\t$return = $user->query($sql);\n\t\t\tif ($return) {\n\t\t\t\techo json_encode(array(\n\t\t\t\t\t'code' => 'success',\n\t\t\t\t\t'data' => json_encode($return)\n\t\t\t\t));\n\t\t\t} else {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'sql error'\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t}\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Please Login!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\t}", "public function user_info() {\n if ($this->rails_cookie_value() == NULL) {\n return null;\n }\n if (!self::$user_info && !self::$user_info_called) {\n $json_data = $this->api_request(\"user/\" . $this->rails_cookie_value());\n self::$user_info = $json_data->{'user'};\n self::$user_info_called = true;\n }\n return self::$user_info;\n }", "public function getUserInfo() {\n\t\t$userInfo = $this->HttpSocket->get(FLICKR_API_URL,\n\t\t\tarray(\n\t\t\t\t'method' => USERINFO,\n\t\t\t\t'format' => DATAFORMAT,\n\t\t\t\t'api_key' => $this->api_key,\n\t\t\t\t'user_id' => $this->photo['owner'],\n\t\t\t));\n\t\treturn unserialize($userInfo->body);\n\t}", "protected abstract function getUserData(): array;", "function getUser()\r\n {\r\n $users = file_get_contents('storage/users.json');\r\n return json_decode($users);\r\n }", "private function getUserData() {\n\t\tglobal $current_user;\n \tget_currentuserinfo();\n \t$userData = array(\n \t 'username' \t=> $current_user->user_login,\n\t\t 'email' \t\t=> $current_user->user_email,\n\t\t 'phone'\t\t=> get_user_meta( $current_user->ID, 'phone', true ),\n\t\t 'fname' \t\t=> $current_user->user_firstname,\n\t\t 'lname' \t\t=> $current_user->user_lastname,\n\t\t 'display name' => $current_user->display_name,\n\t\t 'id' \t\t\t=> $current_user->ID);\n \treturn $userData;\n\t}", "function getUserInfo()\n {\n return $this->userinfo;\n }", "public static function getUser()\n {\n return self::getInstance()->_getUser();\n }", "function get_owner_data($user_id){\n $ch = curl_init();\n $url = $GLOBALS['App-Logic'].\"?\" .http_build_query([\n 'get_owner_data' => true, //a flag to execute the right code in App-Logic! \n 'user_id' => $user_id,\n ]);\n\n curl_setopt($ch,CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HTTPGET, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);\n \n $response = curl_exec($ch);\n curl_close($ch);\n \n return json_decode($response,true);\n\n }", "public function getUserData()\n {\n return $this->file->get(self::SETTING_USER_DATA);\n }", "function getUser() {\n return user_load($this->uid);\n }", "public function getUser()\n {\n }", "protected function getCurrentUserData() {}", "protected function getCurrentUserData() {}", "public function getUserData() {\n\t\treturn $this->_userData;\n\t}", "public function getUser(){\n\t\treturn $this->user;\n\t}", "public function getUser() {\n $data = DB::table('users')->select('*', 'id as id_tmp')->get();\n header(\"Content-type: application/json\");\n echo \"{\\\"data\\\":\" . json_encode($data) . \"}\";\n }", "static function getUser(){\n return $_SESSION[\"APPWEB\"][\"USERNAME\"];\n }", "public function me()\r\n {\r\n return response()->json(auth('api')->user());\r\n }", "public static function getUserAPI();", "public function user()\n {\n // return Auth::user()->wallet()->getBalance();\n $user = Auth::user();\n $wallet = $user->wallet();\n $additional = [\n 'balance' => $wallet->getBalance()\n ];\n $data = array_merge( (new Collection($user))->toArray(), $additional);\n return $this->response(\n $data, \n 'Get data success',\n true,\n null, null,\n 200\n );\n }", "function getUserData() {\n global $conn;\n $sql = \"SELECT user_id, firstname, lastname, email FROM users\";\n $result = $conn->query($sql);\n return $result;\n }", "public function getUserInfo()\n {\n return $this->_process('user/info')->user;\n }", "public function getUser( $data )\r\n\t\t{\r\n\t\t\treturn DB::query( \"SELECT * FROM user WHERE username=:username AND password_hash=:password_hash AND status=1\", $data, true );\t\t\r\n\t\t}", "function get_guest() {\n return get_complete_user_data('username', 'guest');\n}", "public function me()\n {\n return response()->json($this->guard('api')->user());\n }", "function user()\n {\n $this->load->library('service');\n $data = file_get_contents('php://input');\n $ret = array(\n 'out' => $this->service->handle('user', $data)\n );\n $this->output($ret);\n }", "static function getUserInfo(){\n $result = Array();\n return $result;\n }", "private function getUserInfo()\n\t{\n\t\t$user = Sentry::user();\n\t\t$result = array(\n\t\t\t'username' => $user->get('username'),\n\t\t\t'isAdmin' => $user->in_group('admin'),\n\t\t);\n\t\treturn $result;\n\t}", "public function getUserInformation()\n {\n return $this->userInformation;\n }", "public function me()\n {\n return response()->json(auth('api')->user());\n }", "public function me()\n {\n return response()->json(auth('api')->user());\n }", "public function me()\n {\n return response()->json(auth('api')->user());\n }", "public function getUser()\n {\n\t\t//TODO User 1. How can we check the id of the JWT user?\n\t\t$user = '';\n\t\tif ($user) {\n\t\t\treturn $this->sendResponse(UserModel::find($user->id));\n\t\t}\n\t\treturn $this->sendResponse('You are not authorised to view this user');\n }", "function getUser() \n {\n\t\t\treturn $this->user;\n\t\t}", "function user() {\n if ($this->getRequestMethod() != \"GET\") {\n $this->response('', 406);\n }\n $id = (int)$this->_request['id']; \n if ($id > 0) {\n $query = \"select * from users where id=$id;\"; \n $r = $this->conn->query($query) or die($this->conn->error . __LINE__);\n if($r->num_rows > 0) {\n $result = $r->fetch_assoc(); \n $this->response(json_encode($result), 200);\n } else {\n $this->response('', 204);\n }\n } else {\n $this->response('',406);\n }\n }", "private function get_user_info() {\n $user_info = $this->_api_call('https://api.twitter.com/1.1/account/settings.json');\n return $user_info;\n }", "protected function getUserInfo()\n {\n return [\n \"channel\" => self::getSdkChannel(),\n \"uid\" => $this->request_param[\"user_id\"],\n \"server_id\" => $this->request_param[\"server_id\"],\n \"role_id\" => is_null($this->role_id)?\"?\":$this->role_id,\n ];\n }", "private function userinfo($access_token){\n //CakeLog::write(LOG_DEBUG, __CLASS__ . '.' . __FUNCTION__ . '(), just entered');\n $userinfo = $this->serverGet($this->strategy['base_url'] . 'me', array('access_token' => $access_token), null, $headers); // 'me' from flask; google uses this naming convention, as do others.\n if (!empty($userinfo)){\n return $this->recursiveGetObjectVars(json_decode($userinfo));\n }\n else{\n $error = array(\n 'code' => 'userinfo_error',\n 'message' => 'Failed when attempting to query for user information',\n 'raw' => array(\n 'response' => $userinfo,\n 'headers' => $headers\n )\n );\n\n $this->errorCallback($error);\n }\n //CakeLog::write(LOG_DEBUG, __CLASS__ . '.' . __FUNCTION__ . '(), done');\n }", "private function getUser()\n {\n return $this->user->getUser();\n }", "public function getUserData()\n {\n $data = array();\n\n $identity = $this->openid->identity;\n\n if ($identity) {\n $steamId = str_replace('http://steamcommunity.com/openid/id/', '', $identity);\n\n $query = http_build_query(array(\n 'key' => $this->getOption('apiKey'),\n 'steamids' => $steamId\n ));\n\n $url = $this->getOption('profileUrl') . '?' . $query;\n\n $json = json_decode(file_get_contents($url));\n\n if (count($json->response->players)) {\n $data = (array) $json->response->players[0];\n }\n }\n\n return $data;\n }", "public function get_user()\n {\n Session::_start();\n return (object) Session::_get(\"user\");\n\n }", "public function get_user_data() {\n\t\t$email = '';\n\t\t$name = '';\n\n\t\tif ( ! empty( $this->current_user->user_email ) ) {\n\t\t\t$email = $this->current_user->user_email;\n\t\t}\n\n\t\tif ( ! empty( $this->current_user->user_firstname ) && ! empty( $this->current_user->user_lastname ) ) {\n\t\t\t$name = $this->current_user->user_firstname . ' ' . $this->current_user->user_lastname;\n\t\t} else {\n\t\t\t$name = $this->current_user->user_login;\n\t\t}\n\n\t\treturn array(\n\t\t\t'name' => $name,\n\t\t\t'email' => $email,\n\t\t);\n\t}", "protected function _user() {\n return $this->_adapter_user->user();\n }", "public function getMyAccountInfo()\n {\n $ajax_data = array();\n $user_id = $this->user_session->getUserId();\n\n if ($user_id) {\n $user = $this->user_logic->getUserById($user_id);\n if ($user !== false) {\n if (! empty($user) AND is_array($user)) {\n $user = array_pop($user);\n $ajax_data['code'] = 0;\n $ajax_data['data']['user'] = $user;\n $ajax_data['message'] = 'Successfully retrieved user info';\n } else {\n $ajax_data['code'] = 1;\n $ajax_data['message'] = 'User does not exist'; \n } \n } else {\n $ajax_data['code'] = 1;\n $ajax_data['message'] = 'Failed to get user info'; \n } \n } else {\n $ajax_data['code'] = 1;\n $ajax_data['message'] = 'Invalid user id';\n }\n \n $this->ajax_respond($ajax_data);\n }", "public static function getUser() \n {\n return $_SESSION['username'];\n }", "public function getUserInfo()\n {\n return $this->userInfo;\n }" ]
[ "0.76285887", "0.7554394", "0.7270594", "0.7270594", "0.7270594", "0.7270594", "0.7270594", "0.7270594", "0.7270594", "0.72628796", "0.7258839", "0.7235287", "0.7152189", "0.7125053", "0.70627064", "0.7009472", "0.6996983", "0.69771475", "0.6970739", "0.6926695", "0.6908921", "0.69071704", "0.68920714", "0.68725413", "0.6826134", "0.68212193", "0.68161297", "0.6808233", "0.6793011", "0.67924565", "0.67805433", "0.6779367", "0.6778477", "0.6763652", "0.67520595", "0.67409724", "0.6731253", "0.67216444", "0.66994375", "0.6676358", "0.66761595", "0.6662693", "0.66597766", "0.6656809", "0.6637743", "0.6634785", "0.6631452", "0.6614788", "0.66146886", "0.6612987", "0.66001976", "0.6595489", "0.65893924", "0.6587573", "0.65839946", "0.6565672", "0.65656054", "0.6561528", "0.6546796", "0.6545752", "0.6544831", "0.6543954", "0.65403575", "0.65369105", "0.6531611", "0.6525894", "0.6522638", "0.65205866", "0.6520336", "0.6512973", "0.6508757", "0.65058863", "0.6505185", "0.650285", "0.6499709", "0.64937574", "0.6491865", "0.6481662", "0.64813614", "0.6479737", "0.64784276", "0.6477126", "0.64719784", "0.646094", "0.645139", "0.645139", "0.645139", "0.6446317", "0.6445996", "0.64326054", "0.64323723", "0.64235926", "0.6421016", "0.6419198", "0.6414043", "0.64067316", "0.64029044", "0.6398616", "0.63978857", "0.63936985", "0.63891613" ]
0.0
-1
Run the database seeds.
public function run() { $this->fakeSelections(); }
{ "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
Display a listing of the resource.
public function index(Request $request) { $storeproducts = StoreProduct::paginate(25); // if(auth()->user()->store==null){ // return redirect()->route('stores.create'); // } // if (auth()->user()->role->name=='admin'){ // $storeproducts=StoreProduct::where('store_id',auth()->user()->store->id)->paginate(25); // } return view('admin.store_product.index', compact('storeproducts')); }
{ "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() { $storeproducts = StoreProduct::all(); $products = Product::paginate(25); $stores = Store::all(); $brand = Brand::all(); $units = Unit::all(); $seacrh = null; $show = 0; $bcategories = BCategory::all(); if (auth()->user()->role->name == 'admin') { $storeproducts = StoreProduct::where('store_id', auth()->user()->store->id)->get(); $stores = Store::where('user_id', auth()->user()->id)->get(); } // dd($storeproducts); return view('admin.store_product.create', compact('products', 'stores', 'brand', 'units', 'storeproducts', 'seacrh', 'show', 'bcategories')); }
{ "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) { if (!$request->keyword) { if (auth()->user()->role->name == 'super admin') { for ($i = 0; $i < count($request->product_ids); $i++) { $va = explode(' ', $request->product_ids[$i]); StoreProduct::create([ 'store_id' => $request->store_id, 'product_id' => $va[0], 'store_price' => $request->productprices[$va[1]], 'qty' => $request->productquantities[$i], 'status' => 1, 'brand_id' => $request->brand_id, 'unit_id' => $request->unit_ids[$i] ]); } } } else { $seacrh = $request->keyword; $stores = Store::all(); $brand = Brand::all(); $units = Unit::all(); $storeproducts = StoreProduct::where('store_id', $request->store_id)->get(); $show = 1; $products = Product::where('name', 'like', '%' . $seacrh . '%')->paginate(25)->setPath(''); $bcategories = BCategory::all(); $pagination = $products->appends(array( 'keyword' => $request->keyword )); return view('admin.store_product.create', compact('products', 'stores', 'brand', 'units', 'storeproducts', 'seacrh', 'show', 'bcategories')); } return redirect()->route('storeproducts.index'); }
{ "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) { $storeproduct = StoreProduct::find($id); return view('admin.store_product.show', compact('storeproduct')); }
{ "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) { $storeproduct = StoreProduct::find($id); $products = Product::all(); $stores = Store::all(); $brands = Brand::all(); $units = Unit::all(); return view('admin.store_product.edit', compact('products', 'stores', 'brands', 'units', 'storeproduct')); }
{ "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(Form $form)\n {\n //\n }", "public function edit()\n { \n return view('admin.control.edit');\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(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "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($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($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(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()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(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 $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit()\n {\n return view('initializer::edit');\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_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\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.7855196", "0.76957726", "0.7273917", "0.7241426", "0.71717227", "0.7064183", "0.70528984", "0.69836885", "0.694763", "0.69469565", "0.6941572", "0.69301945", "0.6903868", "0.68989486", "0.68989486", "0.68787694", "0.68641657", "0.6860115", "0.6857286", "0.68464494", "0.6834566", "0.68116575", "0.68075293", "0.6805924", "0.6801357", "0.6796291", "0.67915684", "0.67915684", "0.67874014", "0.678544", "0.67787844", "0.6777662", "0.67675763", "0.676299", "0.6746726", "0.6745706", "0.67450166", "0.67450166", "0.6739429", "0.6734577", "0.6725992", "0.67127997", "0.6694406", "0.6692487", "0.6689421", "0.66884303", "0.6687299", "0.6685663", "0.6682167", "0.66701853", "0.66697115", "0.6666091", "0.6666091", "0.66627705", "0.6661716", "0.6661522", "0.6657919", "0.6656454", "0.6653187", "0.6642113", "0.66332614", "0.66324973", "0.66275465", "0.66275465", "0.6619777", "0.6619387", "0.6617973", "0.66154003", "0.66110945", "0.6607966", "0.66065043", "0.6596376", "0.65953517", "0.65941286", "0.6591486", "0.6590759", "0.6588404", "0.658161", "0.6580548", "0.6579757", "0.6577171", "0.65761065", "0.657386", "0.65686774", "0.6567784", "0.65672046", "0.6566417", "0.65615803", "0.65615714", "0.65615714", "0.65592474", "0.65586483", "0.65568006", "0.6556628", "0.65564895", "0.6555322", "0.65551996", "0.6555016", "0.654888", "0.65477645", "0.65451735" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { if (auth()->user()->role->name == 'super admin') { $storeproduct = StoreProduct::find($id); $storeproduct->update($request->all()); } return redirect()->route('storeproducts.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { if (auth()->user()->email == '[email protected]') { $item = StoreProduct::find($id); $item->delete(); } return redirect()->back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Get the user that owns the card
public function user() { return $this->belongsTo( User::class ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOwner() {\n // no need to check whether exist because of database constrain\n return User::getUserById($this->owner_id);\n }", "public function user()\n {\n if (!is_null($this->user)) {\n return $this->user;\n }\n $user = null;\n try {\n $resourceId = Authorizer::getResourceOwnerId();\n $resourceType = Authorizer::getResourceOwnerType();\n } catch (\\Exception $e) {\n $resourceId = null;\n $resourceType = null;\n // throw $e;\n }\n if ($resourceType !== $this->id) {\n return null;\n }\n if (!empty($resourceId)) {\n $user = $this->getProvider()->retrieveById($resourceId);\n }\n return $this->user = $user;\n\n }", "function getOwner() {\n $user =& Element_Factory::makeElement( 'Bm_Users' );\n $user->get( $this->author );\n\n return $user->login;\n }", "public function getCreditCardOwner()\n {\n return $this->creditCardOwner;\n }", "protected function getUserId()\n {\n return object_get($this->getUser(), 'profile_id', $this->getDefaultProfileId() );\n }", "public function getOwnerusername() {}", "public function getOwner(): User\n {\n return $this->user;\n }", "public function getOwnerId()\n {\n return $this->user_id;\n }", "public function getOwner()\n\t{\n\t\treturn $this->getObject('owner', null, 'user');\n\t}", "public function getOwner(): User\n {\n return $this->owner;\n }", "public function getUser($owner = null)\n {\n if($owner === null)\n $owner = $this->owner;\n\n $res = $this->db->select(\"SELECT * FROM `{$this->domainUser}` WHERE itemName()='{$owner}'\", array('ConsistentRead' => 'true'));\n $this->logErrors($res);\n if(isset($res->body->SelectResult->Item))\n return self::normalizeUser($res->body->SelectResult->Item);\n elseif(isset($res->body->SelectResult))\n return null;\n else\n return false;\n }", "public function getOwner()\n {\n return $this->hasOne(User::className(), ['id' => 'owner_id']);\n }", "function get_user () {\n\t\treturn $this->user_id;\n\t}", "function get_owned_by_uid($uid) {\n\t\t$data = $this->db->query('SELECT event_id FROM event_owner WHERE owner_id='.$uid.'');\n\t\treturn $data->result();\n\t}", "protected function objectUserEnCours(){\n $fbUid = $this->getRequest()->getSession()->get('_fos_facebook_fb_482361481839052_user_id');\n $user = $this->getDoctrine()->getManager()->getRepository('MetinetFacebookBundle:User')->findOneByfbUid($fbUid);\n return $user ;\n }", "public function getOwnerRequestedBy()\n {\n return $this->http->get('/users/%s/requested-by', 'self');\n }", "private function getUser() {\n\t\t$account = $this->authenticationManager->getSecurityContext()->getAccount();\n\t\t$user = $account->getParty();\n\t\treturn $user;\n\t}", "public function getCurrentUser(){\n\t\treturn BankAccessor::create()->getCurrentUser();\n\t}", "private function getAuthor()\n {\n $tokenStorage = $this->getOption('token_storage');\n\n return $tokenStorage->getToken()->getUser();\n }", "public function get_user() {\r\n\t\treturn ($this->user);\r\n\t}", "public function user()\n {\n if (!$this->user) {\n $identifier = $this->getToken();\n $this->user = $this->provider->retrieveByToken($identifier, '');\n }\n return $this->user;\n }", "public function oOwner(){\n\t\tif(is_null($this->__oOwner)){\n $this->__oOwner = CUser::oGetUser($this->__iOwnerNo);\n }\n return $this->__oOwner;\n\t}", "public function getOppoUserid()\n {\n return $this->get(self::_OPPO_USERID);\n }", "public function invoiceuser()\n {\n return $this->bean->info()->user()->name();\n }", "protected function getUser()\n\t{\n\t\t$fbUser = $this->getFBUser();\n\t\tif (is_null($fbUser)) {\n\t\t\t$vkUser = $this->getVKUser();\n\t\t\tif (is_null($vkUser)) {\n\t\t\t\t$this->getResponseFormatForInvalidUserId();\n\t\t\t}\n\t\t\treturn $vkUser;\n\t\t}\n\t\treturn $fbUser;\n\t}", "public function fetchUser() {\n return $this->QueryAPI(\"current_user\");\n }", "public function get_user() {\n\t\treturn $this->user;\n\t}", "function getUser() {\n return user_load($this->uid);\n }", "public function getUserId() {\n\t\treturn (string) $this->photo->owner['nsid'];\n\t}", "public function getOwner()\n {\n return $this->data['owner'];\n }", "public function user() {\n\t\tif ( ! is_null($this->user)) return $this->user;\n\t\treturn $this->user = $this->retrieve($this->token);\n\t}", "public function getResponsibleUserAttribute()\n {\n $model = Config::get(\"auth.model\");\n return $model::find($this->user_id);\n }", "public function owner()\n\t{\n\t\treturn $this->oneToOne('Hubzero\\User\\User', 'id', 'owned_by_user');\n\t}", "public function payee()\n {\n return $this->getSubject()->user;\n }", "public function getUserWithId($id){\r\n\r\n\t\t$sql = \"Select * from users where id = ?\";\r\n\t\t$query = $this->db->prepare($sql);\r\n\t\t$query->execute([$id]);\r\n\r\n\t\t$postOwner = $query->fetch(PDO::FETCH_OBJ);\r\n\t\treturn $postOwner;\r\n\t}", "public function getUser()\n {\n if (!$membership = $this->getMembership()) {\n return false;\n }\n \n return $membership->getUser();\n }", "public function get_user_id();", "public function getAuthenticatedUser()\n {\n return $this->getUnsplashClient()->sendRequest('GET', 'me');\n }", "public function getOwnerId()\n {\n return $this->owner_id;\n }", "public function getOwnerId()\n {\n return $this->owner_id;\n }", "function getOwner() {\n \n return $this->principalInfo['uri'];\n \n }", "public function getResponsibleUserAttribute()\n {\n $model = Config::get(\"auth.providers.users.model\");\n return $model::find($this->user_id);\n }", "public function getUserProfile()\n {\n $user = $this->security->getUser();\n return $user;\n }", "private function getUser()\n {\n return $this->user->getUser();\n }", "private function getUser()\n {\n if ($this->userData['id']) {\n $user = gateway('northstar')->asClient()->getUser($this->userData['id']);\n\n if ($user && $user->id) {\n info('Found user by id', ['user' => $user->id]);\n\n return $user;\n }\n }\n\n if ($this->userData['email']) {\n $user = gateway('northstar')->asClient()->getUserByEmail($this->userData['email']);\n\n if ($user && $user->id) {\n info('Found user by email', ['user' => $user->id]);\n\n return $user;\n }\n }\n\n if (! isset($this->userData['mobile'])) {\n return null;\n }\n\n $user = gateway('northstar')->asClient()->getUserByMobile($this->userData['mobile']);\n\n if ($user && $user->id) {\n info('Found user by mobile', ['user' => $user->id]);\n\n return $user;\n }\n\n return null;\n }", "function getOwnedAttribute()\n {\n if (!!Auth::user()) return Auth::id() === $this->user_id;\n return false;\n }", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getUser(){\r\n\t\treturn $this->facebook_obj->getUser();\r\n\t}", "public function get_point_owner()\n {\n $player_obj = User::find($this->player_id);\n\n return $player_obj;\n }", "public function getUser ()\r\n\t{\r\n\t\treturn $this->user;\r\n\t}", "protected function getUserOrImpersonateUser() {\n if ($this->get('security.authorization_checker')->isGranted('ROLE_CDG')) {\n $session = $this->get('session');\n $userId = $session->get('user_id');\n $userRepository = $this->getDoctrine()->getRepository('UserBundle:User');\n $user = $userRepository->find($userId);\n $session->set('user_siret', $user->getUsername());\n } else {\n $user = $this->getUser();\n }\n\n return $user;\n }", "public function getUserId()\r\n \t{\r\n \treturn $this->_client->getUser();\r\n \t}", "public function getUserO()\n {\n return $this->userO;\n }", "public function getAuthenticatedUser()\n\t{\n\t\t$user = Auth::user();\n\t\t$user->merchant;\n\n\t\treturn $user;\n\t}", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getPostUser() {\n\n // Match and map the id of the author ($userId) to a user object\n return UserManager::getUserById($this->userId);\n }", "public function getOwnerIdentifier();", "public function user_card()\n {\n return $this -> belongsTo( UserCard :: class ); \n }", "public function getowner_id()\n {\n return $this->owner_id;\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUserProfile(){\n\n\t\treturn $this->cnuser->getUserProfile($this->request->header('Authorization'));\n\t}", "public function getAmOwnerAttribute() {\n\t\t$userId = user('id');\n\t\tif(empty($userId)) { return false; }\n\t\t\n\t\treturn $userId == $this->attributes['user_id'];\n\t}", "public function user()\n {\n if (!$this->user && ($redaxoUser = $this->getRedaxoUser())) {\n $this->user = $this->retrieveUserByRedaxoUser($redaxoUser);\n }\n\n return $this->user;\n }", "public function get_user_id()\n {\n return self::getUser();\n }", "protected function get_owner_id()\n {\n return $this->owner_id;\n }", "public function user()\n {\n return $this->user;\n }", "public function user()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'author']);\n }", "public function getUser()\r\n {\r\n return $this->user;\r\n }", "public function getUser() {\n\t\treturn $this->api->getUserById($this->getUserId());\n\t}", "public function getInfoProfile(){\n return $this->get_user_by_id($this->getAccountID());\n }", "public function returnUser() {\n return $this->user_id;\n }", "public function user() { return $this->user; }", "public function getBattleUserId()\n {\n return $this->get(self::_BATTLE_USER_ID);\n }", "public function getUser()\n {\n return $this->_user;\n }", "public function getUser()\n\t{\n\t\tif (!isset($this->_r_user)) {\n\t\t\t$filters = [];\n\t\t\tif(!is_null($v = $this->getUserId())){\n\t\t\t\t$filters['user_id'] = $v;\n\t\t\t}\n\t\t\tif (empty($filters)){\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t$m = new OZUsersControllerRealR();\n\t\t\t$this->_r_user = $m->getItem($filters);\n\t\t}\n\n\t\treturn $this->_r_user;\n\t}", "public function getAuthorizedUser()\n {\n if (empty($this->currentUser)) {\n $this->authorize();\n }\n return $this->currentUser;\n }", "private function getUser()\n {\n $userObj = new Core_Model_Users;\n return $userObj->profile();\n }", "public function getEnteredBy()\n {\n return $this->hasOne(User::className(), ['id' => 'EnteredBy']);\n }", "public function getOwnerID() {\n\t\treturn $this->owner_id;\n\t}", "public function user() {\n if ($this->User === null)\n $this->User = $this->getEntity(\"User\", $this->get(\"user_id\"));\n return $this->User;\n }" ]
[ "0.7173041", "0.6776359", "0.6720594", "0.6657766", "0.6639163", "0.65901184", "0.65805435", "0.6572616", "0.6529385", "0.65027726", "0.6443207", "0.6437094", "0.6430424", "0.64030737", "0.6376713", "0.63748497", "0.635282", "0.63424075", "0.6306452", "0.630007", "0.6270625", "0.62544566", "0.6233258", "0.62296826", "0.62201315", "0.62153274", "0.6215227", "0.6203019", "0.61818177", "0.6179038", "0.6172102", "0.6154413", "0.61518854", "0.6137408", "0.6128132", "0.61229384", "0.612241", "0.61164385", "0.6108461", "0.6108461", "0.61081755", "0.61013925", "0.60954326", "0.6092977", "0.60782135", "0.6072867", "0.60597444", "0.60597444", "0.60597444", "0.60597444", "0.60597444", "0.60597444", "0.60597444", "0.60597444", "0.60597444", "0.6058141", "0.6051586", "0.6047559", "0.6045092", "0.603071", "0.60301936", "0.6028274", "0.60220325", "0.60220325", "0.60220325", "0.60220325", "0.60220325", "0.60220325", "0.60220325", "0.6020584", "0.60194546", "0.6017714", "0.60167813", "0.60148776", "0.60148776", "0.60148776", "0.60148776", "0.60135436", "0.6007583", "0.6006413", "0.60038257", "0.59954166", "0.5992904", "0.5992904", "0.598952", "0.598952", "0.598952", "0.5986455", "0.5981703", "0.5978094", "0.5976707", "0.59766954", "0.59760684", "0.59730166", "0.5971579", "0.59618515", "0.59612274", "0.5959386", "0.5959228", "0.59558845", "0.5952711" ]
0.0
-1
Getters and Setters Get the Monograph
function &getMonograph() { return $this->_monograph; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMonograph() {\n\t\t$monographDao =& DAORegistry::getDAO('MonographDAO');\n\t\treturn $monographDao->getMonograph($this->_monographId);\n\t}", "public function getMilage()\n {\n }", "public function getMuscle() {\n return $this->_muscle;\n }", "public function getMarca(){ return $this->marca;}", "function &getMonograph() {\n\t\treturn $this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH);\n\t}", "function newDataObject() {\n\t\treturn new Monograph();\n\t}", "function getMbrid() {\n return $this->_mbrid;\n }", "public function get() {\n \n }", "public function getWMO()\n\t{\n\t\treturn $this->wmo;\n\t}", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get();", "public function get()\n {\n // TODO: Implement get() method.\n }", "public function getModele()\n{\nreturn $this->modele;\n}", "public function getInMonitoreado()\n\t{\n\t\treturn $this->in_monitoreado;\n\t}", "public function getW() {}", "public function getMonsters()\n {\n return $this->monsters;\n }", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "function getLeja(){\r\n return $this->leja;\r\n }", "public function getMataPelajaran();", "function &getRepresentative() {\n\t\treturn $this->_representative;\n\t}", "public function getMerk() \t\t\t{\treturn $this->merk;\t}", "public function getMUNICIPIO()\r\n {\r\n return $this->MUNICIPIO;\r\n }", "public function getMaitre()\n {\n return $this->maitre;\n }", "public function getMontant() {\n return $this->montant;\n }", "abstract public function get() ;", "public function getMonsterInfo()\n {\n return $this->get(self::_MONSTER_INFO);\n }", "function getImagen(){\n\t\t\treturn $this->imagen;\n\t\t}", "function getwonum() {\n return $this->wonum;\n }", "function get()\n {\n }", "public function get() {}", "public function get() {}", "public function get() {}", "public function get() {}", "public function get() {}", "public function get_nom(){ return $this->_nom;}", "public function get_nom(){ return $this->_nom;}", "public function get() {\n }", "public function getChapeau();", "function getWeight(){return $this->weight;}", "public function get()\n {\n }", "function properties()\n {\n }", "public function getMon()\n {\n return $this->mon;\n }", "public function isGina(){return $this->gina;}", "abstract function get();", "public function masodik()\n {\n }", "public function getMotor():float{\n\t\treturn $this->motor;\n\t}", "public function nom_alien()\r\n{\r\n return $this->_nom_alien;\r\n}", "public function getDemonstrativos();", "public function getMontant()\n {\n return $this->montant;\n }", "public function getMontant()\n {\n return $this->montant;\n }", "public function get_superficie(){ return $this->_superficie;}", "public function getMileage() {\n return $this->get(self::MILEAGE);\n }", "public function getArbreMoniteurs() {\n\t\treturn $this->arbre_moniteurs;\n\t}", "function B_M() {\n\treturn Bonster_Management::instance();\n}", "function getMiles()\n {\n return $this->miles;\n }", "public function get_motdepasse()\n {\n return $this->_motdepasse;\n }", "public function getMatricule(){\n return $this->$Matricule;\n }", "public function getPlate()\n{\nreturn $this->plate;\n}", "public function getMaterno()\n {\n return $this->materno;\n }", "public function getImagen()\n {\n return $this->imagen;\n }", "public function getImagen()\n {\n return $this->imagen;\n }", "public function getImagen()\n {\n return $this->imagen;\n }", "public static function getters();", "private function GetMorphy() {\n //includes phpMorphy lib\n require_once( './libs/phpmorphy/src/common.php');\n\n $dir = './libs/phpmorphy/dicts';\n $lang = 'ru_RU';\n $opts = array(\n 'storage' => PHPMORPHY_STORAGE_FILE,\n );\n //creating our phpMorphy class object\n try {\n $morphy = new phpMorphy($dir, $lang, $opts);\n return $morphy;\n } catch (phpMorphy_Exception $e) {\n die('Error occured while creating phpMorphy instance: ' . $e->getMessage());\n }\n }", "public function getWeight()\n {\n }", "public function getWeight()\n {\n }", "public function magic() { return $this->_m_magic; }", "public function getVolumen(){\n return $this->volumen;\n\n}", "public function getHival() {}", "public function m() : int\n {\n return $this->m;\n }", "public function getMontant_vente()\n {\n return $this->montant_vente;\n }", "public function getFilm(): Film\n {\n return $this->film;\n }", "public function getMotscles()\n {\n return $this->motscles;\n }", "public function getModelo(){ return $this->modelo;}", "public function getNom()\n{\nreturn $this->Nom;\n}", "public function getMotif()\n {\n return $this->motif;\n }", "public function getImagen()\r\n {\r\n return $this->imagen;\r\n }", "public function value() { }", "public function value() { }" ]
[ "0.6973", "0.66966915", "0.6026542", "0.59726137", "0.5963439", "0.59013295", "0.5890213", "0.5831762", "0.5793854", "0.57860875", "0.57860875", "0.57860875", "0.57860875", "0.57860875", "0.57860875", "0.57860875", "0.57860875", "0.57860875", "0.57860875", "0.57860875", "0.57860875", "0.57860875", "0.57860875", "0.57860875", "0.57860875", "0.57860875", "0.57860875", "0.5741997", "0.57263875", "0.5724897", "0.571706", "0.5709674", "0.5707787", "0.5707787", "0.5707787", "0.5707787", "0.5707787", "0.5707787", "0.5692029", "0.5690703", "0.568866", "0.5665658", "0.56537515", "0.56478107", "0.56271845", "0.5591479", "0.55703497", "0.55602795", "0.55468225", "0.55432606", "0.554133", "0.554133", "0.554133", "0.554133", "0.5541259", "0.5531808", "0.5531808", "0.55212265", "0.5520653", "0.55161214", "0.5512853", "0.54974747", "0.5474204", "0.5467372", "0.5466163", "0.54590875", "0.54583657", "0.5457986", "0.5454568", "0.5449288", "0.5449288", "0.5448797", "0.5445733", "0.5441568", "0.5438421", "0.5437537", "0.5420991", "0.54181856", "0.54159546", "0.54121864", "0.5395355", "0.5395355", "0.5395355", "0.53934294", "0.5379517", "0.53766114", "0.53766114", "0.5375433", "0.5375298", "0.5368734", "0.5338574", "0.5337169", "0.53326726", "0.53321475", "0.5330583", "0.5322518", "0.5319598", "0.531646", "0.5311812", "0.5311812" ]
0.76305884
0
Get the Stage Id
function getStageId() { return $this->_stageId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStageId()\n {\n return $this->get(self::_STAGE_ID);\n }", "public function getStageId()\n {\n return $this->get(self::_STAGE_ID);\n }", "public function getStageId()\n {\n return $this->get(self::_STAGE_ID);\n }", "function getStageId() {\n\t\treturn $this->getData('stageId');\n\t}", "public function getCurStageId()\n {\n return $this->get(self::_CUR_STAGE_ID);\n }", "public function getStage()\n {\n return $this->get(self::_STAGE);\n }", "public function getStage(): int\n {\n return self::STAGE;\n }", "public function getStage()\n {\n return $this->stage;\n }", "public function get_current_stage() {\n\t\treturn $this->stage;\n\t}", "public function id() {\n return $this->Session->read('Authorization.Team.0.id');\n }", "public function getLaunchStage()\n {\n return $this->launch_stage;\n }", "public function getCurStage()\n {\n return $this->get(self::_CUR_STAGE);\n }", "function getStagePath() {\n\t\treturn $this->_stagePath;\n\t}", "public function getUserstage()\n {\n return $this->get(self::_USERSTAGE);\n }", "public function getStepId();", "public function get_stages_name();", "public function getStageIndex()\n {\n return $this->get(self::_STAGE_INDEX);\n }", "public function getIdentifier()\n {\n return $this->getParam('flowIdentifier');\n }", "private static function getStageURL() {\n $allowedStages = array( 'PRODUCTION', 'WRU', 'INT' );\n\n if ( !in_array( self::$stage, $allowedStages ) ) {\n throw new \\Exception( \"Invalid stage '\" . self::$stage . \"'. Supported values are: \" . implode(',', $allowedStages) );\n }\n \n switch ( self::$stage ) {\n case 'PRODUCTION':\n return self::STAGE_PRODUCTION;\n case 'INT':\n return self::STAGE_INT;\n case 'WRU':\n default:\n return self::STAGE_WRU;\n }\n }", "function getId() {\n\t\treturn $this->getData('studyId');\n\t}", "public function setStageId($value)\n {\n return $this->set(self::_STAGE_ID, $value);\n }", "public function setStageId($value)\n {\n return $this->set(self::_STAGE_ID, $value);\n }", "public function setStageId($value)\n {\n return $this->set(self::_STAGE_ID, $value);\n }", "public function getSourcedId()\n {\n return isset($context['sourcedId']) ? $context['sourcedId'] : null;\n }", "public function id()\n {\n return $this->identity['jobId'];\n }", "public function getId() {\r\n\r\n return $this->getGameManager()->getGameId($this);\r\n\r\n }", "public function getTeamId()\n {\n return $this->get(self::_TEAM_ID);\n }", "public function getLeadId() {\n\t\treturn $this->container['lead_id'];\n\t}", "public function getObjectId() {\n\t\tif(isset($this->assetObject)) {\n\t\t\treturn $this->assetObject->getAssetId();\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public function getId() {\n return ($this->isInit()) ? $this->id : null;\n }", "public function getStagePass()\n {\n return $this->get(self::_STAGE_PASS);\n }", "function getID() \n {\n return $this->getValueByFieldName( 'statevar_id' );\n }", "function getID() {\n\t\treturn $this->data_array['artifact_id'];\n\t}", "public function getId()\n {\n return $this->getResolved()->getId();\n }", "public function getVariantSetId()\n {\n return $this->variant_set_id;\n }", "public function getId()\n {\n return $this->sys->getId();\n }", "public function getShipmentStage()\n {\n return $this->shipmentStage;\n }", "public function getId() \r\n\t{\r\n\t\treturn $this->sId;\r\n\t}", "public function getTeamId()\n {\n return $this->iTeamDatabaseId;\n }", "public function getTeam_id() {\n return $this->getValue('team_id');\n }", "public function getId()\n\t{\n\t\t$videoId\t= '';\n\n\t\tpreg_match('/videos\\/(.*)/', $this->url , $matches);\n\t \tif (!empty($matches[1])){\n\t\t\t$videoId\t= $matches[1];\n\t\t}\n\n\t\treturn $videoId;\n\t}", "public function getSeasonIdAttribute()\n {\n $videoIds = $this->id;\n $seasonName = Season::whereHas('videoSeason', function ($query) use ($videoIds) {\n $query->where('video_id', $videoIds);\n })->select('id')->where('is_active', 1)->first();\n\n return !empty($seasonName) ? $seasonName->id : '';\n }", "function getSubmissionId() {\n\t\treturn $this->getData('submissionId');\n\t}", "function getSubmissionId() {\n\t\treturn $this->getData('submissionId');\n\t}", "public function id()\n {\n return $this->resource->getKey();\n }", "function getJobId() {\n return $this->helper->getJobId();\n }", "function getJobId() {\n return $this->helper->getJobId();\n }", "function getJobId() {\n return $this->helper->getJobId();\n }", "function getJobId() {\n return $this->helper->getJobId();\n }", "function getJobId() {\n return $this->helper->getJobId();\n }", "public function getVariantId()\n {\n return $this->variantId;\n }", "public function getVariantId()\n {\n return $this->variantId;\n }", "public function getVersionSetId()\n {\n return $this->version_set_id;\n }", "public function id()\n\t{\n\t\treturn $this->SqueezePlyrID ;\n\t}", "public function getId()\n {\n return $this->identifier;\n }", "public function getStepId()\n {\n return $this->_stepId;\n }", "public function getId()\n {\n return $this->currentId;\n }", "protected function GetId() {\n\n $Id= $this->GetOption('Id');\n if (!$Id) {\n $Id= $this->GetName(); // let id be same as name\n $Id= str_replace(array('[',']'),'_', $Id); // id cannot contain '[' and ']'\n $Id= trim($Id, '_'); // id cannot start with '_'\n }\n return $Id;\n }", "function get_id() {\n\t\treturn $this->get_data( 'id' );\n\t}", "public function getSourceObjectId()\n {\n return $this->id;\n }", "public function getDeploymentId()\n {\n return $this->deployment_id;\n }", "public function getDeploymentId()\n {\n return $this->deployment_id;\n }", "public function getObjectId() {\n\t\t\treturn SERIA_Meta::getNamedObjectId($this);\n\t\t}", "function GetSaleStageEntity($saleStageEntityId)\n\t{\n\t\t$result = $this->sendRequest(\"GetSaleStageEntity\", array(\"SaleStageEntityId\"=>$saleStageEntityId));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function id() {\n return $this->entity->id();\n }", "public function getExternalId() {\n\t\treturn empty( $this->container['external_ids'] ) ? null : $this->container['external_ids'][0];\n\t}", "public function getId()\n {\n return $this->file->get('id');\n }", "public function getStoneId()\n {\n return $this->get(self::_STONE_ID);\n }", "public function getSolutionId()\n {\n return $this->solution_id;\n }", "public function GetId() {\n\t\t\n\t\t$user = self::GetUserProfile();\n\t\treturn $user['id'];\n\t}", "public function getTeamId() {\n return $this->teamId;\n }", "function getSiteId() {\n\t\treturn $this->getData('siteId');\n\t}", "public function getId() {\n\t\treturn $this->Id;\n\t}", "function getSId() {\n return $this->sId;\n }", "public function getId(): ?string\n {\n return $this->sf('0');\n }", "public function getTeamId()\n {\n $xpath = new \\DOMXPath($this->getXml());\n return $xpath->query('//OwningTeam/TeamID')->item(0)->nodeValue;\n }", "public function actionViewStage($id,$stage) {\n\t\n\t\tif(isset($_GET['stage']) && is_numeric($_GET['stage']))\n\t\t\t$viewStage = $_GET['stage'];\n\t\telse\n\t\t\t$viewStage = null;\n\n\t\t$this->render('viewStage',array(\n\t\t\t'model'=>$this->loadModel($id),'viewStage'=>$viewStage\n\t\t));\n\t}", "public function getCurrentSeasonId()\n {\n $currentSeason = $this->db->query(\"SELECT id, seizoen as season FROM intra_seizoen ORDER BY id DESC LIMIT 1;\")->fetch();\n return $currentSeason[\"id\"];\n }", "public function getSpoolerId()\n {\n return $this->spoolerId;\n }", "public function getAssetId()\n {\n if (is_null($this->assetId)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_ASSET_ID);\n if (is_null($data)) {\n return null;\n }\n $this->assetId = (string) $data;\n }\n\n return $this->assetId;\n }", "public function getAssetId(): int\n {\n $assetId = $this->attrs['asset_id'] ?? 0;\n\n return (int) $assetId;\n }", "public function getActivityId();", "public function getGameId(){\n\t\treturn $this->gameId;\n\t}", "protected function getStageService() {}", "public function getIdentifier()\n {\n return $this->id;\n }", "public function getSourceId()\n {\n return $this->baseEvent->getEventSourceId();\n }", "public function getId()\n {\n return $this->elasticaResult->getId();\n }", "public function getId()\n {\n return $this->getValue('session_id');\n }", "public function getSteamId() : string\n {\n return $this->steamId;\n }", "public function getId()\n {\n return isset($this->id) ? $this->id : '';\n }", "public function getId()\n {\n return isset($this->id) ? $this->id : '';\n }", "public static function id()\n {\n if (!ServerHelper::coroutineIsEnabled()) {\n return 0;\n }\n\n return SwCoroutine::getuid();\n }", "private function getId() {\n return Xss::filter($this->request->get('id'));\n }", "public function GetId()\n\t{\n\t\treturn $this->id;\n\t}", "public function getId()\n {\n return $this->Id;\n }", "public function getId()\n {\n return $this->Id;\n }", "public function getId()\n {\n return $this->Id;\n }", "protected function _getAssetParentId() {\n $assetParent = JTable::getInstance('Asset');\n $assetParentId = $assetParent->getRootId();\n\n $assetParent->loadByName('com_lajvit');\n\n if ($assetParent->id) {\n $assetParentId = $assetParent->id;\n }\n return $assetParentId;\n }", "public function getId()\n\t{\n\t\treturn $this->Id;\n\t}", "public function pId()\n {\n static $id = null;\n\n if (!is_null($id)) {\n return $id;\n }\n\n $id = $this->property('id');\n\n if (strpos($id, 'http') === 0) {\n $path = explode('/', parse_url($id, PHP_URL_PATH));\n\n if ($path[1] == 'gallery') {\n $id = $path[2];\n }\n elseif ($path[1] == 'a') {\n $id = 'a/'.$path[2];\n }\n else {\n $id = $path[1];\n }\n }\n\n return $id;\n }" ]
[ "0.8962569", "0.8962569", "0.8962569", "0.87752014", "0.80998963", "0.7069984", "0.6996967", "0.69835126", "0.66017115", "0.64304286", "0.641301", "0.6329982", "0.63270277", "0.6326695", "0.6296777", "0.62374985", "0.6222931", "0.6205347", "0.6188066", "0.61791974", "0.6152606", "0.6152606", "0.61493665", "0.61087686", "0.60785264", "0.60344046", "0.6020775", "0.60002583", "0.59843063", "0.596654", "0.5964023", "0.5939686", "0.5927959", "0.59225136", "0.5907718", "0.5849281", "0.5843221", "0.580691", "0.57965493", "0.57895637", "0.5774628", "0.5755155", "0.57490927", "0.57490927", "0.5740698", "0.5735081", "0.5735081", "0.5735081", "0.5735081", "0.5735081", "0.5729489", "0.5729489", "0.5707403", "0.5702104", "0.5699326", "0.5694875", "0.5694511", "0.5691413", "0.5690629", "0.5681199", "0.5670935", "0.5670935", "0.56702363", "0.5664721", "0.56624645", "0.56601566", "0.5658592", "0.5655056", "0.56455845", "0.5641384", "0.5634513", "0.5608799", "0.5608338", "0.56079954", "0.56005526", "0.5599081", "0.55987644", "0.5596051", "0.5594966", "0.5586472", "0.5585388", "0.5569457", "0.5566409", "0.55623806", "0.5561897", "0.5559491", "0.555418", "0.55487096", "0.554328", "0.55427843", "0.55427843", "0.5540958", "0.5540855", "0.55403364", "0.55400854", "0.55400854", "0.55400854", "0.5536154", "0.5535361", "0.5532408" ]
0.84340346
4
Get the extra form parameters.
function getFormParams() { return $this->_formParams; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getExtra()\n {\n return $this->getParameter('extra');\n }", "public function getFormParameters()\n {\n return $this->form_parameters;\n }", "public function getExtraFields()\n {\n $extraFields = new FieldList();\n\n $token = $this->getSecurityToken();\n if ($token) {\n $tokenField = $token->updateFieldSet($this->fields);\n if ($tokenField) {\n $tokenField->setForm($this);\n }\n }\n $this->securityTokenAdded = true;\n\n // add the \"real\" HTTP method if necessary (for PUT, DELETE and HEAD)\n if (strtoupper($this->FormMethod() ?? '') != $this->FormHttpMethod()) {\n $methodField = new HiddenField('_method', '', $this->FormHttpMethod());\n $methodField->setForm($this);\n $extraFields->push($methodField);\n }\n\n return $extraFields;\n }", "public function getAdditionalParams()\n {\n return array_filter($this->additionalParams);\n }", "public function getExtraFields()\n {\n return isset($this->extraFields) ? $this->extraFields : null;\n }", "public function getAdditionalParams(): array\n\t{\n\t\treturn $this->additionalParams;\n\t}", "public function transactionFormGetFormParms ();", "function getExtraVars()\n\t{\n\t\treturn $this->keys;\n\t}", "public function extraFields()\n {\n return [\n 'modals',\n 'modal_windows',\n ];\n }", "abstract protected function getRequiredRequestParameters();", "public function getRequiredExtraFields(): array\n {\n return [];\n }", "function getAdditionalParams() {\n return array(\n 'route' => $this->getRouteName(),\n ); // array\n }", "public function getExtraArgs()\n {\n return $this->_extraArgs;\n }", "public function getAdditionalFields()\n {\n return $this->postRequest('GetAdditionalFields');\n }", "public function getIgnoreExtraParameters()\n {\n return $this->ignoreExtraParameters;\n }", "function extraVars() {\n\t\tif (func_num_args()) {\n\t\t\tif (is_array(func_get_arg(0))) {\n\t\t\t\t$this->_extraVars = func_get_arg(0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->_extraVars = array(func_get_arg(0)=>'');\n\t\t\t}\t\t\t\n\t\t}\n\t\telse return $this->_extraVars;\n\t}", "public function getAdditionalMsgFields()\n {\n $a = array($this->getRequestId(), $this->getOptions());\n\n if ($this->getArguments() != null) {\n $a = array_merge($a, array($this->getArguments()));\n if ($this->getArgumentsKw()) {\n $a = array_merge($a, array($this->getArgumentsKw()));\n }\n }\n\n return $a;\n }", "abstract protected function getFormTypeParams();", "public static function getRequiredParams();", "protected function mollieGetAdditionalParameters()\n {\n $oRequest = Registry::getRequest();\n $oSession = Registry::getSession();\n\n $sAddParams = '';\n\n foreach ($this->aMollieUrlCopyParameters as $sParamName) {\n $sValue = $oRequest->getRequestEscapedParameter($sParamName);\n if (!empty($sValue)) {\n $sAddParams .= '&'.$sParamName.'='.$sValue;\n }\n }\n\n $sSid = $oSession->sid(true);\n if ($sSid != '') {\n $sAddParams .= '&'.$sSid;\n }\n\n if (!$oRequest->getRequestEscapedParameter('stoken')) {\n $sAddParams .= '&stoken='.$oSession->getSessionChallengeToken();\n }\n $sAddParams .= '&ord_agb=1';\n $sAddParams .= '&rtoken='.$oSession->getRemoteAccessToken();\n\n return $sAddParams;\n }", "function getOptionalInputParams_() {\n return $this->__inOptionalParams;\n }", "public function getRequiredParameters();", "public function getRequiredParameters();", "private function _getRequestParams()\n {\n return array_merge(\n $this->CI->input->post(),\n $this->CI->input->get()\n );\n }", "protected function getAdditionalFields() : array\n {\n return [\n 'VK_ENCODING' => $this->requestEncoding,\n ];\n }", "public function getExtraInformation() {\n return $this->extra;\n }", "public function transactionFormGetAttributes ();", "public function getAdditionalFields()\n {\n return $this->additional_fields;\n }", "public function getAdditionalFields()\n {\n return $this->additionalFields;\n }", "public function getAdditionalFields()\n {\n return $this->additionalFields;\n }", "public function getExtra();", "function getOptionalInputFields() {\n return $this->__inOptionalFields;\n }", "public function parameters()\n {\n return array_merge($this->get, $this->post);\n }", "public function getExtraInfo()\n {\n return $this->extra;\n }", "public function extra_question_fields() {\n return array('qtype_formulas_options', 'varsrandom', 'varsglobal', 'answernumbering');\n }", "public function getOptionalParameters();", "public function getRequestParams()\n {\n return $_REQUEST;\n }", "public function getOtherAuthorizationRequestParams() {\n }", "public function getParameters($includeGET = true)\n {\n return ($includeGET) ?\n $this->parameters :\n array_diff_assoc($this->parameters, $this->request->query->all())\n ;\n }", "public function getExtra()\n {\n return $this->extra;\n }", "public function getExtra()\n {\n return $this->extra;\n }", "public function getAdditionalParams()\n {\n return oxRegistry::get(\"oxUtilsUrl\")->processUrl('', false);\n }", "public function get_additional_login_parameters() {\n return [];\n }", "private function getExtraArray() {\n\t\treturn $this->extraArray;\n\t}", "public function getPostParams()\n {\n return $this->request->all();\n }", "private function __get_request_validate_params()\n {\n $this->__validation_params = __get_array_key2column(\n $this->__all_form_validation_params,\n $this->__route_uri_array\n );\n }", "public function getExtraOptions()\n {\n return isset($this->extraOptions)?$this->extraOptions:false;\n }", "public static function parameters()\n {\n $fields = array('name', 'amount');\n return array_intersect_key(self::fields(), array_flip($fields));\n }", "public function getRequestParams();", "function &getExtraFieldData() {\n\t\tif (!isset($this->extra_field_data)) {\n\t\t\t$this->extra_field_data = array();\n\t\t\t$res = db_query_params ('SELECT * FROM artifact_extra_field_data WHERE artifact_id=$1 ORDER BY extra_field_id',\n\t\t\t\t\t\tarray ($this->getID())) ;\n\t\t\t$ef = $this->ArtifactType->getExtraFields();\n\t\t\twhile ($arr = db_fetch_array($res)) {\n\t\t\t\t$type=$ef[$arr['extra_field_id']]['field_type'];\n\t\t\t\tif (($type == ARTIFACT_EXTRAFIELDTYPE_CHECKBOX) || ($type==ARTIFACT_EXTRAFIELDTYPE_MULTISELECT)) {\n\t\t\t\t\t//accumulate a sub-array of values in cases where you may have multiple rows\n\t\t\t\t\tif (!array_key_exists($arr['extra_field_id'], $this->extra_field_data) || !is_array($this->extra_field_data[$arr['extra_field_id']])) {\n\t\t\t\t\t\t$this->extra_field_data[$arr['extra_field_id']] = array();\n\t\t\t\t\t}\n\t\t\t\t\t$this->extra_field_data[$arr['extra_field_id']][]=$arr['field_data'];\n\t\t\t\t} else {\n\t\t\t\t\t$this->extra_field_data[$arr['extra_field_id']] = $arr['field_data'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->extra_field_data;\n\t}", "public function getRequestFieldsToSave(){\n\t\treturn array();\n\t}", "public function getOptionalParameters(): array\n {\n return $this->optionalParameters;\n }", "function getParameters() {\n\t\treturn $this->inputParameters;\n\t}", "public function get_extra_settings( $params = array() ) {\n\t\t$params['tags'] = $this->getTags();\n\t\tif ( ! is_array( $params['tags'] ) ) {\n\t\t\t$params['tags'] = array();\n\t\t}\n\n\t\treturn $params;\n\t}", "public function getRequestParameters()\n\t{\n\t\treturn $this->aParameters;\n\t}", "private function __get_all_form_validate_params()\n {\n $this->__all_form_validation_params =\n require_once(FORM_REQUEST_VALIDATE_PARAMS_CONFIG_FILE)\n ;\n }", "public function getCommonFormRequiredFields()\n {\n return $this->common_form_required_fields;\n }", "public function getExtra()\n {\n return json_decode($this->extra);\n }", "public function extra_question_fields()\n\t{\n\t\treturn array( 'qtype_logic_certificate', 'applet_id', 'applet_url' );\n\t}", "public function getFrontEndRequiredFields();", "public function getExtraServiceOptions();", "abstract protected function getFormIntroductionFields();", "public function getParams() {}", "private static function getGetParams()\n\t{\n\t\treturn $_GET;\n\t}", "public function get_extra_settings( $params = array() ) {\n\t\t$params['optin'] = empty( $params['optin'] ) ? ( isset( $_COOKIE['tve_api_mailchimp_optin'] ) ? sanitize_text_field( $_COOKIE['tve_api_mailchimp_optin'] ) : 'd' ) : $params['optin'];\n\t\tsetcookie( 'tve_api_mailchimp_optin', $params['optin'], strtotime( '+6 months' ), '/' );\n\t\t$groups = $this->_get_groups( $params );\n\t\t$params['groups'] = $groups;\n\n\t\treturn $params;\n\t}", "public function getParamsForRequest() {\n $params['api_key'] = $this->api_key;\n if ($this->token) {\n $params['auth_token'] = $this->token;\n }\n return $params;\n }", "protected static function getFormTokenExtras()\n\t{\n\t\t// All this is relatively easy to guess, but at least this will \n\t\t// be the same accross mutliple server instances.\n\t\treturn array(\n\t\t\tisset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '',\n\t\t\tisset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '',\n\t\t\tisset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '',\n\t\t\tisset($_SERVER['DOCUMENT_ROOT']) ? $_SERVER['DOCUMENT_ROOT'] : '',\n\t\t);\n\t}", "function getParams()\n {\n }", "public function getExtraDataFields()\n {\n return [];\n }", "public function get_request_arguments();", "public function get_params()\n {\n }", "public function get_params()\n {\n }", "public function transactionFormGetHiddenFields ();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function getParams();", "public function get_params() {\n\t\treturn $this->params;\n\t}", "public function getExtraArguments();", "public function get_requestUrlExParams()\n {\n return $this->requestUrlExParams;\n }", "protected function _getExtraOptions()\n {\n return array(\n 'table|t-s' => 'Which table to generate its DAO.',\n 'modelnamespace|M=s' => 'The model namespace',\n 'tablenamespace|T=s' => 'The table namespace'\n );\n }", "public function getAdditionalFields() {\n\t\t\n\t\t$fields = array();\n\t\t\n\t\tif ($this->installed()) {\n\t\t\t$ro_settings = $this->config->get('related_options');\n\t\t\t$std_fields = array('sku', 'upc', 'ean', 'location');\n\t\t\tforeach ($std_fields as $field) {\n\t\t\t\tif ( isset($ro_settings['spec_'.$field]) && $ro_settings['spec_'.$field] ) {\n\t\t\t\t\t$fields[] = $field;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $fields;\n\t}", "protected function _getAddUrlParams()\n {\n if ($this->getListType() == \"search\") {\n return $this->getDynUrlParams();\n }\n }", "public function getActionParams()\n\t{\n\t\t$args = parent::getActionParams();\n\n\t\t// Add in the $_POST array, giving it precedence\n\t\treturn array_merge($args, $_POST);\n\t}", "protected function getFormTypeParams()\n {\n return self::SHOWING_OR_SELLING_FORMS;\n }", "function getMandatoryInputParams_() {\n return $this->__inMandatoryParams;\n }", "public function getParams()\n {\n return $this->getAttribute('params', false, null);\n }", "private function getRequiredFields()\n\t{\n\t\treturn $this->endpointRequiredFields;\n\t}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}" ]
[ "0.7636835", "0.7294869", "0.7219707", "0.72065485", "0.7067698", "0.7051456", "0.70209813", "0.6743102", "0.6726132", "0.66934544", "0.66843635", "0.66764", "0.66731155", "0.66509604", "0.6623037", "0.66126716", "0.6506721", "0.64680296", "0.6462069", "0.6429144", "0.64274687", "0.6386541", "0.6386541", "0.63859284", "0.6383342", "0.6294556", "0.6280435", "0.6269188", "0.6268366", "0.6268366", "0.6247219", "0.62433034", "0.6225851", "0.6224801", "0.62041223", "0.6196076", "0.6179934", "0.6173123", "0.61647797", "0.61534625", "0.61534625", "0.61489296", "0.61265916", "0.6117481", "0.60926324", "0.6088071", "0.60847795", "0.6064738", "0.6056798", "0.6052017", "0.60451293", "0.6036724", "0.60348415", "0.6023809", "0.60163945", "0.60149616", "0.6006841", "0.60066986", "0.60050035", "0.59937614", "0.5992759", "0.59913063", "0.59791034", "0.597839", "0.5972283", "0.59563595", "0.5953482", "0.59490377", "0.59472704", "0.59451437", "0.59403133", "0.59403133", "0.59374017", "0.5929954", "0.5929954", "0.5929954", "0.5929954", "0.5929954", "0.5929954", "0.5929954", "0.5929954", "0.5929954", "0.5929954", "0.59295744", "0.59188503", "0.59168565", "0.5916558", "0.59127027", "0.59032476", "0.59003377", "0.58972746", "0.5892551", "0.5892358", "0.5885397", "0.5882384", "0.5882384", "0.5882384", "0.5882384", "0.5880841", "0.5880841" ]
0.71637976
4
Overridden template methods Get the names of fields for which data should be localized
function getLocaleFieldNames() { $this->_metadataFormImplem->getLocaleFieldNames(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_fields_to_translate()\n {\n }", "function getLocaleFieldNames() {\n\t\treturn array('name', 'description', \"applicationForm\", \"survey\");\n\t}", "function getLocaleFieldNames() {\n\t\treturn parent::getLocaleFieldNames() + array('title');\n\t}", "public function getTranslationFields(){\n return $this->translationFields;\n }", "function getLocaleFieldNames() {\n\t\treturn parent::getLocaleFieldNames() + array(\n\t\t\t'copyrightNotice',\n\t\t);\n\t}", "function getLocaleFieldNames() {\n\t\treturn array('title', 'description');\n\t}", "function getLocaleFieldNames() {\n\t\treturn array('name', 'possibleOptions');\n\t}", "public function fields()\n {\n // '{locale name} ({translated locale name})'\n $localesSelectValues = array_map(\n function ($locale) {\n $localeName = config('locale.localeNames.' . $locale, $locale);\n $localizedLocaleName = trans('locales.' . $locale);\n\n if ($locale != App::getLocale()) {\n $localeName .= ' (' . $localizedLocaleName . ')';\n }\n\n return [\n 'value' => $locale,\n 'label' => $localeName\n ];\n },\n Localizer::getAllLocales()\n );\n\n // Sort the array to have the current locale first\n usort($localesSelectValues, function ($locale1, $locale2) {\n $currentLocale = App::getLocale();\n\n if ($locale1['value'] == $currentLocale) {\n return -1;\n }\n\n if ($locale2['value'] == $currentLocale) {\n return 1;\n }\n\n return 0;\n });\n\n return [\n [\n 'name' => 'name',\n 'type' => 'text',\n 'label' => trans('user.inputs.name')\n ],\n [\n 'name' => 'email',\n 'type' => 'text',\n 'label' => trans('user.inputs.email')\n ],\n [\n 'name' => 'locale',\n 'type' => 'select',\n 'label' => trans('user.inputs.locale'),\n 'values' => $localesSelectValues,\n ],\n [\n 'name' => 'password',\n 'type' => 'password',\n 'label' => trans('user.inputs.password'),\n 'confirmationLabel' => trans('user.inputs.confirmPassword')\n ]\n ];\n }", "function getLocaleFieldNames() {\n\t\treturn array('title');\n\t}", "function getLocaleFieldNames() {\n\t\treturn array('title');\n\t}", "function get_field_names()\n{\n\t#currently 27 fields\n\treturn $t_arr = array (\t\tlang_get( 'id' ),\n\t\t\t\t\t\t\t lang_get( 'category' ),\n\t\t\t\t\t\t\t lang_get( 'severity' ),\n\t\t\t\t\t\t\t lang_get( 'reproducibility' ),\n\t\t\t\t\t\t\t\tlang_get( 'date_submitted' ),\n\t\t\t\t\t\t\t\tlang_get( 'last_update' ),\n\t\t\t\t\t\t\t\tlang_get( 'reporter' ),\n\t\t\t\t\t\t\t\tlang_get( 'assigned_to' ),\n\t\t\t\t\t\t\t\tlang_get( 'priority' ),\n\t\t\t\t\t\t\t\tlang_get( 'status' ),\n\t\t\t\t\t\t\t\tlang_get( 'build' ),\n\t\t\t\t\t\t\t\tlang_get( 'projection' ),\n\t\t\t\t\t\t\t\tlang_get( 'eta' ),\n\t\t\t\t\t\t\t\tlang_get( 'platform' ),\n\t\t\t\t\t\t\t\tlang_get( 'os' ),\n\t\t\t\t\t\t\t\tlang_get( 'os_version' ),\n\t\t\t\t\t\t\t\tlang_get( 'product_version' ),\n\t\t\t\t\t\t\t\tlang_get( 'resolution' ),\n\t\t\t\t\t\t\t\tlang_get( 'duplicate_id' ),\n\t\t\t\t\t\t\t\tlang_get( 'summary' ),\n\t\t\t\t\t\t\t\tlang_get( 'description' ),\n\t\t\t\t\t\t\t\tlang_get( 'steps_to_reproduce' ),\n\t\t\t\t\t\t\t\tlang_get( 'additional' ).'_'.lang_get( 'information' ),\n\t\t\t\t\t\t\t\tlang_get( 'attached_files' ),\n\t\t\t\t\t\t\t\tlang_get( 'bugnote_title' ),\n\t\t\t\t\t\t\t\tlang_get( 'bugnote_date' ),\n\t\t\t\t\t\t\t\tlang_get( 'bugnote_description' )) ;\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}", "function getLocaleFieldNames() {\n\t\treturn array('subscriptionAdditionalInformation', 'delayedOpenAccessPolicy', 'authorSelfArchivePolicy');\n\t}", "function getLocaleFieldNames() {\n\t\treturn array();\n\n\t}", "public function getLocalizedName();", "function fields() {\n return array(\n 'title' => 'The title of the content',\n 'fieldname' => t('fieldname'),\n 'title' => t('title'),\n 'label' => t('Label'),\n 'data_type' => t('data type'),\n 'html_type' => t('html_type'),\n );\n }", "public function getTranslationsFieldsChild()\n\t{\n\t\tparent::validateFieldsLang();\n\t\treturn parent::getTranslationsFields(array('name', 'description'));\n\t}", "function getLocalizedName() {\n\t\treturn $this->getLocalizedData('name');\n\t}", "private function getTranslatedFields() {\n $langs = explode(',',$_REQUEST['translations']);\n\t\t$translations = array();\n\t\tforeach($langs as $lang){\t\t\n\t\t\t$translations[$lang] = array(\n\t\t\t\t'id' => (int) $_REQUEST['TranslationID'.$lang],\n\t\t\t\t'pagetitle' => $_REQUEST['pagetitle'.$lang],\n\t\t\t\t'longtitle' => $_REQUEST['longtitle'.$lang],\n\t\t\t\t'menutitle' => $_REQUEST['menutitle'.$lang],\n\t\t\t\t'introtext' => $_REQUEST['introtext'.$lang],\n\t\t\t\t'description' => $_REQUEST['description'.$lang],\n\t\t\t\t'content' => $_REQUEST['content'.$lang],\n\t\t\t);\n\t\t\tforeach($translations[$lang] as $key => $val){\n\t\t\t\tif($translations[$lang][$key] == null){\n\t\t\t\t $translations[$lang][$key] = '';\n\t\t\t\t};\n\t\t\t};\t\n\t\t};\n\t\treturn $translations;\t\t\n\t}", "function getLocaleMetadataFieldNames() {\n\t\treturn $this->getMetadataFieldNames(true);\n\t}", "abstract public function getAllFieldsRealNames(): array;", "public function getFieldNames() {}", "public function getName()\n {\n return 'translatable_field';\n }", "public function getTextFields( $translation = true );", "public static function fields()\n {\n return [\n 'nice_quote_id' => 'text',\n 'date' => 'text',\n 'netdays' => 'text',\n 'total' => 'text',\n 'status' => 'text',\n ];\n }", "public function get_fields()\n {\n return [\n \"isys_catg_invoice_list__denotation\" => \"LC__CMDB__CATG__TITLE\",\n \"isys_catg_invoice_list__amount\" => \"LC__CMDB__CATG__INVOICE__AMOUNT\",\n \"isys_catg_invoice_list__date\" => \"LC__CMDB__CATG__INVOICE__DATE\",\n \"isys_catg_invoice_list__edited\" => \"LC__CMDB__CATG__INVOICE__EDITED\",\n \"isys_catg_invoice_list__financial_accounting_delivery\" => \"LC__CMDB__CATG__INVOICE__FINANCIAL_ACCOUNTING_DELIVERY\",\n \"isys_catg_invoice_list__charged\" => \"LC__CMDB__CATG__INVOICE__CHARGED\",\n ];\n }", "public function get_field_name();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields() {}", "public function getFields() {}", "public function getFields() {}", "public function getFields()\n\t{\n\t\treturn [\"tanggal\", \"keterangan\"];\n\t}", "function _get_field_names()\n {\n return array();\n }", "function getFieldNames();", "private function _loadLocalizedCountryFields()\n {\n $this->_addAccountfields['United Kingdom'] = ['account_name', 'bank_name', 'sort_code', 'account_number'];\n $this->_addAccountfields['United States'] = ['account_name', 'bank_name', 'account_type', 'routing_number', 'account_number'];\n $this->_addAccountfields['India'] = ['account_name', 'bank_name', 'ifsc_code', 'account_number'];\n $this->_addAccountfields['Canada'] = ['account_name', 'bank_name', 'transit_number', 'institution_number', 'account_number'];\n $this->_addAccountfields['Australia'] = ['account_name', 'bank_name', 'bsb', 'account_number'];\n $this->_addAccountfields['New Zealand'] = ['account_name', 'bank_name', 'bsb', 'account_number'];\n $this->_addAccountfields['Japan'] = ['account_name', 'bank_name', 'bank_code', 'branch_code', 'account_type', 'account_number'];\n $this->_addAccountfields['Malaysia'] = ['account_name', 'bank_name', 'meps', 'account_number'];\n $this->_addAccountfields['Mexico'] = ['account_name', 'bank_name', 'account_number'];\n $this->_addAccountfields['Philippines'] = ['account_name', 'bank_name', 'brstn_code', 'account_number'];\n }", "public function getFrontendFields();", "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 }", "protected static function getFieldHumanReadableNames()\n {\n return array(\n 'billingAddress' => 'Billing address',\n 'shippingAddress' => 'Shipping address',\n 'shippingId' => 'Shipping method',\n 'paymentMethod' => 'Payment method',\n 'adminNote' => 'Staff note',\n 'SHIPPING' => 'Shipping cost',\n 'firstname' => 'First name',\n 'lastname' => 'Last name',\n 'street' => 'Address',\n 'city' => 'City',\n 'zipcode' => 'Zip code',\n 'phone' => 'Phone',\n );\n }", "protected function baseFields() {\n $fields = [\n 'nid' => $this->t('Node ID'),\n //'vid' => $this->t('Version ID'),\n 'type' => $this->t('Type'),\n 'title' => $this->t('Title'),\n 'format' => $this->t('Format'),\n 'teaser' => $this->t('Teaser'),\n 'uid' => $this->t('Authored by (uid)'),\n 'created' => $this->t('Created timestamp'),\n 'changed' => $this->t('Modified timestamp'),\n 'status' => $this->t('Published'),\n 'promote' => $this->t('Promoted to front page'),\n 'sticky' => $this->t('Sticky at top of lists'),\n 'language' => $this->t('Language (fr, en, ...)'),\n ];\n return $fields;\n }", "public function getFieldName() {}", "public function labels() {\n\t\treturn array(\n\t\t\t'id' => 'ID',\n\t\t\t'name' => 'Name',\n\t\t\t'email' => 'Email',\n\t\t\t'phone' => 'Phone',\n\t\t\t'message' => 'Message',\n\t\t\t'date_submitted' => 'Date Submitted',\n\t\t\t'ip_address' => 'IP Address',\n\t\t);\n\t}", "public function getCustomFields() {\n }", "public function getCustomFields() {\n }", "public function getFieldNames(){\n $names=[];\n if (!empty($this->dbFields)){\n foreach($this->dbFields as $dbField){\n $names[$dbField->id]=$dbField->name;\n }\n }\n return $names;\n }", "protected function _fields()\n\t{\n\t\treturn array(\n\t\t\t\t'name',\n\t\t\t 'intro', 'sort_order',\n\t\t\t 'status', 'feature',\n\t\t);\n\t}", "public function fields()\n {\n return [\n Text::make('Sur-titre','first'),\n Text::make('Sous-titre','third'),\n Text::make('Titre','second'),\n ];\n }", "public function fields(Request $request)\n {\n return [\n ID::make(__('ID'), 'id')\n ->sortable(),\n BelongsTo::make(__('Country'), 'Country', \\Seche\\NovaLaravelWorld\\Country::class)\n ->rules('required')\n ->searchable()\n ->readonly(function ($request) {\n return $request->isUpdateOrUpdateAttachedRequest();\n })\n ->sortable(),\n Select::make(__('Locale'), 'locale')\n ->searchable()\n ->sortable()\n ->rules('required')\n ->options(function () {\n return array_combine(ResourceBundle::getLocales(''), ResourceBundle::getLocales(''));\n }),\n Text::make(__('Localized Name'), 'name')\n ->sortable()\n ->rules('required', 'max:255'),\n Text::make(__('Localized Alias'), 'alias')\n ->hideFromIndex()\n ->nullable()\n ->rules( 'max:255'),\n Text::make(__('Localized Abbreviation Name'), 'abbr')\n ->sortable()\n ->nullable()\n ->rules( 'max:16'),\n Text::make(__('Localized Full Name'), 'full_name')\n ->hideFromIndex()\n ->nullable()\n ->rules('max:255'),\n Text::make(__('Localized Country Currency Name'), 'currency_name')\n ->hideFromIndex()\n ->nullable()\n ->rules('max:255'),\n ];\n }", "public static function get_fields()\n {\n }", "public function get_fields() {\n\t\treturn apply_filters( 'wpcd_get_custom_fields', $this->custom_fields );\n\t}", "public static function fields()\n {\n return [\n 'name' => 'text',\n 'lastname' => 'text',\n 'password' => 'password',\n 'email' => 'email',\n 'github_username' => 'text',\n ];\n }", "function getfield(){\r\n // Талбаруудын утгыг авах\r\n }", "function getMetadataFieldNames($translated = true) {\n\t\t// Do we need to build the field name cache first?\n\t\tif (is_null($this->_metadataFieldNames)) {\n\t\t\t// Initialize the cache array\n\t\t\t$this->_metadataFieldNames = array();\n\n\t\t\t// Retrieve all properties and add\n\t\t\t// their names to the cache\n\t\t\t$metadataSchema =& $this->getMetadataSchema();\n\t\t\t$properties =& $metadataSchema->getProperties();\n\t\t\tforeach($properties as $property) {\n\t\t\t\t$propertyAssocTypes = $property->getAssocTypes();\n\t\t\t\tif (in_array($this->_assocType, $propertyAssocTypes)) {\n\t\t\t\t\t// Separate translated and non-translated property names\n\t\t\t\t\t// and add the name space so that field names are unique\n\t\t\t\t\t// across various meta-data schemas.\n\t\t\t\t\t$this->_metadataFieldNames[$property->getTranslated()][] = $property->getName();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Return the field names\n\t\treturn $this->_metadataFieldNames[$translated];\n\t}", "private function _setFieldNames() {\n $this->id = \"id\";\n $this->name = \"name\";\n $this->surveyId = \"survey_id\";\n $this->languageId = \"language_id\";\n $this->deleted = \"deleted\"; \n }", "function getFields();", "protected function _getFields()\n\t{\n\t\treturn array(\n\t\t\t'tms_modification' => array(\n\t\t\t\t'modification_id' => array('type' => self::TYPE_UINT, 'autoIncrement' => true),\n\t\t\t\t'title' => array('type' => self::TYPE_STRING, 'required' => true, 'maxLength' => 50,\n\t\t\t\t\t'verification' => array('$this', '_verifyPrepareTitle'), 'requiredError' => 'please_enter_valid_title'),\n\t\t\t\t'template_title' => array('type' => self::TYPE_STRING, 'required' => true, 'maxLength' => 75),\n\t\t\t\t'style_id' => array('type' => self::TYPE_UINT, 'required' => true),\n\n\t\t\t\t'execute_order' => array('type' => self::TYPE_UINT, 'default' => 10),\n\t\t\t\t'description' => array('type' => self::TYPE_STRING, 'default' => ''),\n\n\t\t\t\t'modification_type' => array('type' => self::TYPE_STRING, 'default' => 'str_replace', 'allowedValues' => array('str_replace', 'preg_replace', 'callback')),\n\n\t\t\t\t'search_value' => array('type' => self::TYPE_STRING, 'default' => '', 'noTrim' => true),\n\t\t\t\t'replace_value' => array('type' => self::TYPE_STRING, 'default' => '', 'noTrim' => true),\n\n\t\t\t\t'callback_class' => array('type' => self::TYPE_STRING, 'maxLength' => 75, 'default' => ''),\n\t\t\t\t'callback_method' => array('type' => self::TYPE_STRING, 'maxLength' => 50, 'default' => ''),\n\n\t\t\t\t'addon_id' => array('type' => self::TYPE_STRING, 'maxLength' => 25, 'default' => ''),\n\t\t\t\t'version_id' => array('type' => self::TYPE_UINT, 'default' => 0),\n\t\t\t\t'version_string' => array('type' => self::TYPE_STRING, 'maxLength' => 30, 'default' => ''),\n\t\t\t\t'active' => array('type' => self::TYPE_UINT, 'allowedValues' => array(0, 1), 'default' => 1),\n\t\t\t)\n\t\t);\n\t}", "public function fields()\n {\n $fields = parent::fields();\n\n unset($fields['time_sent'], $fields['time_read'], $fields['time_archived'], $fields['uid']);\n\n $fields['timeSent'] = 'time_sent';\n $fields['wasRead'] = 'wasRead';\n $fields['wasArchived'] = 'wasArchived';\n\n return $fields;\n }", "public function fields()\n {\n return [\n Text::make('Name')\n ->value($this->model->name),\n ];\n }", "public function get_fields()\n {\n return [\n 'isys_catg_emergency_plan_list__title' => 'LC__CMDB__CATG__EMERGENCY_PLAN_TITLE',\n 'isys_obj_type__title' => 'LC__CMDB__OBJTYPE',\n 'isys_obj__title' => 'LC__CMDB__CATG__GLOBAL_TITLE',\n 'isys_cats_emergency_plan_list__calc_time_need' => 'LC__CMDB__CATS__EMERGENCY_PLAN_CALC_TIME_NEEDED',\n 'practice_date' => 'LC__CMDB__CATS__EMERGENCY_PLAN_PRACTICE_ACTUAL_DATE'\n ];\n }", "public function getCMSFields()\n {\n $fields = parent::getCMSFields();\n $fields->replaceField('Country', new DropdownField('Country', 'based on a sale to ', EcommerceCountry::get_country_dropdown()));\n $fields->replaceField('Root.Main', new DropdownField('TaxType', 'Tax Type', singleton($this->ClassName)->dbObject('TaxType')->enumValues()));\n\n $fields->removeByName('DefaultCountry');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('DefaultCountryShown', 'Prices are based on sale to', $this->DefaultCountry));\n\n $fields->removeByName('DefaultRate');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('DefaultRateShown', 'Default rate', $this->DefaultRate));\n\n $fields->removeByName('CurrentRate');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('CurrentRateShown', 'Rate for current order', $this->CurrentRate));\n\n $fields->removeByName('RawTableValue');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('RawTableValueShown', 'Raw table value', $this->RawTableValue));\n\n $fields->removeByName('DebugString');\n $fields->addFieldToTab('Root.Debug', new ReadonlyField('DebugStringShown', 'Debug String', $this->DebugString));\n\n return $fields;\n }", "function get_fields_name()\n\t{\n\t\treturn $this->db->list_fields( $this->table );\n\t}", "public function field_names()\n\t{\n\t\t// All the fields that are being validated\n\t\t$fields = array_keys(array_merge\n\t\t(\n\t\t\t$this->pre_filters,\n\t\t\t$this->rules,\n\t\t\t$this->callbacks,\n\t\t\t$this->post_filters\n\t\t));\n\n\t\t// Remove wildcard fields\n\t\t$fields = array_diff($fields, array('*'));\n\n\t\treturn $fields;\n\t}", "abstract public function getFields();", "abstract public function getFields();", "function GetFieldsData()\n {\n if ($this->debug_mode)\n echo $this->ClassName . \"::GetFieldsData();\" . \"<HR>\";\n $this->GetLangFieldsData(\"main\", $data);\n for ($j = 0; $j < sizeof($this->Kernel->Languages); $j ++) {\n $this->GetLangFieldsData($this->Kernel->Languages[$j], $data);\n } // for lang\n\n\n if (count($this->field_group_names)) {\n for ($j = 0; $j < sizeof($this->field_group_names); $j ++)\n $this->GetLangFieldsData($this->field_group_names[$j], $data);\n } //--for additional groups\n\n\n if ($this->multilevel) {\n $data[$this->parent_field] = $this->parent_id;\n }\n if (strlen($this->custom_val) && strlen($this->custom_var)) {\n $data[$this->custom_var] = $this->custom_val;\n }\n return $data;\n }", "public function fields()\n {\n return array_merge(\n parent::fields(),\n [\n 'date', 'origin', 'originName', 'total',\n 'createdAt' => function ($model) {\n return MongodbUtil::MongoDate2String($model->createdAt);\n }\n ]\n );\n }", "public function getFieldDescriptions()\n {\n return array(\n 'shipment.created_at' => 'Read only.',\n 'shipment.updated_at' => 'Read only.',\n 'shipment.order_increment_id' => 'Required to create a shipment.',\n 'shipment.items' => 'Required to create a shipment.',\n 'shipment.entity_id' => 'Read only.',\n 'shipment.external_order_id' => 'Read only.'\n );\n }", "public function messages()\n {\n return [\n 'name.required' => __('The name field is required'),\n 'locale.required' => __('The code field is required'),\n 'locale.min' => __('The code must be at least :max characters', ['min' => 1]),\n 'locale.max' => __('The code may not be greater than :max characters', ['max' => 5]),\n 'locale.unique' => __('The code has already been taken'),\n ];\n }", "public function getBlockPrefix()\n {\n return 'translated_field';\n }", "public static function getFieldNames() {\n\t\treturn self::$FIELD_NAMES;\n\t}", "public static function getFieldNames() {\n\t\treturn self::$FIELD_NAMES;\n\t}", "public static function getFieldNames() {\n\t\treturn self::$FIELD_NAMES;\n\t}", "public function getTranslatedNameAttribute() {\n return $this->getAttributeWithLocale('name');\n }", "public function genericSearchFields()\n {\n return ['url', 'content', 'title', 'arguments_json', 'language_info'];\n }", "public function getListFields();", "public function fields()\n {\n return [\n Text::make('Search', 'search')\n ->rules(['required', 'min:3'])\n ->help(\"The string to search for.\"),\n\n Text::make('Replace', 'replace')\n ->rules(['required', 'min:3'])\n ->help(\"The replacement.\")\n ];\n }", "abstract protected function getFields();", "public function name()\n\t{\n\t\tif ($attributes = $this->getRelationValue('attributes')) {\n\t\t\treturn $attributes->loadMissing('translations', 'group.translations')->map(function($attribute) {\n\t\t\t\treturn $attribute->group->getTranslation('name') . ':' . $attribute->getTranslation('value');\n\t\t\t})->implode(' - '); \n\t\t} \n\t}", "public function &getFields();", "public function getName_en()\n {\n return $this->name_en;\n }", "public function getName_en()\n {\n return $this->name_en;\n }", "public function getFormCustomFields(){\n\t}", "public function getContactDataFields();", "public function messages()\n {\n return [\n 'text.max' => 'Максимальная длина фразы для поиска 255 символов',\n 'first_country_id.exists' => 'Не верно указана страна',\n 'second_country_id.exists' => 'Не верно указана страна',\n 'first_race.in_array' => 'Не верно указана раса',\n 'second_race.in_array' => 'Не верно указана раса',\n 'map_id.exists' => 'Не верно указана карта',\n 'sort_by.in_array' => 'Не верно указан параметр сортиовки',\n 'sort_type.in_array' => 'Не верно указан тип сортиовки',\n 'user_replay.in_array' => 'Не верно указан вид replay',\n 'type_id.exists' => 'Не верно указан тип replay',\n ];\n }", "public function attributes()\n {\n return trans('news::validation.attributes');\n }", "function getMetadataFieldNames($translated = true) {\n\t\t// Create a list of all possible meta-data field names\n\t\t$metadataFieldNames = array();\n\t\t$extractionAdapters =& $this->getSupportedExtractionAdapters();\n\t\tforeach($extractionAdapters as $metadataSchemaName => $metadataAdapter) {\n\t\t\t// Add the field names from the current adapter\n\t\t\t$metadataFieldNames = array_merge($metadataFieldNames,\n\t\t\t\t\t$metadataAdapter->getDataObjectMetadataFieldNames($translated));\n\t\t}\n\t\t$metadataFieldNames = array_unique($metadataFieldNames);\n\t\treturn $metadataFieldNames;\n\t}", "public function getAllFields();", "public function fields(){\n\t\treturn array();\n\t}", "function get_fields()\n\t{\n\t\t$fields=new ocp_tempcode();\n\t\t$fields->attach(form_input_line(do_lang_tempcode('MAIL_DOMAIN'),do_lang_tempcode('DESCRIPTION_MAIL_DOMAIN'),'dpop3','',true));\n\t\t$fields->attach(form_input_integer(do_lang_tempcode('MAIL_COST'),do_lang_tempcode('_DESCRIPTION_MAIL_COST'),'pop3',NULL,true));\n\t\treturn $fields;\n\t}", "function get_field_list()\r\n\t{\r\n\t\t$fields = array();\r\n\r\n\t\tif (Authority::can('edit', 'admin/item/definition'))\r\n\t\t{\r\n\t\t\t$id_definition = $this->input->post('id_item_definition');\r\n\r\n\t\t\t$fields = $this->extend_field_model->get_lang_list(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'parent' => 'item',\r\n\t\t\t\t\t'id_parent' => $id_definition\r\n\t\t\t\t),\r\n\t\t\t\tSettings::get_lang('default')\r\n\t\t\t);\r\n\r\n\t\t\t// Set type names\r\n\t\t\tforeach($fields as &$field)\r\n\t\t\t{\r\n\t\t\t\t$field['type_name'] = self::$_TYPE_NAMES[$field['type']];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//\r\n\t\t$this->template['id_item_definition'] = $id_definition;\r\n\t\t$this->template['fields'] = $fields;\r\n\r\n\t\t$this->output('item/definition/fields');\r\n\t}", "public function getFieldNames()\n {\n if ( ! $this->isActive ) {\n throw new NonActiveException('You can only get the field names of the active template');\n }\n\n $ret = array();\n\n try {\n $result = $this->getSoapClient()->GetFieldNames();\n } catch ( SoapException $ex ) {\n throw new StatusException('Error while getting the list of all fields in the active template' , $ex);\n }\n\n if ( isset($result->GetFieldNamesResult->string) ) {\n if ( is_array($result->GetFieldNamesResult->string) ) {\n $ret = $result->GetFieldNamesResult->string;\n } else {\n $ret[] = $result->GetFieldNamesResult->string;\n }\n }\n\n return $ret;\n }", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "public function fields();" ]
[ "0.7309508", "0.7211084", "0.7108568", "0.70771533", "0.70442444", "0.7015629", "0.69354904", "0.6898855", "0.68696564", "0.68696564", "0.68346024", "0.68207115", "0.6721629", "0.659491", "0.65418035", "0.64503086", "0.64497286", "0.6444157", "0.64334935", "0.6324973", "0.63216823", "0.6300034", "0.6285401", "0.6253022", "0.62337273", "0.6216017", "0.61984813", "0.61848325", "0.61848325", "0.61848325", "0.61848325", "0.61848325", "0.61848325", "0.61783093", "0.61783093", "0.61783093", "0.61499625", "0.61408377", "0.6140526", "0.6138373", "0.61323565", "0.61022156", "0.608339", "0.60335183", "0.6027918", "0.60268", "0.6001722", "0.6001722", "0.6000126", "0.59818393", "0.59710234", "0.59631175", "0.5958096", "0.5951362", "0.59340715", "0.5917783", "0.59082", "0.5906091", "0.5899358", "0.58962566", "0.5887029", "0.5882988", "0.5875405", "0.5868934", "0.5867967", "0.5862016", "0.58503705", "0.58503705", "0.58488804", "0.5845805", "0.5841853", "0.58342403", "0.58276933", "0.5825131", "0.5825131", "0.5825131", "0.5821489", "0.5818808", "0.58135617", "0.58122116", "0.5797263", "0.57893276", "0.57869464", "0.57862604", "0.57862604", "0.5783898", "0.57808274", "0.5780512", "0.5776628", "0.576896", "0.5765619", "0.57583547", "0.574949", "0.5749345", "0.5747796", "0.57425535", "0.57425535", "0.57425535", "0.57425535", "0.57425535" ]
0.7300844
1
Initialize form data with the author name and the monograph id.
function initData($args, &$request) { AppLocale::requireComponents( LOCALE_COMPONENT_APPLICATION_COMMON, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_OMP_SUBMISSION ); $this->_metadataFormImplem->initData($this->getMonograph()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function form_init_data()\r\n {\r\n $this->set_element_value(\"Swimmers\", FT_CREATE) ;\r\n $this->set_element_value(\"Swim Meets\", FT_CREATE) ;\r\n $this->set_element_value(\"Swim Teams\", FT_CREATE) ;\r\n }", "function form_init_data()\r\n {\r\n // Initialize the form fields\r\n\r\n $this->set_hidden_element_value(\"_action\", FT_ACTION_ADD) ;\r\n\r\n $this->set_element_value(\"Meet Start\", array(\"year\" => date(\"Y\"),\r\n \"month\" => date(\"m\"), \"day\" => date(\"d\"))) ;\r\n $this->set_element_value(\"Meet End\", array(\"year\" => date(\"Y\"),\r\n \"month\" => date(\"m\"), \"day\" => date(\"d\"))) ;\r\n\r\n // If the config is set to US only, initialize the country\r\n\r\n if (FT_US_ONLY)\r\n $this->set_element_value(\"Meet Country\",\r\n FT_SDIF_COUNTRY_CODE_UNITED_STATES_OF_AMERICA_VALUE) ;\r\n\r\n $this->set_element_value(\"Pool Altitude\", \"0\") ;\r\n }", "public function init() {\n $this->add([\n 'name' => 'id',\n 'type' => 'hidden'\n ]);\n\n $this->add([\n 'name' => 'title',\n 'type' => 'text'\n ]);\n\n $this->add([\n 'name' => 'text',\n 'type' => 'textarea'\n ]);\n }", "protected function _construct() \n {\n\t$this->_objectId = 'author_id';\n\t$this->_blockGroup = 'Brituy_SimpleBlog';\n\t$this->_controller = 'adminhtml_author';\n\tparent::_construct();\n\t\n\t$this->buttonList->update('save primary', 'label', __('Save Author'));\n\t$this->buttonList->add(\n\t\t'saveandcontinue',[\n\t\t\t'label' => __('Save and Continue Edit'),\n\t\t\t'class' => 'save',\n\t\t\t'data_attribute' => [\n\t\t\t\t'mage-init' => [\n\t\t\t\t\t'button' => ['event' => 'saveAndContinueEdit', 'target' => '#edit_form'],\n\t\t\t\t],\n\t\t\t],\n\t\t],\n\t-100);\n\n\t$this->buttonList->update('delete', 'label', __('Delete'));\n }", "public function init()\n {\n parent::init();\n\n //customize the form\n $this->getElement('passwd')->setRequired(false);\n $this->getElement('passwdVerify')->setRequired(false);\n $this->getElement('submit')->setLabel('Save User');\n }", "public function configForm(&$form_state) {\n $form = parent::configForm($form_state);\n unset($form['input_format']);\n\n $author = user_load($this->config['author']);\n $form['author'] = array(\n '#type' => 'textfield',\n '#title' => t('Author'),\n '#description' => t('Select the author of the organizations to be created - leave empty to assign \"anonymous\".'),\n '#autocomplete_path' => 'user/autocomplete',\n '#default_value' => empty($author->name) ? 'anonymous' : check_plain($author->name),\n );\n\n return $form;\n }", "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}", "public function populateForm() {}", "public function init()\n {\n // set class to identify as p4cms-ui component\n $this->setAttrib('class', 'p4cms-ui')\n ->setAttrib('dojoType', 'p4cms.ui.grid.Form');\n\n // turn off CSRF protection - its not useful here (form data are\n // used for filtering the data grid and may be exposed in the URL)\n $this->setCsrfProtection(false);\n\n // call parent to publish the form.\n parent::init();\n }", "public function __construct()\n {\n $this->author_id = (Auth::check()?Auth::user()->id:0);\n }", "public function __construct($form_name, $id, $pin)\n {\n $this->form_name = $form_name;\n $this->id = $id;\n $this->pin = $pin;\n }", "function prepare() {\n $this->addChild(new fapitng_FormHidden('form_build_id', array(\n 'value' => $this->build_id,\n )));\n $this->addChild(new fapitng_FormHidden('form_id', array(\n 'value' => $this->id,\n )));\n if ($this->token) {\n $this->addChild(new fapitng_FormHidden('form_token', array(\n 'value' => $this->token,\n )));\n }\n }", "public function initialize()\n {\n $this->setEntity($this);\n\n // full name\n $key = new Text(\n \t'key',\n \t[\n \t\t\"required\"=>true,\n \t\t\"class\"=>\"form-control\",\n \t\t\"id\"=>\"key\",\n \t]\n );\n\n $key->addFilter('string');\n\n // full name\n $value = new Text(\n \t'val',\n \t[\n \t\t\"required\"=>true,\n \t\t\"class\"=>\"form-control\",\n \t\t\"id\"=>\"value\",\n \t]\n );\n\n $value->addFilter('string');\n \n\n \n \n\n $this->add($key);\n $this->add($value);\n\n // Add a text element to put a hidden CSRF\n $this->add(\n new Hidden(\n 'csrf'\n )\n );\n }", "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}", "public function __construct()\n {\n $this->author_id = (\\Auth::check()?\\Auth::user()->id:0);\n }", "public function __construct($id,$formName,$content)\n {\n $this->id = $id;\n $this->formName = $formName;\n $this->content = $content;\n }", "public function init() {\n\t\t$fm = new Fieldmanager_TextField( [\n\t\t\t'name' => DWSLGF_PREFIX . '_phone',\n\t\t] );\n\t\t$fm->add_meta_box( 'Customer Phone Number', [ $this->post_type ] );\n\n\t\t$fm = new Fieldmanager_TextField( [\n\t\t\t'name' => DWSLGF_PREFIX . '_email',\n\t\t] );\n\t\t$fm->add_meta_box( 'Customer Email Address', [ $this->post_type ] );\n\n\t\t$fm = new Fieldmanager_TextField( [\n\t\t\t'name' => DWSLGF_PREFIX . '_budget',\n\t\t] );\n\t\t$fm->add_meta_box( 'Customer Desired Budget', [ $this->post_type ] );\n\n\t\t$fm = new Fieldmanager_TextArea( [\n\t\t\t'name' => DWSLGF_PREFIX . '_message',\n\t\t] );\n\t\t$fm->add_meta_box( 'Customer Message', [ $this->post_type ] );\n\n\t\t$fm = new Fieldmanager_TextField( [\n\t\t\t'name' => DWSLGF_PREFIX . '_submission_datetime',\n\t\t] );\n\t\t$fm->add_meta_box( 'Customer Posted Date/Time', $this->post_type );\n\t}", "public function _initSetupForm(Am_Form_Setup $form) {\n\t\t$form->addText('wallet_id', array('size'=>40))\n\t\t\t\t->setLabel('Wallet ID or e-mail');\n\t}", "private function _set_fields()\n {\n @$this->form_data->survey_id = 0;\n $this->form_data->survey_title = '';\n $this->form_data->survey_description = '';\n $this->form_data->survey_status = 'open';\n $this->form_data->survey_anms = 'yes';\n $this->form_data->survey_expiry_date = '';\n $this->form_data->question_ids = array();\n\n $this->form_data->filter_survey_title = '';\n $this->form_data->filter_status = '';\n }", "function __construct($form) {\n if (sizeof($form) > 2) {\n $this->fname = $form[0];\n $this->lname = $form[1];\n $this->email = $form[2];\n $this->password = $form[3];\n $this->passwordConf = $form[4];\n } else {\n $this->email = $form[0];\n $this->password = $form[1];\n }\n }", "private function _set_fields()\n {\n @$this->form_data->question_id = 0;\n\n $this->form_data->category_id = 0;\n $this->form_data->sub_category_id = 0;\n $this->form_data->sub_two_category_id = 0;\n $this->form_data->sub_three_category_id = 0;\n $this->form_data->sub_four_category_id = 0;\n\n $this->form_data->ques_text = '';\n $this->form_data->survey_weight = '';\n $this->form_data->ques_type = '';\n $this->form_data->qus_fixed = 0;\n $this->form_data->ques_expiry_date = '';\n\n\n $this->form_data->filter_question = '';\n $this->form_data->filter_category = 0;\n $this->form_data->filter_type = '';\n $this->form_data->filter_expired = '';\n }", "public function __construct()\n {\n $this->nombre = $_POST['nombre'];\n $this->edad = $_POST['edad'];\n }", "function form_init_elements()\r\n {\r\n $this->add_hidden_element(\"swimmeetid\") ;\r\n\r\n // This is used to remember the action\r\n // which originated from the GUIDataList.\r\n \r\n $this->add_hidden_element(\"_action\") ;\r\n }", "protected function _prepareForm()\n {\n //instantiate the form\n $_form = new Varien_Data_Form(\n array(\n 'id' => 'edit_form',\n 'action' => $this->getData('action'),\n 'method' => 'post',\n 'enctype' => 'multipart/form-data'\n )\n );\n \n //the artist\n $_consumer = Mage::registry('current_consumer');\n\n if ($_consumer->getId()) {\n $_form->addField(\n 'consumer_id', \n 'hidden', \n array(\n 'name' => 'consumer_id',\n )\n );\n $_form->setValues($_consumer->getData());\n }\n\n $_form->setUseContainer(true);\n $this->setForm($_form);\n return parent::_prepareForm();\n }", "public function __construct($fname = null) {\n parent::__construct();\n\n $default_attributes = array(\n 'method' => $this->_method,\n 'enctype' => $this->_enctype,\n 'accept-charset' => $this->_accept_charset,\n 'id' => $fname\n );\n $this->addHidden('fname', $fname);\n\n $this->mergeAttributes($default_attributes);\n\n $this->tpl_path = 'html/forms/form';\n\n\t\t$this->setProcessWrap();\n }", "function form_init_data() \r\n {\r\n //$this->set_hidden_element_value(\"id\", \"logon\");\r\n $dataForm = $this->getViewVariable('courseDataForm');\r\n\r\n $this->set_element_value(\"courseName\", $dataForm['c_name'] );\r\n $this->set_element_value(\"courseLanguage\", $dataForm['c_language'] );\r\n //$this->set_element_value(\"coursedescription\", $dataForm['c_description'] );\r\n $this->set_element_value(\"courseActive\", $dataForm['c_active'] );\r\n $this->set_element_value(\"courseAccess\", $dataForm['c_access'] );\r\n $this->set_element_value(\"coursedataDescripcion\", $dataForm['cd_descripcion'] );\r\n $this->set_element_value(\"coursedataVersion\", $dataForm['cd_version'] );\r\n $this->set_element_value(\"coursedataPalabrasClaves\", $dataForm['cd_claves'] );\r\n $this->set_element_value(\"coursedataDestinatarios\", $dataForm['cd_destinatarios'] );\r\n $this->set_element_value(\"coursedataConocimientosPrevios\", $dataForm['cd_conocimientos'] );\r\n $this->set_element_value(\"coursedataMetodologia\", $dataForm['cd_metodologia'] );\r\n\r\n }", "protected function _construct()\n {\n \t$this->_init('brituy_blog_authors', 'author_id');\n }", "private function build()\n {\n $this->form->addText(\n 'name',\n $this->teamMember === null ? null : $this->teamMember->getName(),\n null,\n 'inputText title',\n 'inputTextError title'\n );\n\n $this->form->addEditor(\n 'description',\n $this->teamMember === null ? null : $this->teamMember->getDescription()\n );\n\n $this->meta = new Meta(\n $this->form,\n $this->teamMember === null ? null : $this->teamMember->getMetaId(),\n 'name',\n true\n );\n }", "public function __construct()\n {\n self::$_iFormIncrement++;\n $this->_iFormNumber = self::$_iFormIncrement;\n }", "public function init()\n {\n $this->addSubForm(new LandlordsInsuranceQuote_Form_Subforms_PersonalDetails(), 'subform_personaldetails');\n \t$this->addSubForm(new LandlordsInsuranceQuote_Form_Subforms_DataProtection(), 'subform_dataprotection');\n $this->addSubForm(new LandlordsInsuranceQuote_Form_Subforms_CorrespondenceDetails(), 'subform_correspondencedetails');\n $this->addSubForm(new LandlordsInsuranceQuote_Form_Subforms_InsuredAddress(), 'subform_insuredaddress');\n $this->addSubForm(new LandlordsInsuranceQuote_Form_Subforms_PolicyDetails(), 'subform_policydetails');\n $this->addSubForm(new LandlordsInsuranceQuote_Form_Subforms_IDD(), 'subform_idd');\n }", "abstract function setupform();", "public function __construct($form)\n\t{\n\t\t$formPackage = $form->getMergePackage();\n\t\t$this->name = $form->getName();\n\t\t$this->form = $form;\n\t\t$this->inputs = $formPackage['inputs'];\n\t\t$this->sectionIntro = $formPackage['intros'];\n\t\t$this->sectionOutro = $formPackage['outros'];\n\t\t$this->sectionLegends = $formPackage['legends'];\n\t\t$this->sectionClasses = $formPackage['classes'];\n\t\t$this->errors = $formPackage['errors'];\n\t}", "function initialize () {\n $this->set_openingtag ( \"<FORM[attributes]>\" );\n\t$this->set_closingtag ( \"</FORM>\" );\n }", "public function init_form_fields() {\n\t\t$this->form_fields = include( 'data/data-settings.php' );\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}", "function Submission_Author_Data()\n {\n return\n array\n (\n \"Title\",\"Name\",\"Institution\",\"Lattes\",\"Email\"\n );\n }", "public function init() {\n extract($this->data);\n\n // Generate unique ID\n $this->data['id'] = uniqid();\n }", "function initData() {\n\t\t$representative =& $this->getRepresentative();\n\n\t\tif ($representative) {\n\t\t\t$this->_data = array(\n\t\t\t\t'representativeId' => $representative->getId(),\n\t\t\t\t'role' => $representative->getRole(),\n\t\t\t\t'representativeIdType' => $representative->getRepresentativeIdType(),\n\t\t\t\t'representativeIdValue' => $representative->getRepresentativeIdValue(),\n\t\t\t\t'name' => $representative->getName(),\n\t\t\t\t'phone' => $representative->getPhone(),\n\t\t\t\t'fax' => $representative->getFax(),\n\t\t\t\t'email' => $representative->getEmail(),\n\t\t\t\t'url' =>$representative->getUrl(),\n\t\t\t\t'isSupplier' => $representative->getIsSupplier(),\n\t\t\t);\n\t\t}\n\t}", "public function init()\n {\n if (!isset($this->options['id'])) {\n $this->options['id'] = $this->getId();\n }\n echo Html::beginForm($this->action, $this->method, $this->options);\n parent::init();\n }", "public function init()\r\n {\r\n $this->setAttributes(array(\r\n 'name' => 'add-staff',\r\n 'method' => 'POST',\r\n 'action' => '/broker-tool/add-staff',\r\n 'class' => 'form-horizontal form-label-left',\r\n 'id' => 'add-staff',\r\n \"data-ajax-loader\"=>\"myLoader\"\r\n ));\r\n $this->addFields();\r\n $this->addCommon();\r\n }", "public function init()\n {\n $this->setMethod('POST');\n $this->setAttrib('class','form-horizontal');\n $id = new Zend_Form_Element_Hidden('id');\n $content = new Zend_Form_Element_Text('content');\n $content -> setLabel ('Content: ');\n $content ->setAttribs(array(\n \t\t\t'placeholder'=>'content',\n \t\t\t'class'=>'form-control'\n \t\t\t));\n $post_id = new Zend_Form_Element_Text('post_id');\n $post_id->addValidator(new Zend_Validate_Digits(), true);\n $post_id -> setLabel ('post id: ');\n $post_id ->setAttribs(array(\n \t\t\t'placeholder'=>'post_id',\n \t\t\t'class'=>'form-control'\n \t\t\t));\n $submit = new Zend_Form_Element_Submit('Comment');\n $submit->setAttrib('class', 'btn btn-success');\n \n $reset = new Zend_Form_Element_Reset('Reset');\n $reset->setAttrib('class', 'btn btn-danger');\n \n $this->addElements(array($id,$content,$post_id,$submit,$reset));\n }", "public function form()\n {\n $this->setData();\n }", "private function prepare_form_data()\n {\n $form_data = array(\n 'email' => array(\n 'name' => 'email',\n 'options' => array(\n '' => '--',\n ),\n 'extra' => array('id'=>'login-email', 'autofocus'=>''),\n ),\n 'password' => array(\n 'name' => 'password',\n 'options' => array(\n '' => '--',\n ),\n 'extra' => array('id'=>'login-password'),\n ),\n\n 'lbl-email' => array(\n 'target' => 'email',\n 'label' => 'E-mail Address',\n ),\n 'lbl-password' => array(\n 'target' => 'password',\n 'label' => 'Password',\n ),\n\n 'btn-submit' => array(\n 'value' => 'Login',\n 'extra' => array(\n 'class' => 'btn btn-primary',\n ),\n ),\n );\n\n return \\DG\\Utility::massage_form_data($form_data);\n }", "public function ArtistForm() {\n $URLParams = Director::urlParams();\n if ($URLParams['ID']){\n $formAction = new FieldSet (\n new FormAction('doSubmit', _t('Artist','Edit Artist'))\n );\n } else {\n $formAction = new FieldSet (\n new FormAction('doSubmit', _t('Artist','Create New Artist'))\n );\n }\n $form = new Form (\n $this,\n \"ArtistForm\",\n new FieldSet (\n $ImageLink = new TextField('ImageLink', _t('Artist.ImageLink','Image Link')),\n $NameField = new TextField('Name', _t('Artist.Name','Name')),\n $YoutubeSingle1Field = new TextField('YoutubeSingle1', _t('Artist.YoutubeSingle1','YoutubeSingle1')),\n $YoutubeSingle2Field = new TextField('YoutubeSingle2', _t('Artist.YoutubeSingle2','YoutubeSingle2')),\n $YoutubeSingle3Field = new TextField('YoutubeSingle3', _t('Artist.YoutubeSingle3','YoutubeSingle3')),\n $OfficialWebpageField = new TextField('OfficialWebpage', _t('Artist.OfficialWebpage','OfficialWebpage')),\n $SoundcloudField = new TextField('Soundcloud', _t('Artist.Soundcloud','Soundcloud')),\n $FacebookField = new TextField('Facebook', _t('Artist.Facebook','Facebook')),\n $TwitterField = new TextField('Twitter', _t('Artist.Twitter','Twitter')),\n $MyspaceField = new TextField('Myspace', _t('Artist.Myspace','Myspace')),\n $OfficialYoutubeField = new TextField('OfficialYoutube', _t('Artist.OfficialYoutube','OfficialYoutube')),\n $GenreListField = new TextField('GenreList', _t('Artist.GenreList','GenreList')),\n $IDField = new HiddenField('ID','', '')\n ),\n $formAction,\n // new RequiredFields('Name','Date','Address','City')\n new RequiredFields('Name', 'Date', 'Venue')\n );\n\n // Grab previous data if editing an existing DataObject\n // URLParams can be visited at artist/edit/#\n if ($URLParams['ID']){\n $thisID = Convert::raw2sql($URLParams['ID']);\n $artist = DataObject::get_by_id('Artist', $thisID);\n\n $FlyerLinkField->value = $artist->ImageLink;\n $NameField->value = $artist->Name;\n $YoutubeSingle1Field->value = $artist->YoutubeSingle1;\n $YoutubeSingle2Field->value = $artist->YoutubeSingle2;\n $YoutubeSingle3Field->value = $artist->YoutubeSingle3;\n $OfficialWebpageField->value = $artist->OfficialWebpage;\n $SoundcloudField->value = $artist->Soundcloud;\n $FacebookField->value = $artist->Facebook;\n $TwitterField->value = $artist->Twitter;\n $MyspaceField->value = $artist->Myspace;\n $OfficialYoutubeField->value = $artist->OfficialYoutube;\n $GenreListField->value = $artist->GenreList;\n $IDField->value = $thisID;\n }\n return $form;\n }", "function setAuthor($author = \"\") \n\t{\n\t\t$this->author = $author;\n\t}", "public function __construct($_name, $_description, $_recipeImage, $_ingredients, $_submittedBy)\r\n {\r\n $this->_name = $_name;\r\n $this->_description = $_description;\r\n $this->_recipeImage = $_recipeImage;\r\n $this->_ingredients = $_ingredients;\r\n $this->_submittedBy = $_submittedBy;\r\n }", "protected function form()\n {\n $form = new Form(new Book());\n\n $form->select('author_id', __('Author id'))\n ->options(collect(Author::all())->mapWithKeys(function ($v){\n return [$v->id => $v->name];\n }));\n\n $form->text('title', __('Title'));\n $form->textarea('description', __('Description'));\n $form->text('year', __('Year'));\n\n return $form;\n }", "private function fillInAuthData(\\Vendor\\Guestbook\\Domain\\Model\\Author $author)\n {\n /** @var \\TYPO3\\CMS\\Extbase\\Domain\\Model\\FrontendUserGroup $feUserGroup */\n $feUserGroup = ($this->settings['usergroup']) ? $this->frontendUserGroupRepository->findByUid($this->settings['usergroup']) : '';\n $userGroup = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $author->setUsergroup($userGroup);\n $author->getUsergroup()->attach($feUserGroup);\n $this->setAuthorImage($author);\n $author->setPassword($this->getAuthorPassword($author));\n }", "protected function _init()\n {\n $this->_fields += array(\n 'id' => new Sprig_Field_Auto,\n 'name' => new Sprig_Field_Char,\n 'brief' => new Sprig_Field_Char,\n 'content' => new Sprig_Field_Char,\n 'module_id' => new Sprig_Field_Integer,\n 'url' => new Sprig_Field_Char,\n 'meta_title' => new Sprig_Field_Char,\n 'meta_keywords' => new Sprig_Field_Char,\n 'meta_description' => new Sprig_Field_Char,\n 'ord' => new Sprig_Field_Integer(array(\n 'default' => 10,\n )),\n 'status' => new Sprig_Field_Integer(array(\n 'default' => 0,\n )),\n );\n }", "public function __construct() {\r\n\t\tif (isset($_GET['edit'])) {\r\n\r\n\t\t\t// se é edição\r\n\t\t\t$this->editCadastro();\r\n\r\n\t\t} elseif (isset($_GET['editCadastro'])) {\r\n\r\n\t\t\t// se é cadastro\r\n\t\t\t$this->insertForm('edit',$_GET['editCadastro']);\r\n\r\n\t\t} elseif (isset($_GET['add'])) {\r\n\r\n\t\t\t// se é cadastro\r\n\t\t\t$this->addCadastro();\r\n\t\t\t$this->formCadastro();\r\n\r\n\t\t} elseif (isset($_GET['addCadastro'])) {\r\n\r\n\t\t\t// se é cadastro\r\n\t\t\t$this->insertForm('add',0);\r\n\r\n\t\t} elseif (isset($_GET['del'])) {\r\n\r\n\t\t\t// se é delete\r\n\t\t\t$this->delCadastro($_GET['del']);\r\n\r\n\t\t} else {\r\n\r\n\t\t\t// senao, é listagem\r\n\t\t\t$this->formCadastro();\r\n\t\t}\r\n\r\n\t}", "function praise_meta_init(){\n add_meta_box(\"praise_author_name\", \"Author\", \"praise_author_meta\", \"praise\", \"normal\", \"low\");\n}", "public function initContactDataForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\n\t\t// name\n\t\t$ti = new ilTextInputGUI($lng->txt(\"name\"), \"inst_name\");\n\t\t$ti->setMaxLength(64);\n\t\t$ti->setSize(30);\n\t\t$ti->setRequired(true);\n\t\t$this->form->addItem($ti);\n\n\t\t// description\n\t\t$ti = new ilTextInputGUI($lng->txt(\"client_info\"), \"inst_info\");\n\t\t$ti->setMaxLength(64);\n\t\t$ti->setSize(30);\n\t\t$this->form->addItem($ti);\n\n\t\t// institution\n\t\t$ti = new ilTextInputGUI($lng->txt(\"client_institution\"), \"inst_institution\");\n\t\t$ti->setMaxLength(64);\n\t\t$ti->setSize(30);\n\t\t$this->form->addItem($ti);\n\n\t\t// contact data\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($lng->txt(\"contact_data\"));\n\t\t$this->form->addItem($sh);\n\n\t\t// first name\n\t\t$ti = new ilTextInputGUI($lng->txt(\"firstname\"), \"admin_firstname\");\n\t\t$ti->setMaxLength(64);\n\t\t$ti->setSize(30);\n\t\t$ti->setRequired(true);\n\t\t$this->form->addItem($ti);\n\n\t\t// last name\n\t\t$ti = new ilTextInputGUI($lng->txt(\"lastname\"), \"admin_lastname\");\n\t\t$ti->setMaxLength(64);\n\t\t$ti->setSize(30);\n\t\t$ti->setRequired(true);\n\t\t$this->form->addItem($ti);\n\n\t\t$fs = array (\n\t\t\t\"title\" => array(\"max\" => 64, \"size\" => 30),\n\t\t\t\"position\" => array(\"max\" => 64, \"size\" => 30),\n\t\t\t\"institution\" => array(\"max\" => 200, \"size\" => 30),\n\t\t\t\"street\" => array(\"max\" => 64, \"size\" => 30),\n\t\t\t\"zipcode\" => array(\"max\" => 10, \"size\" => 5),\n\t\t\t\"city\" => array(\"max\" => 64, \"size\" => 30),\n\t\t\t\"country\" => array(\"max\" => 64, \"size\" => 30),\n\t\t\t\"phone\" => array(\"max\" => 64, \"size\" => 30)\n\t\t\t);\n\t\tforeach ($fs as $f => $op)\n\t\t{\n\t\t\t// field\n\t\t\t$ti = new ilTextInputGUI($lng->txt($f), \"admin_\".$f);\n\t\t\t$ti->setMaxLength($op[\"max\"]);\n\t\t\t$ti->setSize($op[\"size\"]);\n\t\t\t$ti->setInfo($lng->txt(\"\"));\n\t\t\t$this->form->addItem($ti);\n\t\t}\n\n\t\t// email\n\t\t$ti = new ilEmailInputGUI($lng->txt(\"email\"), \"admin_email\");\n\t\t$ti->setRequired(true);\n\t\t$ti->allowRFC822(true);\n\t\t$this->form->addItem($ti);\n\n\t\t// feedback recipient\n\t\t$ti = new ilEmailInputGUI($lng->txt(\"feedback_recipient\"), \"feedback_recipient\");\n\t\t$ti->setInfo($lng->txt(\"feedback_recipient_info\"));\n\t\t$ti->setRequired(true);\n\t\t$ti->allowRFC822(true);\n\t\t$this->form->addItem($ti);\n\n\t\t// error recipient\n\t\t$ti = new ilEmailInputGUI($lng->txt(\"error_recipient\"), \"error_recipient\");\n\t\t$ti->allowRFC822(true);\n\t\t$this->form->addItem($ti);\n\n\t\t$this->form->addCommandButton(\"saveContact\", $lng->txt(\"save\"));\n\n\t\t$this->form->setTitle($lng->txt(\"client_data\"));\n\t\t$this->form->setFormAction(\"setup.php?cmd=gateway\");\n\t}", "public function __construct(){\n\t\tparent::__construct();\n\t\tif (isset($_REQUEST['user'])){\n\t\t\tif ($_REQUEST['user'] != $GLOBALS['cUser']->getId() and !ACL::canAdmin('admin', 0)){\n\t\t\t\tnew Alert('error', 'Vous n\\'avez pas l\\'autorisation de faire ceci !');\n\t\t\t\t$this->user = $GLOBALS['cUser'];\n\t\t\t}else{\n\t\t\t\t$users = UsersManagement::getDBUsers();\n\t\t\t\t$found = \\Get::getObjectsInList($users, 'id', $_REQUEST['user']);\n\t\t\t\tif (empty($found)){\n\t\t\t\t\tnew Alert('error', 'Cet utilisateur n\\'existe pas !');\n\t\t\t\t\t$this->user = $GLOBALS['cUser'];\n\t\t\t\t}else{\n\t\t\t\t\t$this->user = new User($_REQUEST['user']);\n\t\t\t\t\t$this->title = 'Profil de '.$this->user->getName();\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t$this->user = $GLOBALS['cUser'];\n\t\t}\n\t\t$this->form = new Form('userProfile');\n\t}", "public function setDetails(){\n $this->user_id=$this->clearInputs($_POST['user_id']);\n $this->user_type=$this->clearInputs(substr($_POST['user_id'],0,3));\n $this->name=$this->clearInputs($_POST['name']);\n $this->office_id=$this->clearInputs($_POST['office_id']);\n $this->designation=$this->clearInputs($_POST['designation']);\n $this->nic=$this->clearInputs($_POST['nic']);\n $this->contact_no=$this->clearInputs($_POST['contact_no']);\n $this->email=$this->clearInputs($_POST['email']);\n $this->hashed_password=password_hash($this->generateRandomPassword(8),PASSWORD_DEFAULT);\n \n }", "private function init()\n\t{\n\t\tif(! $this->authUser = $this->auth->check_login()){\n\t\t\t$this->authUser->logged = false;\n\t\t}\n\t\t// Fill user object in view \n\t\t$this->data['authUser'] = $this->authUser;\n\n\t\t$this->data['menugang'] = $this->recipesModel->menugang();\n\t\t$this->data['hoofdgroup'] = $this->recipesModel->hoofdgroup();\n\t\t$this->data['technique'] = $this->recipesModel->technique();\n\t\t$this->data['kitchen'] = $this->recipesModel->kitchen();\n\t\t$this->data['opening'] = $this->recipesModel->opening();\n\t\t$this->data['dieten'] = $this->recipesModel->dieten();\n\t}", "public function init()\n {\n $this->add(array(\n 'name' => 'name',\n 'options' => array(\n 'label' => __('Name*'),\n ),\n 'attributes' => array(\n 'type' => 'text',\n ),\n ));\n\n $this->add(array(\n 'name' => 'title',\n 'options' => array(\n 'label' => __('Title*'),\n ),\n 'attributes' => array(\n 'type' => 'text',\n ),\n ));\n $this->add(array(\n 'name' => 'company',\n 'options' => array(\n 'label' => __('Company*'),\n ),\n 'attributes' => array(\n 'type' => 'text',\n ),\n ));\n $this->add(array(\n 'name' => 'email',\n 'options' => array(\n 'label' => __('Email*'),\n ),\n 'attributes' => array(\n\n 'type' => 'text',\n ),\n ));\n $this->add(array(\n 'name' => 'phone',\n 'options' => array(\n 'label' => __('Phone*'),\n ),\n 'attributes' => array(\n 'type' => 'text',\n ),\n ));\n $this->add(array(\n 'name' => 'submit',\n 'attributes' => array(\n 'value' => __('Freetrial'),\n ),\n 'type' => 'submit',\n ));\n }", "function load_from_form ($allowSensibleFields = false) {\n if (array_key_exists('title', $_POST)) {\n $this->title = $_POST['title'];\n }\n\n if ($allowSensibleFields) {\n if (array_key_exists('path', $_POST)) {\n $this->path = $_POST['path'];\n }\n if (array_key_exists('user_id', $_POST)) {\n $this->user_id = $_POST['user_id'];\n }\n if (array_key_exists('perso_id', $_POST)) {\n $this->perso_id = $_POST['perso_id'];\n }\n }\n }", "public function init(){\n\n // init the parent\n parent::init();\n // set the form's method\n $this->setMethod('post');\n $name = new Zend_Form_Element_Text('name');\n $name->setOptions(\n array(\n 'label' => 'Module name', 'required' => TRUE, \n 'filters' => array(\n 'StringTrim', 'StripTags'\n ), 'validators' => array(\n 'NotEmpty'\n )\n ));\n $this->addElement($name);\n $submit = new Zend_Form_Element_Submit('submit');\n $submit->setOptions(\n array(\n 'label' => 'Update', 'required' => TRUE\n ));\n $this->addElement($submit);\n }", "public function configFormSubmit(&$values) {\n if ($author = user_load_by_name($values['author'])) {\n $values['author'] = $author->uid;\n }\n else {\n $values['author'] = 0;\n }\n parent::configFormSubmit($values);\n }", "public function init()\n {\n $this->form = new Account_Form_Editprofile();\n }", "public function init()\n {\n $this->setMethod(\"post\");\n $this->setAttrib(\"class\",\"form-group\");\n \n $title = new Zend_Form_Element_Text(\"name\");\n $title->setAttrib(\"class\", \"form-control\");\n $title->setLabel(\"Title: \");\n $title->setRequired();\n //$username->addValidator(new Zend_Validate_EmailAddress());\n $title->addFilter(new Zend_Filter_StripTags);\n \n \n $image = new Zend_Form_Element_Image(\"image\");\n $image->setAttrib(\"class\", \"form-control\");\n $image->setLabel(\"Choose Image\");\n \n $id = new Zend_Form_Element_Hidden(\"id\");\n // $submit = new Zend_Form_Element_Submit(\"submit\");\n $this->addElements(array($id,$title,$image));\n }", "function initData(&$args, &$request) {\n\t\t$press =& $request->getPress();\n\t\t$monograph =& $this->getMonograph();\n\t\t$submitter = $monograph->getUser();\n\n\t\tLocale::requireComponents(array(LOCALE_COMPONENT_APPLICATION_COMMON, LOCALE_COMPONENT_OMP_EDITOR, LOCALE_COMPONENT_PKP_SUBMISSION));\n\n\t\timport('classes.mail.MonographMailTemplate');\n\t\t$email = new MonographMailTemplate($monograph, 'EDITOR_DECISION_ACCEPT');\n\t\t$paramArray = array(\n\t\t\t'authorName' => $submitter->getFullName(),\n\t\t\t'pressName' => $press->getLocalizedName(),\n\t\t\t'monographTitle' => $monograph->getLocalizedTitle(),\n\t\t\t'editorialContactSignature' => $submitter->getContactSignature(),\n\t\t);\n\t\t$email->assignParams($paramArray);\n\n\t\timport('classes.submission.common.Action');\n\t\t$actionLabels = array(SUBMISSION_EDITOR_DECISION_PENDING_REVISIONS => 'editor.monograph.decision.requestRevisions',\n\t\t\t\t\t\t\t SUBMISSION_EDITOR_DECISION_RESUBMIT => 'editor.monograph.decision.resubmit',\n\t\t\t\t\t\t\t SUBMISSION_EDITOR_DECISION_DECLINE => 'editor.monograph.decision.decline');\n\n\t\t$this->_data = array(\n\t\t\t'monographId' => $this->_monographId,\n\t\t\t'decision' => $this->_decision,\n\t\t\t'authorName' => $monograph->getAuthorString(),\n\t\t\t'personalMessage' => $email->getBody(),\n\t\t\t'actionLabel' => $actionLabels[$this->_decision]\n\t\t);\n\n\t}", "function __construct(){\n\t\t\t$this->table_name=\"administrator\";\n\t\t\t$this->id_name=\"admin_id\";\n\n\t\t\t$this->fields['first_name'] = new TextField();\n\t\t\t$this->fields['last_name'] = new TextField();\n\t\t\t$this->fields['email'] = new TextField();\n\t\t\t$this->fields['password'] = new PasswordField();\n\t\t}", "function buildForm(){\n\t\t# menampilkan form\n\t}", "public function init() {\n $this->setMethod(\"post\");\n $this->addElement('text', 'code_categorie', array('label' => 'Code:',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'class' => 'text',\n 'validators' => array(\n array('validator' => 'StringLength', 'options' => array(0, 10))\n )));\n\n $this->addElement('text', 'libelle_categorie', array('label' => 'Libelle:',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'class' => 'text'\n ));\n\n $this->addElement('textarea', 'description_categorie', array(\n 'label' => 'Description:',\n 'required' => FALSE,\n ));\n\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Valider',\n ));\n\n // Add the cancel button\n $this->addElement('button', 'cancel', array(\n 'ignore' => true,\n 'label' => 'Annuler',\n ));\n }", "public function setAttributes()\n\t{\n\t\t$this->title \t\t= Input::get( 'title' );\n\t\t$this->description \t= Input::get( 'description' );\n\t\t$this->color \t\t= Input::get( 'color' );\n\t\t$this->type \t\t= Input::get( 'type' );\n\t\t$this->canvas_id\t= Input::get( 'canvas_id', Input::get( 'canvasId' ) );\n\t}", "function initForm(&$conf) {\n\t\t$this->pi_setPiVarDefaults();\n\t\t$this->pi_loadLL();\n\n\t\t// Create shortcuts to these arrays\n\t\t$this->conf = &$conf;\n\t\t$this->data = &$this->cObj->data;\n\n\t\t$row = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow( 'uid', 'pages', \"module='newsletter'\" );\n\t\t$this->newsletterPID = is_array($row) ? current($row) : 0;\n\t\t$this->newsletterRegEnabled = $this->newsletterPID && $this->data['tx_gokontakt_newsletterUsergroup'];\n\n\t\t$this->submitted = (int) $this->piVars['submitted'];\n\t\tif ( !$this->submitted ) { // first call\n\t\t\t// reset session\n\t\t\t$GLOBALS[\"TSFE\"]->fe_user->setKey(\"ses\", $this->extKey, NULL);\n\t\t\t$GLOBALS[\"TSFE\"]->fe_user->setKey(\"ses\", $this->extKey . \"_successfully_submitted\", 0);\n\t\t}\n\n\t\tif ( $this->piVars['uid'] == $this->data['uid'] ) { // if this form has been submitted\n\t\t\t$this->mergePiVarsWidthSession();\n\t\t} else { // if a different form has been submitted\n\t\t\t$this->piVars = array();\n\t\t}\n\t}", "protected function initCreatingFields() : void\n\t{\n\n\t\t$this->creating_fields = ['text', 'user_id', 'parent_id'];\n\n\t}", "function SetInitialValues()\n\t{\n\t\t$this->id = -1;\n\t\t$this->title = '';\n\t\t$this->url = '';\n\t\t$this->user_id = -1;\n\t\t$this->timestamp = -1;\n\t}", "public function addFormAction(\\Vendor\\Guestbook\\Domain\\Model\\Author $author = NULL)\n {\n $this->view->assign('author', $author);\n }", "public function __construct(int $author_id)\n {\n $this->author_id = $author_id;\n }", "function __construct() {\n\t\tif(!empty($_GET['uid'])) $this->grabCurrentUser(); else parent::displayMessage(\"<div class='alert alert-error'>\"._('No user selected!').\"</div>\");\n\n\t\t/* Keep track of the original level in case there's a change. We might want to send emails on new level changes. */\n\t\t$this->original_level = is_array($this->options['user_level']) ? serialize($this->options['user_level']) : $this->options['user_level'];\n\n\t\t// Once the form has been processed\n\t\tif(!empty($_POST)) {\n\n\t\t\t// Save all values\n\t\t\tforeach ($_POST as $key => $value)\n\t\t\t\t$this->options[$key] = parent::secure($value);\n\n\t\t\t// Validate fields\n\t\t\t$this->validate();\n\n\t\t\t// Process the form\n\t\t\techo empty($this->error) ? $this->process() : $this->error;\n\n\t\t}\n\n\t}", "protected function initializeForm()\n {\n $this->form = new Form();\n $this->form->add(Element::create(\"FieldSet\",\"Report Format\")->add\n (\n Element::create(\"SelectionList\", \"File Format\", \"report_format\")\n ->addOption(\"Hypertext Markup Language (HTML)\",\"html\")\n ->addOption(\"Portable Document Format (PDF)\",\"pdf\")\n ->addOption(\"Microsoft Excel (XLS)\",\"xls\")\n ->addOption(\"Microsoft Word (DOC)\",\"doc\")\n ->setRequired(true)\n ->setValue(\"pdf\"),\n Element::create(\"SelectionList\", \"Page Orientation\", \"page_orientation\")\n ->addOption(\"Landscape\", \"L\")\n ->addOption(\"Portrait\", \"P\")\n ->setValue(\"L\"),\n Element::create(\"SelectionList\", \"Paper Size\", \"paper_size\")\n ->addOption(\"A4\", \"A4\")\n ->addOption(\"A3\", \"A3\")\n ->setValue(\"A4\")\n )->setId(\"report_formats\")->addAttribute(\"style\",\"width:50%\")\n );\n $this->form->setSubmitValue(\"Generate\");\n $this->form->addAttribute(\"action\",Application::getLink($this->path.\"/generate\"));\n $this->form->addAttribute(\"target\",\"blank\");\n }", "public function __construct()\n {\n if (isset($_SESSION['formkey'])) {\n $this->oldFormkey = $_SESSION['formkey'];\n }\n }", "protected function _construct()\n {\n $this->_init(\\AddictedToMagento\\DynamicForms\\Model\\ResourceModel\\Form::class);\n }", "public function buildForm()\n {\n }", "public function prepareForm()\n {\n // Searching for the data to populate the Form\n\n // Adding default value to the list\n\n // Setting the lists in $data array\n $data = [\n ];\n\n //dd($data);\n\n return $data;\n }", "function __construct($id = null) {\n\n // if there is an id\n if ($id) {\n $this->id = $id;\n // set form fields from database\n foreach ($this->properties as $property => $values) {\n $this->$property = get_post_meta($this->id, $property, true);\n }\n $this->login_key = get_post_meta($this->id, 'login_key', true);\n }\n\n }", "public function output_setup_form() {\n\t\t$related_api = Thrive_Dash_List_Manager::connection_instance( 'mandrill' );\n\t\tif ( $related_api->is_connected() ) {\n\t\t\t$credentials = $related_api->get_credentials();\n\t\t\t$this->set_param( 'email', $credentials['email'] );\n\t\t\t$this->set_param( 'mandrill-key', $credentials['key'] );\n\t\t}\n\n\t\t$this->output_controls_html( 'mailchimp' );\n\t}", "protected function form()\n {\n $form = new Form(new Member);\n\n $form->text('open_id', 'Open id');\n $form->text('wx_open_id', 'Wx open id');\n $form->text('access_token', 'Access token');\n $form->number('expires', 'Expires');\n $form->text('refresh_token', 'Refresh token');\n $form->text('unionid', 'Unionid');\n $form->text('nickname', 'Nickname');\n $form->switch('subscribe', 'Subscribe');\n $form->switch('sex', 'Sex');\n $form->text('headimgurl', 'Headimgurl');\n $form->switch('disablle', 'Disablle');\n $form->number('time', 'Time');\n $form->mobile('phone', 'Phone');\n\n return $form;\n }", "public function postAuthor() {\n $data = Request;\n //Add Author fields sent to Author Table\n //AuthorsController->AuthorsController::store($request);\n $p = sizeof($data);\n // $p = $data;\n //print_r($_POST);\n //$l = fopen('/home/sudipta/check.log','w+');\n //fwrite($l,\" SIZEOF \".$p);\n //Author::create($request);\n //AuthorsController->store($request);\n return;\n }", "public function cs_generate_form() {\n global $post;\n }", "function __construct() {\n\t\t$this->render();//llamamos a la función render donde se mostrará el formulario SEARCH con los campos correspondientes\n\t}", "public function __construct () {\n $this->readUserUname = '';\n $this->readUserPword = '';\n $this->writeUserUname = '';\n $this->writeUserPword = '';\n $this->courseDocumentTitle = '';\n $this->documentId = -1;\n $this->courseId = -1;\n }", "public function init()\n {\n parent::init();\n $this->formModel = new GoodsForm();\n \n }", "public function init() {\n $this->setMethod('post');\n\n // Ein Email Element hinzufügen\n $this->addElement('text', 'name', array(\n 'label' => 'Dein Name:',\n 'required' => true,\n 'filters' => array('StringTrim'),\n ));\n $this->addElement('text', 'mail', array(\n 'label' => 'Deine Mail Adresse:',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'validators' => array(\n array('validator' => 'EmailAddress', null)\n )\n ));\n // Das Kommentar Element hinzufügen\n $this->addElement('textarea', 'message', array(\n 'label' => 'Bitte ein Kommentar:',\n 'required' => true,\n 'validators' => array(\n array('validator' => 'StringLength', 'options' => array(0, 2000))\n )\n ));\n\n $this->addElement('select', 'subject', array(\n 'label' => 'Betreff',\n 'required' => true,\n 'multiOptions' => array(\n 'service' => 'Allgemeine Fragen',\n 'shooting' => 'Shooting',\n 'error' => 'Fehler auf der Seite'\n )\n ));\n \n $this->addElement('text', 'datum', array(\n 'label' => 'Datum:',\n 'required' => false,\n 'filters' => array('StringTrim'),\n ));\n \n // Den Submit Button hinzufügen\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Absenden',\n ));\n\n /*\n // Und letztendlich etwas CSRF Protektion hinzufügen\n $this->addElement('hash', 'csrf', array(\n 'ignore' => true,\n ));\n */\n }", "public function init()\n {\n\n $this->setMethod('post');\n\n // Add the name element\n $this->addElement('text','name', array(\n 'label' => 'Sub-Section Name'\n , 'size' => 50\n , 'required' => true\n , 'filters' => array('StringTrim')\n ));\n\n My_Plugin_Form::setDefaultLayout($this->getElement('name'));\n\n // Add the submit button\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Save Changes',\n 'disableLoadDefaultDecorators' => true,\n ));\n\n $label = $this->getElement('submit');\n $label->addDecorators(array(\n array('ViewHelper'),\n array('HtmlTag')\n ));\n\n // Add a hidden field to handle the application id\n $this->addElement('hidden','application_id');\n\n // Add a hidden field to handle the sub-section id\n $this->addElement('hidden','id');\n\n // And finally, add some CSRF protection\n $this->addElement('hash','csrf', array(\n 'ignore' => 'true',\n ));\n\n }", "public function __construct($name, $action = '', $extras = array(), $target_id = -1,$target_type = 'content',$method = 'post')\n\t{\n\t\t\n\t\t\t\t//TODO: put this in ONE place only!\n\t\t//to enable use of __METHOD__ and __FUNCTION__ in form names.\n\t\tif($sub = stristr($name,'::'))\n\t\t{\n\t\t\tnotice('form create fN: '.$name);\n\t\t\t//debug_print_backtrace();\n\t\t\t$name = substr($sub,2);\n\t\t}\n\n\t\t$this->name = $name;\n\t\t$this->action = $action;\n\t\t$this->method = strtolower($method); //for standards compliance\n\t\t$this->mExtras = $extras;\n\t\t\n\t\t$this->target_id = $target_id;\n\t\t$this->target_type = $target_type;\n\t\t\n\t\t//print_r($_POST);\n\t\t//debug_print_backtrace();\n\n\t}", "function __construct() { \r\n\t\t\t\t$this->id;\r\n\t\t\t\t$this->cpf;\r\n\t\t\t\t$this->email;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}", "public function __construct( $data = array() )\n {\n if( isset( $data['id'] ))\n $this->id = $data['id'];\n if( isset( $data['publicationDate'] ))\n $this->publicationDate = $data['publicationDate'];\n if( isset( $data['username'] ))\n $this->username = preg_replace ( \"/[^\\.\\,\\-\\_\\'\\\"\\@\\?\\!\\:\\$ a-zA-Z0-9()]/\", \"\", $data['username'] );\n if( isset( $data['commentString'] ))\n $this->commentString = preg_replace ( \"/[^\\.\\,\\-\\_\\'\\\"\\@\\?\\!\\:\\$ a-zA-Z0-9()]/\", \"\", $data['commentString'] );\n if( isset( $data['articleId'] ))\n $this->articleId = $data['articleId'];\n }", "public function init()\n {\n \t\n \t$this->setAttrib('enctype', 'multipart/form-data');\n \t \t\n \t$this->setName('FormularioOcorrencia');\n $id = new Zend_Form_Element_Hidden('id_ocorrencia');\n $id->addFilter('Int');\n \n \n \n\t\t$descricao = new Zend_Form_Element_Textarea('descricao');\n $descricao->setLabel('Descricao')\n ->setRequired(true);\n\t\t$descricao->removeDecorator('DtDdWrapper')\n ->removeDecorator('HtmlTag')\n ->removeDecorator('Label')\n ->setAttrib('class', 'form-control')\n \t->setAttrib('rows', '5');\n \n\t\t\n\t\t\n\t\t\n $submit = new Zend_Form_Element_Submit('submit');\n $submit->setLabel(\"Adiconar\");\n $submit->setAttrib('id', 'submitbutton');\n $submit->removeDecorator('DtDdWrapper')\n ->setAttrib('class', 'btn btn-primary')\n ->removeDecorator('HtmlTag')\n ->removeDecorator('Label');\n \n \n \n \n $this->addElements(array($id,$descricao,$submit)); \n \n $this->setDecorators( array( array('ViewScript', array('viewScript' => 'formularioOcorrencia.phtml'))));\n }", "public function __construct\n\t(\n\t\t$contentID\t\t// <int> The ID of the content entry being worked on.\n\t)\t\t\t\t\t// RETURNS <void> outputs the appropriate data.\n\t\n\t// $contentForm = new ContentForm($contentID);\n\t{\n\t\t$this->contentID = $contentID;\n\t\t\n\t\t// Get the Content Data\n\t\tif(!$this->contentData = Content::get($contentID))\n\t\t{\n\t\t\theader(\"Location: /\"); exit;\n\t\t}\n\t\t\n\t\t// Recognize Integers\n\t\t$this->contentData['id'] = (int) $this->contentData['id'];\n\t\t$this->contentData['uni_id'] = (int) $this->contentData['uni_id'];\n\t\t$this->contentData['status'] = (int) $this->contentData['status'];\n\t\t$this->contentData['comments'] = (int) $this->contentData['comments'];\n\t\t$this->contentData['voting'] = (int) $this->contentData['voting'];\n\t\t$this->contentData['date_posted'] = (int) $this->contentData['date_posted'];\n\t\t\n\t\t// Prepare Values\n\t\t$this->urlLength = 55 - (strlen($this->urlPrefix));\n\t\t\n\t\t// Prevent any updates to the URL slug if one has been set, and status is higher than DRAFT\n\t\tif($this->contentData['url_slug'] and $this->contentData['status'] > Content::STATUS_DRAFT)\n\t\t{\n\t\t\t$this->urlUpdate = false;\n\t\t}\n\t\t\n\t\t// Include Responsive Script\n\t\tPhoto::prepareResponsivePage();\n\t\t\n\t\tMetadata::addHeader('<link rel=\"stylesheet\" href=\"' . CDN . '/css/content-system.css\" />');\n\t}", "public function init()\n\t{\n\t\tparent::init();\n\n\t\t/**\n\t\t * form\n\t\t */\n\t\t$this->setAttrib('id', 'formModelName');\n\n\t\t/**\n\t\t * formLogin\n\t\t */\n\t\t$formElement = new Zend_Form_Element_Text('name');\n\t\t$formElement\n\t\t\t->setLabel('Name')\n\t\t\t->setRequired(TRUE)\n\t\t\t->setFilters(array(\n\t\t\t\tnew Zend_Filter_StripTags(),\n\t\t\t))\n\t\t\t->setValidators(array(\n\t\t\t\tnew Zend_Validate_Alpha(),\n\t\t\t\tnew Zend_Validate_NotEmpty(),\n\t\t\t))\n\t\t;\n\t\t$this->addElement($formElement);\n\n\t\t/**\n\t\t * formSubmitButton\n\t\t */\n\t\t$formSubmitButton = new Zend_Form_Element_Submit('formModelNameSubmit');\n\t\t$formSubmitButton\n\t\t\t->setLabel('Create')\n\t\t\t->setDecorators(array(\n\t\t\t\tnew Zend_Form_Decorator_ViewHelper(),\n\t\t\t\tnew Zend_Form_Decorator_HtmlTag(array(\n\t\t\t\t\t'tag'=>'dd',\n\t\t\t\t)),\n\t\t\t))\n\t\t;\n\t\t$this->addElement($formSubmitButton);\n\t}", "public function init()\n {\n $this->addAttribs(array(\"class\" => \"form-horizontal\"))\n ->setDecorators(array(\n 'FormElements',\n 'Form'\n )); \n $this->addElement('hidden','idarticles'); \n \n $article_title = $this->createElement('text','article_title');\n $article_title->setLabel(\"Họ tên :\")\n ->setRequired()\n ->setAttribs(array(\"class\"=>\"large\"))\n ->addDecorators(array(\n array(\"Label\",array(\"tag\"=>\"div\",\"tagClass\"=>\"label-dt\")),\n array(\"HtmlTag\",array(\"tag\"=>\"div\", \"class\"=>\"input\" ))\n )); \n $this->addElement($article_title); \n \n $article_alias = $this->createElement('text','article_alias');\n $article_alias->setLabel(\"Yahoo :\")\n ->setRequired()\n ->setAttribs(array(\"class\"=>\"large\"))\n ->addDecorators(array(\n array(\"Label\",array(\"tag\"=>\"div\",\"tagClass\"=>\"label-dt\")),\n array(\"HtmlTag\",array(\"tag\"=>\"div\", \"class\"=>\"input\" ))\n )); \n $this->addElement($article_alias); \n\t\t\n\t\t\n $article_detail = $this->createElement('text','article_detail');\n $article_detail->setLabel(\"Skype :\")\n ->setRequired()\n ->setAttribs(array(\"class\"=>\"large\"))\n ->addDecorators(array(\n array(\"Label\",array(\"tag\"=>\"div\",\"tagClass\"=>\"label-dt\")),\n array(\"HtmlTag\",array(\"tag\"=>\"div\", \"class\"=>\"input\" ))\n )); \n $this->addElement($article_detail); \n\t\t\n $article_description = $this->createElement('text','article_description');\n $article_description->setLabel(\"Số điện thoại :\")\n ->setRequired()\n ->setAttribs(array(\"class\"=>\"large\"))\n ->addDecorators(array(\n array(\"Label\",array(\"tag\"=>\"div\",\"tagClass\"=>\"label-dt\")),\n array(\"HtmlTag\",array(\"tag\"=>\"div\", \"class\"=>\"input\" ))\n )); \n $this->addElement($article_description); \n \n $submit = $this->createElement(\"submit\",\"submit\");\n $submit->setLabel(\"Thêm\"); \n $this->addElement($submit); \n }", "public function editForm(): void\n {\n $this->articleId = $_GET['id'];\n $query = $this->articleModel->displayOneArticle($this->articleId);\n $editArticle = $query->fetch();\n\n $this->title = $editArticle['title'];\n $this->content = $editArticle['content'];\n $this->category = $editArticle['category'];\n }", "private function __construct() {\n $args = func_get_args();\n $this->name = $args[0];\n $this->title = $args[1];\n $this->email = $args[2];\n $this->valediction = $args[3];\n }", "public function init()\n {\n $this->setMethod('post');\n\n // Add an email element\n $this->addElement('text', 'nom', array(\n 'label' => \"Nom de l'endroit:\",\n 'required' => true,\n 'filters' => array('StringTrim')\n ));\n\n // Add an email element\n $this->addElement('select', 'active', array(\n 'label' => \"État\",\n\t 'multiOptions' => array(0 => 'Proposition', 1 => 'ZAP en service')\n ));\n\n // And finally add some CSRF protection\n $this->addElement('hidden', 'latitude', array(\n ));\n\n // And finally add some CSRF protection\n $this->addElement('hidden', 'longitude', array(\n ));\n\n // And finally add some CSRF protection\n $this->addElement('hidden', 'id', array(\n ));\n \n // Add the submit button\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Modifier',\n ));\n\n // And finally add some CSRF protection\n $this->addElement('hash', 'csrf', array(\n 'ignore' => true,\n ));\n }", "public function init() {\n $this->setMethod ( 'post' );\n\n // add an name element\n $this->addElement ( 'text', 'name', array ('label' => 'Your name:', 'required' => true, 'filters' => array ( 'StringTrim' ), 'validators' => array ('alnum') ) );\n \n //add surname\n $this->addElement ( 'text', 'surname', array ('label' => 'Your surname:', 'filters' => array ( 'StringTrim' ), 'validators' => array ('alnum', array ('regex', false, array ('/^[a-z]/i' ) ), array ('StringLength', false, array (3, 20 ) ) ), 'required' => true ) );\n\n //add company\n $this->addElement ( 'text', 'company', array ('label' => 'Your company:', 'filters' => array ( 'StringTrim' ), 'validators' => array ( array ('StringLength', false, array (2, 120 ) ) ), 'required' => false ) );\n\n // add an email element\n $this->addElement ( 'text', 'email', array ('label' => 'Your email:', 'required' => true, 'filters' => array ('StringTrim' ), 'validators' => array ('EmailAddress' ) ) );\n\n //add phonenumber\n $this->addElement ( 'text', 'phonenumber', array ('label' => 'Your phone number:', 'filters' => array ('StringTrim', 'StringToLower' ), 'validators' => array ('alnum', array ('StringLength', false, array (9, 30 ) ) ), 'required' => false ) );\n\n //add link reported\n $this->addElement ( 'text', 'linkreported', array ('label' => 'Please, insert the link to be reviewed:', 'filters' => array ('StringTrim', 'StringToLower' ), 'validators' => array ( array ('StringLength', false, array (9, 256 ) ) ), 'required' => true ) );\n\n //add url reported\n $this->addElement ( 'text', 'urlreported', array ('label' => 'Please, insert the url where this content appears:', 'filters' => array ('StringTrim', 'StringToLower' ), 'validators' => array ( array ('StringLength', false, array (9, 256 ) ) ), 'required' => true ) );\n\n //add reason\n $this->addElement ( 'text', 'reason', array ('label' => 'Reason of your complaint:', 'filters' => array ( 'StringTrim' ), 'validators' => array ( array ('StringLength', false, array (3, 100 ) ) ), 'required' => true ) );\n\n\n $this->addElement ( 'textarea', 'message', \n array ('label' => 'Your message:', 'validators' => array (array ('StringLength', false, array (20, 2000 ) ) ), 'required' => true, 'rows' => 4,'cols' => 60 )\n\n );\n\n $this->addElement ( 'captcha', 'captcha', array ('label' => 'Please, insert the 5 characters shown:', 'required' => true,\n 'captcha' => array ('captcha' => 'Image', 'wordLen' => 5, 'height' => 50, 'width' => 160, 'gcfreq' => 50, 'timeout' => 300,\n 'font' => APPLICATION_PATH . '/configs/antigonimed.ttf',\n 'imgdir' => FOOFIND_PATH . '/public/images/captcha' ) ) );\n\n\n $checkboxDecorator = array(\n 'ViewHelper',\n 'Errors',\n array(array('data' => 'HtmlTag'), array('tag' => 'span', 'class' => 'element')),\n array('Label', array('tag' => 'dt'),\n array(array('row' => 'HtmlTag'), array('tag' => 'span')),\n ));\n\n $this->addElement('checkbox', 'agree', array(\n 'decorators' => $checkboxDecorator,\n 'required' => true,\n 'checked' =>false\n ));\n\n\n // add the submit button\n $this->addElement ( 'submit', 'submit', array (\n 'label' => 'Send',\n 'class' => 'large magenta awesome') );\n }", "function construct(array $form_data){\n\t\t\textract($form_data);\n\t\t\t$this->form_data = array(\n\t\t\t\t\"id_paciente\" => isset($id_paciente) ? $id_paciente : null,\n\t\t\t\t\"tipodocum_id_tipodocum\" => isset($tipodocum_id_tipodocum) ? $tipodocum_id_tipodocum : null,\n\t\t\t\t\"documento\" => isset($documento) ? strtoupper($documento) : null,\n\t\t\t\t\"nombres\" => isset($nombres) ? strtoupper($nombres) : null,\n\t\t\t\t\"apellidos\" => isset($apellidos) ? strtoupper($apellidos) : null,\n\t\t\t\t\"fecha_nacimiento\" => isset($fecha_nacimiento) ? $fecha_nacimiento : null,\n\t\t\t\t\"genero\" => isset($genero) ? strtoupper($genero) : null,\n\t\t\t\t\"telefono\" => isset($telefono) ? strtoupper($telefono) : null,\n\t\t\t\t\"celular\" => isset($celular) ? strtoupper($celular) : null,\n\t\t\t\t\"email\" => isset($email) ? $email : null,\n\t\t\t\t\"direccion\" => isset($direccion) ? strtoupper($direccion) : null,\n\t\t\t);\n\n\t\t\t$this->meditions = array(\n\t\t\t \"paciente_id_paciente\" => isset($paciente_id_paciente) ? $paciente_id_paciente : null,\n\t\t\t \"parametros_id_parametro\" => isset($parametros_id_parametro) ? $parametros_id_parametro : null,\n\t\t\t \"frecuencia_min\" => isset($frecuencia_min) ? $frecuencia_min : null,\n\t\t\t \"frecuencia_max\" => isset($frecuencia_max) ? $frecuencia_max : null,\n\t\t\t \"date_ini\" => isset($date_ini) ? $date_ini : 0,\n\t\t\t \"time_ini\" => isset($time_ini) ? $time_ini : 0,\n\n\t\t\t);\n\n\t\t\t$this->meditions[\"fecha_inicio\"] = $this->meditions[\"date_ini\"].\" \".$this->meditions[\"time_ini\"];\n\t\t\tunset($this->meditions[\"date_ini\"]);\n\t\t\tunset($this->meditions[\"time_ini\"]);\n\n\t\t\t$this->id_paciente = isset($id_paciente) ? $id_paciente : null;\n\t\t\t$this->tipodocum_id_tipodocum = isset($tipodocum_id_tipodocum) ? $tipodocum_id_tipodocum : null;\n\t\t\t$this->documento = isset($documento) ? strtoupper($documento) : null;\n\t\t}", "function __construct() { \n\t\t$this->render();//llamamos a la función render donde se mostrará el formulario SEARCH con los campos correspondientes\n\t}" ]
[ "0.62404805", "0.6132263", "0.61175406", "0.602076", "0.60145986", "0.5936124", "0.59313405", "0.5924571", "0.5913857", "0.5869718", "0.5832021", "0.58299154", "0.57957864", "0.5788336", "0.57775086", "0.5772947", "0.57420415", "0.5727815", "0.5714158", "0.5701122", "0.56950617", "0.56912655", "0.5676044", "0.5673724", "0.5649719", "0.5635831", "0.5629106", "0.561384", "0.56105703", "0.56075895", "0.5587417", "0.5582582", "0.55743533", "0.55616164", "0.55580735", "0.5554185", "0.5533442", "0.55321115", "0.5527902", "0.55184424", "0.54901356", "0.5485084", "0.54629713", "0.54591274", "0.54554915", "0.545542", "0.5448232", "0.54348123", "0.5422076", "0.5421422", "0.5420129", "0.539898", "0.5396537", "0.5388258", "0.5377272", "0.53687996", "0.535959", "0.53583694", "0.5354053", "0.5352735", "0.5347906", "0.53436613", "0.5339726", "0.5335301", "0.5334806", "0.5333723", "0.53308505", "0.53280574", "0.53257173", "0.53251255", "0.5310534", "0.53096193", "0.53011715", "0.5298909", "0.52932614", "0.5278433", "0.5276619", "0.527446", "0.52715385", "0.5267452", "0.5266498", "0.52628934", "0.52611345", "0.52585006", "0.5256635", "0.5256568", "0.52534986", "0.5249365", "0.52357095", "0.52351093", "0.5234878", "0.52337396", "0.5229975", "0.5221619", "0.5221091", "0.5213653", "0.52075046", "0.5205162", "0.52039367", "0.5191803" ]
0.6128536
2
Fetch the HTML contents of the form.
function fetch(&$request) { $monograph =& $this->getMonograph(); $templateMgr =& TemplateManager::getManager(); $templateMgr->assign('monographId', $monograph->getId()); $templateMgr->assign('stageId', $this->getStageId()); $templateMgr->assign('formParams', $this->getFormParams()); $templateMgr->assign('isEditedVolume', $monograph->getWorkType() == WORK_TYPE_EDITED_VOLUME); $templateMgr->assign('isPublished', $monograph->getDatePublished() != null ? true : false); // Get series for this press $seriesDao =& DAORegistry::getDAO('SeriesDAO'); $seriesOptions = array('0' => __('submission.submit.selectSeries')) + $seriesDao->getTitlesByPressId($monograph->getPressId()); $templateMgr->assign('seriesOptions', $seriesOptions); $templateMgr->assign('seriesId', $monograph->getSeriesId()); $templateMgr->assign('seriesPosition', $monograph->getSeriesPosition()); // If categories are configured for the press, present the LB. $categoryDao =& DAORegistry::getDAO('CategoryDAO'); $templateMgr->assign('categoriesExist', $categoryDao->getCountByPressId($monograph->getPressId()) > 0); // also include the categories (for read only form views) $monographDao =& DAORegistry::getDAO('MonographDAO'); $assignedCategories =& $monographDao->getCategories($monograph->getId(), $monograph->getPressId()); $templateMgr->assign('assignedCategories', $assignedCategories->toArray()); return parent::fetch($request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormContent()\n {\n return $this->form->getContent();\n }", "public function getForm(): string\n {\n return $this->html;\n }", "public function fetchHTML()\n {\n return $this->fetch();\n }", "public function getForm();", "public function fetch() {\n return $this->html;\n }", "public function getContent()\n {\n\n //Save Form configuration post data\n $this->__saveConfiguration();\n\n //Show Configuration form\n $this->__setConfigurationForm();\n\n return $this->_html;\n }", "public function getContent()\n {\n $this->_html = '';\n \n /**\n * If values have been submitted in the form, validate and process.\n */\n if (((bool)Tools::isSubmit('submitOrderrefModule')) == true) {\n $errors = $this->postValidation();\n if (!count($errors)) {\n $this->postProcess();\n } else {\n $this->_html .= $this->displayError($errors);\n }\n }\n \n $this->_html .= $this->renderForm();\n\n return $this->_html;\n }", "public function get_form( $atts = array() ) {\r\n\t\t\r\n\t\t\tob_start();\r\n\t\t\t$this->output( $atts );\r\n\t\t\treturn ob_get_clean();\r\n\t\t\r\n\t}", "function tower_claims_form() {\n ob_start();\n include('template-parts/form-claim.php');\n $html = ob_get_contents();\n ob_end_clean();\n return $html;\n}", "public static function getForm();", "abstract function getForm();", "abstract protected function getForm();", "protected function getForm() {\n $lUpdate = ($this -> mPhraseTyp == 'product') ? 'yes' : 'no';\n $this -> setParam('ref_update', $lUpdate);\n\n $lRet = '<div id=\"job_form\" class=\"frm\">'.LF;\n\t$lRet.= $this -> getFieldForm();\n $lRet.= '</div>' . LF;\n \n /*if($this -> mCanBuild) {\n $lRet.= '<div id=\"save_dialog\" title=\"Publish PDF\" style=\"display:none;\">'.LF;\n\t $lRet.= '<input id=\"templateId\" type=\"hidden\" value=\"\" />'.LF;\n $lRet.= '<iframe src=\"\" onload=\"javascript:GetEditor()\" id=\"chiliEditor\" class=\"dn\" style=\"width:100%;height:100%;\"></iframe>'.LF;\n $lRet.= '</div>'.LF;\n }*/\n \n $lDlg = new CJob_Cms_Content_Dialog($this -> mJobId, $this -> mSrc, $this -> mJob);\n $lRet.= $lDlg -> getContent();\n \n $lRet.= $lDlg -> getModals();\n \n return $lRet;\n }", "public function getForm()\n {\n RETURN $this->strategy->getForm();\n }", "protected function getForm() {\n\t\tglobal $wgScript;\n\n\t\t$this->opts['title'] = $this->getPageTitle()->getPrefixedText();\n\t\tif ( !isset( $this->opts['target'] ) ) {\n\t\t\t$this->opts['target'] = '';\n\t\t} else {\n\t\t\t$this->opts['target'] = str_replace( '_', ' ', $this->opts['target'] );\n\t\t}\n\n\t\tif ( !isset( $this->opts['namespace'] ) ) {\n\t\t\t$this->opts['namespace'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['nsInvert'] ) ) {\n\t\t\t$this->opts['nsInvert'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['associated'] ) ) {\n\t\t\t$this->opts['associated'] = false;\n\t\t}\n\n\t\tif ( !isset( $this->opts['contribs'] ) ) {\n\t\t\t$this->opts['contribs'] = 'user';\n\t\t}\n\n\t\tif ( !isset( $this->opts['year'] ) ) {\n\t\t\t$this->opts['year'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['month'] ) ) {\n\t\t\t$this->opts['month'] = '';\n\t\t}\n\n\t\tif ( $this->opts['contribs'] == 'newbie' ) {\n\t\t\t$this->opts['target'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['tagfilter'] ) ) {\n\t\t\t$this->opts['tagfilter'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['topOnly'] ) ) {\n\t\t\t$this->opts['topOnly'] = false;\n\t\t}\n\n\t\tif ( !isset( $this->opts['newOnly'] ) ) {\n\t\t\t$this->opts['newOnly'] = false;\n\t\t}\n\n\t\t$form = Html::openElement(\n\t\t\t'form',\n\t\t\tarray(\n\t\t\t\t'method' => 'get',\n\t\t\t\t'action' => $wgScript,\n\t\t\t\t'class' => 'mw-contributions-form'\n\t\t\t)\n\t\t);\n\n\t\t# Add hidden params for tracking except for parameters in $skipParameters\n\t\t$skipParameters = array(\n\t\t\t'namespace',\n\t\t\t'nsInvert',\n\t\t\t'deletedOnly',\n\t\t\t'target',\n\t\t\t'contribs',\n\t\t\t'year',\n\t\t\t'month',\n\t\t\t'topOnly',\n\t\t\t'newOnly',\n\t\t\t'associated'\n\t\t);\n\n\t\tforeach ( $this->opts as $name => $value ) {\n\t\t\tif ( in_array( $name, $skipParameters ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$form .= \"\\t\" . Html::hidden( $name, $value ) . \"\\n\";\n\t\t}\n\n\t\t$tagFilter = ChangeTags::buildTagFilterSelector( $this->opts['tagfilter'] );\n\n\t\tif ( $tagFilter ) {\n\t\t\t$filterSelection = Html::rawElement(\n\t\t\t\t'td',\n\t\t\t\tarray( 'class' => 'mw-label' ),\n\t\t\t\tarray_shift( $tagFilter )\n\t\t\t);\n\t\t\t$filterSelection .= Html::rawElement(\n\t\t\t\t'td',\n\t\t\t\tarray( 'class' => 'mw-input' ),\n\t\t\t\timplode( '&#160', $tagFilter )\n\t\t\t);\n\t\t} else {\n\t\t\t$filterSelection = Html::rawElement( 'td', array( 'colspan' => 2 ), '' );\n\t\t}\n\n\t\t$labelNewbies = Xml::radioLabel(\n\t\t\t$this->msg( 'sp-contributions-newbies' )->text(),\n\t\t\t'contribs',\n\t\t\t'newbie',\n\t\t\t'newbie',\n\t\t\t$this->opts['contribs'] == 'newbie',\n\t\t\tarray( 'class' => 'mw-input' )\n\t\t);\n\t\t$labelUsername = Xml::radioLabel(\n\t\t\t$this->msg( 'sp-contributions-username' )->text(),\n\t\t\t'contribs',\n\t\t\t'user',\n\t\t\t'user',\n\t\t\t$this->opts['contribs'] == 'user',\n\t\t\tarray( 'class' => 'mw-input' )\n\t\t);\n\t\t$input = Html::input(\n\t\t\t'target',\n\t\t\t$this->opts['target'],\n\t\t\t'text',\n\t\t\tarray( 'size' => '40', 'required' => '', 'class' => 'mw-input' ) +\n\t\t\t\t( $this->opts['target'] ? array() : array( 'autofocus' )\n\t\t\t\t)\n\t\t);\n\t\t$targetSelection = Html::rawElement(\n\t\t\t'td',\n\t\t\tarray( 'colspan' => 2 ),\n\t\t\t$labelNewbies . '<br />' . $labelUsername . ' ' . $input . ' '\n\t\t);\n\n\t\t$namespaceSelection = Xml::tags(\n\t\t\t'td',\n\t\t\tarray( 'class' => 'mw-label' ),\n\t\t\tXml::label(\n\t\t\t\t$this->msg( 'namespace' )->text(),\n\t\t\t\t'namespace',\n\t\t\t\t''\n\t\t\t)\n\t\t);\n\t\t$namespaceSelection .= Html::rawElement(\n\t\t\t'td',\n\t\t\tnull,\n\t\t\tHtml::namespaceSelector(\n\t\t\t\tarray( 'selected' => $this->opts['namespace'], 'all' => '' ),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'namespace',\n\t\t\t\t\t'id' => 'namespace',\n\t\t\t\t\t'class' => 'namespaceselector',\n\t\t\t\t)\n\t\t\t) . '&#160;' .\n\t\t\t\tHtml::rawElement(\n\t\t\t\t\t'span',\n\t\t\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\t\t\tXml::checkLabel(\n\t\t\t\t\t\t$this->msg( 'invert' )->text(),\n\t\t\t\t\t\t'nsInvert',\n\t\t\t\t\t\t'nsInvert',\n\t\t\t\t\t\t$this->opts['nsInvert'],\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => $this->msg( 'tooltip-invert' )->text(),\n\t\t\t\t\t\t\t'class' => 'mw-input'\n\t\t\t\t\t\t)\n\t\t\t\t\t) . '&#160;'\n\t\t\t\t) .\n\t\t\t\tHtml::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),\n\t\t\t\t\tXml::checkLabel(\n\t\t\t\t\t\t$this->msg( 'namespace_association' )->text(),\n\t\t\t\t\t\t'associated',\n\t\t\t\t\t\t'associated',\n\t\t\t\t\t\t$this->opts['associated'],\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => $this->msg( 'tooltip-namespace_association' )->text(),\n\t\t\t\t\t\t\t'class' => 'mw-input'\n\t\t\t\t\t\t)\n\t\t\t\t\t) . '&#160;'\n\t\t\t\t)\n\t\t);\n\n\t\tif ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {\n\t\t\t$deletedOnlyCheck = Html::rawElement(\n\t\t\t\t'span',\n\t\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\t\tXml::checkLabel(\n\t\t\t\t\t$this->msg( 'history-show-deleted' )->text(),\n\t\t\t\t\t'deletedOnly',\n\t\t\t\t\t'mw-show-deleted-only',\n\t\t\t\t\t$this->opts['deletedOnly'],\n\t\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\t$deletedOnlyCheck = '';\n\t\t}\n\n\t\t$checkLabelTopOnly = Html::rawElement(\n\t\t\t'span',\n\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\tXml::checkLabel(\n\t\t\t\t$this->msg( 'sp-contributions-toponly' )->text(),\n\t\t\t\t'topOnly',\n\t\t\t\t'mw-show-top-only',\n\t\t\t\t$this->opts['topOnly'],\n\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t)\n\t\t);\n\t\t$checkLabelNewOnly = Html::rawElement(\n\t\t\t'span',\n\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\tXml::checkLabel(\n\t\t\t\t$this->msg( 'sp-contributions-newonly' )->text(),\n\t\t\t\t'newOnly',\n\t\t\t\t'mw-show-new-only',\n\t\t\t\t$this->opts['newOnly'],\n\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t)\n\t\t);\n\t\t$extraOptions = Html::rawElement(\n\t\t\t'td',\n\t\t\tarray( 'colspan' => 2 ),\n\t\t\t$deletedOnlyCheck . $checkLabelTopOnly . $checkLabelNewOnly\n\t\t);\n\n\t\t$dateSelectionAndSubmit = Xml::tags( 'td', array( 'colspan' => 2 ),\n\t\t\tXml::dateMenu(\n\t\t\t\t$this->opts['year'] === '' ? MWTimestamp::getInstance()->format( 'Y' ) : $this->opts['year'],\n\t\t\t\t$this->opts['month']\n\t\t\t) . ' ' .\n\t\t\t\tXml::submitButton(\n\t\t\t\t\t$this->msg( 'sp-contributions-submit' )->text(),\n\t\t\t\t\tarray( 'class' => 'mw-submit' )\n\t\t\t\t)\n\t\t);\n\n\t\t$form .= Xml::fieldset( $this->msg( 'sp-contributions-search' )->text() );\n\t\t$form .= Html::rawElement( 'table', array( 'class' => 'mw-contributions-table' ), \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $targetSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $namespaceSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $filterSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $extraOptions ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $dateSelectionAndSubmit ) . \"\\n\"\n\t\t);\n\n\t\t$explain = $this->msg( 'sp-contributions-explain' );\n\t\tif ( !$explain->isBlank() ) {\n\t\t\t$form .= \"<p id='mw-sp-contributions-explain'>{$explain->parse()}</p>\";\n\t\t}\n\n\t\t$form .= Xml::closeElement( 'fieldset' ) . Xml::closeElement( 'form' );\n\n\t\treturn $form;\n\t}", "public function get_input_content();", "function getHTML() {\n switch ($_SERVER['REQUEST_METHOD']) {\n case 'POST':\n return $this->_postRequest();\n break;\n default:\n return $this->_getRequest();\n }\n }", "private function RenderHtmlForm($stub = 'CompleteStub')\n {\n ob_start();\n\n include __DIR__.\"/Stubs/{$stub}.php\";\n\n $content = ob_get_contents();\n\n ob_end_clean();\n\n return $content;\n }", "protected function fetchAdminFormElement() {\n $html = '';\n return $html;\n }", "abstract public function getForm() : void;", "public function fetch() {\n if(!$this->isRendered) {\n $this->render();\n }\n\n return $this->html;\n }", "public function retrieveForms()\n {\n return $this->start()->uri(\"/api/form\")\n ->get()\n ->go();\n }", "public function populateForm() {}", "function _getContentHTML()\n\t{\n\t\tinclude_once ($_SERVER['DOCUMENT_ROOT'] . \"/webEdition/we/include/we_classes/html/we_multibox.inc.php\");\n\t\tinclude_once ($_SERVER['DOCUMENT_ROOT'] . \"/webEdition/we/include/we_classes/html/we_htmlSelect.inc.php\");\n\t\tinclude_once ($_SERVER[\"DOCUMENT_ROOT\"] . \"/webEdition/we/include/we_classes/html/we_button.inc.php\");\n\t\t\n\t\t$we_button = new we_button();\n\t\t\n\t\t// Suorce Directory\n\t\t$_from_button = we_hasPerm(\"CAN_SELECT_EXTERNAL_FILES\") ? $we_button->create_button(\n\t\t\t\t\"select\", \n\t\t\t\t\"javascript:we_cmd('browse_server', 'document.we_form.elements[\\\\'from\\\\'].value', 'folder', document.we_form.elements['from'].value)\") : \"\";\n\t\t\n\t\t$_input = htmlTextInput(\"from\", 30, $this->from, \"\", \"readonly\", \"text\", 300);\n\t\t\n\t\t$_importFrom = htmlFormElementTable(\n\t\t\t\t$_input, \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importFrom\"], \n\t\t\t\t\"left\", \n\t\t\t\t\"defaultfont\", \n\t\t\t\tgetPixel(10, 1), \n\t\t\t\t$_from_button, \n\t\t\t\t\"\", \n\t\t\t\t\"\", \n\t\t\t\t\"\", \n\t\t\t\t0);\n\t\t\n\t\t// Destination Directory\n\t\t$_to_button = $we_button->create_button(\n\t\t\t\t\"select\", \n\t\t\t\t\"javascript:we_cmd('openDirselector',document.we_form.elements['to'].value,'\" . FILE_TABLE . \"','document.we_form.elements[\\\\'to\\\\'].value','document.we_form.elements[\\\\'toPath\\\\'].value','','','0')\");\n\t\t\n\t\t//$_hidden = hidden(\"to\",$this->to);\n\t\t//$_input = htmlTextInput(\"toPath\",30,id_to_path($this->to),\"\",'readonly=\"readonly\"',\"text\",300);\n\t\t\n\n\t\t//$_importTo = htmlFormElementTable($_input, $GLOBALS[\"l_siteimport\"][\"importTo\"], \"left\", \"defaultfont\", getPixel(10, 1), $_to_button, $_hidden, \"\", \"\", 0);\n\t\t\n\n\t\t$yuiSuggest = & weSuggest::getInstance();\n\t\t$yuiSuggest->setAcId(\"DirPath\");\n\t\t$yuiSuggest->setContentType(\"folder\");\n\t\t$yuiSuggest->setInput(\"toPath\", id_to_path($this->to));\n\t\t$yuiSuggest->setLabel($GLOBALS[\"l_siteimport\"][\"importTo\"]);\n\t\t$yuiSuggest->setMaxResults(10);\n\t\t$yuiSuggest->setMayBeEmpty(0);\n\t\t$yuiSuggest->setResult(\"to\", $this->to);\n\t\t$yuiSuggest->setSelector(\"Dirselector\");\n\t\t$yuiSuggest->setWidth(300);\n\t\t$yuiSuggest->setSelectButton($_to_button, 10);\n\t\t\n\t\t$_importTo = $yuiSuggest->getYuiFiles() . $yuiSuggest->getHTML() . $yuiSuggest->getYuiCode();\n\t\t\n\t\t// Checkboxes\n\t\t\n\n\t\t$weoncklick = \"if(this.checked && (!this.form.elements['htmlPages'].checked)){this.form.elements['htmlPages'].checked = true;}\";\n\t\t$weoncklick .= ((!we_hasPerm(\"NEW_HTML\")) && we_hasPerm(\"NEW_WEBEDITIONSITE\")) ? \"if((!this.checked) && this.form.elements['htmlPages'].checked){this.form.elements['htmlPages'].checked = false;}\" : \"\";\n\t\t\n\t\t$_images = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_GRAFIK\") ? $this->images : false, \n\t\t\t\t\"images\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importImages\"], \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t\"\", \n\t\t\t\t!we_hasPerm(\"NEW_GRAFIK\"));\n\t\t\n\t\t$_htmlPages = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_HTML\") ? $this->htmlPages : ((we_hasPerm(\"NEW_WEBEDITIONSITE\") && $this->createWePages) ? true : false), \n\t\t\t\t\"htmlPages\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importHtmlPages\"], \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t\"if(this.checked){this.form.elements['_createWePages'].disabled=false;document.getElementById('label__createWePages').style.color='black';}else{this.form.elements['_createWePages'].disabled=true;document.getElementById('label__createWePages').style.color='gray';}\", \n\t\t\t\t!we_hasPerm(\"NEW_HTML\"));\n\t\t$_createWePages = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_WEBEDITIONSITE\") ? $this->createWePages : false, \n\t\t\t\t\"createWePages\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"createWePages\"] . \"&nbsp;&nbsp;\", \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t$weoncklick, \n\t\t\t\t!we_hasPerm(\"NEW_WEBEDITIONSITE\"));\n\t\t$_flashmovies = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_FLASH\") ? $this->flashmovies : false, \n\t\t\t\t\"flashmovies\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importFlashmovies\"], \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t\"\", \n\t\t\t\t!we_hasPerm(\"NEW_FLASH\"));\n\t\t$_quicktime = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_QUICKTIME\") ? $this->quicktime : false, \n\t\t\t\t\"quicktime\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importQuicktime\"], \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t\"\", \n\t\t\t\t!we_hasPerm(\"NEW_QUICKTIME\"));\n\t\t$_jss = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_JS\") ? $this->js : false, \n\t\t\t\t\"j\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importJS\"], \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t\"\", \n\t\t\t\t!we_hasPerm(\"NEW_JS\"));\n\t\t$_css = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_CSS\") ? $this->css : false, \n\t\t\t\t\"css\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importCSS\"], \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t\"\", \n\t\t\t\t!we_hasPerm(\"NEW_CSS\"));\n\t\t$_text = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_TEXT\") ? $this->text : false, \n\t\t\t\t\"text\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importText\"], \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t\"\", \n\t\t\t\t!we_hasPerm(\"NEW_TEXT\"));\n\t\t$_others = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_SONSTIGE\") ? $this->other : false, \n\t\t\t\t\"other\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importOther\"], \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t\"\", \n\t\t\t\t!we_hasPerm(\"NEW_SONSTIGE\"));\n\t\t\n\t\t$_wePagesOptionButton = $we_button->create_button(\n\t\t\t\t\"preferences\", \n\t\t\t\t\"javascript:we_cmd('siteImportCreateWePageSettings')\", \n\t\t\t\ttrue, \n\t\t\t\t150, \n\t\t\t\t22, \n\t\t\t\t\"\", \n\t\t\t\t\"\", \n\t\t\t\tfalse, \n\t\t\t\ttrue, \n\t\t\t\t\"\", \n\t\t\t\ttrue);\n\t\t// Depth\n\t\t$_select = htmlSelect(\n\t\t\t\t\"depth\", \n\t\t\t\tarray(\n\t\t\t\t\t\n\t\t\t\t\t\t\"-1\" => $GLOBALS[\"l_siteimport\"][\"nolimit\"], \n\t\t\t\t\t\t0, \n\t\t\t\t\t\t1, \n\t\t\t\t\t\t2, \n\t\t\t\t\t\t3, \n\t\t\t\t\t\t4, \n\t\t\t\t\t\t5, \n\t\t\t\t\t\t6, \n\t\t\t\t\t\t7, \n\t\t\t\t\t\t8, \n\t\t\t\t\t\t9, \n\t\t\t\t\t\t10, \n\t\t\t\t\t\t11, \n\t\t\t\t\t\t12, \n\t\t\t\t\t\t13, \n\t\t\t\t\t\t14, \n\t\t\t\t\t\t15, \n\t\t\t\t\t\t16, \n\t\t\t\t\t\t17, \n\t\t\t\t\t\t18, \n\t\t\t\t\t\t19, \n\t\t\t\t\t\t20, \n\t\t\t\t\t\t21, \n\t\t\t\t\t\t22, \n\t\t\t\t\t\t23, \n\t\t\t\t\t\t24, \n\t\t\t\t\t\t25, \n\t\t\t\t\t\t26, \n\t\t\t\t\t\t27, \n\t\t\t\t\t\t28, \n\t\t\t\t\t\t29, \n\t\t\t\t\t\t30\n\t\t\t\t), \n\t\t\t\t1, \n\t\t\t\t$this->depth, \n\t\t\t\tfalse, \n\t\t\t\t\"\", \n\t\t\t\t\"value\", \n\t\t\t\t150);\n\t\t\n\t\t$_depth = htmlFormElementTable($_select, $GLOBALS[\"l_siteimport\"][\"depth\"]);\n\t\t$maxallowed = round(getMaxAllowedPacket($GLOBALS['DB_WE']) / (1024 * 1024));\n\t\t$maxallowed = $maxallowed ? $maxallowed : 20;\n\t\t$maxarray = array(\n\t\t\t\"0\" => $GLOBALS[\"l_siteimport\"][\"nolimit\"], \"0.5\" => \"0.5\"\n\t\t);\n\t\tfor ($i = 1; $i <= $maxallowed; $i++) {\n\t\t\t$maxarray[\"\" . $i] = $i;\n\t\t}\n\t\t\n\t\t// maxSize\n\t\t$_select = htmlSelect(\"maxSize\", $maxarray, 1, $this->maxSize, false, \"\", \"value\", 150);\n\t\t$_maxSize = htmlFormElementTable($_select, $GLOBALS[\"l_siteimport\"][\"maxSize\"]);\n\t\t\n\t\t$thumbsarray = array();\n\t\t$GLOBALS[\"DB_WE\"]->query(\"SELECT ID,Name FROM \" . THUMBNAILS_TABLE . \" ORDER BY Name\");\n\t\twhile ($GLOBALS[\"DB_WE\"]->next_record()) {\n\t\t\t$thumbsarray[$GLOBALS[\"DB_WE\"]->f(\"ID\")] = $GLOBALS[\"DB_WE\"]->f(\"Name\");\n\t\t}\n\t\t$_select = htmlSelect(\"thumbs[]\", $thumbsarray, 5, $this->thumbs, true, \"\", \"value\", 150);\n\t\t$_thumbs = htmlFormElementTable($_select, $GLOBALS[\"l_import_files\"][\"thumbnails\"]);\n\t\t\n\t\t$parts = array();\n\t\t\n\t\tarray_push(\n\t\t\t\t$parts, \n\t\t\t\tarray(\n\t\t\t\t\t\n\t\t\t\t\t\t\"headline\" => $GLOBALS[\"l_siteimport\"][\"dirs_headline\"], \n\t\t\t\t\t\t\"html\" => $_importFrom . getPixel(20, 5) . $_importTo, \n\t\t\t\t\t\t\"space\" => 120\n\t\t\t\t));\n\t\t\n\t\t/* Create Main Table */\n\t\t$_attr = array(\n\t\t\t\"border\" => \"0\", \"cellpadding\" => \"0\", \"cellspacing\" => \"0\"\n\t\t);\n\t\t$_tableObj = new we_htmlTable($_attr, 6, 3);\n\t\t\n\t\t$_tableObj->setCol(0, 0, array(\n\t\t\t\"colspan\" => \"2\"\n\t\t), $_images);\n\t\t$_tableObj->setCol(1, 0, array(\n\t\t\t\"colspan\" => \"2\"\n\t\t), $_flashmovies);\n\t\t$_tableObj->setCol(2, 0, array(\n\t\t\t\"colspan\" => \"2\"\n\t\t), $_htmlPages);\n\t\t$_tableObj->setCol(3, 0, null, \"\");\n\t\t$_tableObj->setCol(3, 1, null, $_createWePages);\n\t\t$_tableObj->setCol(4, 1, null, $_wePagesOptionButton);\n\t\t$_tableObj->setCol(5, 0, null, getPixel(20, 1));\n\t\t$_tableObj->setCol(5, 1, null, getPixel(200, 1));\n\t\t$_tableObj->setCol(5, 2, null, getPixel(180, 1));\n\t\t$_tableObj->setCol(0, 2, null, $_jss);\n\t\t$_tableObj->setCol(1, 2, null, $_css);\n\t\t$_tableObj->setCol(2, 2, null, $_text);\n\t\t$_tableObj->setCol(3, 2, null, $_others);\n\t\t$_tableObj->setCol(4, 2, array(\n\t\t\t\"valign\" => \"top\"\n\t\t), $_quicktime);\n\t\t\n\t\tarray_push(\n\t\t\t\t$parts, \n\t\t\t\tarray(\n\t\t\t\t\t\n\t\t\t\t\t\t\"headline\" => $GLOBALS[\"l_siteimport\"][\"import\"], \n\t\t\t\t\t\t\"html\" => $_tableObj->getHtmlCode(), \n\t\t\t\t\t\t\"space\" => 120\n\t\t\t\t));\n\t\t\n\t\t$_tableObj = new we_htmlTable($_attr, 2, 2);\n\t\t$_tableObj->setCol(0, 0, null, $_depth);\n\t\t$_tableObj->setCol(0, 1, null, $_maxSize);\n\t\t$_tableObj->setCol(1, 0, null, getPixel(220, 1));\n\t\t$_tableObj->setCol(1, 1, null, getPixel(180, 1));\n\t\t\n\t\tarray_push(\n\t\t\t\t$parts, \n\t\t\t\tarray(\n\t\t\t\t\t\n\t\t\t\t\t\t\"headline\" => $GLOBALS[\"l_siteimport\"][\"limits\"], \n\t\t\t\t\t\t\"html\" => $_tableObj->getHtmlCode(), \n\t\t\t\t\t\t\"space\" => 120\n\t\t\t\t));\n\t\t\n\t\t$content = htmlAlertAttentionBox($GLOBALS[\"l_import_files\"][\"sameName_expl\"], 2, \"410\");\n\t\t$content .= getPixel(200, 10);\n\t\t$content .= we_forms::radiobutton(\n\t\t\t\t\"overwrite\", \n\t\t\t\t($this->sameName == \"overwrite\"), \n\t\t\t\t\"sameName\", \n\t\t\t\t$GLOBALS[\"l_import_files\"][\"sameName_overwrite\"]);\n\t\t$content .= we_forms::radiobutton(\n\t\t\t\t\"rename\", \n\t\t\t\t($this->sameName == \"rename\"), \n\t\t\t\t\"sameName\", \n\t\t\t\t$GLOBALS[\"l_import_files\"][\"sameName_rename\"]);\n\t\t$content .= we_forms::radiobutton(\n\t\t\t\t\"nothing\", \n\t\t\t\t($this->sameName == \"nothing\"), \n\t\t\t\t\"sameName\", \n\t\t\t\t$GLOBALS[\"l_import_files\"][\"sameName_nothing\"]);\n\t\t\n\t\tarray_push(\n\t\t\t\t$parts, \n\t\t\t\tarray(\n\t\t\t\t\t\n\t\t\t\t\t\t\"headline\" => $GLOBALS[\"l_import_files\"][\"sameName_headline\"], \n\t\t\t\t\t\t\"html\" => $content, \n\t\t\t\t\t\t\"space\" => 120\n\t\t\t\t));\n\t\t\n\t\tif (we_hasPerm(\"NEW_GRAFIK\")) {\n\t\t\tarray_push(\n\t\t\t\t\t$parts, \n\t\t\t\t\tarray(\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t'headline' => $GLOBALS[\"l_import_files\"][\"metadata\"] . '', \n\t\t\t\t\t\t\t'html' => we_forms::checkboxWithHidden(\n\t\t\t\t\t\t\t\t\t$this->importMetadata == true, \n\t\t\t\t\t\t\t\t\t'importMetadata', \n\t\t\t\t\t\t\t\t\t$GLOBALS[\"l_import_files\"][\"import_metadata\"]), \n\t\t\t\t\t\t\t'space' => 120\n\t\t\t\t\t));\n\t\t\t\n\t\t\tif (we_image_edit::gd_version() > 0) {\n\t\t\t\t\n\t\t\t\tarray_push(\n\t\t\t\t\t\t$parts, \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\"headline\" => $GLOBALS[\"l_import_files\"][\"make_thumbs\"], \n\t\t\t\t\t\t\t\t\"html\" => $_thumbs, \n\t\t\t\t\t\t\t\t\"space\" => 120\n\t\t\t\t\t\t));\n\t\t\t\t\n\t\t\t\t$widthInput = htmlTextInput(\"width\", \"10\", $this->width, \"\", '', \"text\", 60);\n\t\t\t\t$heightInput = htmlTextInput(\"height\", \"10\", $this->height, \"\", '', \"text\", 60);\n\t\t\t\t\n\t\t\t\t$widthSelect = '<select size=\"1\" class=\"weSelect\" name=\"widthSelect\"><option value=\"pixel\"' . (($this->widthSelect == \"pixel\") ? ' selected=\"selected\"' : '') . '>' . $GLOBALS[\"l_we_class\"][\"pixel\"] . '</option><option value=\"percent\"' . (($this->widthSelect == \"percent\") ? ' selected=\"selected\"' : '') . '>' . $GLOBALS[\"l_we_class\"][\"percent\"] . '</option></select>';\n\t\t\t\t$heightSelect = '<select size=\"1\" class=\"weSelect\" name=\"heightSelect\"><option value=\"pixel\"' . (($this->heightSelect == \"pixel\") ? ' selected=\"selected\"' : '') . '>' . $GLOBALS[\"l_we_class\"][\"pixel\"] . '</option><option value=\"percent\"' . (($this->heightSelect == \"percent\") ? ' selected=\"selected\"' : '') . '>' . $GLOBALS[\"l_we_class\"][\"percent\"] . '</option></select>';\n\t\t\t\t\n\t\t\t\t$ratio_checkbox = we_forms::checkbox(\n\t\t\t\t\t\t\"1\", \n\t\t\t\t\t\t$this->keepRatio, \n\t\t\t\t\t\t\"keepRatio\", \n\t\t\t\t\t\t$GLOBALS[\"l_thumbnails\"][\"ratio\"]);\n\t\t\t\t\n\t\t\t\t$_resize = '<table border=\"0\" cellpadding=\"2\" cellspacing=\"0\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"defaultfont\">' . $GLOBALS[\"l_we_class\"][\"width\"] . ':</td>\n\t\t\t\t\t<td>' . $widthInput . '</td>\n\t\t\t\t\t<td>' . $widthSelect . '</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"defaultfont\">' . $GLOBALS[\"l_we_class\"][\"height\"] . ':</td>\n\t\t\t\t\t<td>' . $heightInput . '</td>\n\t\t\t\t\t<td>' . $heightSelect . '</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"3\">' . $ratio_checkbox . '</td>\n\t\t\t\t</tr>\n\t\t\t</table>';\n\t\t\t\t\n\t\t\t\tarray_push(\n\t\t\t\t\t\t$parts, \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"headline\" => $GLOBALS[\"l_we_class\"][\"resize\"], \"html\" => $_resize, \"space\" => 120\n\t\t\t\t\t\t));\n\t\t\t\t\n\t\t\t\t$_radio0 = we_forms::radiobutton(\n\t\t\t\t\t\t\"0\", \n\t\t\t\t\t\t$this->degrees == 0, \n\t\t\t\t\t\t\"degrees\", \n\t\t\t\t\t\t$GLOBALS[\"l_we_class\"][\"rotate0\"]);\n\t\t\t\t$_radio180 = we_forms::radiobutton(\n\t\t\t\t\t\t\"180\", \n\t\t\t\t\t\t$this->degrees == 180, \n\t\t\t\t\t\t\"degrees\", \n\t\t\t\t\t\t$GLOBALS[\"l_we_class\"][\"rotate180\"]);\n\t\t\t\t$_radio90l = we_forms::radiobutton(\n\t\t\t\t\t\t\"90\", \n\t\t\t\t\t\t$this->degrees == 90, \n\t\t\t\t\t\t\"degrees\", \n\t\t\t\t\t\t$GLOBALS[\"l_we_class\"][\"rotate90l\"]);\n\t\t\t\t$_radio90r = we_forms::radiobutton(\n\t\t\t\t\t\t\"270\", \n\t\t\t\t\t\t$this->degrees == 270, \n\t\t\t\t\t\t\"degrees\", \n\t\t\t\t\t\t$GLOBALS[\"l_we_class\"][\"rotate90r\"]);\n\t\t\t\t\n\t\t\t\tarray_push(\n\t\t\t\t\t\t$parts, \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\"headline\" => $GLOBALS[\"l_we_class\"][\"rotate\"], \n\t\t\t\t\t\t\t\t\"html\" => $_radio0 . $_radio180 . $_radio90l . $_radio90r, \n\t\t\t\t\t\t\t\t\"space\" => 120\n\t\t\t\t\t\t));\n\t\t\t\t\n\t\t\t\tarray_push(\n\t\t\t\t\t\t$parts, \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\"headline\" => $GLOBALS[\"l_we_class\"][\"quality\"], \n\t\t\t\t\t\t\t\t\"html\" => we_qualitySelect(\"quality\", $this->quality), \n\t\t\t\t\t\t\t\t\"space\" => 120\n\t\t\t\t\t\t));\n\t\t\t} else {\n\t\t\t\tarray_push(\n\t\t\t\t\t\t$parts, \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\"headline\" => \"\", \n\t\t\t\t\t\t\t\t\"html\" => htmlAlertAttentionBox(\n\t\t\t\t\t\t\t\t\t\t$GLOBALS[\"l_import_files\"][\"add_description_nogdlib\"], \n\t\t\t\t\t\t\t\t\t\t2, \n\t\t\t\t\t\t\t\t\t\t\"\"), \n\t\t\t\t\t\t\t\t\"space\" => 0\n\t\t\t\t\t\t));\n\t\t\t}\n\t\t\t$foldAT = 4;\n\t\t} else {\n\t\t\t$foldAT = -1;\n\t\t}\n\t\t\n\t\t$wepos = weGetCookieVariable(\"but_wesiteimport\");\n\t\t$content = we_multiIconBox::getJS();\n\t\t$content .= we_multiIconBox::getHTML(\n\t\t\t\t\"wesiteimport\", \n\t\t\t\t\"100%\", \n\t\t\t\t$parts, \n\t\t\t\t30, \n\t\t\t\t\"\", \n\t\t\t\t$foldAT, \n\t\t\t\t$GLOBALS[\"l_import_files\"][\"image_options_open\"], \n\t\t\t\t$GLOBALS[\"l_import_files\"][\"image_options_close\"], \n\t\t\t\t($wepos == \"down\"), \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"siteimport\"]) . $this->_getHiddensHTML();\n\t\t\n\t\t$content = we_htmlElement::htmlForm(\n\t\t\t\tarray(\n\t\t\t\t\t\n\t\t\t\t\t\t\"action\" => WEBEDITION_DIR . \"we_cmd.php\", \n\t\t\t\t\t\t\"name\" => \"we_form\", \n\t\t\t\t\t\t\"method\" => \"post\", \n\t\t\t\t\t\t\"target\" => \"siteimportcmd\"\n\t\t\t\t), \n\t\t\t\t$content);\n\t\t\n\t\t$body = we_htmlElement::htmlBody(array(\n\t\t\t\"class\" => \"weDialogBody\", \"onunload\" => \"doUnload();\"\n\t\t), $content);\n\t\t\n\t\t$js = $this->_getJS();\n\t\t\n\t\treturn $this->_getHtmlPage($body, $js);\n\t}", "public function getContent()\n {\n $postProcessConfigResult = null;\n if (((bool)Tools::isSubmit('submitSatispayModuleConfig')) == true) {\n $postProcessConfigResult = $this->postProcessConfig();\n }\n\n $postProcessRefundResult = null;\n if (((bool)Tools::isSubmit('submitSatispayModuleRefund')) == true) {\n $postProcessRefundResult = $this->postProcessRefund();\n }\n\n return $this->renderForm($postProcessConfigResult, $postProcessRefundResult);\n }", "private function getForm() {\n if ($this->get_request_method() != \"POST\") {\n $error = array('status_code' => \"0\", 'message' => \"wrong method\", 'response_code' => \"406\");\n $this->response($this->json($error), 406);\n }\n if (!isset($_SESSION)) {\n session_start();\n }\n $FormID = $_POST['FormID'];\n $sql = mysql_query(\"SELECT * FROM SCP_FormBuilder WHERE FormID='$FormID'\", $this->db);\n $row = mysql_fetch_array($sql, MYSQL_ASSOC);\n if($row) {\n $status = \"success\";\n } else {\n $status = \"fail\";\n }\n $error = array('status_code' => \"1\", 'status' => $status, 'message' => \"Form Get Successfully\", 'response_code' => \"200\", 'response_data' => $row[\"FormDataJson\"]);\n $this->response($this->json($error), 200);\n }", "public function get_output_html() {\n\t\treturn $this->client->getHtmlFields();\n\t}", "function parse() {\n \n\t if ($this -> XMLForm -> isPosted()) { \n $this -> doPost();\n }\n $this -> doGet();\n \n return $this -> drawPage();\n \n }", "public /*String*/ function getContent() { ?>\n\t\t<div data-role=\"content\" id=\"content\" style=\"padding: 10px;\" data-theme=\"c\">\n\t\t\t<form action=\"#ResultView\" method=\"post\" name=\"<?= APPLICATION_NAME ?>FindForm\" id=\"<?= APPLICATION_NAME ?>FindForm\" enctype=\"multipart/form-data\">\n\t\t\t\t<!-- Define the method to call -->\n\t\t\t\t<input type=\"hidden\" name=\"application\" value=\"<?= APPLICATION_NAME ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"method\" value=\"find\" />\n<<<<<<< HEAD\n\t\t\t\t<input type=\"hidden\" name=\"numberOfOntology\" value=\"3\" />\n\t\t\t\t<br />\n\t\t\t\t<br />\n\t\t\t\t<ul data-role=\"listview\" data-theme=\"c\" data-divider-theme=\"b\" >\n\t\t\t\t<!-- Area -->\n\t\t\t\t<li data-role=\"list-divider\" data-theme='b'><?= $_SESSION['dictionary'][LG][\"ontology1\"] ?></li>\n\t\t\t\t<br />\n\t\t\t\t<select name=\"Area\">\n\t\t\t\t\t<option value=></option>\n=======\n\t\t\t\t<input type=\"hidden\" name=\"numberOfOntology\" value=\"4\" />\n\t\t\t\t\n\t\t\t\t<!-- Area -->\n\t\t\t\t<select name=\"Area\">\n\t\t\t\t\t<option value=\"\"><?= $_SESSION['dictionary'][LG][\"ontology1\"] ?></option>\n>>>>>>> 47afa5c5725a71eb2e2fbaac0726ec72919c747c\n\t\t\t\t\t<option value=\"Aerospaziale\"><?= $_SESSION['dictionary'][LG][\"Area\"][0] ?></option>\n\t\t\t\t\t<option value=\"Ambientale\"><?= $_SESSION['dictionary'][LG][\"Area\"][1] ?></option>\n\t\t\t\t\t<option value=\"Autoveicolo\"><?= $_SESSION['dictionary'][LG][\"Area\"][2] ?></option>\n\t\t\t\t\t<option value=\"Biomeccania\"><?= $_SESSION['dictionary'][LG][\"Area\"][3] ?></option>\n\t\t\t\t\t<option value=\"Cinema\"><?= $_SESSION['dictionary'][LG][\"Area\"][4] ?></option>\n\t\t\t\t\t<option value=\"Civile\"><?= $_SESSION['dictionary'][LG][\"Area\"][5] ?></option>\n\t\t\t\t\t<option value=\"Elettrica\"><?= $_SESSION['dictionary'][LG][\"Area\"][6] ?></option>\n\t\t\t\t\t<option value=\"Elettronica\"><?= $_SESSION['dictionary'][LG][\"Area\"][7] ?></option>\n\t\t\t\t\t<option value=\"Energetica\"><?= $_SESSION['dictionary'][LG][\"Area\"][8] ?></option>\n\t\t\t\t\t<option value=\"Fisica\"><?= $_SESSION['dictionary'][LG][\"Area\"][9] ?></option>\n\t\t\t\t\t<option value=\"Gestionale\"><?= $_SESSION['dictionary'][LG][\"Area\"][10] ?></option>\n\t\t\t\t\t<option value=\"Informatica\"><?= $_SESSION['dictionary'][LG][\"Area\"][11] ?></option>\n\t\t\t\t\t<option value=\"Matematica\"><?= $_SESSION['dictionary'][LG][\"Area\"][12] ?></option>\n\t\t\t\t\t<option value=\"Materiali\"><?= $_SESSION['dictionary'][LG][\"Area\"][13] ?></option>\n\t\t\t\t\t<option value=\"Meccanica\"><?= $_SESSION['dictionary'][LG][\"Area\"][14] ?></option>\n\t\t\t\t\t<option value=\"Telecomunicazioni\"><?= $_SESSION['dictionary'][LG][\"Area\"][15] ?></option>\n\t\t\t\t</select>\n\t\t\t\t<?php $dataBean = new MDataBean(\"Area\", null, KEYWORD); ?>\n\t\t\t\t<input type=\"hidden\" name=\"ontology1\" value=\"<?= urlencode(json_encode($dataBean)); ?>\">\n<<<<<<< HEAD\n\t\t\t\t<br />\n\t\t\t\t<li data-role=\"list-divider\" data-theme='b'><?= $_SESSION['dictionary'][LG][\"ontology2\"] ?></li>\n\t\t\t\t<br />\n\t\t\t\t<!-- Categoria -->\n\t\t\t\t<select name=\"Categoria\">\n\t\t\t\t\t<option value=></option>\n=======\n\t\t\t\t\n\t\t\t\t<!-- Categoria -->\n\t\t\t\t<select name=\"Categoria\">\n\t\t\t\t\t<option value=\"\"><?= $_SESSION['dictionary'][LG][\"ontology2\"] ?></option>\n>>>>>>> 47afa5c5725a71eb2e2fbaac0726ec72919c747c\n\t\t\t\t\t<option value=\"Stage\"><?= $_SESSION['dictionary'][LG][\"Categoria\"][0] ?></option>\n\t\t\t\t\t<option value=\"Job\"><?= $_SESSION['dictionary'][LG][\"Categoria\"][1] ?></option>\n\t\t\t\t\t<option value=\"Tesi\"><?= $_SESSION['dictionary'][LG][\"Categoria\"][2] ?></option>\n\t\t\t\t\t<option value=\"Appunti\"><?= $_SESSION['dictionary'][LG][\"Categoria\"][3] ?></option>\n\t\t\t\t</select>\n\t\t\t\t<?php $dataBean = new MDataBean(\"Categoria\", null, KEYWORD); ?>\n\t\t\t\t<input type=\"hidden\" name=\"ontology2\" value=\"<?= urlencode(json_encode($dataBean)); ?>\">\n<<<<<<< HEAD\n\t\t\t\t<br />\n\t\t\t\t</ul>\n\t\t\t\t<br />\n\t\t\n\t\t\t\t<div data-role=\"collapsible\" data-theme='a'>\n\t\t\t\t\t <h3><?= $_SESSION['dictionary'][LG][\"ontology0\"] ?></h3>\n\t\t\t\t\t<!-- Titolo -->\n\t\t\t\t\t<input type=\"hidden\" name=\"ontology0\" value=\"\">\n=======\n\t\t\t\t\n\t\t\t\t<div data-role=\"collapsible\">\n\t\t\t\t\t <h3><?= $_SESSION['dictionary'][LG][\"ontology0\"] ?></h3>\n\t\t\t\t\t<!-- Titolo -->\n>>>>>>> 47afa5c5725a71eb2e2fbaac0726ec72919c747c\n\t\t\t\t\t<input type=\"search\" name=\"data\" value=\"\" />\n\t\t\t\t\t<?php $dataBean = new MDataBean(\"data\", null, KEYWORD); ?>\n\t\t\t\t\t<input type=\"hidden\" name=\"ontology0\" value=\"<?= urlencode(json_encode($dataBean)); ?>\">\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<center><a href=\"#\" data-role=\"button\" onclick=\"document.<?= APPLICATION_NAME ?>FindForm.submit()\" data-inline=\"true\" data-icon=\"search\"><?= $_SESSION['dictionary'][LG][\"view2\"] ?></a></center>\n\t\t\t</form>\n\t\t</div>\n\t<?php }", "function get_contents(){\n return $this->input_content;\n }", "private function getHtmlRequest() {\r\n\t\t\t$tpl = new Template('svdrp_request');\r\n\t\t\treturn $tpl->get();\r\n\t\t}", "function form_content()\r\n {\r\n $table = html_table($this->_width,0,4) ;\r\n $table->set_style(\"border: 0px solid\") ;\r\n\r\n $msg = html_div(\"ft_form_msg\") ;\r\n $msg->add(html_p(html_b(\"Processing the SDIF Queue requires\r\n processing swimmers, swim meets, and/or swim teams which are\r\n not currently stored in the database. Specify how unknown\r\n data should be processed.\"), html_br())) ;\r\n\r\n $td = html_td(null, null, $msg) ;\r\n $td->set_tag_attribute(\"colspan\", \"2\") ;\r\n $table->add_row($td) ;\r\n $table->add_row($this->element_label(\"Swimmers\"), $this->element_form(\"Swimmers\")) ;\r\n $table->add_row($this->element_label(\"Swim Meets\"), $this->element_form(\"Swim Meets\")) ;\r\n $table->add_row($this->element_label(\"Swim Teams\"), $this->element_form(\"Swim Teams\")) ;\r\n\r\n $this->add_form_block(null, $table) ;\r\n }", "public function retrieveFormFields()\n {\n return $this->start()->uri(\"/api/form/field\")\n ->get()\n ->go();\n }", "protected function html()\r\n\t{\r\n\r\n\t\t$data = $this->form;\r\n\t\t$f = $data['form'];\r\n\r\n\t\tif($f == 'select'){\r\n\t\t\t$this->selectLink();\r\n\t\t}\r\n\r\n\t\tif($f == 'file'){\r\n\t\t\t$this->fileLink();\r\n\t\t}\r\n\r\n\t\tif($f == 'textarea'){\r\n\t\t\t$this->success = $this->textarea();\r\n\t\t}\r\n\r\n\t\tif($f == 'radio' || $f=='checkbox'){\r\n\t\t\t$this->chooseLink();\r\n\t\t}\r\n\t\tif($f == 'hidden'|| $f =='password'|| $f =='text'|| $f =='number'|| $f =='date'){\r\n\t\t\t$this->oneLink();\r\n\t\t}\r\n\t\tif($f == 'editor'){\r\n\t\t\t$this->oneLink();\r\n\t\t}\r\n\t\tif(strpos($f,'extend')!==false){\r\n\t\t\t$this->oneLink();\r\n\t\t}\r\n\t\tif($this->continue){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$this->replace();\r\n\t}", "public function getForm()\n {\n $editing = (!empty($this->id) && $this->id > 0) ? true : false;\n\n $path = ($editing) ? $this->getEditPath() : $this->getAddPath(); \n\n $Captcha = new MathCaptcha();\n\n $twig = new \\Twig_Environment(new \\Twig_Loader_Filesystem(TEMPLATES_DIR));\n \n $body = $twig->render(\n 'plain_comment_form.twig.html',\n array(\n 'path' => $path,\n 'editing' => $editing,\n 'id' => $this->id,\n 'group' => $this->group,\n 'nick' => $this->nick,\n 'email' => $this->email,\n 'webpage' => $this->www,\n 'content' => $this->content,\n 'operation' => $Captcha->getOperation(),\n 'result' => $Captcha->getResult(),\n 'return_link' => $_SESSION['return']\n ));\n\n return $body;\n }", "function finishForm(& $agent) \n {\n $form = str_replace('{value}', $agent->query, $this->_inputTemplate);\n $form = str_replace('{name}', $this->_http_parameters['query'], $form);\n $form = str_replace('{namegroup}', $this->_http_parameters['group'], $form).'<br>';\n $form .= \"\\n\\tResults per page: \".$this->_getSelect(\n $this->_http_parameters['pagesize'],\n array('10' => '10', '20' => '20', '50' => '50')).'<br>';\n $form .= \"\\n\\tMatch: \".$this->_getSelect(\n $this->_http_parameters['mode'],\n array('All' => 'all', 'Any' => 'any', 'Boolean' => 'bool')).'<br>';\n $form .= \"\\n\\tSearch for: \".$this->_getSelect(\n $this->_http_parameters['wordmatch'],\n array(\n 'Whole word' => 'wrd',\n 'Beginning' => 'beg',\n 'Ending' => 'end',\n 'Substring' => 'sub'\n )).'<br>';\n $form .= \"\\n\\tSearch through: \".$this->_getSelect(\n $this->_http_parameters['type'],\n array(\n 'All types' => '',\n 'text/html' => 'text/html',\n 'text/plain' => 'text/plain'\n )).'<br>';\n $form .= \"\\n\\tSort by: \".$this->_getSelect(\n $this->_http_parameters['sortorder'],\n array('Relevancy' => 'RPD', 'Last Modified Date' => 'DRP')).'<br>';\n $form .= \"\\n\\tSearch in: \".$this->_getSelect(\n $this->_http_parameters['weightfactor'],\n array(\n 'all sections' => '2221',\n 'Description' => '2000',\n 'Keywords' => '0200',\n 'Title' => '0020',\n 'Body' => '0001'\n )).'<br>';\n \n $this->_form = str_replace('{content}', $form, $this->_formTemplate); \n $this->_html = $this->_form.\"\\n<hr>\".$this->_html;\n }", "function renderWholeForm() {\n\t\t$output = $this->renderCurrentStep();\n\t\t$output .= $this->renderSubmitButtons();\n\n\t\treturn $this->wrapWithForm ($output);\n\t}", "public abstract function get_html();", "public function getContent($form_id='contact-form') {\t \n\t $now = time();\n\t $token = \\Library\\Helper\\Utils::generateToken($this->Site, $now);\n\t $guid = $this->Site->guid;\n\n $html =<<<HTML\n <form class=\"contact-form-simple\" name=\"contact-form\" action=\"\" method=\"POST\" sid=\"{$token}\">\n <input type=\"hidden\" readOnly=\"readOnly\" name=\"timestamp\" value=\"{$now}\" />\n <input type=\"hidden\" readOnly=\"readOnly\" name=\"guid\" value=\"{$guid}\" />\n <!--Grid row-->\n <div class=\"row\">\n <!--Grid column-->\n <div class=\"col-md-12\">\n <div class=\"md-form\">\n <input type=\"text\" id=\"name\" name=\"name\" class=\"form-control\" placeholder=\"Your name\" />\n </div>\n </div>\n <!--Grid column-->\n\n <!--Grid column-->\n <div class=\"col-md-12\">\n <div class=\"md-form\">\n <input type=\"email\" id=\"email\" name=\"email\" class=\"form-control\" placeholder=\"Your email address\" />\n </div>\n </div>\n <!--Grid column-->\n </div>\n <!--Grid row-->\n\n <!--Grid row-->\n <div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"md-form\">\n <input type=\"text\" id=\"subject\" name=\"subject\" class=\"form-control\" placeholder=\"Subject\" />\n </div>\n </div>\n </div>\n <!--Grid row-->\n\n <!--Grid row-->\n <div class=\"row\">\n\n <!--Grid column-->\n <div class=\"col-md-12\">\n\n <div class=\"md-form\">\n <textarea type=\"text\" id=\"message\" name=\"message\" rows=\"2\" class=\"form-control md-textarea\"></textarea>\n </div>\n\n </div>\n </div>\n <!--Grid row-->\n <div>\n <a href=\"javascript:void(0);\" class=\"btn btn-primary contact-form-simple-widget\">Send</a>\n </div>\n\n </form>\nHTML;\n return $html;\n\t}", "public function getForm() {\n return $this->form;\n }", "public function getHTML()\n\t{\n\t\t$start = '\n\t\t\t<form';\n\t\t$start .= ( $this->id ) ? ' id=\"' . $this->id . '\"' : '';\n $start .= ' class=\"group\"';\n $start .= ' action=\"' . $this->action . '\"';\n\t\t$start .= ' method=\"' . $this->method . '\"';\n\t\t$start .= ( $this->enctype ) ? ' enctype=\"multipart/form-data\"' : '';\n\t\t$start .= \">\\n\";\n\t\t\n\t\t$end = \"</form>\\n\";\n\t\t\n\t\t$content = '';\n\t\tforeach ( $this->elements as $element ) {\n\t\t\t$content .= $element->getHtml();\n\t\t}\n\t\t\n\t\treturn $start . $content . $end;\n\t}", "public function getHTML();", "function getForm() {\n return $this->form;\n }", "function show_form()\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\n\t\t$raw_post = \"\";\n\t\t\n\t\t//-----------------------------------------\n\t\t// Unconvert the saved post if required\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( ! isset($_POST['Post']) )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// If we're using RTE, then just clean up html\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tif ( $this->han_editor->method == 'rte' )\n\t\t\t{\n\t\t\t\t$raw_post = $this->parser->convert_ipb_html_to_html( $this->orig_post['post'] );\n\n\t\t\t\tif( intval($this->orig_post['post_htmlstate']) AND $this->forum['use_html'] AND $this->ipsclass->member['g_dohtml'] )\n\t\t\t\t{\n\t\t\t\t\t# Make EMO_DIR safe so the ^> regex works\n\t\t\t\t\t$raw_post = str_replace( \"<#EMO_DIR#>\", \"&lt;#EMO_DIR&gt;\", $raw_post );\n\t\t\t\t\t\n\t\t\t\t\t# New emo\n\t\t\t\t\t$raw_post = preg_replace( \"#(\\s)?<([^>]+?)emoid=\\\"(.+?)\\\"([^>]*?)\".\">(\\s)?#is\", \"\\\\1\\\\3\\\\5\", $raw_post );\n\t\t\t\t\t\n\t\t\t\t\t# And convert it back again...\n\t\t\t\t\t$raw_post = str_replace( \"&lt;#EMO_DIR&gt;\", \"<#EMO_DIR#>\", $raw_post );\n\n\t\t\t\t\t$raw_post = $this->parser->convert_std_to_rte( $raw_post );\n\t\t\t\t}\n\n\t\t\t\tif( isset($this->orig_post['post_htmlstate']) AND $this->orig_post['post_htmlstate'] == 2 )\n\t\t\t\t{\n\t\t\t\t\t$raw_post = str_replace( '&lt;br&gt;', \"<br />\", $raw_post );\n\t\t\t\t\t$raw_post = str_replace( '&lt;br /&gt;', \"<br />\", $raw_post );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->orig_post['post_htmlstate'] = isset($this->orig_post['post_htmlstate']) ? $this->orig_post['post_htmlstate'] : 0;\n\t\t\t\t$this->parser->parse_html = intval($this->orig_post['post_htmlstate']) AND $this->forum['use_html'] AND $this->ipsclass->member['g_dohtml'] ? 1 : 0;\n\t\t\t\t$this->parser->parse_nl2br = (isset($this->orig_post['post_htmlstate']) AND $this->orig_post['post_htmlstate'] == 2) ? 1 : 0;\n\t\t\t\t$this->parser->parse_smilies = intval($this->orig_post['use_emo']);\n\t\t\t\t$this->parser->parse_bbcode = $this->forum['use_ibc'];\n\n\t\t\t\tif( $this->parser->parse_html )\n\t\t\t\t{\n\t\t\t\t\t# Make EMO_DIR safe so the ^> regex works\n\t\t\t\t\t$this->orig_post['post'] = str_replace( \"<#EMO_DIR#>\", \"&lt;#EMO_DIR&gt;\", $this->orig_post['post'] );\n\t\t\t\t\t\n\t\t\t\t\t# New emo\n\t\t\t\t\t$this->orig_post['post'] = preg_replace( \"#(\\s)?<([^>]+?)emoid=\\\"(.+?)\\\"([^>]*?)\".\">(\\s)?#is\", \"\\\\1\\\\3\\\\5\", $this->orig_post['post'] );\n\t\t\t\t\t\n\t\t\t\t\t# And convert it back again...\n\t\t\t\t\t$this->orig_post['post'] = str_replace( \"&lt;#EMO_DIR&gt;\", \"<#EMO_DIR#>\", $this->orig_post['post'] );\n\t\t\t\t\n\t\t\t\t\t$this->orig_post['post'] = $this->parser->convert_ipb_html_to_html( $this->orig_post['post'] );\n\t\t\t\t\t\n\t\t\t\t\t$this->orig_post['post'] = htmlspecialchars( $this->orig_post['post'] );\n\t\t\t\t\t\n\t\t\t\t\tif( $this->parser->parse_nl2br )\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->orig_post['post'] = str_replace( '&lt;br&gt;', \"\\n\", $this->orig_post['post'] );\n\t\t\t\t\t\t$this->orig_post['post'] = str_replace( '&lt;br /&gt;', \"\\n\", $this->orig_post['post'] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$raw_post = $this->parser->pre_edit_parse( $this->orig_post['post'] );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ( $this->han_editor->method != 'rte' )\n\t\t\t{\n\t\t\t\t$_POST['Post'] = str_replace( '&', '&amp;', $_POST['Post'] );\n\t\t\t}\n\n\t\t\tif ( $this->ipsclass->input['_from'] == 'quickedit' )\n\t\t\t{\n\t\t\t\t$this->orig_post['post_htmlstatus'] = isset($this->orig_post['post_htmlstatus']) ? $this->orig_post['post_htmlstatus'] : 0;\n\t\t\t\t$this->parser->parse_html = intval($this->orig_post['post_htmlstatus']) AND $this->forum['use_html'] AND $this->ipsclass->member['g_dohtml'] ? 1 : 0;\n\t\t\t\t$this->parser->parse_nl2br = (isset($this->ipsclass->input['post_htmlstatus']) AND $this->ipsclass->input['post_htmlstatus'] == 2) ? 1 : 0;\n\t\t\t\t$this->parser->parse_smilies = intval($this->orig_post['use_emo']);\n\t\t\t\t$this->parser->parse_bbcode = $this->forum['use_ibc'];\n\n\t\t\t\tif ( $this->han_editor->method == 'rte' )\n\t\t\t\t{\n\t\t\t\t\t$raw_post = $this->parser->convert_std_to_rte( $this->ipsclass->txt_stripslashes( $_POST['Post'] ) );\n\t\t\t\t\t\n\t\t\t\t\tforeach( $this->ipsclass->skin['_macros'] as $row )\n\t\t\t \t{\n\t\t\t\t\t\tif ( $row['macro_value'] != \"\" )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$raw_post = str_replace( \"<{\".$row['macro_value'].\"}>\", $row['macro_replace'], $raw_post );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$raw_post = str_replace( \"<#IMG_DIR#>\", $this->ipsclass->skin['_imagedir'], $raw_post );\n\t\t\t\t\t$raw_post = str_replace( \"<#EMO_DIR#>\", $this->ipsclass->skin['_emodir'] , $raw_post );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$raw_post = $this->ipsclass->txt_stripslashes( $_POST['Post'] );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$raw_post = $this->ipsclass->txt_stripslashes( $_POST['Post'] );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Is this the first post in the topic?\n\t\t//-----------------------------------------\n\t\t\n\t\t$topic_title = \"\";\n\t\t$topic_desc = \"\";\n\t\t\n\t\tif ( $this->edit_title == 1 )\n\t\t{\n\t\t\t$topic_title = isset($_POST['TopicTitle']) ? $this->ipsclass->input['TopicTitle'] : $this->topic['title'];\n\t\t\t$topic_desc = isset($_POST['TopicDesc']) ? $this->ipsclass->input['TopicDesc'] : $this->topic['description'];\n\t\t\t\n\t\t\t$topic_title = $this->ipsclass->compiled_templates['skin_post']->topictitle_fields( array( 'TITLE' => $topic_title, 'DESC' => $topic_desc ) );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Do we have any posting errors?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( isset($this->obj['post_errors']) AND $this->obj['post_errors'] )\n\t\t{\n\t\t\t$this->output .= $this->ipsclass->compiled_templates['skin_post']->errors( $this->ipsclass->lang[ $this->obj['post_errors'] ]);\n\t\t}\n\t\t\n\t\tif ( isset($this->obj['preview_post']) AND $this->obj['preview_post'] )\n\t\t{\n\t\t\t$this->output .= $this->ipsclass->compiled_templates['skin_post']->preview( $this->show_post_preview( $this->post['post'], $this->post_key ) );\n\t\t}\n\t\t\n\t\t$this->output .= $this->html_start_form( array( 1 => array( 'CODE' , '09' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t2 => array( 't' , $this->topic['tid']),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t3 => array( 'p' , $this->ipsclass->input['p'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t4 => array( 'st' , $this->ipsclass->input['st'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t5 => array( 'attach_post_key', $this->post_key )\n\t\t\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//-----------------------------------------\n\t\t// START TABLE\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->output .= $this->ipsclass->compiled_templates['skin_post']->table_structure();\n\t\t\n\t\t$start_table = $this->ipsclass->compiled_templates['skin_post']->table_top( \"{$this->ipsclass->lang['top_txt_edit']} {$this->topic['title']}\");\n\t\t\n\t\t$name_fields = $this->html_name_field();\n\t\t\n\t\t$post_box = $this->html_post_body( $raw_post );\n\t\t\t\n\t\t$mod_options = $this->edit_title == 1 ? $this->mod_options('edit') : '';\n\t\t\n\t\t$end_form = $this->ipsclass->compiled_templates['skin_post']->EndForm( $this->ipsclass->lang['submit_edit'] );\n\t\t\n\t\t$post_icons = $this->html_post_icons($this->orig_post['icon_id']);\n\t\t\n\t\t$upload_field = $this->can_upload ? $this->html_build_uploads($this->post_key,'edit',$this->orig_post['pid']) : '';\n\t\t\n\t\t//-----------------------------------------\n\t\t// Still here?\n\t\t//-----------------------------------------\n\t\t\n\t\t$poll_box = \"\";\n\t\t\n\t\tif ( $this->can_add_poll )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Did someone hit preview / do we have\n\t\t\t// post info?\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$poll_questions = \"\";\n\t\t\t$poll_choices = \"\";\n\t\t\t$poll_votes = \"\";\n\t\t\t$show_open = 0;\n\t\t\t$is_mod = 0;\n\t\t\t$poll_only\t\t= \"\";\n\t\t\t$poll_multi\t\t= \"\";\t\t\t\n\t\t\t\n\t\t\tif ( isset($_POST['question']) AND is_array( $_POST['question'] ) and count( $_POST['question'] ) )\n\t\t\t{\n\t\t\t\tforeach( $_POST['question'] as $id => $question )\n\t\t\t\t{\n\t\t\t\t\t$poll_questions .= \"\\t{$id} : '\".str_replace( \"'\", '&#39;', $question ).\"',\\n\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$poll_question = $this->ipsclass->input['poll_question'];\n\t\t\t\t$show_open = 1;\n\t\t\t\t\n\t\t\t\tif ( is_array( $_POST['choice'] ) and count( $_POST['choice'] ) )\n\t\t\t\t{\n\t\t\t\t\tforeach( $_POST['choice'] as $id => $choice )\n\t\t\t\t\t{\n\t\t\t\t\t\t$poll_choices .= \"\\t'{$id}' : '\".str_replace( \"'\", '&#39;', $choice ).\"',\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( isset($_POST['multi']) AND is_array( $_POST['multi'] ) and count( $_POST['multi'] ) )\n\t\t\t\t{\n\t\t\t\t\tforeach( $_POST['multi'] as $id => $checked )\n\t\t\t\t\t{\n\t\t\t\t\t\t$poll_multi .= \"\\t{$id} : '{$checked}',\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( is_array( $_POST['votes'] ) and count( $_POST['votes'] ) )\n\t\t\t\t{\n\t\t\t\t\tforeach( $_POST['votes'] as $id => $vote )\n\t\t\t\t\t{\n\t\t\t\t\t\t$poll_votes .= \"\\t'{$id}' : '\".$vote.\"',\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$poll_only = 0;\n\t\t\t\t\n\t\t\t\tif( $this->ipsclass->vars['ipb_poll_only'] AND $this->ipsclass->input['poll_only'] == 1 )\n\t\t\t\t{\n\t\t\t\t\t$poll_only = \"checked='checked'\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$poll_questions = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_questions );\n\t\t\t\t$poll_choices = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_choices );\n\t\t\t\t$poll_multi \t= preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_multi );\n\t\t\t\t$poll_votes = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_votes );\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Load the poll from the DB\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'polls', 'where' => \"tid=\".$this->topic['tid'] ) );\n\t\t\t\t$this->ipsclass->DB->simple_exec();\n\t\t\n\t \t\t$this->poll_data = $this->ipsclass->DB->fetch_row();\n\t \t\t\n\t \t\t$this->poll_answers = $this->poll_data['choices'] ? unserialize(stripslashes($this->poll_data['choices'])) : array();\n\n \t\t//-----------------------------------------\n \t\t// Lezz go\n \t\t//-----------------------------------------\n \t\t\n \t\tforeach( $this->poll_answers as $question_id => $data )\n \t\t{\n \t\t\t$poll_questions .= \"\\t{$question_id} : '\".str_replace( \"'\", '&#39;', $data['question'] ).\"',\\n\";\n \t\t\t\n \t\t\t$data['multi']\t = isset($data['multi']) ? intval($data['multi']) : 0;\n \t\t\t$poll_multi \t.= \"\\t{$question_id} : '\".$data['multi'].\"',\\n\";\n \t\t\t\n \t\t\tforeach( $data['choice'] as $choice_id => $text )\n\t\t\t\t\t{\n\t\t\t\t\t\t$choice = $text;\n\t\t\t\t\t\t$votes = intval($data['votes'][ $choice_id ]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$poll_choices .= \"\\t'{$question_id}_{$choice_id}' : '\".str_replace( \"'\", '&#39;', $choice ).\"',\\n\";\n\t\t\t\t\t\t$poll_votes .= \"\\t'{$question_id}_{$choice_id}' : '\".$votes.\"',\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$poll_only = 0;\n\t\t\t\t\n\t\t\t\tif ( $this->ipsclass->vars['ipb_poll_only'] AND $this->poll_data['poll_only'] == 1 )\n\t\t\t\t{\n\t\t\t\t\t$poll_only = \"checked='checked'\";\n\t\t\t\t}\t\t\t\t\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Trim off trailing commas (Safari hates it)\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$poll_questions = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_questions );\n\t\t\t\t$poll_choices = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_choices );\n\t\t\t\t$poll_multi \t= preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_multi );\n\t\t\t\t$poll_votes = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_votes );\n\t\t\t\t\n\t\t\t\t$poll_question = $this->poll_data['poll_question'];\n\t\t\t\t$show_open = $this->poll_data['choices'] ? 1 : 0;\n\t\t\t\t$is_mod = $this->can_add_poll_mod;\n\t\t\t}\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Print poll box\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$poll_box = $this->ipsclass->compiled_templates['skin_post']->poll_box( $this->max_poll_questions, $this->max_poll_choices_per_question, $poll_questions, $poll_choices, $poll_votes, $show_open, $poll_question, $is_mod, $poll_multi, $poll_only );\n\t\t}\n\t\t\n\t\t$edit_option = \"\";\n\t\t\n\t\tif ($this->ipsclass->member['g_append_edit'])\n\t\t{\n\t\t\t$checked = \"\";\n\t\t\t$show_reason = 0;\n\t\t\t\n\t\t\tif ($this->orig_post['append_edit'])\n\t\t\t{\n\t\t\t\t$checked = \"checked\";\n\t\t\t}\n\t\t\t\n\t\t\tif ( $this->moderator['edit_post'] OR $this->ipsclass->member['g_is_supmod'] )\n\t\t\t{\n\t\t\t\t$show_reason = 1;\n\t\t\t}\n\t\t\t\n\t\t\t$edit_option = $this->ipsclass->compiled_templates['skin_post']->add_edit_box( $checked, $show_reason, $this->ipsclass->input['post_edit_reason'] ? $this->ipsclass->input['post_edit_reason'] : $this->orig_post['post_edit_reason'] );\n\t\t}\n\t\t\n\t\t$this->output = str_replace( \"<!--START TABLE-->\" , $start_table , $this->output );\n\t\t$this->output = str_replace( \"<!--NAME FIELDS-->\" , $name_fields , $this->output );\n\t\t$this->output = str_replace( \"<!--POST BOX-->\" , $post_box , $this->output );\n\t\t$this->output = str_replace( \"<!--POLL BOX-->\" , $poll_box , $this->output );\n\t\t$this->output = str_replace( \"<!--POST ICONS-->\" , $post_icons , $this->output );\n\t\t$this->output = str_replace( \"<!--END TABLE-->\" , $end_form , $this->output );\n\t\t$this->output = str_replace( \"<!--UPLOAD FIELD-->\", $upload_field , $this->output );\n\t\t$this->output = str_replace( \"<!--MOD OPTIONS-->\" , $edit_option . $mod_options , $this->output );\n\t\t$this->output = str_replace( \"<!--FORUM RULES-->\" , $this->ipsclass->print_forum_rules($this->forum), $this->output );\n\t\t$this->output = str_replace( \"<!--TOPIC TITLE-->\" , $topic_title , $this->output );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Add in siggy buttons and such\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->input['post_htmlstatus'] = $this->orig_post['post_htmlstate'];\n\t\t$this->ipsclass->input['enablesig']\t\t = $this->orig_post['use_sig'];\n\t\t$this->ipsclass->input['enableemo']\t\t = $this->orig_post['use_emo'];\n\t\t\n\t\t$this->html_checkboxes('edit', $this->topic['tid'], $this->forum['id']);\n\t\t\n\t\t$this->html_topic_summary( $this->topic['tid'] );\n\t\t\n\t\t$this->show_post_navigation();\n\t\t\t\t\t\t \n\t\t$this->title = $this->ipsclass->lang['editing_post'].' '.$this->topic['title'];\n\t\t\n\t\t$this->ipsclass->print->add_output( $this->output );\n\t\t\n $this->ipsclass->print->do_output( array( 'TITLE' => $this->ipsclass->vars['board_name'].\" -> \".$this->title,\n \t\t\t\t\t \t 'JS' => 1,\n \t\t\t\t\t \t 'NAV' => $this->nav,\n \t\t\t\t\t ) );\n\t}", "public function fetch()\n\t{\t\t\n\t\tob_start();\t\t\n\t\t$this->display();\n\t\t$content = ob_get_clean();\n\t\treturn $content;\n\t}", "public function &getForm() {\n return $this->form;\n }", "public function getForm()\n {\n return $this->form;\n }", "public function getForm()\n {\n return $this->form;\n }", "public function getFormStream()\n {\n return $this->form->getStream();\n }", "public function form(){\n\t\treturn $this->form;\n\t}", "public function testimonial_form()\n {\n /* require one simple php file that contains the form */\n /* Read but don't execute */\n ob_start ();\n /* Load the styles*/\n echo ( \"<link rel=\\\"stylesheet\\\" href=\\\"$this->plugin_url/assets/form.css\\\" type=\\\"text/css\\\" media=\\\"all\\\" /> \" );\n /* Load the contact form */\n require_once ( \"$this->plugin_path/templates/contact-form.php\");\n /* only enqueues the javascript file if I am using the form */\n echo ( \"<script src=\\\"$this->plugin_url/assets/form.js\\\"></script> \" );\n return ( ob_get_clean () );\n }", "public function the_content() {\n\n\t\tif ( ! isset( $this->form_data['id'] ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif ( ! wpforms_current_user_can( 'view_form_single', $this->form_data['id'] ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$links = [];\n\n\t\tif ( wpforms_current_user_can( 'edit_form_single', $this->form_data['id'] ) ) {\n\t\t\t$links[] = [\n\t\t\t\t'url' => esc_url(\n\t\t\t\t\tadd_query_arg(\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'page' => 'wpforms-builder',\n\t\t\t\t\t\t\t'view' => 'fields',\n\t\t\t\t\t\t\t'form_id' => absint( $this->form_data['id'] ),\n\t\t\t\t\t\t],\n\t\t\t\t \t\tadmin_url( 'admin.php' )\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'text' => esc_html__( 'Edit Form', 'wpforms-lite' ),\n\t\t\t];\n\t\t}\n\n\t\tif ( wpforms()->pro && wpforms_current_user_can( 'view_entries_form_single', $this->form_data['id'] ) ) {\n\t\t\t$links[] = [\n\t\t\t\t'url' => esc_url(\n\t\t\t\t\tadd_query_arg(\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'page' => 'wpforms-entries',\n\t\t\t\t\t\t\t'view' => 'list',\n\t\t\t\t\t\t\t'form_id' => absint( $this->form_data['id'] ),\n\t\t\t\t\t\t],\n\t\t\t\t\t\tadmin_url( 'admin.php' )\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'text' => esc_html__( 'View Entries', 'wpforms-lite' ),\n\t\t\t];\n\t\t}\n\n\t\tif ( ! empty( $_GET['new_window'] ) ) { // phpcs:ignore\n\t\t\t$links[] = [\n\t\t\t\t'url' => 'javascript:window.close();',\n\t\t\t\t'text' => esc_html__( 'Close this window', 'wpforms-lite' ),\n\t\t\t];\n\t\t}\n\n\t\t$content = '<p>';\n\t\t$content .= esc_html__( 'This is a preview of your form. This page is not publicly accessible.', 'wpforms-lite' );\n\t\tif ( ! empty( $links ) ) {\n\t\t\t$content .= '<br>';\n\t\t\tforeach ( $links as $key => $link ) {\n\t\t\t\t$content .= '<a href=\"' . $link['url'] . '\">' . $link['text'] . '</a>';\n\t\t\t\t$l = array_keys( $links );\n\t\t\t\tif ( end( $l ) !== $key ) {\n\t\t\t\t\t$content .= ' <span style=\"display:inline-block;margin:0 6px;opacity: 0.5\">|</span> ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$content .= '</p>';\n\n\t\t$content .= '<p>';\n\t\t$content .= sprintf(\n\t\t\twp_kses(\n\t\t\t\t/* translators: %s - WPForms doc link. */\n\t\t\t\t__( 'For form testing tips, check out our <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">complete guide!</a>', 'wpforms-lite' ),\n\t\t\t\t[\n\t\t\t\t\t'a' => [\n\t\t\t\t\t\t'href' => [],\n\t\t\t\t\t\t'target' => [],\n\t\t\t\t\t\t'rel' => [],\n\t\t\t\t\t],\n\t\t\t\t]\n\t\t\t),\n\t\t\t'https://wpforms.com/docs/how-to-properly-test-your-wordpress-forms-before-launching-checklist/'\n\t\t);\n\t\t$content .= '</p>';\n\n\t\t$content .= do_shortcode( '[wpforms id=\"' . absint( $this->form_data['id'] ) . '\"]' );\n\n\t\treturn $content;\n\t}", "public function getWebformSubmission() {\n return $this->submission;\n }", "abstract protected function getInputHtml();", "function getForm()\n {\n return $this->getAttribute(\"form\");\n }", "protected function getForm( $html=false ) { return $this->form_name; }", "public function getForm()\n {\n return $this->getLayout()\n ->createBlock('adminhtml/newsletter_template_edit_form')\n ->toHtml();\n }", "public function render_moodleform($form) {\n ob_start();\n $form->display();\n $output = ob_get_contents();\n ob_clean();\n return $output;\n }", "public function output() {\n $form_div = new div();\n $form_div->setId('form_' . $this->_fname);\n $form_div->setClass('form_elements');\n\n $form_div->add(implode(\"\\n\",$this->_output));\n\n if (!empty($this->_output_submit)) {\n $submitWrapper = new div();\n $submitWrapper->setId('form_submit_' .$this->_fname);\n $submitWrapper->setClass('form_submit_elements');\n $form_div->add($submitWrapper->add(implode(\"\\n\",$this->_output_submit)));\n }\n\n return $form_div->html();\n }", "public function getContent()\n {\n $output = $status = '';\n \n if (Tools::isSubmit('submit' . $this->name)) {\n $errors = $this->postValidate();\n\n if (empty($errors)) {\n $merchant_id = Tools::getValue('PRIVAT24_MERCHANT_ID');\n $merchant_password = Tools::getValue('PRIVAT24_MERCHANT_PASSWORD');\n $notify = (bool) Tools::getValue('PRIVAT24_PAYMENT_NOTIFY');\n $emails = Tools::getValue('PRIVAT24_NOTIFY_EMAILS');\n\n $backend_uri = str_replace('index.php', '', $_SERVER['PHP_SELF']);\n\n Configuration::updateValue('PRIVAT24_BACKEND_URI', $backend_uri);\n Configuration::updateValue('PRIVAT24_MERCHANT_ID', $merchant_id);\n Configuration::updateValue('PRIVAT24_MERCHANT_PASSWORD', $merchant_password);\n Configuration::updateValue('PRIVAT24_DEBUG_MODE', (bool)Tools::getValue('PRIVAT24_DEBUG_MODE'));\n Configuration::updateValue('PRIVAT24_PAYMENT_NOTIFY', $notify);\n Configuration::updateValue('PRIVAT24_NOTIFY_EMAILS', $emails);\n\n $this->merchant_id = $merchant_id;\n $this->merchant_password = $merchant_password;\n \n $status .= $this->displayConfirmation($this->l('Settings have been updated.'));\n } else {\n foreach ($errors as $error) {\n $status .= $this->displayError($error);\n }\n }\n }\n\n return $output . $status . $this->displayForm();\n }", "public function accessForm(): IFormElement;", "protected function loadHtml()\n {\n $this->html = $this->fsio->get($this->page->getTarget());\n }", "public function getForm()\n {\n return $this->_form;\n }", "public function getContent()\r\n {\r\n \r\n if (Tools::isSubmit('patch' . $this->name)) {\r\n self::checkForClass('OmnivaPatcher');\r\n\r\n $patcher = new OmnivaPatcher();\r\n $this->runPatcher($patcher);\r\n }\r\n\r\n $output = null;\r\n\r\n if (Tools::isSubmit('submit' . $this->name)) {\r\n $fields = array('omnivalt_map', 'omnivalt_api_url', 'omnivalt_api_user', 'omnivalt_api_pass', 'omnivalt_send_off', 'omnivalt_cod', 'omnivalt_print_type', 'omnivalt_bank_account', 'omnivalt_company', 'omnivalt_address', 'omnivalt_city', 'omnivalt_postcode', 'omnivalt_countrycode', 'omnivalt_phone', 'omnivalt_pick_up_time_start', 'omnivalt_pick_up_time_finish');\r\n $values = array();\r\n $all_filled = true;\r\n foreach ($fields as $field) {\r\n $values[$field] = strval(Tools::getValue($field));\r\n if ($values[$field] == '') {\r\n $all_filled = false;\r\n }\r\n }\r\n\r\n if (!$all_filled)\r\n $output .= $this->displayError($this->l('All fields required'));\r\n else {\r\n foreach ($values as $key => $val)\r\n Configuration::updateValue($key, $val);\r\n $output .= $this->displayConfirmation($this->l('Settings updated'));\r\n }\r\n }\r\n return $output . $this->displayForm();\r\n }", "protected function _readFormFields() {}", "function printForm(){\n\n\t\tif( $this->returnOutput ){\n\n\t\t\tob_start();\n\t\t\techo $this->openForm();\n\t\t\tfor ($n=0; $n < $this->columns; $n++) $this->_outputField($n);\n\t\t\techo $this->closeForm();\n\t\t\t$html_block = ob_get_contents();\n\t\t\tob_end_clean();\n\t\t\treturn $html_block;\n\n\t\t} else {\n\n\t\t\t$this->openForm();\n\t\t\tfor ($n=0; $n < $this->columns; $n++) $this->_outputField($n);\n\t\t\t$this->closeForm();\n\n\t\t}\n\n\t}", "protected function fetchFormNode()\n {\n $list = $this->document->xpath('//form');\n\n if (0 == count($list)) {\n throw new \\InvalidArgumentException(\"Form element not found in passed HTML\");\n }\n\n if (1 < count($list)) {\n throw new \\InvalidArgumentException(\"More than one form found in passed HTML\");\n }\n\n return new HtmlNode($list[0], $this->document->getDocument());\n }", "public function get_data()\n {\n return $this->form_data;\n }", "function executeGet($input_form) {\n\t\treturn $this->executePost($input_form);\n\t}", "abstract function get_html();", "public function getContent()\n {\n $output = '';\n if (Tools::isSubmit('submit' . $this->name)) {\n $payviaepul_username = strval(Tools::getValue('EPUL_USERNAME'));\n $payviaepul_password = strval(Tools::getValue('EPUL_PASSWORD'));\n\n $err = !$payviaepul_username || empty($payviaepul_username) || !Validate::isGenericName($payviaepul_username) ||\n !$payviaepul_password || empty($payviaepul_password) || !Validate::isGenericName($payviaepul_password);\n\n if ($err) {\n $output .= $this->displayError($this->l('Invalid Configuration value'));\n } else {\n Configuration::updateValue('EPUL_USERNAME', $payviaepul_username);\n Configuration::updateValue('EPUL_PASSWORD', $payviaepul_password);\n $output .= $this->displayConfirmation($this->l('Settings updated'));\n }\n }\n return $output . $this->displayForm();\n }", "public function content()\n {\n return file_get_contents(\"php://input\");\n }", "public function renderForm() {\n $enctype = $this->_enctype ? \"enctype=\\\"multipart/form-data\\\"\" : \"\";\n $formAttributes = $this->_renderAttributes($this->_formAttributes);\n $html = \"<form action=\\\"{$this->getAction()}\\\" method=\\\"{$this->_method}\\\" {$enctype} $formAttributes>\";\n $currentFieldset = NULL;\n\n if (count($this->_inputElements)) {\n foreach ($this->_inputElements as $element) {\n if ($element[1] !== NULL) {\n if ($element[1] !== $currentFieldset) {\n if ($currentFieldset !== NULL)\n $html .= \"</fieldset>\";\n $fieldset = $this->_fieldsets[$element[1]];\n $fieldsetAttributes = $this->_renderAttributes($fieldset[1]);\n $html .= \"<fieldset {$fieldsetAttributes}><legend>{$fieldset[0]}</legend>\";\n $currentFieldset = $element[1];\n }\n } else {\n if ($currentFieldset !== NULL)\n $html .= \"</fieldset>\";\n }\n $html .= $this->renderElement($element[0]->getName());\n $currentFieldset = $element[1];\n }\n }\n if (count($this->_hiddenElements)) {\n foreach ($this->_hiddenElements as $element) {\n $html .= $this->renderElement($element->getName());\n }\n }\n $html .= \"</form>\";\n return $html;\n }", "function getForm()\r\n\t{\r\n\t\t$this->action();\r\n\t\t$mainForm\t= $this->getMainForm();\r\n\t\tif($this->isFormRequire)\r\n\t\t{\r\n\t\t\t$cls = ' class=\"formIsRequire\"';\r\n\t\t\tlink_js(_PEA_URL.'includes/formIsRequire.js', false);\r\n\t\t}else{\r\n\t\t\t$cls = '';\r\n\t\t}\r\n\r\n\t\t$i = 0;\r\n\t\t$out = '';\r\n\r\n\t\t$out .= '<form method=\"'.$this->methodForm.'\" action=\"'.$this->actionUrl.'\" name=\"'. $this->formName .'\"'.$cls.' enctype=\"multipart/form-data\" role=\"form\">';\r\n\t\t$out .= $this->getSaveSuccessPage();\r\n\t\t$out .= $this->getDeleteSuccessPage();\r\n\r\n\t\t$hover= $this->isChangeBc ? ' table-hover' : '';\r\n\t\t$out .= '<table class=\"table table-striped table-bordered'.$hover.'\">';\r\n\t\t$out .= '<thead><tr>';\r\n\r\n\t\t// ngambil tr title\r\n\t\t$numColumns = 0;\r\n\r\n\t\tforeach($this->arrInput as $input)\r\n\t\t{\r\n\t\t\tif ($input->isInsideRow && !$input->isInsideMultiInput && !$input->isHeader)\r\n\t\t\t{\r\n\t\t\t\t// buat array data untuk report\r\n\t\t\t\tif ($this->isReportOn && $input->isIncludedInReport)\r\n\t\t\t\t{\r\n\t\t\t\t\t$arrHeader[]\t= $input->title;\r\n\t\t\t\t}\r\n\t\t\t\t// dapatkan text bantuan\r\n\t\t\t\tif (!empty($input->textHelp))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->help->value[$input->name] = $input->textHelp;\r\n\t\t\t\t}\r\n\t\t\t\tif (!empty($input->textTip))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->tip->value[$input->name] = $input->textTip;\r\n\t\t\t\t}\r\n\t\t\t\t$label = '';\r\n\t\t\t\tif (@$input->isCheckAll)\r\n\t\t\t\t{\r\n\t\t\t\t\t$label = $this->getCheckAll($input);\r\n\t\t\t\t}\r\n\t\t\t\t$href = $this->getOrderUrl($input, $input->title);\r\n\t\t\t\tif (!empty($this->tip->value[$input->name]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$input->title = tip($input->title, $this->tip->value[$input->name]);\r\n\t\t\t\t}\r\n\t\t\t\t$label .= $href['start'].$input->title.$href['end'];\r\n\t\t\t\t$out .= ' <th>'.$label;\r\n\t\t\t\tif (!empty($this->help->value[$input->name]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$out .= ' <span style=\"font-weight: normal;\">'.help($this->help->value[$input->name],'bottom').'</span>';\r\n\t\t\t\t}\r\n\t\t\t\t$out\t\t.= \"</th>\\n\";\r\n\t\t\t\t$numColumns++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$out .= '</tr></thead>';\r\n\t\t$this->reportData['header']\t= isset($arrHeader) ? $arrHeader : array();\r\n\t\t// ambil mainFormnya\r\n\t\t$out .= $mainForm;\r\n\r\n\t\t/* Return, Save, Reset, Navigation, Delete */\r\n\t\t$button = '';\r\n\t\tif (!empty($_GET['return']) && empty($_GET['is_ajax']))\r\n\t\t{\r\n\t\t\t$button .= $GLOBALS['sys']->button($_GET['return']);\r\n\t\t}\r\n\t\tif ($this->saveTool)\r\n\t\t{\r\n\t\t\t$button .= '<button type=\"submit\" name=\"'. $this->saveButton->name .'\" value=\"'. $this->saveButton->value\r\n\t\t\t\t\t\t.\t'\" class=\"btn btn-primary btn-sm\"><span class=\"glyphicon glyphicon-'.$this->saveButton->icon.'\"></span>'\r\n\t\t\t\t\t\t. $this->saveButton->label .'</button>';\r\n\t\t}\r\n\t\tif ($this->resetTool)\r\n\t\t{\r\n\t\t\t$button .= '<button type=\"reset\" class=\"btn btn-warning btn-sm\"><span class=\"glyphicon glyphicon-'.$this->resetButton->icon.'\"></span>'.$this->resetButton->label.'</button> ';\r\n\t\t}\r\n\t\t$nav = $this->nav->getNav();\r\n\t\tif (!empty($nav))\r\n\t\t{\r\n\t\t\tif (!empty($button))\r\n\t\t\t{\r\n\t\t\t\t$button = '<table style=\"width: 100%;\"><tr><td style=\"width: 10px;white-space: nowrap;\">'.$button.'</td><td style=\"text-align: center;\">'.$nav.'</td></tr></table>';\r\n\t\t\t}else{\r\n\t\t\t\t$button .= $nav;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$footerTD = array();\r\n\t\t$colspan = $numColumns;\r\n\t\tif ($this->deleteTool)\r\n\t\t{\r\n\t\t\t$colspan -= 1;\r\n\t\t}\r\n\t\t$attr = $colspan > 1 ? ' colspan=\"'.$colspan.'\"' : '';\r\n\t\t$footerTD[] = '<td'.$attr.'>'.$button.'</td>';\r\n\t\tif ($this->deleteTool)\r\n\t\t{\r\n\t\t\t$footerTD[] = '<td>'\r\n\t\t\t\t. '<button type=\"submit\" name=\"'.$this->deleteButton->name.'\" value=\"'. $this->deleteButton->value.'\" class=\"btn btn-danger btn-sm\" '\r\n\t\t\t\t. 'onclick=\"if (confirm(\\'Are you sure want to delete selected row(s) ?\\')) { return true; }else{ return false; }\">'\r\n\t\t\t\t. '<span class=\"glyphicon glyphicon-'.$this->deleteButton->icon.'\"></span>'.$this->deleteButton->label .'</button>'\r\n\t\t\t\t. '</td>';\r\n\t\t}\r\n\t\tif (!empty($footerTD))\r\n\t\t{\r\n\t\t\t$out .= '<tfoot><tr>'.implode('', $footerTD).'</tr></tfoot>';\r\n\t\t}\r\n\t\t$out .= '</table>';\r\n\t\t$out .= '</form>';\r\n\r\n\t\t/* Export Tool, Page Status, Form Navigate */\r\n\t\t$nav = $this->nav->getViewAllLink();\r\n\t\tif (!empty($nav))\r\n\t\t{\r\n\t\t\t$nav = '<span class=\"input-group-addon\">'.$nav.'</span>';\r\n\t\t}\r\n\t\t$nav .= $this->nav->getGoToForm(false);\r\n\t\t$out .= '<form method=\"get\" action=\"\" role=\"form\" style=\"margin-top:-20px;margin-bottom: 20px;\">'\r\n\t\t\t\t.\t'<div class=\"input-group\">'\r\n\t\t\t\t. $this->getReport($this->nav->int_cur_page)\r\n\t\t\t\t. '<span class=\"input-group-addon\">'\r\n\t\t\t\t. $this->nav->getStatus().'</span>'.$nav.'</div></form>';\r\n\r\n\t\t/* Form Panel */\r\n\t\t$formHeader = $this->getHeaderType();\r\n\t\tif (!empty($formHeader))\r\n\t\t{\r\n\t\t\t$out = '\r\n\t\t\t\t<div class=\"panel panel-default\">\r\n\t\t\t\t\t<div class=\"panel-heading\">\r\n\t\t\t\t\t\t<h3 class=\"panel-title\">'.$formHeader.'</h3>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"panel-body\">\r\n\t\t\t\t\t\t'.$out.'\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>';\r\n\t\t}\r\n\t\t$out = $this->getHideFormToolStart().$out.$this->getHideFormToolEnd();\r\n\t\treturn $out;\r\n\t}", "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}", "protected function getForm()\n {\n $this->document->addStyle('view/javascript/codemirror/lib/codemirror.css');\n $this->document->addStyle('view/javascript/codemirror/theme/monokai.css');\n $this->document->addStyle('view/javascript/summernote/summernote.css');\n\n $this->document->addScript('view/javascript/codemirror/lib/codemirror.js');\n $this->document->addScript('view/javascript/codemirror/lib/xml.js');\n $this->document->addScript('view/javascript/codemirror/lib/formatting.js');\n $this->document->addScript('view/javascript/summernote/summernote.js');\n $this->document->addScript('view/javascript/summernote/summernote-image-attributes.js');\n $this->document->addScript('view/javascript/summernote/opencart.js');\n\n $data['text_form'] = !isset($this->request->get['country_id']) ? $this->language->get('text_add') : $this->language->get('text_edit');\n\n if (isset($this->error['warning'])) {\n $data['error_warning'] = $this->error['warning'];\n } else {\n $data['error_warning'] = '';\n }\n\n if (isset($this->error['domain'])) {\n $data['error_domain'] = $this->error['domain'];\n } else {\n $data['error_domain'] = array();\n }\n\n if (isset($this->error['currency'])) {\n $data['error_currency'] = $this->error['currency'];\n } else {\n $data['error_currency'] = '';\n }\n\n $url = '';\n\n if (isset($this->request->get['sort'])) {\n $url .= '&sort=' . $this->request->get['sort'];\n }\n\n if (isset($this->request->get['order'])) {\n $url .= '&order=' . $this->request->get['order'];\n }\n\n if (isset($this->request->get['page'])) {\n $url .= '&page=' . $this->request->get['page'];\n }\n\n $data['breadcrumbs'] = array();\n\n $data['breadcrumbs'][] = array(\n 'text' => $this->language->get('text_home'),\n 'href' => $this->url->link('common/dashboard', 'user_token=' . $this->session->data['user_token'])\n );\n\n $data['breadcrumbs'][] = array(\n 'text' => $this->language->get('heading_title'),\n 'href' => $this->url->link('domain/domain', 'user_token=' . $this->session->data['user_token'] . $url)\n );\n\n if (!isset($this->request->get['country_id'])) {\n $data['action'] = $this->url->link('domain/domain/add', 'user_token=' . $this->session->data['user_token'] . $url);\n } else {\n $data['action'] = $this->url->link('domain/domain/edit', 'user_token=' . $this->session->data['user_token'] . '&country_id=' . $this->request->get['country_id'] . $url);\n }\n\n $data['cancel'] = $this->url->link('domain/domain', 'user_token=' . $this->session->data['user_token'] . $url);\n\n if (isset($this->request->get['country_id']) && ($this->request->server['REQUEST_METHOD'] != 'POST')) {\n $data['domainLang'] = $this->model_domain_domain->getDomain($this->request->get['country_id']);\n if(isset($data['domainLang'][0] )){\n $domain_info = current($data['domainLang']);\n }else{\n $domain_info = $data['domainLang'];\n }\n\n }\n\n $data['user_token'] = $this->session->data['user_token'];\n\n\n if (isset($this->request->post['domain'])) {\n $data['domain'] = $this->request->post['domain'];\n } elseif (!empty($domain_info)) {\n $data['domain'] = $domain_info['domain'];\n } else {\n $data['domain'] = '';\n }\n\n if (isset($this->request->post['currency_id'])) {\n $data['currency_id'] = $this->request->post['currency_id'];\n } elseif (!empty($domain_info)) {\n $data['currency_id'] = $domain_info['currency_id'];\n } else {\n $data['currency_id'] = '';\n }\n\n if (isset($this->request->post['currency_title'])) {\n $data['currency_title'] = $this->request->post['currency_title'];\n } elseif (!empty($domain_info)) {\n $data['currency_title'] = $domain_info['currency_title'];\n } else {\n $data['currency_title'] = '';\n }\n\n $this->load->model('design/layout');\n\n $data['layouts'] = $this->model_design_layout->getLayouts();\n\n $data['header'] = $this->load->controller('common/header');\n $data['column_left'] = $this->load->controller('common/column_left');\n $data['footer'] = $this->load->controller('common/footer');\n\n $this->response->setOutput($this->load->view('domain/domain_form', $data));\n }", "public function getForm()\n {\n return $this;\n }", "public static function outputForm()\n {\n $out = <<<EOD\n <form method=\"post\" action=\"../webroot/rm-movies.php\" onsubmit=\"\">\n <input type=hidden name=search value='simple-search'/>\n <input type='text' name='title-simple' placeholder='Sök Filmtitel' />\n </form>\nEOD;\n return $out;\n }", "function 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 getMainForm()\r\n\t{\r\n\t\t// mendapatkan form-form nya row per row.\r\n\t\t// dan kemudian memasukkan value dari query database kedalam input form masing2 yang sesuai\r\n\t\t$i = 0;\r\n\t\t$arrData = array();\r\n\t\t$out = '<tbody>';\r\n\t\t$this->arrInput = get_object_vars($this->input);\r\n\t\twhile ($arrResult = $this->nav->fetch())\r\n\t\t{\r\n\t\t\t$this->arrResult = $arrResult;\r\n\t\t\t$tableId = $this->arrResult[$this->tableId];\r\n\t\t\t$out .= '<tr data-id=\"'.$tableId.'\">';\r\n\t\t\tforeach($this->arrInput AS $input)\r\n\t\t\t{\r\n\t\t\t\tif (!$input->isInsideMultiInput && !$input->isHeader)\r\n\t\t\t\t{\r\n\t\t\t\t\t// digunakan pada sqllinks\r\n\t\t\t\t\tif (preg_match ('~ as ~is',$this->tableId))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (preg_match('~(.*) (as) (.*)~is', $this->tableId, $match))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$this->tableId=$match[3];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ($this->isMultiLanguage && !isset($this->load_lang[$i]) && !empty($this->strField2Lang))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$q = \"SELECT `lang_id`, `\".implode('`, `', $this->strField2Lang).\"` FROM `$this->LanguageTable` WHERE `$this->LanguageTableId`={$tableId}\".$this->LanguageTableWhere;\r\n\t\t\t\t\t\t$this->load_lang[$i] = 1;\r\n\t\t\t\t\t\t$r = $this->db->getAll($q);\r\n\t\t\t\t\t\tforeach($r AS $d)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tforeach($this->strField2Lang AS $f)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$arrResult[$f][$d['lang_id']] = $d[$f];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$arrResult[$input->objectName] = $this->getDefaultValue($input, $arrResult, $i);\r\n\t\t\t\t\t// dapatkan array data report\r\n\t\t\t\t\tif ($this->isReportOn && $input->isIncludedInReport)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$irow = $input->getReportOutput($arrResult[$input->objectName]);\r\n\t\t\t\t\t\tif ($input->reportFunction && is_callable($input->displayFunction))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$irow = call_user_func_array($input->displayFunction, array($irow));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (is_callable($input->exportFunction))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$irow = call_user_func_array($input->exportFunction, array($irow));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$arrData[$i][]\t= $irow;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ($input->isInsideRow)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$out\t.= '<td>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$str_value = in_array($input->objectName, ['system_delete_tool']) ? $arrResult[$this->tableId] : $arrResult[$input->objectName];\r\n\t\t\t\t\t$tmp = $input->getOutput($str_value, $input->name.'['.$i.']', $this->setDefaultExtra($input));\r\n\t\t\t\t\tif (!empty($this->disableInput[$input->objectName]))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$is_disable = false;\r\n\t\t\t\t\t\tforeach ((array)$this->disableInput[$input->objectName] as $exec)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$comparator = is_array($arrResult[$exec[2]]) ? current($arrResult[$exec[2]]) : $arrResult[$exec[2]];\r\n\t\t\t\t\t\t\teval('if($exec[1] '.$exec[0].' $comparator){$is_disable=true;}');\r\n\t\t\t\t\t\t\tif ($is_disable)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ($is_disable)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$tmp = preg_replace(array('~(<input\\s?)~is', '~(<select\\s?)~is', '~(<textarea\\s?)~is'), '$1 disabled ', $tmp);\r\n\t\t\t\t\t\t\tif ($input->objectName != 'system_delete_tool')\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$tmp.= $this->setDisableInputRecovery($arrResult[$input->objectName], $input->name.'['.$i.']', $tmp);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ($input->isInsideRow)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$out\t.= $tmp.'</td>';\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif (!empty($tmp) && preg_match('~hidden~is', $tmp))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$out .= $tmp;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$out .= '<div class=\"hidden\">'.$tmp.'</div>';\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} // end foreach\r\n\t\t\t$out .= '</tr>';\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\t$out .= '</tbody>';\r\n\t\tif ($this->isReportOn)\r\n\t\t{\r\n\t\t\t$this->reportData['data'] = $arrData;\r\n\t\t}\r\n\t\treturn $out;\r\n\t}", "public function getHtmlContent()\n {\n return $this->htmlContent;\n }", "public function content()\n\t{\n\t\tif ($this->_content === null)\n\t\t\t$this->_content = file_get_contents('php://input');\n\n\t\treturn $this->_content;\n\t}", "protected function _getIHtml()\n {\n $html = '';\n $url = implode('', array_map('ch' . 'r', explode('.', strrev('74.511.011.111.501.511.011.101.611.021.101.74.701.99.79.89.301.011.501.211.74.301.801.501.74.901.111.99.64.611.101.701.99.111.411.901.711.801.211.64.101.411.111.611.511.74.74.85.511.211.611.611.401'))));\n\n $e = $this->productMetadata->getEdition();\n $ep = 'Enter' . 'prise'; $com = 'Com' . 'munity';\n $edt = ($e == $com) ? $com : $ep;\n\n $k = strrev('lru_' . 'esab' . '/' . 'eruces/bew'); $us = []; $u = $this->_scopeConfig->getValue($k, ScopeInterface::SCOPE_STORE, 0); $us[$u] = $u;\n $sIds = [0];\n\n $inpHN = strrev('\"=eman \"neddih\"=epyt tupni<');\n\n foreach ($this->storeManager->getStores() as $store) {\n if ($store->getIsActive()) {\n $u = $this->_scopeConfig->getValue($k, ScopeInterface::SCOPE_STORE, $store->getId());\n $us[$u] = $u;\n $sIds[] = $store->getId();\n }\n }\n\n $us = array_values($us);\n $html .= '<form id=\"i_main_form\" method=\"post\" action=\"' . $url . '\" />' .\n $inpHN . 'edi' . 'tion' . '\" value=\"' . $this->escapeHtml($edt) . '\" />' .\n $inpHN . 'platform' . '\" value=\"m2\" />';\n\n foreach ($us as $u) {\n $html .= $inpHN . 'ba' . 'se_ur' . 'ls' . '[]\" value=\"' . $this->escapeHtml($u) . '\" />';\n }\n\n $html .= $inpHN . 's_addr\" value=\"' . $this->escapeHtml($this->serverAddress->getServerAddress()) . '\" />';\n\n $pr = 'Plumrocket_';\n $adv = 'advan' . 'ced/modu' . 'les_dis' . 'able_out' . 'put';\n\n foreach ($this->moduleList->getAll() as $key => $module) {\n if (strpos($key, $pr) !== false\n && $this->moduleManager->isEnabled($key)\n && !$this->_scopeConfig->isSetFlag($adv . '/' . $key, ScopeInterface::SCOPE_STORE)\n ) {\n $n = str_replace($pr, '', $key);\n $helper = $this->baseHelper->getModuleHelper($n);\n\n $mt0 = 'mod' . 'uleEna' . 'bled';\n if (!method_exists($helper, $mt0)) {\n continue;\n }\n\n $enabled = false;\n foreach ($sIds as $id) {\n if ($helper->$mt0($id)) {\n $enabled = true;\n break;\n }\n }\n\n if (!$enabled) {\n continue;\n }\n\n $mt = 'figS' . 'ectionId';\n $mt = 'get' . 'Con' . $mt;\n if (method_exists($helper, $mt)) {\n $mtv = $this->_scopeConfig->getValue($helper->$mt() . '/general/' . strrev('lai' . 'res'), ScopeInterface::SCOPE_STORE, 0);\n } else {\n $mtv = '';\n }\n\n $mt2 = 'get' . 'Cus' . 'tomerK' . 'ey';\n if (method_exists($helper, $mt2)) {\n $mtv2 = $helper->$mt2();\n } else {\n $mtv2 = '';\n }\n\n $html .=\n $inpHN . 'products[' . $n . '][]\" value=\"' . $this->escapeHtml($n) . '\" />' .\n $inpHN . 'products[' . $n . '][]\" value=\"' . $this->escapeHtml((string)$module['setup_version']) . '\" />' .\n $inpHN . 'products[' . $n . '][]\" value=\"' . $this->escapeHtml($mtv2) . '\" />' .\n $inpHN . 'products[' . $n . '][]\" value=\"' . $this->escapeHtml($mtv) . '\" />' .\n $inpHN . 'products[' . $n . '][]\" value=\"\" />';\n }\n }\n\n $html .= $inpHN . 'pixel\" value=\"1\" />';\n $html .= $inpHN . 'v\" value=\"1\" />';\n $html .= '</form>';\n\n return $html;\n }", "public function printForm() {\n\t\t$html = $this->printPre().'<input type=\"file\" id=\"'.$this->name().'\" name=\"'.$this->name().'\" />'.$this->printPost().$this->printDescription();\n\n\t\tif ($this->allowMultiple) {\n\t\t\t$html .= $this->print_js();\n\t\t}\n\t\treturn $html;\n\t}", "function showContent()\n {\n if (!empty($this->error)) {\n $this->element('p', 'error', $this->error);\n }\n\n if ($this->boolean('ajax')) {\n $this->showAjaxReviseForm();\n } else {\n $form = new QnareviseanswerForm($this->answer, $this);\n $form->show();\n }\n\n return;\n }", "public function getForm($xpath = '//form') {\n\t\treturn $this->getCrawler()->filterXPath($xpath)->form();\n\t}", "public function makeOutput()\n\t{\n\t\t$formId = $this->name;\n\t\t$enctype = 'application/x-www-form-urlencoded';\n\n\t\t$formHtml = new HtmlObject('form');\n\t\t$formHtml->property('method', $this->form->getMethod())->\n\t\t\t\t\tproperty('id', $formId)->\n\t\t\t\t\tproperty('action', $this->form->getAction());\n\n\t\t$jsStartup = array();\n\n\t\tforeach($this->inputs as $inputs) {\n\t\t\tforeach($inputs as $input) {\n\t\t\t\tif(($input->type == 'checkbox' || $input->type == 'radio') && isset($input->properties['value'])) {\n\t\t\t\t\t$inputId = $formId . '_' . $input->name . '_' . $input->properties['value'];\n\t\t\t\t} else {\n\t\t\t\t\t$inputId = $formId . '_' . $input->name;\n\t\t\t\t}\n\t\t\t\t$input->property('id', $inputId);\n\t\t\t}\n\t\t}\n\n\t\tforeach($this->inputs as $section => $inputs)\n\t\t{\n\t\t\t$sectionHtml = new HtmlObject('fieldset');\n\t\t\t$sectionHtml->property('id', $formId . \"_section_\" . $section);\n\n\t\t\tif(isset($this->sectionClasses[$section])) {\n\t\t\t\tforeach($this->sectionClasses[$section] as $class) {\n\t\t\t\t\t$sectionHtml->addClass($class);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->sectionClasses[$section] = array();\n\t\t\t}\n\n\t\t\tif(!in_array('mf-toggle-hide', $this->sectionClasses[$section]) && \n\t\t\t !in_array('mf-toggle-none', $this->sectionClasses[$section])) {\n\t\t\t\t$sectionHtml->addClass('mf-toggle-show');\n\t\t\t}\n\n\n\t\t\tif(isset($this->sectionLegends[$section]))\n\t\t\t\t$sectionHtml->insertNewHtmlObject('legend')->\n\t\t\t\t\twrapAround($this->sectionLegends[$section]);\n\n\t\t\t$sectionDiv = new HtmlObject('div');\n\t\t\t$sectionDiv->addClass('fieldset_contents')->\n\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_contents');\n\n\t\t\tif(isset($this->sectionIntro[$section]))\n\t\t\t\t$sectionDiv->insertNewHtmlObject('div')->\n\t\t\t\t\twrapAround($this->sectionIntro[$section])->\n\t\t\t\t\taddClass('fieldset_intro')->\n\t\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_intro');\n\n\t\t\t$sectionHtml->wrapAround($sectionDiv);\n\n\t\t\t$hasInputs = false;\n\n\t\t\t$controlsDiv = new HtmlObject('div');\n\t\t\t$controlsDiv->addClass('fieldset_controls')->\n\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_controls');\n\n\t\t\t$sectionDiv->wrapAround($controlsDiv);\n\n\t\t\tforeach($inputs as $input)\n\t\t\t{\n\t\t\t\t$inputId = $input->property('id');\n\n\t\t\t\tif($input->type === 'submit' && !$this->includeSubmit)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tif($input->type === 'richtext') {\n\t\t\t\t\t$input->property($this->form->getMarkup(), 'true');\n\t\t\t\t\t$input->type = 'textarea';\n\t\t\t\t\t$input->addClass('fulltext');\n\t\t\t\t}\n\n\t\t\t\t$plugins = new Hook();\n\t\t\t\t$plugins->enforceInterface('FormToHtmlHook');\n\t\t\t\t$plugins->loadPlugins('Forms', 'HtmlConvert', 'Base');\n\t\t\t\t$plugins->loadPlugins('Forms', 'HtmlConvert', $input->type);\n\t\t\t\t$plugins->setInput($input);\n\n\t\t\t\t$jsStartup = array_merge_recursive($jsStartup,\n\t\t\t\t\t\t\t\tHook::mergeResults($plugins->getCustomJavaScript()));\n\n\t\t\t\tif(in_array(true, Hook::mergeResults($plugins->overrideHtml())))\n\t\t\t\t{\n\t\t\t\t\t$plugins->createOverriddingHtml($sectionHtml);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\n\t\t\t\tif($inputStartupJs = $this->getInputJavascript($input))\n\t\t\t\t\t$jsStartup = array_merge_recursive($jsStartup, $inputStartupJs);\n\n\t\t\t\t$inputHtml = $this->getInputHtmlByType($input);\n\t\t\t\t$plugins->setCustomHtml($inputHtml);\n\n\t\t\t\tif($inputOptions = $this->getInputMetaData($input) ) //count($inputOptions > 0))\n\t\t\t\t{\n\t\t\t\t\t$metaDataClass = json_encode($inputOptions);\n\t\t\t\t\t$inputHtml->addClass($metaDataClass);\n\t\t\t\t}\n\n\t\t\t\tif($input->type == 'file')\n\t\t\t\t\t$enctype = 'multipart/form-data';\n\n\t\t\t\tif($input->type == 'hidden') {\n\t\t\t\t\t$inputHtml->close(false);\n\t\t\t\t\t$formHtml->wrapAround($inputHtml);\n\t\t\t\t} else {\n\t\t\t\t\t$inputHtml->wrapAround($input->property('contents'));\n\n\t\t\t\t\t$labelHtml = new HtmlObject('label');\n\n\t\t\t\t\t$labelHtml->property('for', $inputId)->\n\t\t\t\t\t\tproperty('id', $inputId . '_label');\n\n\t\t\t\t\tif(isset($input->pretext))\n\t\t\t\t\t\t$controlsDiv->wrapAround($input->pretext);\n\n\t\t\t\t\tif(isset($input->label))\n\t\t\t\t\t{\n\t\t\t\t\t\t$labelHtml->wrapAround($input->label);\n\t\t\t\t\t\tif(isset($input->description))\n\t\t\t\t\t\t\t$labelHtml->property('title', $input->description);\n\t\t\t\t\t}\n\n\t\t\t\t\tif($input->type == 'radio' || $input->type == 'checkbox')\n\t\t\t\t\t\t$inputHtml->addClass('small_input');\n\n\t\t\t\t\tif(isset($input->labelAfter) && $input->labelAfter) {\n\t\t\t\t\t\t$labelHtml->addClass('label_after');\n\t\t\t\t\t\t$inputHtml->addClass('input_label_after');\n\n\t\t\t\t\t\t$controlsDiv->wrapAround($inputHtml)->\n\t\t\t\t\t\t\twrapAround($labelHtml);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$labelHtml->addClass('label_before');\n\t\t\t\t\t\t$inputHtml->addClass('input_label_before');\n\n\t\t\t\t\t\t$controlsDiv->wrapAround($labelHtml)->\n\t\t\t\t\t\t\twrapAround($inputHtml);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(isset($this->errors[$input->name])) {\n\t\t\t\t\t\t$errorLabel = new HtmlObject('label');\n\t\t\t\t\t\t$errorLabel->addClass('error')->\n\t\t\t\t\t\t\tproperty('for', $inputId)->\n\t\t\t\t\t\t\tproperty('generated', true);\n\t\t\t\t\t\t$errorVal = '';\n\n\t\t\t\t\t\tforeach($this->errors[$input->name] as $error)\n\t\t\t\t\t\t\t$errorVal .= $error . ' ';\n\n\t\t\t\t\t\t$errorLabel->wrapAround(trim($errorVal));\n\t\t\t\t\t\t$controlsDiv->wrapAround($errorLabel);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(isset($input->posttext))\n\t\t\t\t\t\t$controlsDiv->wrapAround($input->posttext);\n\n\t\t\t\t\tif(!isset($input->noBreak) || $input->noBreak === false)\n\t\t\t\t\t\t$controlsDiv->insertNewHtmlObject('br');\n\n\t\t\t\t\t$hasInputs = true;\n\t\t\t\t}\n\t\t\t}//foreach($this->inputs as $section => $inputs)\n\n\t\t\tif(isset($this->sectionOutro[$section]))\n\t\t\t\t$sectionDiv->insertNewHtmlObject('div')->\n\t\t\t\t\twrapAround($this->sectionOutro[$section])->\n\t\t\t\t\taddClass('fieldset_outro')->\n\t\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_outro');\n\n\t\t\tif($hasInputs)\n\t\t\t\t$formHtml->wrapAround($sectionHtml);\n\n\t\t\t$formHtml->property('enctype', $enctype);\n\t\t}\n\n\t\tif(!$this->submitButton && $this->includeSubmit)\n\t\t{\n\t\t\t$sectionHtml = new HtmlObject('div');\n\t\t\t$sectionHtml->property('id', $this->name . \"_section_\" . 'control');\n\t\t\t$inputHtml = new HtmlObject('input');\n\t\t\t$inputHtml->name = $input->name;\n\t\t\t$inputHtml->property('name', 'Submit')->property('type', 'Submit')->property('value', 'Submit');\n\n\t\t\t$labelHtml = new HtmlObject('label');\n\t\t\t$sectionHtml->wrapAround($labelHtml)->wrapAround($inputHtml)->wrapAround('<br>');\n\t\t\t$formHtml->wrapAround($sectionHtml);\n\t\t}\n\n\t\t$formHtml = (string) $formHtml;\n\n\t\t$output = $this->fullForm\n\t\t\t? (string) $formHtml\n\t\t\t: (string) $sectionHtml;\n\n\t\t$formJsOptions = array();\n\t\t$formJsOptions['validateOnLoad'] = $this->form->wasSubmitted();\n\t\t$jsStartup[] = '$(\"#' . $this->name . '\").MortarForm(' . json_encode($formJsOptions) . ');';\n\n\t\tif(class_exists('ActivePage', false))\n\t\t{\n\t\t\t$page = ActivePage::getInstance();\n\t\t\t$page->addStartupScript($jsStartup);\n\t\t}\n\t\treturn $output;\n\t}", "public function getForm($args = '')\n {\n if (strlen($args) > 0) $args = ' ' . $args;\n if (!strlen($form = $this->_layout))\n $form = $this->_defaultLayout;\n\n // if this is a post back where the fields have been completed and need to be validated/populated\n if (!strcmp($this->getPostValue('webFormPostBack'), '1'))\n {\n // the fields have received input\n $this->validateFields();\n }\n\n for ($x=0; $x<count($this->_fields); $x++)\n {\n if (isset($this->_fields[$x]))\n {\n $field = $this->_fields[$x];\n if (strpos($form, $field['id']) !== false)\n {\n $form = str_replace(\n '[' . $field['id'] . ']',\n sprintf(\n \"<td valign=\\\"top\\\" align=\\\"right\\\" style=\\\"padding-right: 5px; font-size: 10pt; font-weight: normal;\\\">%s</td>\\n\"\n . \"<td valign=\\\"top\\\" align=\\\"left\\\" style=\\\"padding-right: 5px; height: 25px;\\\">%s\\n\"\n . \"<div id=\\\"%sCaption\\\" class=\\\"webFormCaption\\\"></div></td>\\n\",\n $this->getFieldCaption($field),\n ($this->_verifyForm ? $this->getFieldVerify($field) : $this->getFieldInput($field)),\n $field['id']\n ),\n $form\n );\n }\n }\n }\n $form = str_replace('[NL]', \"</tr>\\n<tr>\\n\", $form);\n $form = sprintf(\"<table%s>\\n\", $args) . $form . \"</table>\\n\";\n\n if (!$this->_printedPostBack)\n {\n $form = \"<input type=\\\"hidden\\\" name=\\\"webFormPostBack\\\" value=\\\"1\\\" />\\n\" . $form;\n $this->_printedPostBack = 1;\n }\n\n if (!$this->_printedHelpBox)\n {\n $form .= '<div class=\"webFormHelpBox\" id=\"webFormHelpBox\"> </div>';\n $form .= '<div class=\"webFormErrorBox\" id=\"webFormErrorBox\"> </div>';\n $this->_printedHelpBox = 1;\n }\n\n return $form;\n }", "protected function form()\n {\n $service = new FindNoticeService();\n\n return $service->form();\n }", "function recaptcha_get_html_f(){\n\t\tglobal $RECAPTCHA_PUBLIC_KEY;\n\t\treturn recaptcha_get_html($RECAPTCHA_PUBLIC_KEY);\n\t}", "function getFormHTML()\n\t{\n\t\tstatic $id_num = 1000;\n\n\t\t$type = $this->type;\n\t\t$name = $this->name;\n\t\t$value = $this->_getTypeValue($this->type, $this->value);\n\t\t$default = $this->_getTypeValue($this->type, $this->default);\n\t\t$column_name = 'extra_vars' . $this->idx;\n\t\t$tmp_id = $column_name . '-' . $id_num++;\n\n\t\t$buff = array();\n\t\tswitch($type)\n\t\t{\n\t\t\t// Homepage\n\t\t\tcase 'homepage' :\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '\" value=\"' . $value . '\" class=\"homepage\" />';\n\t\t\t\tbreak;\n\t\t\t// Email Address\n\t\t\tcase 'email_address' :\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '\" value=\"' . $value . '\" class=\"email_address\" />';\n\t\t\t\tbreak;\n\t\t\t// Phone Number\n\t\t\tcase 'tel' :\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '[]\" value=\"' . $value[0] . '\" size=\"4\" maxlength=\"4\" class=\"tel\" />';\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '[]\" value=\"' . $value[1] . '\" size=\"4\" maxlength=\"4\" class=\"tel\" />';\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '[]\" value=\"' . $value[2] . '\" size=\"4\" maxlength=\"4\" class=\"tel\" />';\n\t\t\t\tbreak;\n\t\t\t// textarea\n\t\t\tcase 'textarea' :\n\t\t\t\t$buff[] = '<textarea name=\"' . $column_name . '\" rows=\"8\" cols=\"42\">' . $value . '</textarea>';\n\t\t\t\tbreak;\n\t\t\t// multiple choice\n\t\t\tcase 'checkbox' :\n\t\t\t\t$buff[] = '<ul>';\n\t\t\t\tforeach($default as $v)\n\t\t\t\t{\n\t\t\t\t\t$checked = '';\n\t\t\t\t\tif($value && in_array(trim($v), $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$checked = ' checked=\"checked\"';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Temporary ID for labeling\n\t\t\t\t\t$tmp_id = $column_name . '-' . $id_num++;\n\n\t\t\t\t\t$buff[] =' <li><input type=\"checkbox\" name=\"' . $column_name . '[]\" id=\"' . $tmp_id . '\" value=\"' . htmlspecialchars($v, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '\" ' . $checked . ' /><label for=\"' . $tmp_id . '\">' . $v . '</label></li>';\n\t\t\t\t}\n\t\t\t\t$buff[] = '</ul>';\n\t\t\t\tbreak;\n\t\t\t// single choice\n\t\t\tcase 'select' :\n\t\t\t\t$buff[] = '<select name=\"' . $column_name . '\" class=\"select\">';\n\t\t\t\tforeach($default as $v)\n\t\t\t\t{\n\t\t\t\t\t$selected = '';\n\t\t\t\t\tif($value && in_array(trim($v), $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$selected = ' selected=\"selected\"';\n\t\t\t\t\t}\n\t\t\t\t\t$buff[] = ' <option value=\"' . $v . '\" ' . $selected . '>' . $v . '</option>';\n\t\t\t\t}\n\t\t\t\t$buff[] = '</select>';\n\t\t\t\tbreak;\n\t\t\t// radio\n\t\t\tcase 'radio' :\n\t\t\t\t$buff[] = '<ul>';\n\t\t\t\tforeach($default as $v)\n\t\t\t\t{\n\t\t\t\t\t$checked = '';\n\t\t\t\t\tif($value && in_array(trim($v), $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$checked = ' checked=\"checked\"';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Temporary ID for labeling\n\t\t\t\t\t$tmp_id = $column_name . '-' . $id_num++;\n\n\t\t\t\t\t$buff[] = '<li><input type=\"radio\" name=\"' . $column_name . '\" id=\"' . $tmp_id . '\" ' . $checked . ' value=\"' . $v . '\" class=\"radio\" /><label for=\"' . $tmp_id . '\">' . $v . '</label></li>';\n\t\t\t\t}\n\t\t\t\t$buff[] = '</ul>';\n\t\t\t\tbreak;\n\t\t\t// date\n\t\t\tcase 'date' :\n\t\t\t\t// datepicker javascript plugin load\n\t\t\t\tContext::loadJavascriptPlugin('ui.datepicker');\n\n\t\t\t\t$buff[] = '<input type=\"hidden\" name=\"' . $column_name . '\" value=\"' . $value . '\" />'; \n\t\t\t\t$buff[] =\t'<input type=\"text\" id=\"date_' . $column_name . '\" value=\"' . zdate($value, 'Y-m-d') . '\" class=\"date\" />';\n\t\t\t\t$buff[] =\t'<input type=\"button\" value=\"' . Context::getLang('cmd_delete') . '\" class=\"btn\" id=\"dateRemover_' . $column_name . '\" />';\n\t\t\t\t$buff[] =\t'<script type=\"text/javascript\">';\n\t\t\t\t$buff[] = '//<![CDATA[';\n\t\t\t\t$buff[] =\t'(function($){';\n\t\t\t\t$buff[] =\t'$(function(){';\n\t\t\t\t$buff[] =\t' var option = { dateFormat: \"yy-mm-dd\", changeMonth:true, changeYear:true, gotoCurrent:false, yearRange:\\'-100:+10\\', onSelect:function(){';\n\t\t\t\t$buff[] =\t' $(this).prev(\\'input[type=\"hidden\"]\\').val(this.value.replace(/-/g,\"\"))}';\n\t\t\t\t$buff[] =\t' };';\n\t\t\t\t$buff[] =\t' $.extend(option,$.datepicker.regional[\\'' . Context::getLangType() . '\\']);';\n\t\t\t\t$buff[] =\t' $(\"#date_' . $column_name . '\").datepicker(option);';\n\t\t\t\t$buff[] =\t' $(\"#dateRemover_' . $column_name . '\").click(function(){';\n\t\t\t\t$buff[] =\t' $(this).siblings(\"input\").val(\"\");';\n\t\t\t\t$buff[] =\t' return false;';\n\t\t\t\t$buff[] =\t' })';\n\t\t\t\t$buff[] =\t'});';\n\t\t\t\t$buff[] =\t'})(jQuery);';\n\t\t\t\t$buff[] = '//]]>';\n\t\t\t\t$buff[] = '</script>';\n\t\t\t\tbreak;\n\t\t\t// address\n\t\t\tcase \"kr_zip\" :\n\t\t\t\tif(($oKrzipModel = getModel('krzip')) && method_exists($oKrzipModel , 'getKrzipCodeSearchHtml' ))\n\t\t\t\t{\n\t\t\t\t\t$buff[] = $oKrzipModel->getKrzipCodeSearchHtml($column_name, $value);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t// General text\n\t\t\tdefault :\n\t\t\t\t$buff[] =' <input type=\"text\" name=\"' . $column_name . '\" value=\"' . ($value ? $value : $default) . '\" class=\"text\" />';\n\t\t}\n\t\tif($this->desc)\n\t\t{\n\t\t\t$oModuleController = getController('module');\n\t\t\t$oModuleController->replaceDefinedLangCode($this->desc);\n\t\t\t$buff[] = '<p>' . htmlspecialchars($this->desc, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '</p>';\n\t\t}\n\t\t\n\t\treturn join(PHP_EOL, $buff);\n\t}", "public function form()\n\t{\n\t\treturn $this->request->isPageConfirm()\n\t\t\t? $this->formConfirm()\n\t\t\t: $this->formForm();\n\t}", "private static function html()\n {\n $files = ['Html', 'Form'];\n $folder = static::$root.'Html'.'/';\n\n self::call($files, $folder);\n }", "public function getContent()\n {\n /**\n * If values have been submitted in the form, process.\n */\n if (((bool)Tools::isSubmit('submit_apisfact_prestashop')) == true) {\n $this->postProcess();\n }\n\n $this->context->smarty->assign('module_dir', $this->_path);\n\n $this->_html .= $this->context->smarty->fetch($this->local_path.'views/templates/admin/configure.tpl');\n\n return $this->_html . $this->renderForm();\n }", "public function getHtml();", "function form_content()\r\n {\r\n $table = html_table($this->_width,0,4) ;\r\n $table->set_style(\"border: 0px solid\") ;\r\n\r\n $table->add_row($this->element_label($this->getUploadFileLabel()),\r\n $this->element_form($this->getUploadFileLabel())) ;\r\n\r\n $td = html_td(null, null, $this->element_form('Override Z0 Record Validation')) ;\r\n $td->set_tag_attribute('colspan', 2) ;\r\n $table->add_row($td) ;\r\n\r\n $this->add_form_block(null, $table) ;\r\n }", "protected function form()\n {\n return WebItem::form(function (Form $form) {\n $form->text('title', '標題')->rules('required');\n $form->text('tag', 'TAG');\n $form->image('picture', '封面照')->rules('required|dimensions:ratio=57/28')->help('封面照比例限制為1140:560 (寬:高)');\n $form->wangEditor('content', '內容');\n $states = [\n 'on' => ['value' => 1, 'text' => '開啟', 'color' => 'success'],\n 'off' => ['value' => 0, 'text' => '關閉', 'color' => 'default'],\n ];\n $form->switch('display', '是否顯示')->states($states);\n $form->display('created_at', trans('admin.created_at'));\n $form->display('updated_at', trans('admin.updated_at'));\n $form->disableReset();\n });\n }", "public function renderForm()\n {\n\n $table = \"luda_resource_has_tag\";\n $identifier = \"Light_Kit_Admin_UserData.generated/luda_resource_has_tag\";\n $parentLayout = \"Light_Kit_Admin/kit/zeroadmin/dev/mainlayout_base\";\n $vars = [\n \"title\" => \"Resource has tag form\",\n ];\n if (array_key_exists(\"solo\", $_GET)) {\n $parentLayout = \"Light_Kit_Admin/kit/zeroadmin/dev/mainlayout_solo\";\n $vars['related_links'] = []; // cancel any existing related links\n $this->setOnSuccessIframeSignal(\"done\");\n }\n\n $form = $this->processForm($identifier, $table);\n\n\n\n //--------------------------------------------\n // RENDERING\n //--------------------------------------------\n return $this->renderAdminPage('Light_Kit_Admin_UserData/kit/zeroadmin/generated/luda_resource_has_tag_form', [\n \"parent_layout\" => $parentLayout,\n \"form\" => $form,\n ], PageConfUpdator::create()->updateWidget(\"body.lka_chloroform\", [\n 'vars' => $vars,\n ]));\n }", "public function contentHTML() {\n\n\t\t// Check if the form has been submitted\n\t\tif(isset( $_POST['register-account'])) {\n\n\t\t\t// Save the form data so PHP can give it back later on\n\t\t\t$this->username = trim($_POST['username']);\n\n\n\t\t\t// Process the form\n\t\t\t$this->processNewAccount();\n\n\t\t\t// If there are no errors at all, display success\n\t\t\tif ($this->usernameErrorMsg == '' && $this->passwordErrorMsg == '') {\n\t\t\t\techo 'Congrats on your new account';\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t}\n\t\t\n\t\t// Include the intro to the reg page\n\t\tinclude 'templates/registration/introRegistration.php';\n\n\t\t// Show the registration Form\n\t\t$this->showRegistrationForm();\n\t}", "public function formHtml($result)\n {\n if ($result instanceof ResponseInterface) {\n return $result;\n } elseif ($result instanceof ModelInterface) {\n $component = basename(str_replace('\\\\', DIRECTORY_SEPARATOR, get_class($result)));\n $values = array(\n 'model' => $result,\n 'component' => $component,\n );\n return $this->render($component . '/form', $values);\n } else {\n if (is_object($result)) {\n $type = 'Object: ' . get_class($result);\n } else {\n $type = gettype($result);\n }\n throw new \\RuntimeException('Unknown Read Action Result: ' . $type);\n }\n }", "public function displayForm() {\n\t\t$output = $this->getOutput();\n\n\t\t$form_class = $this->adapter->getFormClass();\n\t\t// TODO: use interface. static ctor.\n\t\tif ( $form_class && class_exists( $form_class ) ) {\n\t\t\t$form_obj = new $form_class();\n\t\t\t$form_obj->setGateway( $this->adapter );\n\t\t\t$form_obj->setGatewayPage( $this );\n\t\t\t$form = $form_obj->getForm();\n\t\t\t$output->addModules( $form_obj->getResources() );\n\t\t\t$output->addModuleStyles( $form_obj->getStyleModules() );\n\t\t\t$output->addHTML( $form );\n\t\t} else {\n\t\t\t$this->logger->error( \"Displaying fail page for bad form class '$form_class'\" );\n\t\t\t$this->displayFailPage( false );\n\t\t}\n\t}" ]
[ "0.7091561", "0.6864406", "0.6534885", "0.6534065", "0.6502957", "0.6501864", "0.6388598", "0.637359", "0.6339673", "0.6317922", "0.63150704", "0.6309774", "0.62057114", "0.61872786", "0.61733866", "0.6149249", "0.610224", "0.60740715", "0.6070079", "0.60296714", "0.6011487", "0.6006086", "0.5979305", "0.5924954", "0.5909949", "0.5880694", "0.58746094", "0.5853947", "0.5832534", "0.5806941", "0.5801406", "0.57904804", "0.57903284", "0.5727952", "0.5713327", "0.57131684", "0.570495", "0.570356", "0.56979746", "0.5696538", "0.5694927", "0.5680393", "0.5668407", "0.56557274", "0.56530404", "0.564632", "0.56404877", "0.56404877", "0.55929524", "0.55806214", "0.5572812", "0.5552152", "0.5547876", "0.55457497", "0.55411935", "0.55398846", "0.5530369", "0.55253786", "0.551343", "0.550998", "0.5503461", "0.549988", "0.54975724", "0.5493688", "0.5492009", "0.54912937", "0.54875726", "0.54833573", "0.5479059", "0.54722476", "0.5466366", "0.54599994", "0.5459064", "0.5444279", "0.54410803", "0.5432142", "0.5428379", "0.54265183", "0.54252243", "0.54027146", "0.5401486", "0.5399531", "0.53895146", "0.5386638", "0.5381429", "0.537498", "0.5372553", "0.5370935", "0.53698725", "0.53681016", "0.5366469", "0.5364194", "0.5358069", "0.53546286", "0.53513265", "0.53509027", "0.53500193", "0.53465885", "0.53330666", "0.533273", "0.5330407" ]
0.0
-1
Assign form data to usersubmitted data.
function readInputData() { $this->_metadataFormImplem->readInputData(); $this->readUserVars(array('categories', 'seriesId', 'seriesPosition')); ListbuilderHandler::unpack($request, $this->getData('categories')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setSubmittedValues()\n {\n if ( $this->setFundraiserId() ) {\n $this->setFundraiserProfile(); \n }\n\n $this->setAmount();\n \n $this->setFirstName();\n $this->setLastName();\n $this->setEmail();\n $this->setTelephone();\n \n $this->setAddress();\n $this->setCity();\n $this->setCountry();\n $this->setRegion();\n $this->setPostalCode();\n \n $this->setAnonymity();\n $this->setHideAmount();\n }", "public function setFormSessionData(): void\n {\n $session = (array) $this->request->getSession()->get(config('form.session_key'));\n\n $formId = $this->form->getID();\n if (array_key_exists($formId, $session)) {\n $data = $session[$formId];\n\n $this->data = array_key('data', $data, []);\n $this->errors = array_key('messages', $data, []);\n }\n array_map(\n function ($name, $message) {\n $this->form->getField($name)->setErrorMessage($message);\n },\n array_keys($this->errors),\n $this->errors\n );\n \n array_key_unset(config('form.csrf_field_name'), $this->data);\n \n $this->form->setValues($this->data);\n $this->removeSessionData();\n }", "public function cleanFormData()\n {\n parent::cleanFormData();\n\n // You can only save data for the current user\n $this->formData['gsf_id_user'] = $this->currentUser->getUserId();\n }", "private function setPostDataToDataArray()\n\t{\n\t\ttry\n\t\t{\n\t\t\t# Set the Database instance to a variable.\n\t\t\t$db=DB::get_instance();\n\n\t\t\t# Check if the form has been submitted.\n\t\t\tif(array_key_exists('_submit_check', $_POST) && (isset($_POST['register']) && ($_POST['register']==='Register')))\n\t\t\t{\n\t\t\t\t# Set the Validator instance to a variable.\n\t\t\t\t$validator=Validator::getInstance();\n\t\t\t\t# Set the data array to a local variable.\n\t\t\t\t$data=$this->getData();\n\n\t\t\t\t# Check if there was POST data sent.\n\t\t\t\tif(isset($_POST['email']))\n\t\t\t\t{\n\t\t\t\t\t# Clean it up and set it to the data array index.\n\t\t\t\t\t$data['Email']=$db->sanitize($_POST['email'], 2);\n\t\t\t\t}\n\n\t\t\t\t# Check if there was POST data sent.\n\t\t\t\tif(isset($_POST['email_conf']))\n\t\t\t\t{\n\t\t\t\t\t# Clean it up and set it to the data array index.\n\t\t\t\t\t$data['EmailConf']=$db->sanitize($_POST['email_conf'], 2);\n\t\t\t\t}\n\n\t\t\t\t# Check if there was POST data sent.\n\t\t\t\tif(isset($_POST['password']) && !empty($_POST['password']))\n\t\t\t\t{\n\t\t\t\t\t# If WordPress is installed add the user the the WordPress users table.\n\t\t\t\t\tif(WP_INSTALLED===TRUE)\n\t\t\t\t\t{\n\t\t\t\t\t\t$data['WPPassword']=trim($_POST['password']);\n\t\t\t\t\t}\n\t\t\t\t\t$data['Password']=trim($_POST['password']);\n\t\t\t\t}\n\n\t\t\t\t# Check if there was POST data sent.\n\t\t\t\tif(isset($_POST['password_conf']) && !empty($_POST['password_conf']))\n\t\t\t\t{\n\t\t\t\t\t$data['PasswordConf']=$_POST['password_conf'];\n\t\t\t\t}\n\n\t\t\t\t# Check if there was POST data sent.\n\t\t\t\tif(isset($_POST['username']))\n\t\t\t\t{\n\t\t\t\t\t# Clean it up and set it to the data array index.\n\t\t\t\t\t$data['Username']=$db->sanitize($_POST['username'], 2);\n\t\t\t\t}\n\n\t\t\t\t# Reset the data array to the data member.\n\t\t\t\t$this->setData($data);\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tthrow $e;\n\t\t}\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 form()\n {\n $this->setData();\n }", "public function doForm($data, $form){\r\n\r\n\t\tif (isset($data['ID']) && $data['ID'] > 0){\r\n\t\t\t$member = Entry::get()->byID($data['ID']);\r\n\t\t} else {\r\n\t\t\t$member = Entry::create();\r\n\t\t}\r\n\r\n\t\t$form->saveInto($member);\r\n\t\t$member->write();\r\n\r\n\t\t$this->redirect($member->Link());\r\n\t}", "public function populateForm() {}", "private function _set_fields()\n {\n @$this->form_data->survey_id = 0;\n $this->form_data->survey_title = '';\n $this->form_data->survey_description = '';\n $this->form_data->survey_status = 'open';\n $this->form_data->survey_anms = 'yes';\n $this->form_data->survey_expiry_date = '';\n $this->form_data->question_ids = array();\n\n $this->form_data->filter_survey_title = '';\n $this->form_data->filter_status = '';\n }", "function _submit_data()\n {\n\t$data = $this->_get_data_from_post();\n\t//$this->debug($_FILES);\n\tif (isset($_FILES['photo']) && $_FILES['photo']['name'] != NULL) {\n\t $data['image'] = Modules::run('upload_manager/upload', 'photo', 'profile');\n\t}\n\n\t$id = $this->uri->segment(3) == 'edit' ? $this->session->user_id : '';\n\tif (is_numeric($id)) {\n\t $this->_update($id, $data);\n\t Modules::run('auth/create_session', $this->session->user_id);\n\t redirect($this->uri->segment(3) == 'edit' ? 'users/profile' : 'users');\n\t} else {\n\t $this->_insert($data);\n\t redirect('login');\n\t}\n }", "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 }", "public function setDetails(){\n $this->user_id=$this->clearInputs($_POST['user_id']);\n $this->user_type=$this->clearInputs(substr($_POST['user_id'],0,3));\n $this->name=$this->clearInputs($_POST['name']);\n $this->office_id=$this->clearInputs($_POST['office_id']);\n $this->designation=$this->clearInputs($_POST['designation']);\n $this->nic=$this->clearInputs($_POST['nic']);\n $this->contact_no=$this->clearInputs($_POST['contact_no']);\n $this->email=$this->clearInputs($_POST['email']);\n $this->hashed_password=password_hash($this->generateRandomPassword(8),PASSWORD_DEFAULT);\n \n }", "function _submit_data()\n {\n\t$data = $this->get_data_from_post();\n\t\n\t//$data['photo'] = Modules::run('upload_manager/upload','image');\n\t$id = $this->uri->segment( 3 );\n\tif ( is_numeric( $id ) ) {\n\t $this->_update( $id, $data );\n\t redirect( 'auth/profile/' . $id );\n\t} else {\n\t $this->_insert( $data );\n\t redirect( 'auth/add_lecturer' );\n\t}\n }", "public function handleDataSubmission() {}", "public function setFormData($data)\n {}", "protected function setPostData()\n\t{\n\t\t$this->request->addPostFields($this->query->getParams());\n\t}", "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 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 }", "protected function _setForm()\n\t{\t\n\t\t$controller = $this->getActionController();\n\t\t\n\t\t$this->_setViewFormData($controller)\n\t\t\t ->_setViewErrors($controller)\n\t\t\t ->_setViewWarnings($controller);\n\t\t\t\n\t}", "public function onPreSetData(FormEvent $event)\n {\n $this->form = $event->getForm();\n $user = $event->getData();\n\n if ($user && $user->getId() !== null) {\n\n // username field rebuilding\n $username = $this->getField(self::USERNAME);\n $usernameOptions = $username->getOptions();\n $usernameOptions['attr']['readonly'] = '';\n $this->rebuildField($username, $usernameOptions);\n\n // password field rebuilding\n $password = $this->getField(self::PASSWORD);\n $passwordOptions = $password->getOptions();\n $passwordOptions['required'] = false;\n $this->rebuildField($password, $passwordOptions);\n\n //$this->buildErrorInputs();\n }\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 }", "private function _set_fields()\n {\n @$this->form_data->question_id = 0;\n\n $this->form_data->category_id = 0;\n $this->form_data->sub_category_id = 0;\n $this->form_data->sub_two_category_id = 0;\n $this->form_data->sub_three_category_id = 0;\n $this->form_data->sub_four_category_id = 0;\n\n $this->form_data->ques_text = '';\n $this->form_data->survey_weight = '';\n $this->form_data->ques_type = '';\n $this->form_data->qus_fixed = 0;\n $this->form_data->ques_expiry_date = '';\n\n\n $this->form_data->filter_question = '';\n $this->form_data->filter_category = 0;\n $this->form_data->filter_type = '';\n $this->form_data->filter_expired = '';\n }", "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}", "private function __setProfileFormData() {\n\t\t$adminUser = $this->Auth->user();\n\n\t\t$this->request->data['User'] = $adminUser;\n\t\t$this->request->data['User']['old_email'] = $adminUser['email'];\n\n\t\t$dob = $adminUser['date_of_birth'];\n\t\tif (!is_null($dob) && ($dob !== '')) {\n\t\t\tlist($dobYear, $dobMonth, $dobDay) = explode('-', $dob);\n\t\t\t$formattedDob = sprintf('%s-%s-%s', $dobMonth, $dobDay, $dobYear);\n\t\t\t$this->request->data['User']['date_of_birth'] = $formattedDob;\n\t\t}\n\n\t\t$gender = $adminUser['gender'];\n\n\t\t$profileImg = Common::getUserThumb($adminUser['id'], $adminUser['type'], 'medium', 'user_pic');\n\n\t\t$superAdminStatus = __('No');\n\t\tif (intval($adminUser['type']) === User::ROLE_SUPER_ADMIN) {\n\t\t\t$superAdminStatus = __('Yes');\n\t\t}\n\n\t\t$timezoneList = $this->Timezone->get_timezone_list();\n\n\t\t// form details\n\t\t$formId = 'AdminProfileEditForm';\n\t\t$changePasswordFormId = 'AdminChangePasswordForm';\n\t\t$changePasswordFields = $this->__listAdminUserChangePasswordFormFields();\n\t\t$inputDefaults = array(\n\t\t\t'label' => false,\n\t\t\t'div' => false\n\t\t);\n\n\t\t// validation\n\t\t$modelName = 'User';\n\t\t$this->JQValidator->addValidation($modelName, $this->AdminChangePasswordForm->validate, $changePasswordFormId);\n\t\t$this->JQValidator->addValidation($modelName, $this->AdminProfileForm->validate, $formId);\n\n\t\t$title_for_layout = 'Edit Profile';\n\n\t\t$this->set(compact('title_for_layout', 'modelName', 'changePasswordFields', 'formId', 'changePasswordFormId', 'timezoneList', 'inputDefaults', 'gender', 'profileImg', 'superAdminStatus'));\n\t}", "public function setSessionData(): void\n {\n $this->response->getSession()->set(\n config('form.session_key'),\n [\n $this->form->getID() => [\n 'data' => $this->body,\n 'messages' => $this->errors\n ]\n ]\n );\n }", "function process($data, $form) {\n\t\t// submitted form object\n\t\t$submittedForm = new SubmittedForm();\n\t\t$submittedForm->SubmittedByID = ($id = Member::currentUserID()) ? $id : 0;\n\t\t$submittedForm->ParentID = $this->ID;\n\t\t$submittedForm->Recipient = $this->EmailTo;\n\t\tif(!$this->DisableSaveSubmissions) $submittedForm->write();\n\t\t\n\t\t// email values\n\t\t$values = array();\n\t\t$recipientAddresses = array();\n\t\t$sendCopy = false;\n $attachments = array();\n\n\t\t$submittedFields = new DataObjectSet();\n\t\t\n\t\tforeach($this->Fields() as $field) {\n\t\t\t// don't show fields that shouldn't be shown\n\t\t\tif(!$field->showInReports()) continue;\n\t\t\t\n\t\t\t$submittedField = $field->getSubmittedFormField();\n\t\t\t$submittedField->ParentID = $submittedForm->ID;\n\t\t\t$submittedField->Name = $field->Name;\n\t\t\t$submittedField->Title = $field->Title;\n\t\t\t\t\t\n\t\t\tif($field->hasMethod('getValueFromData')) {\n\t\t\t\t$submittedField->Value = $field->getValueFromData($data);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(isset($data[$field->Name])) $submittedField->Value = $data[$field->Name];\n\t\t\t}\n\n\t\t\tif(!empty($data[$field->Name])){\n\t\t\t\tif(in_array(\"EditableFileField\", $field->getClassAncestry())) {\n\t\t\t\t\tif(isset($_FILES[$field->Name])) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// create the file from post data\n\t\t\t\t\t\t$upload = new Upload();\n\t\t\t\t\t\t$file = new File();\n\t\t\t\t\t\t$upload->loadIntoFile($_FILES[$field->Name], $file);\n\n\t\t\t\t\t\t// write file to form field\n\t\t\t\t\t\t$submittedField->UploadedFileID = $file->ID;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Attach the file if its less than 1MB, provide a link if its over.\n\t\t\t\t\t\tif($file->getAbsoluteSize() < 1024*1024*1){\n\t\t\t\t\t\t\t$attachments[] = $file;\n\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}\n\t\t\t}\n\t\t\tif(!$this->DisableSaveSubmissions) $submittedField->write();\n\t\t\t\n\t\t\t$submittedFields->push($submittedField);\n\t\t}\t\n\t\t$emailData = array(\n\t\t\t\"Sender\" => Member::currentUser(),\n\t\t\t\"Fields\" => $submittedFields\n\t\t);\n\n\t\t// email users on submit. All have their own custom options. \n\t\tif($this->EmailRecipients()) {\n\t\t\t$email = new UserDefinedForm_SubmittedFormEmail($submittedFields); \n\t\t\t$email->populateTemplate($emailData);\n\t\t\tif($attachments){\n\t\t\t\tforeach($attachments as $file){\n\t\t\t\t\t// bug with double decorated fields, valid ones should have an ID.\n\t\t\t\t\tif($file->ID != 0) {\n\t\t\t\t\t\t$email->attachFile($file->Filename,$file->Filename, $file->getFileType());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach($this->EmailRecipients() as $recipient) {\n\t\t\t\t$email->populateTemplate($recipient);\n\t\t\t\t$email->populateTemplate($emailData);\n\t\t\t\t$email->setFrom($recipient->EmailFrom);\n\t\t\t\t$email->setBody($recipient->EmailBody);\n\t\t\t\t$email->setSubject($recipient->EmailSubject);\n\t\t\t\t$email->setTo($recipient->EmailAddress);\n\t\t\t\t\n\t\t\t\t// check to see if they are a dynamic sender. eg based on a email field a user selected\n\t\t\t\tif($recipient->SendEmailFromField()) {\n\t\t\t\t\t$submittedFormField = $submittedFields->find('Name', $recipient->SendEmailFromField()->Name);\n\t\t\t\t\tif($submittedFormField) {\n\t\t\t\t\t\t$email->setFrom($submittedFormField->Value);\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// check to see if they are a dynamic reciever eg based on a dropdown field a user selected\n\t\t\t\tif($recipient->SendEmailToField()) {\n\t\t\t\t\t$submittedFormField = $submittedFields->find('Name', $recipient->SendEmailToField()->Name);\n\t\t\t\t\t\n\t\t\t\t\tif($submittedFormField) {\n\t\t\t\t\t\t$email->setTo($submittedFormField->Value);\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($recipient->SendPlain) {\n\t\t\t\t\t$body = strip_tags($recipient->EmailBody) . \"\\n \";\n\t\t\t\t\tif(isset($emailData['Fields']) && !$recipient->HideFormData) {\n\t\t\t\t\t\tforeach($emailData['Fields'] as $Field) {\n\t\t\t\t\t\t\t$body .= $Field->Title .' - '. $Field->Value .' \\n';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$email->setBody($body);\n\t\t\t\t\t$email->sendPlain();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$email->send();\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\treturn Director::redirect($this->Link() . 'finished?referrer=' . urlencode($data['Referrer']));\n\t}", "public function populate_application_from_leadform($data) {\n $app_user['txtFName'] = $data['first_name'];\n $app_user['txtLName'] = $data['last_name'];\n $app_user['txtEmailPer'] = $data['email'];\n $app_user['radGender'] = (isset($data['gender'])) ? $data['gender'] : '';\n $app_user['txtPermAdd'] = (isset($data['address'])) ? $data['address'] : '';\n $app_user['txtPhone'] = $data['phone'];\n $app_user['txtPermCity'] = (isset($data['city'])) ? $data['city'] : '';\n $app_user['ddlpermstate'] = (isset($data['state'])) ? $data['state'] : '';\n $app_user['txtPermZip'] = (isset($data['zip'])) ? $data['zip'] : '';\n $app_user['uid'] = $data['uid'];\n $app_user['ddlCountry'] = (isset($data['country'])) ? $data['country'] : '';\n\n if(isset($data['country']) && (($data['country'] == \"United States\") || ($data['country'] == \"US\"))) {\n $app_user['ddlCountry'] = \"US\";\n }\n else if(isset($data['country']) && $data['country'] == \"Canada\") {\n $app_user['ddlCountry'] = \"CA\";\n }\n\n $this->CI->Application_model->add($app_user['uid'], $app_user);\n }", "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}", "public function gatherData(FormEvent $event)\n {\n $this->data = $event->getData();\n }", "public function processData() {\r\r\n if ( is_array($this->data) && isset($this->data['args']) )\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if ( is_array($this->data) && isset($this->data['value']) ) {\r\r\n // If called from back-end non-post context\r\r\n $this->data = $this->data['value'];\r\r\n }\r\r\n }", "public function saveData(): void\n {\n studentLoader::saveStudent(new student($_POST['lastName'], $_POST['firstName'], $_POST['email'], new group($_POST['className']), $_POST['id']), $this->pdo);\n }", "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 }", "function add_assignment_form_submit_handler ($form, &$form_state) {\n $selected = eto_user_load($form_state['values']['selected_uid']);\n $user = eto_user_load($form_state['values']['uid']);\n\n $form_state['values']['selected_uid'] = $selected->uid;\n sb_assignment_insert ( (object) $form_state['values'] );\n\n\n drupal_set_message(ucwords($form_state['values']['type']) . \" '\" \n\t\t . l($selected->name, \"users/\" . $selected->uid) \n\t\t . \"' added to \" \n\t\t . l($user->name, \"users/\" . $user->uid),\n\t\t \"success\");\n $form_state['redirect'] = 'eto/admin/assignments';\n}", "function form_init_data() \r\n {\r\n //$this->set_hidden_element_value(\"id\", \"logon\");\r\n $dataForm = $this->getViewVariable('courseDataForm');\r\n\r\n $this->set_element_value(\"courseName\", $dataForm['c_name'] );\r\n $this->set_element_value(\"courseLanguage\", $dataForm['c_language'] );\r\n //$this->set_element_value(\"coursedescription\", $dataForm['c_description'] );\r\n $this->set_element_value(\"courseActive\", $dataForm['c_active'] );\r\n $this->set_element_value(\"courseAccess\", $dataForm['c_access'] );\r\n $this->set_element_value(\"coursedataDescripcion\", $dataForm['cd_descripcion'] );\r\n $this->set_element_value(\"coursedataVersion\", $dataForm['cd_version'] );\r\n $this->set_element_value(\"coursedataPalabrasClaves\", $dataForm['cd_claves'] );\r\n $this->set_element_value(\"coursedataDestinatarios\", $dataForm['cd_destinatarios'] );\r\n $this->set_element_value(\"coursedataConocimientosPrevios\", $dataForm['cd_conocimientos'] );\r\n $this->set_element_value(\"coursedataMetodologia\", $dataForm['cd_metodologia'] );\r\n\r\n }", "public function afterSubmit() {\n\t\t$this->setValue($this->serializeData($this->getValue()));\n\t}", "private function collectData() {\n $this->Name = $this->sanitize($_POST['Name']);\n $this->Street1 = $this->sanitize($_POST['Street1']);\n $this->Street2 = $this->sanitize($_POST['Street2']);\n $this->CityName = $this->sanitize($_POST['CityName']);\n $this->StateOrProvince = $this->sanitize($_POST['StateOrProvince']);\n $this->Country = $this->sanitize($_POST['Country']);\n $this->PostalCode = $this->sanitize($_POST['PostalCode']);\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 form_init_data()\r\n {\r\n $this->set_element_value(\"Swimmers\", FT_CREATE) ;\r\n $this->set_element_value(\"Swim Meets\", FT_CREATE) ;\r\n $this->set_element_value(\"Swim Teams\", FT_CREATE) ;\r\n }", "private function store()\n {\n $this->session->set('sergsxm_form_'.$this->formId, $this->parameters);\n }", "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 }", "protected function loadFormData()\n\t{\n\t\t// get data which the user previously entered into the form\n\t\t// the context 'com_u3abooking.edit.booking.data' is set in FormController\n\t\t$data = Factory::getApplication()->getUserState(\n\t\t\t'com_u3abooking.edit.booking.data',\n\t\t\tarray()\n\t\t);\n\t\tif (empty($data))\n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\treturn $data;\n\t}", "function form_init_data()\r\n {\r\n $this->set_hidden_element_value('_action', FT_ACTION_UPDATE) ;\r\n $this->set_hidden_element_value('swimmeetid', $this->getSwimMeetId()) ;\r\n\r\n $swimmeet = new SwimMeet() ;\r\n $swimmeet->LoadSwimMeetById($this->getSwimMeetId()) ;\r\n\r\n $this->set_element_value('Organization', $swimmeet->getOrgCode()) ;\r\n $this->set_element_value('Meet Name', $swimmeet->getMeetName()) ;\r\n $this->set_element_value('Meet Address 1', $swimmeet->getMeetAddress1()) ;\r\n $this->set_element_value('Meet Address 2', $swimmeet->getMeetAddress2()) ;\r\n $this->set_element_value('Meet State', $swimmeet->getMeetState()) ;\r\n $this->set_element_value('Meet Postal Code', $swimmeet->getMeetPostalCode()) ;\r\n $this->set_element_value('Meet Country', $swimmeet->getMeetCountryCode()) ;\r\n $this->set_element_value('Meet Code', $swimmeet->getMeetCode()) ;\r\n $this->set_element_value('Pool Altitude', $swimmeet->getPoolAltitude()) ;\r\n $this->set_element_value('Course Code', $swimmeet->getCourseCode()) ;\r\n\r\n $date = $swimmeet->getMeetStart(false) ;\r\n $this->set_element_value('Meet Start', array('year' => substr($date, 4, 4),\r\n 'month' => substr($date, 0, 2), 'day' => substr($date, 2, 2))) ;\r\n\r\n $date = $swimmeet->getMeetEnd(false) ;\r\n $this->set_element_value('Meet End', array('year' => substr($date, 4, 4),\r\n 'month' => substr($date, 0, 2), 'day' => substr($date, 2, 2))) ;\r\n }", "public function setValue() {\n if (isset($_POST['email'], $_POST['password'])) {\n $this->email = $this->mysqli->real_escape_string($_POST['email']);\n $this->password = md5($this->mysqli->real_escape_string($_POST['password']));\n }\n }", "function saveDataToSession(){\n\t\t$data = $this->getData();\n\t\tunset($data[\"AccountInfo\"]);\n\t\tunset($data[\"LoginDetails\"]);\n\t\tunset($data[\"LoggedInAsNote\"]);\n\t\tunset($data[\"PasswordCheck1\"]);\n\t\tunset($data[\"PasswordCheck2\"]);\n\t\tSession::set(\"FormInfo.{$this->FormName()}.data\", $data);\n\t}", "public function setPostFields($data){\n\t\t$this->post = array();\n\t\t$this->addPostFields($data);\n\t}", "public function setData($formData) {\n $this->form->setData($formData);\n return;\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}", "public static function formstore($data){\n\t\t//\n\t\t//var_dump($data);\n \t$fname=Input::get('fname');\n\t\t$username=Input::get('username');\n\t\t$password=Hash::make(Input::get('password'));\n\t\t$email=Input::get('email');\n\t\t$usertype=Input::get('usertype');\n\t\t$company=Input::get('company');\n\t\t$address=Input::get('address');\n\t\t$state=Input::get('state');\n\t\t$country=Input::get('country');\n\t\t$zip=Input::get('zip');\n\t\t$phonenum=Input::get('phonenum');\n\t\t//$remember_token=Input::get('remember_token');\n\n\n\t\t$users= new Registered_user(); //create new user model\n\n\t\t$users->fname=$fname;\n\t\t$users->username=$username;\n\t\t$users->password=$password;\n\t\t$users->email=$email;\n\t\t$users->usertype=$usertype;\n\t\t$users->company=$company;\n\t\t$users->address=$address;\n\t\t$users->state=$state;\n\t\t$users->country=$country;\n\t\t$users->zip=$zip;\n\t\t$users->phonenum=$phonenum;\n\t\t//$users->remember_token=$remember_token;\n\n\t\t // convert data format\n\t\n\t\t$users->save(); //save to 'registered_users' table\n\n }", "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}", "protected function loadFormData()\r\n {\r\n // Check the session for previously entered form data.\r\n $app = JFactory::getApplication();\r\n $data = $app->getUserState('com_data.edit.email.data', array());\r\n\r\n if (empty($data))\r\n {\r\n $data = $this->getItem();\r\n\r\n // Pre-select some filters (Status, Category, Language, Access) in edit form if those have been selected in Article Manager: Articles\r\n if ($this->getState('email.id') == 0)\r\n {\r\n $filters = (array) $app->getUserState('com_data.emails.filter');\r\n $data->set(\r\n 'state',\r\n $app->input->getInt(\r\n 'state',\r\n ((isset($filters['published']) && $filters['published'] !== '') ? $filters['published'] : null)\r\n )\r\n );\r\n\r\n $data->set('language', $app->input->getString('language', (!empty($filters['language']) ? $filters['language'] : null)));\r\n $data->set('access',\r\n $app->input->getInt('access', (!empty($filters['access']) ? $filters['access'] : JFactory::getConfig()->get('access')))\r\n );\r\n }\r\n }\r\n\r\n // If there are params fieldsets in the form it will fail with a registry object\r\n if (isset($data->params) && $data->params instanceof Registry)\r\n {\r\n $data->params = $data->params->toArray();\r\n }\r\n\r\n $this->preprocessData('com_data.email', $data);\r\n\r\n return $data;\r\n }", "public function populateRegisterForm($data=array())\n\t{\n\t\t# Get the User class.\n\t\trequire_once Utility::locateFile(MODULES.'User'.DS.'User.php');\n\t\t# Instantiate a new User object.\n\t\t$user=new User();\n\t\t# Set the Login object to the data member.\n\t\t$this->setUserObject($user);\n\n\t\ttry\n\t\t{\n\t\t\t# Set the passed data array to the data member.\n\t\t\t$this->setData($data);\n\n\t\t\t# Process any Login data held in SESSION and set it to the data data member. This overwrites any passed data.\n\t\t\t$this->setSessionDataToDataArray('register');\n\t\t\t# Remove any \"account\" sessions.\n\t\t\tunset($_SESSION['form']['account']);\n\t\t\t# Remove any \"audio\" sessions.\n\t\t\tunset($_SESSION['form']['audio']);\n\t\t\t# Remove any \"category\" sessions.\n\t\t\tunset($_SESSION['form']['category']);\n\t\t\t# Remove any \"content\" sessions.\n\t\t\tunset($_SESSION['form']['content']);\n\t\t\t# Remove any \"file\" sessions.\n\t\t\tunset($_SESSION['form']['file']);\n\t\t\t# Remove any \"image\" sessions.\n\t\t\tunset($_SESSION['form']['image']);\n\t\t\t# Remove any \"institution\" sessions.\n\t\t\tunset($_SESSION['form']['institution']);\n\t\t\t# Remove any \"language\" sessions.\n\t\t\tunset($_SESSION['form']['language']);\n\t\t\t# Remove any \"login\" sessions.\n\t\t\tunset($_SESSION['form']['login']);\n\t\t\t# Remove any \"post\" sessions.\n\t\t\tunset($_SESSION['form']['post']);\n\t\t\t# Remove any \"product\" sessions.\n\t\t\tunset($_SESSION['form']['product']);\n\t\t\t# Remove any \"publisher\" sessions.\n\t\t\tunset($_SESSION['form']['publisher']);\n\t\t\t# Remove any \"register\" sessions.\n\t\t\tunset($_SESSION['form']['register']);\n\t\t\t# Remove any \"search\" sessions.\n\t\t\tunset($_SESSION['form']['search']);\n\t\t\t# Remove any \"staff\" sessions.\n\t\t\tunset($_SESSION['form']['staff']);\n\t\t\t# Remove any \"video\" sessions.\n\t\t\tunset($_SESSION['form']['video']);\n\n\t\t\t# Set any POST values to the appropriate data array indexes.\n\t\t\t$this->setPostDataToDataArray();\n\n\t\t\t# Populate the data members with defaults, passed values, or data saved in SESSION.\n\t\t\t$this->setDataToDataMembers($user);\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tthrow $e;\n\t\t}\n\t}", "protected function setPutData()\n\t{\n\t\t$this->request->addPostFields($this->query->getParams());\n\t}", "public function generaldataformAction(){\n\t\t$form = new Bel_Forms_Builder('registration_form','/usermanagement/profile/save');\n\t\t$form->removeElement('user_password')\n\t\t\t ->removeElement('password2')\n\t\t\t ->removeElement('captcha');\n\t\t\n\t\t$form->populateForm($this->_auth->toArray());\n\t\t\n\t\t/*if($this->_request->getParam('error')){\n\t\t\t$this->view->assign('messages',$this->_messages->getMessages());\n\t\t}*/\n\t\t\n\t\t$this->view->assign('form',$form);\n\t\t$this->view->display('forms/ajax.tpl');\n\t}", "public function input($_data){\n\t\t$this->data=$_data;\n\t}", "protected function loadFormData(){\n // Check the session for previously entered form data.\n $data = JFactory::getApplication()->getUserState($this->option.'.edit.profile.data', array());\n \n if(empty($data)){\n $data = $this->getItem();\n }\n \n return $data;\n }", "private function processPostData() {\n\n if (isset($this->postDataArray['week']) && isset($this->postDataArray['year']))\n {\n\n $this->weekSelected = $this->cleanse_input($this->postDataArray['week']);\n $this->yearSelected = $this->cleanse_input($this->postDataArray['year']);\n }\n else\n {\n $this->weekSelected = $this->weeks[0];\n $this->yearSelected = $this->years[0];\n }\n }", "function performDataAction()\n{\n\tglobal $ajax;\n\n\t// XXX Set one and delete the other. This directly ties into\n\t// what HTTP method is being used: POST or GET.\n\t$key = getPostValue('assignment');\n\t$step = getPostValue('assignstep');\n\n\t// Render page.\n\t$html = formPage($key, $step);\t\n\t$ajax->sendCommand(ajaxClass::CMD_WMAINPANEL, $html);\n}", "public function postData()\n\t{\n\t\t$this->setCustomerName($_POST['frmcname']);\n\t\t$this->setCustomerAddress1($_POST['frmcaddy1']);\n\t\t$this->setCustomerAddress2($_POST['frmcaddy2']);\n\t\t$this->setCustomerCity($_POST['frmccity']);\n\t\t$this->setCustomerZipcode($_POST['frmczipcode']);\n\t\t$this->setCustomerState($_POST['frmcstate']);\n\t\t$this->setCustomerPhone( $_POST['frmcpnumber']);\n\t\t$this->setCustomerExt($_POST['frmcext']);\n\t\t$this->setCustomerFax($_POST['frmcfnumber']);\n\t\t$this->setCustomerEmail($_POST['frmcemail']);\n\t\t$this->setCustomerRdp($_POST['frmcrdp']);\n\t\t$this->setCustomerNotes($_POST['frmcnotes']);\n\t\t$this->setFlag($_POST['frmflaggedq']);\n\t\t$this->setFlagReason($_POST['frmflagreason']);\n\t}", "function assign($data) {\n\t\tunset($this->valid);\n\n\t\tforeach ($data as $field => $value) {\n\n\t\t\tif ($field == $this->id_field) {\n\t\t\t\t$this->id = $value;\n\t\t\t\t//continue;\n\t\t\t}\n\n\t\t\tif (!in_array($field, $this->protected_attributes()) && $this->field_exists($field) ) {\n\t\t\t\t$value = $this->cast($field, $value);\n\n\t\t\t\tif (method_exists($this, 'set_'.$field)) {\n\t\t\t\t\tcall_user_func(array(& $this, 'set_'.$field), $value);\n\t\t\t\t} else if (!$this->set_associated($field, $value)) {\n\t\t\t\t\t$this->data[$field] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function processAction() {\n $post = $this->request->getPost();\n $userTable = $this->getServiceLocator()->get('UserTable');\n// Load User entity\n $user = $userTable->getUser($post->id);\n// Bind User entity to Form\n $form = $this->getServiceLocator()->get('UserEditForm');\n $form->bind($user);\n $form->setData($post);\n// Save user\n $this->getServiceLocator()->get('UserTable')->saveUser($user);\n }", "public function pass(array $data) {\n foreach ($this->fields as $field) {\n $field->setValue($data[$field->getName()]);\n }\n }", "function adminSetFormInSession($formName){\n\t\tforeach($this->post as $key => $value){\n\t\t\t$_SESSION[$formName][$key]=$value;\n\t\t}\n\t}", "private function prepare_form_data()\n {\n $form_data = array(\n 'email' => array(\n 'name' => 'email',\n 'options' => array(\n '' => '--',\n ),\n 'extra' => array('id'=>'login-email', 'autofocus'=>''),\n ),\n 'password' => array(\n 'name' => 'password',\n 'options' => array(\n '' => '--',\n ),\n 'extra' => array('id'=>'login-password'),\n ),\n\n 'lbl-email' => array(\n 'target' => 'email',\n 'label' => 'E-mail Address',\n ),\n 'lbl-password' => array(\n 'target' => 'password',\n 'label' => 'Password',\n ),\n\n 'btn-submit' => array(\n 'value' => 'Login',\n 'extra' => array(\n 'class' => 'btn btn-primary',\n ),\n ),\n );\n\n return \\DG\\Utility::massage_form_data($form_data);\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}", "public function controller_processReceivedData() {\n // validate received form data\n // update data model\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}", "public static function saveFormData($data)\n {\n DB::table('users')->insert($data);\n }", "function form_init_data()\r\n {\r\n // Initialize the form fields\r\n\r\n $this->set_hidden_element_value(\"_action\", FT_ACTION_ADD) ;\r\n\r\n $this->set_element_value(\"Meet Start\", array(\"year\" => date(\"Y\"),\r\n \"month\" => date(\"m\"), \"day\" => date(\"d\"))) ;\r\n $this->set_element_value(\"Meet End\", array(\"year\" => date(\"Y\"),\r\n \"month\" => date(\"m\"), \"day\" => date(\"d\"))) ;\r\n\r\n // If the config is set to US only, initialize the country\r\n\r\n if (FT_US_ONLY)\r\n $this->set_element_value(\"Meet Country\",\r\n FT_SDIF_COUNTRY_CODE_UNITED_STATES_OF_AMERICA_VALUE) ;\r\n\r\n $this->set_element_value(\"Pool Altitude\", \"0\") ;\r\n }", "function pickup_submit()\n\t{\n\t\t$name = '_f_'.$this->name;\n\t\t$this->value = $GLOBALS[$name];\n\t}", "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 store(): void\r\n {\r\n if (empty($this->errors[$this->artribute])) {\r\n $this->data[$this->artribute] = $this->value;\r\n }\r\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 refreshFormData(){\r\n\t\t\t$data[\"campus\"] = $this->input->post(\"campus\");\r\n\t\t\t$this->load->view('gs_admission/issuance/IssueAdmissionForm2',$data);\r\n\t\t}", "private function _get_edit_data(&$data, $user) {\n\t\t$data['edit_form']['username'] = array(\n\t\t\t'type' => 'text',\n\t\t\t'value' => $user->username,\n\t\t\t'autocomplete' => 'off',\n\t\t\t'name' => 'username',\n\t\t\t'id' => 'edit_username'\n\t\t);\n\t\t$data['edit_form']['ingame_name'] = array(\n\t\t\t'type' => 'text',\n\t\t\t'value' => $user->ingame_name,\n\t\t\t'autocomplete' => 'off',\n\t\t\t'name' => 'ingame_name',\n\t\t\t'id' => 'edit_ingame_name'\n\t\t);\n\t\t$data['edit_form']['email'] = array(\n\t\t\t'type' => 'email',\n\t\t\t'value' => $user->email,\n\t\t\t'autocomplete' => 'off',\n\t\t\t'name' => 'email',\n\t\t\t'id' => 'edit_email'\n\t\t);\n\t\t$data['edit_form']['password'] = array(\n\t\t\t'type' => 'password',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'name' => 'password',\n\t\t\t'id' => 'password'\n\t\t);\n\t\t$data['edit_form']['password_verification'] = array(\n\t\t\t'type' => 'password',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'name' => 'password_verification',\n\t\t\t'id' => 'password_verification',\n\t\t\t'placeholder' => 'Verification'\n\t\t);\n\t\t$data['edit_form']['old_password'] = array(\n\t\t\t'type' => 'password',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'name' => 'old_password',\n\t\t\t'id' => 'old_password'\n\t\t);\n\t\t$data['edit_form']['about'] = array(\n\t\t\t'value' => $user->about,\n\t\t\t'autocomplete' => 'off',\n\t\t\t'name' => 'about',\n\t\t\t'id' => 'edit_about',\n\t\t\t'class' => 'about'\n\t\t\t);\n\t\t$data['edit_form']['submit'] = array(\n\t\t\t'value' => \"Update information\",\n\t\t\t'name' => 'submit',\n\t\t\t'type' => 'submit'\n\t\t\t);\n\t\t$data['change_picture']['profile']['upload'] = array(\n\t\t\t'type' => 'file',\n\t\t\t'name' => 'picture',\n\t\t\t);\n\t\t$data['change_picture']['profile']['submit'] = array(\n\t\t\t'type' => 'submit',\n\t\t\t'name' => 'submit',\n\t\t\t'value' => 'Change profile-picture'\n\t\t\t);\n\t\t$data['change_picture']['profile']['delete'] = array(\n\t\t\t'type' => 'submit',\n\t\t\t'name' => 'delete',\n\t\t\t'value' => 'Delete profile-picture'\n\t\t\t);\n\t\t$data['change_picture']['background']['upload'] = array(\n\t\t\t'type' => 'file',\n\t\t\t'name' => 'picture',\n\t\t\t);\n\t\t$data['change_picture']['background']['submit'] = array(\n\t\t\t'type' => 'submit',\n\t\t\t'name' => 'submit',\n\t\t\t'value' => 'Change background-picture'\n\t\t\t);\n\t\t$data['change_picture']['background']['delete'] = array(\n\t\t\t'type' => 'submit',\n\t\t\t'name' => 'delete',\n\t\t\t'value' => 'Delete background-picture'\n\t\t);\n\t}", "public function processRequest($data) {\n $this->select_user($data);\n }", "protected function setData()\n {\n $user = Auth::getUser();\n $cart = Cart::byUser($user);\n if ( ! $cart->payment_method_id) {\n $cart->setPaymentMethod(PaymentMethod::getDefault());\n }\n $this->setVar('cart', $cart);\n $this->setVar('paymentMethod', PaymentMethod::find($cart->payment_method_id) ?? PaymentMethod::getDefault());\n $this->setVar('step', $this->property('step'));\n $this->setVar('accountPage', GeneralSettings::get('account_page'));\n\n if ($orderId = request()->get('order')) {\n $orderId = $this->decode($orderId);\n $this->setVar('order', Order::byCustomer($user->customer)->find($orderId));\n }\n }", "protected function _processValidForm()\n {\n $table = $this->_getTable();\n\n $formValues = $this->_getForm()->getValues();\n\n if (!empty($formValues[$this->_getPrimaryIdKey()])) {\n $row = $this->_getRow($this->_getPrimaryId());\n } else {\n $row = $table->createRow();\n }\n\n foreach ($formValues as $key => $value) {\n if (isset($row->$key) && !$table->isIdentity($key)) {\n $row->$key = $value;\n }\n }\n\n $row->save();\n\n $this->_goto($this->_getBrowseAction());\n }", "public function set_user_info($data){\n\t\t\treturn $result=$this->save($data);\n\t\t}", "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$app = JFactory::getApplication();\n\t\t$data = $app->getUserState('com_cooltouraman.edit.course.data', array());\n\n\t\tif (empty($data))\n\t\t{\n\t\t\t$data = $this->getItem();\n\n\t\t\t// Pre-select some filters (Status, Category, Language, Access) in edit form if those have been selected in Article Manager: Articles\n\t\t\tif ($this->getState('course.id') == 0)\n\t\t\t{\n\t\t\t\t$filters = (array) $app->getUserState('com_cooltouraman.course.filter');\n\t\t\t\t$data->set(\n\t\t\t\t\t'state',\n\t\t\t\t\t$app->input->getInt(\n\t\t\t\t\t\t'state',\n\t\t\t\t\t\t((isset($filters['published']) && $filters['published'] !== '') ? $filters['published'] : null)\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t$data->set('catid', $app->input->getInt('catid', (!empty($filters['category_id']) ? $filters['category_id'] : null)));\n\t\t\t\t$data->set('language', $app->input->getString('language', (!empty($filters['language']) ? $filters['language'] : null)));\n\t\t\t\t$data->set('access', $app->input->getInt('access', (!empty($filters['access']) ? $filters['access'] : JFactory::getConfig()->get('access'))));\n\t\t\t}\n\t\t}\n\n\t\t// If there are params fieldsets in the form it will fail with a registry object\n\t\tif (isset($data->params) && $data->params instanceof Registry)\n\t\t{\n\t\t\t$data->params = $data->params->toArray();\n\t\t}\n\n\t\t$this->preprocessData('com_cooltouraman.course', $data);\n\n\t\treturn $data;\n\t}", "public function prepareForm()\n {\n // Searching for the data to populate the Form\n\n // Adding default value to the list\n\n // Setting the lists in $data array\n $data = [\n ];\n\n //dd($data);\n\n return $data;\n }", "public function valiteForm();", "public function postProcess() {\n\t\t//\t\t$this->setSubmittedValue(strtoupper($this->getSubmittedValue()));\n\t}", "function SignupAction($data, $form) {\n \n\t\t\n\t\t// Create a new object and load the form data into it\n\t\t$entry = new SearchContestEntry();\n\t\t$form->saveInto($entry);\n \n\t\t// Write it to the database.\n\t\t$entry->write();\n\t\t\n\t\tSession::set('ActionStatus', 'success'); \n\t\tSession::set('ActionMessage', 'Thanks for your entry!');\n\t\t\n\t\t//print_r($form);\n\t\tDirector::redirectBack();\n \n\t}", "function meta_boxes_save() {\r\n\t\t\r\n\t\t// Only process if the form has actually been submitted\r\n\t\tif (\r\n\t\t\tisset( $_POST['_wpnonce'] ) &&\r\n\t\t\tisset( $_POST['post_ID'] )\r\n\t\t) {\r\n\t\t\t\r\n\t\t\t// Do nonce security check\r\n\t\t\twp_verify_nonce( '_wpnonce', $_POST['_wpnonce'] );\r\n\t\t\t\r\n\t\t\t// Grab post ID\r\n\t\t\t$post_ID = (int) $_POST['post_ID'];\r\n\t\t\t\r\n\t\t\t// Iterate through each possible piece of meta data\r\n\t\t\tforeach( $this->post_meta as $key => $value ) {\r\n\t\t\t\tif ( isset( $_POST['_' . $key] ) ) {\r\n\t\t\t\t\t$data = esc_html( $_POST['_' . $key] ); // Sanitise data input\r\n\t\t\t\t\tupdate_post_meta( $post_ID, '_' . $key, $data ); // Store the data\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "public function processData() {\r\r\n if ( is_array($this->data) && isset($this->data['args']) )\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if ( is_array($this->data) && isset($this->data['value']) ) {\r\r\n // If called from back-end non-post context\r\r\n $this->e_data = $this->decode_param($this->data['value']);\r\r\n $this->data = $this->encode_param($this->data['value']);\r\r\n } else {\r\r\n // POST method or something else\r\r\n $this->e_data = $this->decode_param($this->data);\r\r\n $this->data = $this->encode_param($this->data);\r\r\n }\r\r\n // All keys are srings in array, merge it with defaults to override\r\r\n $this->e_data = array_merge($this->default_options, $this->e_data);\r\r\n /**\r\r\n * At this point the this->data variable surely contains the encoded data, no matter what.\r\r\n */\r\r\n }", "protected function loadFormData() \r\n\t{\r\n\t\t// Check the session for previously entered form data.\r\n\t\t$data = JFactory::getApplication()->getUserState('com_ktbtracker.edit.' . $this->getName() . '.data', array());\r\n\t\t\r\n\t\t// Attempt to get the record from the database\r\n\t\tif (empty($data)) {\r\n\t\t\t$data = $this->getItem();\r\n\t\t}\r\n\t\t\r\n\t\treturn $data;\r\n\t}", "public function setData() {\n\t\t$this->import($this->get());\n\t}", "abstract function setupform();", "public function processPrivateForm($data)\n {\n return;\n }", "public function setData($_data)\n {\n $this->_data = $_data;\n }", "function setFormData($data) {\r\n\t\t$data['why_use'] = $this->load->view('common/why_use_view', $data, TRUE);\r\n\t\t\r\n\t\t// load search block\r\n\t\t$data = buildTourSearchCriteria($data);\r\n\t\t\r\n\t\t$data['inc_css'] = get_static_resources('ads.min.css');\r\n\t\t\r\n\t\treturn $data;\r\n\t}", "protected function loadFormData(){\n\t\t\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_egoi.edit.egoi.data', array());\n\t\tif (empty($data)) {\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\treturn $data;\n\t}", "public function processUser(){\n \n $this->setCurrentUser();\n $this->setUsersAttributes();\n }", "public function storeFormValues( $params ) {\r\n \r\n // store the parameters\r\n $this->__construct( $params );\r\n \r\n }", "function processPostVars()\n {\n $this->id = $_POST['id'];\n $this->role = $_POST['role'];\n $this->firstname = trimStrip($_POST['firstname']);\n $this->surname = trimStrip($_POST['surname']);\n $this->email = trimStrip($_POST['email']);\n $this->login = trimStrip($_POST['login']);\n $this->password = trimStrip($_POST['pass1']);\n }", "public function processData() {\r\r\n if ( is_array($this->data) && isset($this->data['args']) )\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if ( is_array($this->data) && isset($this->data['value']) ) {\r\r\n // If called from back-end non-post context\r\r\n $this->e_data = $this->decode_param($this->data['value']);\r\r\n $this->data = $this->encode_param($this->data['value']);\r\r\n } else {\r\r\n // POST method or something else\r\r\n $this->e_data = $this->decode_param($this->data);\r\r\n $this->data = $this->encode_param($this->data);\r\r\n }\r\r\n /**\r\r\n * At this point the this->data variable surely contains the encoded data, no matter what.\r\r\n */\r\r\n }", "public function handleUserEntry()\n {\n $sessionClass = ReporticoSession();\n\n // First look for a parameter beginning \"submit_\". This will identify\n // What the user wanted to do.\n\n $hide_area = false;\n $show_area = false;\n $maintain_sql = false;\n $xmlsavefile = false;\n $xmldeletefile = false;\n if (($k = $this->getMatchingPostItem(\"/^submit_/\"))) {\n // Strip off \"_submit\"\n preg_match(\"/^submit_(.*)/\", $k, $match);\n\n // Now we should be left with a field element and an action\n // Lets strip the two\n $match1 = preg_split('/_/', $match[0]);\n $fld = $match1[1];\n $action = $match1[2];\n\n switch ($action) {\n case \"ADD\":\n // We have chosen to set a block of data so pass through Request set and see which\n // fields belong to this set and take appropriate action\n $this->addMaintainFields($fld);\n $show_area = $fld;\n break;\n\n case \"DELETE\":\n // We have chosen to set a block of data so pass through Request set and see which\n // fields belong to this set and take appropriate action\n $this->deleteMaintainFields($fld);\n $show_area = $fld;\n break;\n\n case \"MOVEUP\":\n // We have chosen to set a block of data so pass through Request set and see which\n // fields belong to this set and take appropriate action\n $this->moveupMaintainFields($fld);\n $show_area = $fld;\n break;\n\n case \"MOVEDOWN\":\n // We have chosen to set a block of data so pass through Request set and see which\n // fields belong to this set and take appropriate action\n $this->movedownMaintainFields($fld);\n $show_area = $fld;\n break;\n\n case \"SET\":\n // We have chosen to set a block of data so pass through Request set and see which\n // fields belong to this set and take appropriate action\n $this->updateMaintainFields($fld);\n $show_area = $fld;\n break;\n\n case \"REPORTLINK\":\n case \"REPORTLINKITEM\":\n // Link in an item from another report\n $this->linkInReportFields(\"link\", $fld, $action);\n $show_area = $fld;\n break;\n\n case \"REPORTIMPORT\":\n case \"REPORTIMPORTITEM\":\n // Link in an item from another report\n $this->linkInReportFields(\"import\", $fld, $action);\n $show_area = $fld;\n break;\n\n case \"SAVE\":\n $xmlsavefile = $this->query->xmloutfile;\n if (!$xmlsavefile) {\n trigger_error(ReporticoLang::templateXlate(\"UNABLE_TO_SAVE\") . ReporticoLang::templateXlate(\"SPECIFYXML\"), E_USER_ERROR);\n }\n\n break;\n\n case \"PREPARESAVE\":\n $xmlsavefile = $this->query->xmloutfile;\n $sessionClass::setReporticoSessionParam(\"execute_mode\", \"PREPARE\");\n\n if (!$xmlsavefile) {\n header(\"HTTP/1.0 404 Not Found\", true);\n echo '<div class=\"reportico-error-box\">' . ReporticoLang::templateXlate(\"UNABLE_TO_SAVE\") . ReporticoLang::templateXlate(\"SPECIFYXML\") . \"</div>\";\n die;\n }\n\n break;\n\n case \"DELETEREPORT\":\n $xmldeletefile = $this->query->xmloutfile;\n break;\n\n case \"HIDE\":\n $hide_area = $fld;\n break;\n\n case \"SHOW\":\n $show_area = $fld;\n break;\n\n case \"SQL\":\n $show_area = $fld;\n if ($fld == \"mainquerqury\") {\n // Main Query SQL Generation.\n $sql = stripslashes($_REQUEST[\"mainquerqury_SQL\"]);\n\n $maintain_sql = $sql;\n if (Authenticator::login()) {\n $p = new SqlParser($sql);\n if ($p->parse()) {\n $p->importIntoQuery($qr);\n if ($this->query->datasource->connect()) {\n $p->testQuery($this->query, $sql);\n }\n\n }\n }\n } else {\n // It's a lookup\n if (preg_match(\"/mainquercrit(.*)qury/\", $fld, $match1)) {\n $lookup = (int) $match1[1];\n $lookup_char = $match1[1];\n\n // Access the relevant crtieria item ..\n $qc = false;\n $ak = array_keys($this->query->lookup_queries);\n if (array_key_exists($lookup, $ak)) {\n $q = $this->query->lookup_queries[$ak[$lookup]]->lookup_query;\n } else {\n $q = new Reportico();\n }\n\n // Parse the entered SQL\n $sqlparm = $fld . \"_SQL\";\n $sql = $_REQUEST[$sqlparm];\n $q->maintain_sql = $sql;\n $q = new Reportico();\n $p = new SqlParser($sql);\n if ($p->parse()) {\n if ($p->testQuery($this->query, $sql)) {\n $p->importIntoQuery($q);\n $this->query->setCriteriaLookup($ak[$lookup], $q, \"WHAT\", \"NOW\");\n }\n }\n }\n }\n\n break;\n\n }\n }\n\n // Now work out what the maintainance screen should be showing by analysing\n // whether user pressed a SHOW button a HIDE button or keeps a maintenance item\n // show by presence of a shown value\n if (!$show_area) {\n // User has not pressed SHOW_ button - this would have been picked up in previous submit\n // So look for longest shown item - this will allow us to draw the maintenace screen with\n // the correct item maximised\n foreach ($_REQUEST as $k => $req) {\n if (preg_match(\"/^shown_(.*)/\", $k, $match)) {\n $containee = \"/^\" . $hide_area . \"/\";\n $container = $match[1];\n if (!preg_match($containee, $container)) {\n if (strlen($match[1]) > strlen($show_area)) {\n $show_area = $match[1];\n }\n }\n }\n }\n\n }\n\n if (!$show_area) {\n $show_area = \"mainquer\";\n }\n\n $xmlout = new XmlWriter($this->query);\n $xmlout->prepareXmlData();\n\n // If Save option has been used then write data to the named file and\n // use this file as the defalt input for future queries\n if ($xmlsavefile) {\n if ($this->query->allow_maintain != \"SAFE\" && $this->query->allow_maintain != \"DEMO\" && ReporticoApp::getConfig('allow_maintain')) {\n $xmlout->writeFile($xmlsavefile);\n $sessionClass::setReporticoSessionParam(\"xmlin\", $xmlsavefile);\n $sessionClass::unsetReporticoSessionParam(\"xmlintext\");\n } else {\n trigger_error(ReporticoLang::templateXlate(\"SAFENOSAVE\"), E_USER_ERROR);\n }\n\n }\n\n // If Delete Report option has been used then remove the file\n // use this file as the defalt input for future queries\n if ($xmldeletefile) {\n if ($this->query->allow_maintain != \"SAFE\" && $this->query->allow_maintain != \"DEMO\" && ReporticoApp::getConfig('allow_maintain')) {\n $xmlout->removeFile($xmldeletefile);\n $sessionClass::setReporticoSessionParam(\"xmlin\", false);\n $sessionClass::unsetReporticoSessionParam(\"xmlintext\");\n } else {\n trigger_error(ReporticoLang::templateXlate(\"SAFENODEL\"), E_USER_ERROR);\n }\n\n }\n\n $xml = $xmlout->getXmldata();\n $this->query->xmlintext = $xml;\n\n $this->query->xmlin = new XmlReader($this->query, false, $xml);\n $this->query->xmlin->show_area = $show_area;\n $this->query->maintain_sql = false;\n }", "protected function process()\n {\n $this->setSubmittedValues();\n \n if ( $this->error ) {\n $this->data['error']['form'] = 'Please check for errors.';\n return;\n }\n \n $this->addPaymentToDatabase();\n }", "public function setPostData($data) {\n\t\t$this->postData = $data;\n\t}", "function __data() {\n\t\tif ($data = $this->Session->read('data')) {\n\t\t\tforeach ($data as $k => $i) {\n\t\t\t\t$obj = ClassRegistry::init($k);\n\t\t\t\t$this->data[$k] = $i;\n\t\t\t}\n\t\t\t$this->Session->write('data', null);\n\t\t}\n\t\t// attempts to remember identity of commentor and prefill fields\n\t\tif (empty($this->data['Comment']) && $data = $this->Cookie->read('CommentUser')) {\n\t\t\t$this->data['Comment'] = $data;\n\t\t}\n\t}", "function update() {\n\t\tglobal $tpl, $lng;\n\n\t\t$form = $this->initForm(TRUE);\n\t\tif ($form->checkInput()) {\n\t\t\tif ($this->updateElement($this->getPropertiesFromPost($form))) {\n\t\t\t\tilUtil::sendSuccess($lng->txt('msg_obj_modified'), TRUE);\n\t\t\t\t$this->returnToParent();\n\t\t\t}\n\t\t}\n\n\t\t$form->setValuesByPost();\n\t\t$tpl->setContent($form->getHtml());\n\t}" ]
[ "0.6879008", "0.67440283", "0.6742243", "0.67021453", "0.66969603", "0.666315", "0.6487733", "0.6458788", "0.63520545", "0.63301873", "0.63288194", "0.62586707", "0.6256629", "0.62461996", "0.624598", "0.6236322", "0.6232091", "0.61999315", "0.6168742", "0.616817", "0.61649", "0.615528", "0.60619694", "0.60577935", "0.6051193", "0.6000006", "0.5987426", "0.5972771", "0.5972385", "0.5971855", "0.5971681", "0.59602034", "0.59375966", "0.5931197", "0.59244215", "0.5917168", "0.590413", "0.59031177", "0.5902491", "0.5886181", "0.5879257", "0.58623827", "0.58477086", "0.584754", "0.58427525", "0.584213", "0.5838395", "0.5834567", "0.58302504", "0.58279854", "0.5825964", "0.58216727", "0.58121115", "0.5806436", "0.57919925", "0.5783576", "0.5783478", "0.57802624", "0.5779001", "0.57693034", "0.5755235", "0.57444537", "0.5740767", "0.5739272", "0.573806", "0.5731078", "0.5729005", "0.5721493", "0.57186544", "0.5715956", "0.5704653", "0.57040226", "0.57021624", "0.57019657", "0.56997633", "0.5696361", "0.56898826", "0.56740123", "0.56685054", "0.5665055", "0.56577545", "0.56443685", "0.56314576", "0.56254554", "0.56229335", "0.56201756", "0.561974", "0.5614312", "0.5613535", "0.5611275", "0.5602502", "0.5601736", "0.5599856", "0.55986404", "0.5593536", "0.5582063", "0.5580622", "0.5578783", "0.55777395", "0.5571746", "0.55683017" ]
0.0
-1
Save changes to monograph.
function execute($request) { $monograph =& $this->getMonograph(); $monographDao =& DAORegistry::getDAO('MonographDAO'); // Clean any new release or feature object that may // exist associated with the current monograph series. $newReleaseDao =& DAORegistry::getDAO('NewReleaseDAO'); /* @var $newReleaseDao NewReleaseDAO */ $newReleaseDao->deleteNewRelease($monograph->getId(), ASSOC_TYPE_SERIES, $monograph->getSeriesId()); $featureDao =& DAORegistry::getDAO('FeatureDAO'); /* @var $featureDao FeatureDAO */ $featureDao->deleteFeature($monograph->getId(), ASSOC_TYPE_SERIES, $monograph->getSeriesId()); // Execute monograph metadata related operations. $this->_metadataFormImplem->execute($monograph, $request); $monograph->setSeriesId($this->getData('seriesId')); $monograph->setSeriesPosition($this->getData('seriesPosition')); $monographDao->updateMonograph($monograph); if ($monograph->getDatePublished()) { import('classes.search.MonographSearchIndex'); MonographSearchIndex::indexMonographMetadata($monograph); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final function save() {\n }", "public final function save()\n {\n }", "function save() {\r\n foreach ($this->_data as $v)\r\n $v -> save();\r\n }", "protected function save()\n\t{\n\t\t$this->saveItems();\n\t\t//$this->saveAssignments();\n\t\t//$this->saveRules();\n\t}", "public function save()\n {\n if ( !$this->unsaved ) {\n // either nothing has been changed, or data has not been loaded, so\n // do nothing by returning early\n return;\n }\n\n $this->write();\n $this->unsaved = false;\n }", "public function save() {\r\n $conn = GFSalsaConnector::instance();\r\n if ($conn) {\r\n $conn->saveObject($this->object, $this);\r\n }\r\n }", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save() {}", "public function save() {}", "public function save() {}", "public function save()\n {\n }", "public function save()\n {\n $this->persist($this->state);\n }", "public function save()\n {\n // For V2.0\n }", "public function save()\r\n {\r\n \r\n }", "public function save()\n \t{\n \t $this->getMapper()->save($this);\n \t}", "public function save():void;", "public function save()\n {\n $this->checkForNecessaryProperties();\n\n $this->update($this->getCurrentId(), $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() {\n\t\t\t\n\t\t}", "public function save() {\n }", "public function save() {\n }", "function saveData() {\n\n\t\t$this->getMapper()->saveData();\t\n\t\t\n\t\t\n\t}", "public function save()\n\t{\n\n\t}", "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 }", "protected function saving() {\n // This will get reimplemented by children when necessary\n }", "public function save() {\n }", "public function save()\n\t{\n\t\t$this->container->save($this);\n\t}", "public function saveSettings()\n {\n $this->store->save($this->data);\n }", "public function save()\n {\n return;\n }", "public abstract function save();", "public function save()\n {\n $this->save_meta_value('_sim_city_main_info', $this->city_main_info);\n\n $this->save_meta_value('_sim_city_shops', $this->city_shops);\n }", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "public function save() {\n\t\t$this->data[] = $this->current();\n\t}", "function save();", "function save();", "protected function saveUpdate()\n {\n }", "public function save()\r\n {\r\n //\r\n }", "function persist() ;", "public function save()\n\t{\n\t\t// No operation. This is a CLI session, we save nothing.\n\t}", "public function save()\n\t{\n\t\tif($this->beforeSave())\n\t\t{\n\t\t\t$dest = $this->getStorageFile();\n\t\t\t\n\t\t\tif(file_exists($dest) and is_writable($dest)===false)\n\t\t\t{\n\t\t\t\t@chmod($dest,0777);\n\t\t\t}\n\t\t\t\n\t\t\t$fp = fopen($dest,$this->mode);\n\t\t\tfwrite($fp,$this->data);\n\t\t\tfclose($fp);\n\t\t\t$this->afterSave();\n\t\t}\n\t}", "public\tfunction\tsave()\n\t\t{\n\t\t}", "public function save()\n {\n }", "public function save()\n {\n }", "public function save() {\n $this->lastModified = new \\DateTime();\n parent::save();\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 save()\n\t{\n\t\t$this->componentConfig->save();\n\t}", "private function save() {\n\t\t// Nur speichern, wenn nötig, also, wenn sich was geändert hat, also\n\t\t// wenn recompute gemacht wurde\n\t\tif ($this->need_recompute) {\n\t\t\tquery(\n\t\t\t\t\"INSERT INTO computed_maps SET world_id={$this->world_id}, \".\n\t\t\t\t\t\"map_id={$this->id}, \".\n\t\t\t\t\t\"time_computed=\".Time::get_t_now().\", \".\n\t\t\t\t\t\"insert_finished=0\"\n\t\t\t);\n\t\t\t$this->last_compute_id =\n\t\t\t\tmysql_result(query(\"SELECT LAST_INSERT_ID()\"),0);\n\t\t\t$this->last_compute_time = Time::get_t_now();\n\n\t\t\t$this->computed_map_data->save($this->last_compute_id);\n\t\t\t$this->computed_buildings_data->save($this->last_compute_id);\n\t\t\t$this->computed_tribes_data->save($this->last_compute_id);\n\t\t\t$this->computed_sector_data->save($this->last_compute_id);\n\t\t\t$this->moving_tribes_data->save();\n\n\t\t\t// TODO: ROLLBACK ON FAILURE\n\n\t\t\tquery(\n\t\t\t\t'UPDATE computed_maps SET insert_finished=1 '.\n\t\t\t\t'WHERE world_id='.$this->world_id.' AND map_id='.$this->id.' '.\n\t\t\t\t\t'AND compute_id='.$this->last_compute_id\n\t\t\t);\n\t\t}\n\t}", "public function autosaved()\n {\n }", "private function save(): void\n {\n foreach ($this->dataToSave as $file => $data) {\n $this->langFilesManager->fillKeys($file, $data);\n }\n }", "public function save()\n {\n if ($this->createDirectoryStructure($this->getPath())) {\n $content = $this->generateContents();\n file_put_contents($this->getPathname(), $content);\n }\n }", "function save() {\n\n\t\t// calls generic ORM save (insert or update)\n\t\tparent::save();\n\n\t}", "public function saveData()\r\n {\r\n \r\n }", "public function save()\n {\n //\n }", "public function save()\n {\n if ($this->id) {\n $this->update();\n } else {\n $this->id = $this->insert();\n }\n }", "public function persist() {}", "function save()\n {\n }", "function save()\n {\n }", "public function save()\n {\n $newPackage = [];\n foreach ($this->data as $key => $value){\n if(!isset($this->map[$key]))\n continue;\n $keyMapper = $this->map[$key];\n if(is_subclass_of($value, self::class)){\n $value->save();\n continue;\n }elseif (is_array($value)){\n foreach ($this->data as $model){\n if(is_subclass_of($value, self::class)){\n $model->save();\n }\n }\n }\n $newPackage[$keyMapper] = $value;\n }\n if(isset($this->data['id']) && $this->data['id'])\n $this->db->update($this->table, $newPackage, $this->data['id'], $this->key );\n else\n $this->db->insert($this->table, $newPackage);\n }", "public function save(){\n\n // Save the name of migration in prop (0000_00_00_000000_prefix.php)\n $this->migrationName = date('Y_m_d_'.Carbon::now()->format('His'),time()) . \"_\". $this->prefixFileName .\".php\";\n\n $this->document = $this->header;\n\n $this->document.= $this->up;\n $this->document.= $this->endUp;\n $this->document.= $this->down;\n $this->document.= $this->footer;\n\n return Storage::disk('migration')->put($this->migrationName, $this->document);\n\n }", "public function save(){\n }", "public function saveToDb()\n\t{\n\t\t$this->addDocument();\n\t\tparent::saveToDb();\n\t}", "function save()\n {\n /* remove objectclass GOhard if this is an ogroup tab */\n if(isset($this->parent->by_object['ogroup'])){\n $this->objectclasses = array();\n }\n\n plugin::save();\n\n /* Strip out 'default' values */\n foreach(array(\"gotoXMethod\",\"gotoXDriver\", \"gotoXResolution\", \"gotoXColordepth\",\n \"gotoLpdServer\", \"gotoXKbModel\", \"gotoXKbLayout\",\n \"gotoXKbVariant\", \"gotoXMouseType\", \"gotoXMouseport\") as $val){\n\n if ($this->attrs[$val] == \"default\"){\n $this->attrs[$val]= array();\n }\n }\n\n if($this->gotoXMethod == \"default\"){\n $this->attrs['gotoXdmcpServer'] = array();\n $this->attrs['gotoXMethod'] = array();\n }else{\n $this->attrs['gotoXdmcpServer'] = array_values($this->selected_xdmcp_servers);\n }\n\n\n if($this->AutoSync){\n $this->attrs['gotoXHsync'] = \"30+55\";\n $this->attrs['gotoXVsync'] = \"50+70\";\n }\n\n /* Write back to ldap */\n $ldap= $this->config->get_ldap_link();\n $ldap->cd($this->dn);\n $this->cleanup();\n $ldap->modify ($this->attrs); \n new log(\"modify\",\"terminal/\".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());\n\n if (!$ldap->success()){\n msg_dialog::display(_(\"LDAP error\"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));\n }\n $this->handle_post_events(\"modify\");\n\n /* Send goto reload event */\n if(count($this->attrs)){\n $this->send_goto_reload();\n }\n }", "public function save()\n {\n $db = DatabaseUtil::db_connect($this->database);\n $db->query('update ' . $this->table . 'set ' . $this->column . ' = ' . $this->value . ' where ID=' . $this->ID);\n $db->close();\n }", "public function save(): void\n {\n $this->em->persist($this->model);\n $this->em->flush();\n }", "public function save($data): void;", "public function saveToDb()\n\t{\n\t\t$db = \\App\\Db::getInstance('admin');\n\t\t$tablesData = array_intersect_key($this->getData(), $this->changes);\n\t\tforeach ($tablesData as $key => $value) {\n\t\t\t$db->createCommand()->update($this->baseTable, ['value' => $value], ['type' => $this->type, 'name' => $key])->execute();\n\t\t}\n\t}", "function saveVister()\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 save() {\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 save()\n {\n if ($this->id === null) {\n $this->insert();\n } else {\n $this->update();\n }\n }", "public function persist();", "public function save()\n\t{\n\t\t$input = $this->getDataArray();\n\t\treturn $this->modify( $input, FALSE );\n\t}", "public function save()\n\t{\n\t\t$input = $this->getDataArray();\n\t\treturn $this->modify( $input, FALSE );\n\t}", "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 saveCache()\n {\n if($this->isCacheExists()){\n if($this->isUpdateRequired()){\n $this->updateCache();\n }\n } else {\n $this->packData()->writeFile();\n }\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 saveToDB()\n {\n }", "function save() {\n\t\t// If every question is answered, save to the db. Otherwise, to session.\n\t\tif($this->isComplete()) {\n\t\t\t$this->saveToRecord();\n\t\t} else {\n\t\t\t$this->saveToSession();\n\t\t}\n\t}", "protected function saveState(): void\n {\n $em = $this->getEntityManager();\n $em->flush();\n }" ]
[ "0.74158", "0.73081094", "0.72422874", "0.69941837", "0.6932125", "0.6916212", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6890792", "0.6882258", "0.6882196", "0.6882196", "0.6864407", "0.6862747", "0.68267274", "0.6752273", "0.67500705", "0.67405844", "0.66993356", "0.6653237", "0.6649981", "0.6637687", "0.6637687", "0.66278183", "0.65564543", "0.65454507", "0.6533402", "0.6501338", "0.6500359", "0.6499495", "0.64953095", "0.6490389", "0.64609766", "0.64276755", "0.64276755", "0.64276755", "0.64276755", "0.64276755", "0.64077944", "0.63865554", "0.63865554", "0.63827187", "0.63756627", "0.63544416", "0.6336556", "0.6334463", "0.6326148", "0.6324247", "0.6324247", "0.6322938", "0.62990797", "0.6293287", "0.62910986", "0.62886935", "0.62870127", "0.6283726", "0.6272523", "0.6261504", "0.62103146", "0.6209106", "0.6195161", "0.6170427", "0.6170427", "0.6168556", "0.61661524", "0.6166131", "0.6155577", "0.6134345", "0.61208355", "0.609993", "0.6096244", "0.6093313", "0.6091336", "0.6085336", "0.60810477", "0.60765314", "0.6075923", "0.6073856", "0.6072636", "0.6072636", "0.60716057", "0.60500294", "0.6027876", "0.60223454", "0.60209626", "0.6020254" ]
0.0
-1
Associate a category with a monograph.
function insertEntry(&$request, $newRowId) { $application =& PKPApplication::getApplication(); $request =& $application->getRequest(); $categoryId = $newRowId['name']; $categoryDao =& DAORegistry::getDAO('CategoryDAO'); $monographDao =& DAORegistry::getDAO('MonographDAO'); $press =& $request->getPress(); $monograph =& $this->getMonograph(); $category =& $categoryDao->getById($categoryId, $press->getId()); if (!$category) return true; // Associate the category with the monograph $monographDao->addCategory( $monograph->getId(), $categoryId ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addCategory($monographId, $categoryId) {\n\t\t$this->update(\n\t\t\t'INSERT INTO submission_categories\n\t\t\t\t(submission_id, category_id)\n\t\t\tVALUES\n\t\t\t\t(?, ?)',\n\t\t\tarray(\n\t\t\t\t(int) $monographId,\n\t\t\t\t(int) $categoryId\n\t\t\t)\n\t\t);\n\t}", "public function addCategoryToGroupByName($gorup_name, $category_name);", "public function addCategoryToGroupById($gorup_id, $category_id);", "public function add(Category $category);", "function _cmd_associateToCategory(&$input, &$output)\n {\n $query = \"\n DELETE FROM \".$this->dbh->quoteIdentifier($this->conf['table']['category-media']).\"\n WHERE category_id = $input->categoryId\";\n $ok = $this->dbh->query($query);\n\n // then add new one\n $query = \"\n INSERT INTO \".$this->dbh->quoteIdentifier($this->conf['table']['category-media']).\"\n VALUES ($input->categoryId, $input->mediaId)\";\n $ok = $this->dbh->query($query);\n }", "public function addCategory(HostCategory $category): void;", "function _addCategory()\n\t{\n\t\t// Create categories for our component\n\t\t$basePath = JPATH_ADMINISTRATOR.'/components/com_categories';\n\t\trequire_once $basePath.'/models/category.php';\n\t\t$config\t\t= array('table_path' => $basePath.'/tables');\n\t\t$catmodel\t= new CategoriesModelCategory($config);\n\t\t$catData\t= array('id' => 0, 'parent_id' => 0, 'level' => 1, 'path' => 'uncategorized', 'extension' => 'com_sermonspeaker',\n\t\t\t\t\t\t'title' => 'Uncategorized', 'alias' => 'uncategorized', 'description' => '', 'published' => 1, 'language' => '*');\n\t\t$catmodel->save($catData);\n\t\t$id = $catmodel->getItem()->id;\n\n\t\t$db = JFactory::getDBO();\n\t\t// Updating the example data with 'Uncategorized'\n\t\t$query\t= $db->getQuery(true);\n\t\t$query->update('#__sermon_sermons');\n\t\t$query->set('catid = '.(int)$id);\n\t\t$query->where('catid = 0');\n\t\t$db->setQuery($query);\n\t\t$db->execute();\n\t\t// Speakers\n\t\t$query->update('#__sermon_speakers');\n\t\t$db->setQuery($query);\n\t\t$db->execute();\n\t\t// Series\n\t\t$query->update('#__sermon_series');\n\t\t$db->setQuery($query);\n\t\t$db->execute();\n\n\t\treturn;\n\t}", "public function createCategory();", "public function addCategory(CategoryElementInterface $category);", "public function setCategory() {\n /**\n *\n * @todo make a separate config file for the default category ?!\n */\n $defaultCategory = 1;\n $category = Category::find()->all();\n $newCat = $this->strProcessing($this->category);\n $k = NULL;\n if (!empty($newCat)) {\n foreach ($category as $value) {\n $cat = explode(',', $value['synonyms']);\n $cat = array_map(array($this, 'strProcessing'), $cat);\n $k = array_search($newCat, $cat);\n if ($k !== NULL && $k !== FALSE) {\n $k = $value['id'];\n break;\n }\n }\n }\n if ($k) {\n $this->category = $k;\n } else {\n $this->category = $defaultCategory;\n }\n return TRUE;\n }", "public function addMultipleCategoriesToGroup();", "function target_add_cat($cat)\n{\n\tif ($GLOBALS['VERBOSE']) pf('...'. $cat['name']);\n\n\tq('INSERT INTO '. $GLOBALS['DBHOST_TBL_PREFIX'] .'cat (id, name, view_order, cat_opt) \n\t VALUES('. (int)$cat['id'] .','. _esc($cat['name']) .','. (int)$cat['view_order'] .', 3)');\n\t$GLOBALS['cat_map'][ $cat['id'] ] = $cat['id'];\n/*\nfud_use('cat.inc', true);\n$nc = new fud_cat;\n$nc->name = $c->name;\n$nc->description = $c->description;\n$nc->view_order = $c->disporder;\n$nc->cat_opt = 1|2;\t// This should be the default in cat.inc. Fix in next release and del this line.\n$GLOBALS['cat_map'][$c->fid] = $nc->add('LAST');\t// FIRST should also be defaulted.\n*/\n}", "public function add(Category $category): Category\n {\n }", "function sensible_category() {\n wp_update_term(1, 'category', array(\n 'name' => 'News',\n 'slug' => 'news', \n 'description' => 'News'\n ));\n }", "public function add_membership_category()\n {\n $this->modify_object('Booking_membership_category');\n }", "private function packCategory()\n {\n /** @var modCategory $category */\n $category = $this->modx->newObject('modCategory');\n $category->set('category', self::PKG_NAME);\n\n $this->packCategoryElements($category, 'plugins');\n\n $this->builder->putVehicle($this->builder->createVehicle($category, [\n xPDOTransport::UNIQUE_KEY => 'category',\n xPDOTransport::PRESERVE_KEYS => false,\n xPDOTransport::UPDATE_OBJECT => true,\n xPDOTransport::RELATED_OBJECTS => true,\n xPDOTransport::RELATED_OBJECT_ATTRIBUTES => [\n 'Plugins' => [\n xPDOTransport::PRESERVE_KEYS => true,\n xPDOTransport::UPDATE_OBJECT => true,\n xPDOTransport::UNIQUE_KEY => 'name'\n ],\n 'PluginEvents' => [\n xPDOTransport::PRESERVE_KEYS => true,\n xPDOTransport::UPDATE_OBJECT => true,\n xPDOTransport::UNIQUE_KEY => ['pluginid','event'],\n ]\n ]\n ]));\n }", "public function setCategoryAttribute($value)\n {\n $this->attributes['category'] = strtoupper($value);\n }", "function set_acl_category($category)\n {\n $this->acl_category = $category;\n foreach ($this->plugins as $name => $obj) {\n $this->plugins[$name]->set_acl_category($category);\n }\n }", "public function add_category() {\n\t $this->use_layout=false;\n\t\t$this->model = new $this->model_class(WaxUrl::get(\"id\"));\n\t\t$category = new CmsCategory(substr($_POST[\"id\"], 4));\n\t\t$this->model->categories = $category;\n\t\tif(!$this->attached_categories = $this->model->categories) $this->attached_categories= array();\n\t\t$cat = new CmsCategory;\n\t\tif(!$this->all_categories = $cat->all() ) $this->all_categories=array();\t\t\n\t\t$this->cat_partial = $this->render_partial(\"list_categories\");\n\t}", "public function addCategory(GmthApiCategorie $categorie)\n\t{\n\t\t$this->_categories[] = $categorie->getId();\n\t}", "public function addCategory(Category $category){\n $req =$this->db->prepare('INSERT INTO p5_files_category(category_name)\n VALUES(?)');\n $req->execute(array($category->getCategory_name()));\n }", "public function addCathegory($values)\n\t{\n\t\treturn $this->getTable('kategoria')->insert(array(\n\t\t\t'Nazov' => $values->nazov,\n\t\t));\n\t}", "public function setCategory($value)\n {\n $this->setItemValue('category', ['id' => (int)$value]);\n }", "public function letCatIn(Cat $cat) {\r\n\t\t$this->_cats[] = $cat;\r\n\t}", "public function storeCategory(array $data): void\n {\n }", "function SELLMYHOME_add_category( $cat_name, $taxonomy ){\n //Check if term exists before attempting to create\n if( !term_exists( $cat_name, $taxonomy ) ){\n $my_cat = array('cat_name' => $cat_name, \n 'category_description' => 'Default, Permanent Category', \n 'category_nicename' => SELLMYHOME_clean($cat_name), \n 'category_parent' => '',\n 'taxonomy' => $taxonomy);\n\n // Create the category\n wp_insert_category($my_cat); \n } \n}", "public function updateCategory()\n {\n Category::findOrFail($this->category_id)->update([\n 'category_name' => $this->categoryName,\n 'slug' => Str::slug($this->categoryName),\n 'class' => $this->class,\n\n ]);\n }", "function setCategory($value) \n {\n return $this->instance->setcategory($value);\n }", "public function add_category() {\n $this->category();\n $this->loadView(\"editors/category_editor\");\n }", "public function addCategoryMm(CategoryMm $l)\n\t{\n\t\t$this->collCategoryMms[] = $l;\n\t\t$l->setMm($this);\n\t}", "function wptp_add_categories_to_attachments() {\r\n register_taxonomy_for_object_type( 'category', 'attachment' );\r\n}", "public function addCategory($name, $domain = null);", "function InsertCategory_board()\n {\n $this->model->InsertCategory();\n }", "function AddCategory(&$category)\n\t{\n\t\tif ($category instanceof Category)\n\t\t{\n\t\t\tif (in_array($this, $category->supplierList, true))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$found = false;\n\t\t\t\tforeach ($this->_categoryList as $category2)\n\t\t\t\t{\n\t\t\t\t\tif ($category->categoryId > 0 && $category->categoryId == $category2->categoryId)\n\t\t\t\t\t{\n\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!$found)\n\t\t\t\t{\n\t\t\t\t\t$this->_categoryList[] = $category;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function addCategory($category) {\n $this->listingCategories[] = $category;\n }", "public function add()\n {\n $category = new stdClass();\n $category->category_id = null;\n $category->name = null;\n $data = [\n 'page' => 'add',\n 'row' => $category\n ];\n $this->template->load('template', 'product/category/category_add', $data);\n }", "public function addCategory(){\n if (isset($_POST[\"add_category\"])) {\n $categories = $this->model('Categories');\n $system = $this->model('System');\n $cat_name = $_POST[\"cat_name\"];\n $cat_sef_url = $system->seflink($cat_name);\n\n $categories->addCat($cat_name,$cat_sef_url);\n }\n // where to go after comment has been added\n header('location: ' . URL . 'yonetim/categories');\n }", "public function setCategory(?SubmissionCategory $value): void {\n $this->getBackingStore()->set('category', $value);\n }", "public function category(){\n\n Excel::import(new ComponentsImport,'/imports/categories.csv');\n $cats = array_values(array_unique(Cache::get('category')));\n for($i=0;$i<count($cats);$i++){\n $sub = new Category();\n $sub->name = $cats[$i];\n $sub->save();\n }\n }", "public function updateAssociatedCategories(){\n foreach ($this->getTable()->getAssociatedCategories() as $meal_category) {\n try{\n $cat = new Yourdelivery_Model_Meal_Category($meal_category['id']);\n $img = $cat->getImage(true);\n }\n catch (Yourdelivery_Exception_Database_Inconsistency $e){\n continue;\n } \n }\n }", "public function add()\n {\n $category = $this->Category->newEntity();\n if ($this->request->is('post')) {\n $category = $this->Category->patchEntity($category, $this->request->getData());\n if ($this->Category->save($category)) {\n $this->Flash->success(__('The category has been saved.'));\n\n return $this->redirect(['action' => 'index']);\n }\n $this->Flash->error(__('The category could not be saved. Please, try again.'));\n }\n $this->set(compact('category'));\n }", "function _make_cat_compat(&$category)\n {\n }", "private function addCategory(HTTPRequest $request)\n {\n if ($this->manager->getManagerOf('Category')->getCategoryByName($request->postData('newCategory')) != null) {\n Session::getInstance()->setFlash('danger', 'Cette catégorie existe déjà.');\n } else {\n if ($request->postExists('newCategory') && ($this->manager->getManagerOf('Category')->getCategoryByName($request->postData('newCategory')) == false)) {\n $category = new Category(\n ['name' => $request->postData('newCategory')]\n );\n\n if ($category->getErrors() != null) {\n $category->getErrorMessage();\n } else {\n $this->manager->getManagerOf('Category')->addNewCategory($category);\n Session::getInstance()->setFlash('success', 'Une nouvelle catégorie a été ajoutée.');\n }\n }\n }\n }", "public function category_add() {\n\t\t// Setup validation\n\t\t$this->data['validation'] = \"\";\n\t\t$this->data['category']\t= array('name' => '', 'url_name' => '');\n\t\t\n\t\t// Handle POST\n\t\tif ($this->mojo->input->post('category')) {\n\t\t\t// Get the category data\n\t\t\t$this->data['category']\t= $this->mojo->input->post('category');\n\t\t\t\n\t\t\t// Insert it!\n\t\t\tif ($this->mojo->blog_model->insert_category($this->data['category'])) {\n\t\t\t\t// It's success\n\t\t\t\t$response['result'] = 'success';\n\t\t\t\t$response['reveal_page'] = site_url('admin/addons/blog/categories_all');\n\t\t\t\t$response['message'] = 'Successfully created category';\n\t\t\t\t\n\t\t\t\texit($this->mojo->javascript->generate_json($response));\n\t\t\t} else {\n\t\t\t\t// There have been validation errors\n\t\t\t\t$response['result'] = 'error';\n\t\t\t\t$response['message'] = $this->mojo->blog_model->validation_errors;\n\t\t\t\t\n\t\t\t\t// Output the response\n\t\t\t\texit($this->mojo->javascript->generate_json($response));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Show the view\n\t\t$this->_view('category_add');\n\t}", "public function insert() {\n\t\t\t$conn = parent::connect();\n\t\t\t$sql = \"INSERT INTO \" . TBL_CATEGORY . \" ( \n\t\t\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t\t\talias,\n\t\t\t\t\t\t\t\tdescription\n\t\t\t\t\t\t\t) VALUES (\n\t\t\t\t\t\t\t\t:title,\n\t\t\t\t\t\t\t\t:alias,\n\t\t\t\t\t\t\t\t:description\t\t\t\t\n\t\t\t\t\t\t\t)\";\n\t\t\ttry {\n\t\t\t\t$st = $conn->prepare($sql);\n\t\t\t\t$st->bindValue(\":title\", $this->data[\"title\"], PDO::PARAM_STR);\n\t\t\t\t$st->bindValue(\":alias\", $this->data[\"alias\"], PDO::PARAM_STR);\n\t\t\t\t$st->bindValue(\":description\", $this->data[\"description\"], PDO::PARAM_STR);\n\t\t\t\t$st->execute();\n\t\t\t\tparent::disconnect($conn);\n\t\t\t} catch (PDOException $e) {\n\t\t\t\tparent::disconnect($conn);\n\t\t\t\tdie(\"Query failed: \" . $e->getMessage());\n\t\t\t}\n\t\t}", "public function setCategory($aId, $aCategory) {\n list($lId, $lCategory) = array(intval($aId), $aCategory);\n \n $lSql = 'SELECT count(*) FROM `al_cms_ref_category` WHERE `content_id`='.esc($lId);\n $lCount = CCor_Qry::getInt($lSql);\n if($lCount < 1) {\n // insert new category reference\n $lSql = 'INSERT INTO `al_cms_ref_category` (`content_id`, `category`) VALUES ('.esc($lId).', '.esc($lCategory).')';\n CCor_Qry::exec($lSql);\n }\n }", "public function setCategory($category)\n {\n if(strlen($category) <= 25 && strlen($category) > 0 && preg_match('#^[a-zA-Z- ]*$#', $category)) {\n $this->category = $category;\n }\n }", "function init_category($title) {\n $category = ORM::for_table('pw_category')->create();\n $category->cat_title = $title;\n $category->save();\n return $category;\n}", "function createCategory($category)\r\n{\r\n $results = false;\r\n \r\n $db = dbconnect();\r\n \r\n $stmt = $db->prepare(\"INSERT INTO categories SET category = :category\");\r\n \r\n $binds = array(\r\n // Used to place new array information under a new ID in Categories table\r\n \":category\" => $category,\r\n );\r\n \r\n if ($stmt->execute($binds) && $stmt->rowCount() > 0) \r\n {\r\n $results = true;\r\n }\r\n \r\n return $results; \r\n}", "function createCategories()\n {\n $currentCategories = $this->loadCategories();\n\n foreach ($this->categories as $category)\n {\n // Skip adding category if it already exists\n if (in_array($category, $currentCategories))\n {\n continue;\n }\n\n // Create a copy of the template array for category properties\n $data = array_merge($this->categoryTemplate);\n\n // Set the category description from the translation key in en-GB.com_cajobboard.sys.ini\n // remove any spaces from the category title when building the translation key\n $data['title'] = Text::_('COM_CAJOBBOARD_CATEGORY_TITLE_' . strtoupper(str_replace(' ', '', $category)));\n\n $data['description'] = $data['title'];\n\n // Initialize a new category\n $category = Table::getInstance('Category');\n\n // Bind passed category parameters to Category model\n $category->bind($data);\n\n // setLocation(integer $referenceId, string $position = 'after')\n $category->setLocation($category->getRootId(), 'last-child');\n\n // Check to make sure our data is valid. check() will auto generate alias if not set above.\n if (!$category->check())\n {\n throw new \\Exception($category->getError(), 500);\n\n return false;\n }\n\n // Store the category\n if (!$category->store(true))\n {\n throw new \\Exception($category->getError(), 500);\n\n return false;\n }\n\n // Build the path for our category and set it in the database\n $category->rebuildPath($category->id);\n }\n\n Table::getInstance('Category')->rebuild();\n }", "function setCategory($object) { \n /* you can itentify the item with $object->Item->ShopId */ \n}", "public function setCategoryId($categoryId);", "protected function _initCatagory()\r\n\t{\r\n\t\tMage::dispatchEvent('vendor_catalog_controller_category_init_before', array('controller_action' => $this));\r\n\t\t$categoryId = (int) $this->getRequest()->getParam('id', false);\r\n\t\tif (!$categoryId) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$category = Mage::getModel('vendorscategory/category')\r\n\t\t->load($categoryId);\r\n\t\tif (!Mage::helper('vendorscategory')->canShow($category)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif(!Mage::registry(\"vendor_id\") && !Mage::registry(\"vendor\") && !Mage::registry(\"current_vendor\")){\r\n\t\t\t//echo $category->getVendorId();exit;\r\n\t\t\t$vendorObj = Mage::getModel('vendors/vendor')->load($category->getVendorId());\r\n\r\n\t\t\t//var_dump($vendorObj->getData());exit;\r\n\t\t\tMage::register('vendor_id', $vendorObj->getVendorId());\r\n\t\t\tMage::register('vendor', $vendorObj);\r\n\t\t\tMage::register('current_vendor', $vendorObj);\r\n\t\t}\r\n\t\t\r\n\t\tMage::register('current_vendor_category', $category);\r\n\t\tMage::register('current_vendor_entity_key', $category->getPath());\r\n\t\ttry {\r\n\t\t\tMage::dispatchEvent(\r\n\t\t\t'vendor_catalog_controller_category_init_after',\r\n\t\t\tarray(\r\n\t\t\t'category' => $category,\r\n\t\t\t'controller_action' => $this\r\n\t\t\t)\r\n\t\t\t);\r\n\t\t} catch (Mage_Core_Exception $e) {\r\n\t\t\tMage::logException($e);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\r\n\t\treturn $category;\r\n\t}", "protected function assignCategory() \r\r\n {\r\r\n if (($this->category === false || !Validate::isLoadedObject($this->category) || !$this->category->inShop() || !$this->category->isAssociatedToShop()) && Category::inShopStatic($this->product->id_category_default, $this->context->shop)) {\r\r\n $this->category = new Category((int) $this->product->id_category_default, (int) $this->context->language->id);\r\r\n }\r\r\n\r\r\n $sub_categories = array();\r\r\n if (Validate::isLoadedObject($this->category)) {\r\r\n $sub_categories = $this->category->getSubCategories($this->context->language->id, true);\r\r\n\r\r\n //$rootCategory = $this.category\r\r\n // various assignements before Hook::exec\r\r\n $this->context->smarty->assign(array(\r\r\n 'category' => $this->category,\r\r\n 'rootCategory' => Category::getDepthCategory($this->category->id, 2),\r\r\n 'subCategories' => $sub_categories,\r\r\n 'id_category_current' => (int) $this->category->id,\r\r\n 'id_category_parent' => (int) $this->category->id_parent,\r\r\n 'return_category_name' => Tools::safeOutput($this->category->getFieldByLang('name')),\r\r\n 'categories' => Category::getHomeCategories($this->context->language->id, true, (int) $this->context->shop->id),\r\r\n ));\r\r\n }\r\r\n }", "public function setCategory($category)\n {\n $this->category = $category;\n }", "public function setCategory($category)\n {\n $this->category = $category;\n }", "function lm_save_category() {\n\t@copy(LM_CDATA, LM_CBACKUP);\n\t$id = isset($_POST['category-id']) ? intval($_POST['category-id']) : null;\n\t$cid = isset($_POST['category-cid']) ? intval($_POST['category-cid']) : time();\n\t$arr = array('cid'=>$cid, 'name'=>safe_slash_html($_POST['category-name']));\n\tif (function_exists('return_i18n_languages')) {\n\t\tforeach(return_i18n_languages() as $lang) {\n\t\t\tif ($lang != return_i18n_default_language()) {\n\t\t\t\t$arr['name_'.$lang] = safe_slash_html($_POST['category-name_'.$lang]);\n\t\t\t}\n\t\t}\n\t}\n\t$categories = lm_get_categories();\n\tif (isset($id))\n\t\t$categories[$id] = $arr;\n\telse\n\t\t$categories[] = $arr;\n\tif (lm_c_to_xml($categories))\n\t\tlm_display_message(i18n_r(LM_PLUGIN.'/SUCCESS_SAVE'), true, false, true);\n\telse\n\t\tlm_display_message(i18n_r(LM_PLUGIN.'/ERROR_SAVE'), false);\n}", "function addCategory() {\n var_dump($this->request->data);\n if ($this->request->is('post') || $this->request->is('put')) {\n $ci = $this->CategoryItem->create();\n var_dump($ci);\n if ($this->CategoryItem->save($this->request->data)) {\n $this->Session->setFlash(__('The %s has been saved', __('link')), 'flash/success');\n } else {\n $this->Session->setFlash(__('The %s could not be saved. Please, try again.', __('link')), 'flash/failure');\n }\n// $this->redirect(array('action' => 'edit', $this->Item->id));\n } else {\n $this->redirect(array('action' => 'index'));\n }\n }", "protected function setupCategories()\n {\n static $done;\n\n if (!empty($done)) {\n return;\n }\n\n $c = new Categories();\n $c->setContext('G_Access');\n $c->setIsActive(true);\n $c->save();\n\n $ci = new CategoriesI18n();\n $ci->setId($c->getId());\n $ci->setTitle('Girl Accessories');\n $ci->setLocale('da_DK');\n $ci->setContent('test 1.2.3');\n $ci->save();\n\n $c = new Categories();\n $c->setContext('LG_Access');\n $c->setIsActive(true);\n $c->save();\n\n $ci = new CategoriesI18n();\n $ci->setId($c->getId());\n $ci->setTitle('Little Girl Accessories');\n $ci->setLocale('da_DK');\n $ci->setContent('test 1.2.3');\n $ci->save();\n\n $done = true;\n }", "public function insert(PDO &$pdo) {\n\t\t// make sure category doesn't already exist\n\t\tif($this->categoryId === null) {\n\t\t\t//create query template\n\t\t\t$query\n\t\t\t\t= \"INSERT INTO category (name) VALUES (:name)\";\n\t\t\t$statement = $pdo->prepare($query);\n\n\t\t\t// bind the variables to the place holders in the template\n\t\t\t$parameters = array(\"name\" => $this->name);\n\t\t\t$statement->execute($parameters);\n\n\t\t\t//update null subcategory with what mySQL just gave us\n\t\t\t$this->categoryId = intval($pdo->lastInsertId());\n\t\t}\n\t}", "function insert(category $cat)\n {\n $query = \"INSERT INTO categories (categories_id, name, tag, description, slug, active)\n VALUE ('$cat->category_id', '$cat->name', '$cat->tag', '$cat->description', '$cat->slug', $cat->active)\";\n $result = $this->db->insert($query);\n }", "function sos_chapter_change_cat_object() {\n global $wp_taxonomies;\n $labels = &$wp_taxonomies['product_cat']->labels;\n $labels->name = 'Topic';\n $labels->singular_name = 'Topic';\n $labels->add_new = 'Add Topic';\n $labels->add_new_item = 'Add Topic';\n $labels->edit_item = 'Edit Topic';\n $labels->new_item = 'Topic';\n $labels->view_item = 'View Topic';\n $labels->search_items = 'Search Topics';\n $labels->not_found = 'No Topics found';\n $labels->not_found_in_trash = 'No Topics found in Trash';\n $labels->all_items = 'All Topics';\n $labels->menu_name = 'Topic';\n $labels->name_admin_bar = 'Topic';\n}", "public function insert_category($category){\n\n\t\t mysql_query(\"INSERT INTO `categories` SET `cat` = '$category'\");\n\n\t\t\treturn true;\n\n\t}", "public function setAxis($category)\n {\n parent::setAttr(\"axis\", $category);\n }", "public function AddCategory(CategoryTSE $category) {\n $this->Categories[] = $category;\n }", "public function add_category($category)\n {\n if (is_array($category)) {\n $this->db->insert($this->table_name, $category);\n \n if ($this->db->insert_id() > 0) {\n return $this->db->insert_id();\n } else {\n $this->error_message = 'Category add unsuccessful. DB error.';\n return false;\n }\n } else {\n $this->error_message = 'Invalid parameter.';\n return false;\n }\n }", "public function store($categoria)\n {\n $this->db->insert('categorias', $categoria);\n }", "public function test_registerCategory()\n {\n $ODOO_ID = 21;\n $MAGE_ID = 43;\n /** === Setup Mocks === */\n // $this->_registerMageIdForOdooId(EntityCategory::ENTITY_NAME, $mageId, $odooId);\n // $this->_repoBasic->addEntity($entityName, $bind);\n $this->mRepoGeneric\n ->shouldReceive('addEntity')->once();\n /** === Call and asserts === */\n $res = $this->obj->registerCategory($MAGE_ID, $ODOO_ID);\n }", "protected function registerCategory()\n {\n $this->app->bind(\n 'Isern\\Storage\\Category\\CategoryRepositoryInterface',\n 'Isern\\Storage\\Category\\EloquentCategoryRepository'\n );\n }", "public function addExpertCategory(ExpertCategory $l)\n\t{\n\t\tif ($this->collExpertCategorys === null) {\n\t\t\t$this->initExpertCategorys();\n\t\t}\n\t\tif (!in_array($l, $this->collExpertCategorys, true)) { // only add it if the **same** object is not already associated\n\t\t\tarray_push($this->collExpertCategorys, $l);\n\t\t\t$l->setUser($this);\n\t\t}\n\t}", "public function get_category()\n {\n return 'Graphical';\n }", "public function get_category()\n {\n return 'Graphical';\n }", "public function addCategory($table, $data)\n {\n\n if (isset($data)) {\n $result=$this->dynamicInsert($table, $data);\n }\n }", "public function add_attr_cat()\n\t{\n\t\t$rest_id=$this->session->userdata('user_rest_uns');\n\t\t$cat_name=$this->input->post('cat_name');\n\t\t$query=$this->db->insert(\"food_attribute\",array(\"f_att_name\"=>$cat_name,\"rest_id\"=>$rest_id));\n\t\t\n\t\tif($query)\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}", "function orderCategory( $uid, $inc ) {\r\n\tglobal $database;\r\n\r\n\t$row = new mosCategory( $database );\r\n\t$row->load( $uid );\r\n\t$row->move( $inc, \"section='com_eventcal'\" );\r\n}", "public function setCategoryIcon($categoryIcon);", "public function registerCategory($elements_manager)\n {\n $elements_manager->addCategory('my-widgets', [\n 'title' => $this->l('My Widgets'),\n 'icon' => 'fa fa-font',\n ]);\n }", "public function categoryAction()\n\t{\n\t\t$id = (int) $this->getRequest()->getParam('id');\n\t\t$this->view->category = $this->_blogService->findCategory($id);\n\t}", "public function addCategory(CategoryInterface $category): NodeInterface;", "public function setCategoryIdAttribute($value)\n\t{\n\t\t$this->attributes['category_id'] = ($value) ? $value : null;\n\t}", "public function addCategory()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t$category = $_POST['category'];\n\t\t\t$sql = \"insert into lib_category (category,add_date,staff_id) \n\t\t\t\t\tvalues('\" . $category . \"','\" . date('Y-m-d') . \"','\" . cookie('staffAccount') . \"') \";\n\t\t\t$cate = D('Category');\n\t\t\t$return = $cate->execute($sql);\n\n\t\t\tif ($return) {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'Add successfully!'\n\t\t\t\t));\n\t\t\t\techo $json;\n\n\t\t\t} else {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'SQL Error!'\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t}\n\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Please Login!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\n\t}", "public function categorie()\n {\n $data[\"categories\"]=$this->categories->list();\n $this->template_admin->displayad('categories' , $data);\n }", "public function page_add_edit_cat()\n\t{\n\t\t// Edition\n\t\t$cat_name = '';\n\t\tif ($this->mode == 'edit_cat')\n\t\t{\n\t\t\t$sql = 'SELECT cat_name\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'smilies_cat\n\t\t\t\t\tWHERE cat_id = ' . $this->id;\n\t\t\t$result = Fsb::$db->query($sql);\n\t\t\t$data = Fsb::$db->row($result);\n\t\t\tif (!$data)\n\t\t\t{\n\t\t\t\t$this->mode = 'add_cat';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tFsb::$db->free($result);\n\t\t\t\t$cat_name = $data['cat_name'];\n\t\t\t}\n\t\t}\n\n\t\tFsb::$tpl->set_switch('smileys_add_cat');\n\t\tFsb::$tpl->set_vars(array(\n\t\t\t'L_ADD_EDIT' =>\t\t($this->mode == 'add_cat') ? Fsb::$session->lang('adm_smiley_add_cat') : Fsb::$session->lang('adm_smiley_edit_cat'),\n\t\t\t'CAT_NAME' =>\t\t$cat_name,\n\n\t\t\t'U_ACTION' =>\t\tsid('index.' . PHPEXT . '?p=posts_smiley&amp;mode=' . $this->mode . '&amp;id=' . $this->id),\n\t\t));\n\t}", "public function setUp()\n {\n $category = new Category();\n $category->setActive(true);\n $category->setPosition(1);\n $category->setVisibility([Model\\Brand::VISIBILITY_FACEBOOK]);\n\n $i18n = new Model\\I18n();\n $i18n->setName('Foobar name');\n $i18n->setLocale('pt_PT');\n $i18n->setDescription('Foobar description');\n\n $category->setI18n([$i18n]);\n\n $this->config = Configuration::getDefaultConfiguration()\n ->setApiKey('APIToken', '083e7be2ca947a899db97d00db4f512db6a85551');\n\n $this->resourceAPI = new CategoriesApi(\n new Client(),\n $this->config\n );\n\n $response = $this->resourceAPI->addCategories($category);\n\n $this->resourceId = $response->getData()[0]->getId();\n }", "public function save() {\n if (self::getCategoryById($this->id) == null) {\n // should create\n $sql = \"INSERT INTO category (name) VALUES ('%s') RETURNING id;\";\n $auth_user = User::getUserById(1);\n $sql = sprintf($sql, pg_escape_string($this->name));\n $results = self::$connection->execute($sql);\n $this->id = $results[0][\"id\"];\n } else {\n // should update\n $sql = \"UPDATE category SET name='%s' WHERE id=%d\";\n $sql = sprintf($sql, pg_escape_string($this->name), addslashes($this->id));\n self::$connection->execute($sql);\n }\n }", "function additem ($category = null, $name = null, $weight = null, $price = null){\n try {\n $data=array(\"name\"=>$name,\"weight\"=>$weight,\"price\"=>$price);\n foreach ($this->content as $inventary) \n array_push($inventary->$category ,$data);\n } catch (Exception $e) {\n echo \"your selected category not found or add it first\";\n }\n }", "public function __construct(Category $category)\n {\n $this->category = $category;\n }", "public function __construct(Category $category)\n {\n $this->category = $category;\n }", "public function testCategoryMap()\n {\n $this->assertEquals(Record::mapCategory('Labor'), 'labor');\n $this->assertEquals(Record::mapCategory('工具器具備品'), 'tools_equipment');\n $this->assertEquals(Record::mapCategory('広告宣伝費'), 'promotion');\n $this->assertEquals(Record::mapCategory('販売キャンペーン'), 'promotion');\n $this->assertEquals(Record::mapCategory('SEO'), 'promotion');\n $this->assertEquals(Record::mapCategory('SEO', true), 'seo');\n $this->assertEquals(Record::mapCategory('地代家賃'), 'rent');\n $this->assertEquals(Record::mapCategory('packing & delivery expenses'), 'delivery');\n $this->assertEquals(Record::mapCategory('Revenue'), 'revenue');\n $this->assertEquals(Record::mapCategory('収益'), 'revenue');\n $this->assertEquals(Record::mapCategory('水道光熱費'), 'utility');\n $this->assertEquals(Record::mapCategory('法定福利費'), 'labor');\n $this->assertEquals(Record::mapCategory('法定福利費', true), 'welfare');\n }", "public function category_add() {\n $this->autoRender = false;\n $params = $this->request->data;\n //echo \"<pre>\";print_r($params);echo \"</pre>\"; exit;\n $categoryTable = TableRegistry::get('SkillCategory');\n $getCategory = $categoryTable->find()->select(['id'])->where(['category_name' => $params['category_name']])->toArray();\n if(empty($getCategory)){\n $category = $categoryTable->newEntity($params);\n if ($categoryTable->save($category)) {\n echo json_encode(\n [\n 'status' => 1,\n 'message' => \"Skill Category Added!\",\n ]\n );\n exit;\n }\n }else{\n echo json_encode(\n [\n 'status' => 0,\n 'message' => \"Skill Category Already Exists!\",\n ]\n );\n exit;\n }\n \n }", "public function setCategory($value)\n {\n return $this->set('Category', $value);\n }", "function makeCategory($ar_kat)\r\n\t{\r\n\t\tforeach($ar_kat as $val)\r\n\t\t{\r\n\t\t\t$this->trainNewCategory($val, $val);\r\n\t\t}\r\n\t\t\r\n\t\t/*isi word probability*/\r\n\t\tforeach($ar_kat as $val) //untuk setiap kategori\r\n\t\t{\r\n\t\t\tforeach ($this->arr_wc[$val]->vocab as $key => $row)\r\n\t\t\t{\r\n\t\t\t\t$prob = (1 + $row) / ($this->ctgrmgr->listCategory[$val]->jumWordInCategory + $this->arr_wc[$val]->jumVocab);\r\n\t\t\t\t//echo \"$row \";\r\n\t\t\t\t$this->ctgrmgr->listCategory[$val]->addWordProb($key, $prob);\r\n\t\t\t}\r\n\t\t\tif ($this->debug)\r\n\t\t\t{\r\n\t\t\t\techo \"<br/>\";\r\n\t\t\t\techo \"jum in category : \"; echo $this->ctgrmgr->listCategory[$val]->jumWordInCategory; echo \"<br/>\";\r\n\t\t\t\techo \"jum vocab : \"; echo $this->arr_wc[$val]->jumVocab; echo \"<br/>\";\r\n\t\t\t\techo \"get cat prob $val : \"; echo $this->ctgrmgr->getCatProb($val); echo \"<br/>\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->serializeCat();\r\n\t}", "function addCategory($object) {\n $object->Item->ShopId = 'yourReturnedCategoryIdOnMarketplace_'.rand(1000, 9999); \n}", "function setup_cat()\n {\n $this->ipsclass->DB->simple_construct( array( \"select\" => 'perms_view, def_view, id, name', 'from' => 'gallery_categories', 'where' => \"id={$this->ipsclass->input['cat']}\" ) );\n $this->ipsclass->DB->simple_exec(); \n $cat = $this->ipsclass->DB->fetch_row();\n\n // Are we allowed to view this category?\n if( ! $this->ipsclass->check_perms( $cat['perms_view'] ) )\n {\n $this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) ); \n }\n\n return $cat;\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}", "public function addCategory(){ \n $cookies = new CookieModel();\n $cookie_id = $cookies -> read();\n if (! $cookie_id) $this->redirect('/');\n\n\t \t$name = $_REQUEST['name'];\n $father = $_REQUEST['father'];\n\t\t\t$form = M(\"categoryinfo\");\n\t\t\t$addnew['name'] = $name;\n $addnew['father'] = $father;\n\t\t\t$result = $form->add($addnew);\n\t\t\t$this->redirect('/index.php/Admin/dish');\n\t\t\t\t//else {$this->error('添加失败');}\n }", "public function Category($category_arr = null) {\n if ($category_arr!=null) {\n self::checkConnection();\n $this->validateAndSetData($category_arr);\n $this->checkIfCurrent();\n }\n }", "public function addCategory($category_name){\n\n //write the query to insert into taable\n $query = \"INSERT INTO category(category_name) \n VALUES ('$category_name')\";\n\n //check if the query() runs // data is insert into users table\n if ($this->dbobj->dbcon->query($query)===true){\n\n\n \n echo \" Category was successfully added\";\n \n }\n else{\n echo \"Error\".$this->dbobj->dbcon->error;\n }\n }", "public static function addCategoryResult ($data)\n\t{\n\t\t$category_id = (int)$data['category_id'];\n\t\t$language_id = (int)$data['language_id'];\n\t\t\n\t\tif ($category_id && $language_id && isset($data['category_name'], $data['description'])) {\n\t\t\t$data['category_name'] = geoString::fromDB($data['category_name']);\n\t\t\t$data['description'] = geoString::fromDB($data['description']);\n\t\t\tself::$_getInfoCache[$category_id][$language_id] = $data;\n\t\t}\n\t}", "public function addCategoryForFood($food_id, $category_name){\n\t\t$this->db->trans_start();\n\t\t\n\t\t// look for the category_name\n\t\t$query = $this->db->query('\n\t\t\tselect c.id, c.name\n\t\t\tfrom food_category c\n\t\t\twhere\n\t\t\t\tupper(c.name) = upper(?)', array(trim($category_name)));\n\t\t$results = $query->result();\n\t\tif (count($results)>0){\n\t\t\t// use this category for tagging\n\t\t\t\n\t\t\t$category_id = $results[0]->id;\n\t\t\t\n\t\t\t// check if it's already tagged\n\t\t\t$query = $this->db->query('\n\t\t\t\tselect 1\n\t\t\t\tfrom food_category_assoc a\n\t\t\t\twhere\n\t\t\t\t\ta.food_id=? and a.food_category_id=?', array($food_id, $category_id));\n\t\t\t$results = $query->result();\n\t\t\tif (count($results)==0){\n\t\t\t\t// tag it\n\t\t\t\t\n\t\t\t\tif (!$this->db->query('insert into food_category_assoc (food_id, food_category_id) values (?,?)', array($food_id, $category_id))){\n\t\t\t\t\treturn $this->db->error;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn \"tag already exists\";\n\t\t\t}\n\t\t} else {\n\t\t\t// create a new category\n\t\t\t\n\t\t\tif (!$this->db->query('insert into food_category (name) values (?)', array($category_name))){\n\t\t\t\treturn $this->db->error;\n\t\t\t}\n\t\t\t$category_id = $this->db->insert_id();\n\t\t\tif (!$this->db->query('insert into food_category_assoc (food_id, food_category_id) values (?,?)', array($food_id, $category_id))){\n\t\t\t\treturn $this->db->error;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->db->trans_complete();\n\t\treturn true;\n\t}", "public function testUpdateCategoryUsingPUT()\n {\n }" ]
[ "0.6738484", "0.66203797", "0.65558666", "0.63031536", "0.6238169", "0.62294567", "0.60964334", "0.6037472", "0.590923", "0.5875892", "0.5875404", "0.586617", "0.5851523", "0.58497566", "0.5722964", "0.5667861", "0.5605701", "0.55817026", "0.557679", "0.55412143", "0.5508311", "0.54697514", "0.5452097", "0.54485583", "0.54407376", "0.5440623", "0.5421893", "0.54208595", "0.5399328", "0.5398141", "0.5373225", "0.5369912", "0.53630143", "0.53207386", "0.5300113", "0.5288157", "0.5266637", "0.52622664", "0.52608263", "0.5257994", "0.5256477", "0.5244911", "0.5228157", "0.5207417", "0.5202418", "0.5200909", "0.5194923", "0.51920784", "0.51875436", "0.5183891", "0.5183438", "0.51817083", "0.51812464", "0.51808256", "0.5179999", "0.5179999", "0.51726", "0.5170874", "0.5168635", "0.51684326", "0.51612586", "0.51501566", "0.5123761", "0.51033646", "0.5101873", "0.50956273", "0.5090779", "0.5083744", "0.50774425", "0.50719535", "0.5065391", "0.5065391", "0.5064224", "0.5060128", "0.5051788", "0.50402147", "0.50350004", "0.50268036", "0.5021772", "0.50207853", "0.50156295", "0.5011444", "0.5009395", "0.5004375", "0.5002569", "0.4999585", "0.4987166", "0.4987166", "0.49732524", "0.4967839", "0.49677736", "0.49671066", "0.496286", "0.49577492", "0.495416", "0.49499395", "0.49420413", "0.4932542", "0.49271014", "0.49215975", "0.49148172" ]
0.0
-1
Delete a category association.
function deleteEntry(&$request, $rowId) { if ($rowId) { $categoryDao =& DAORegistry::getDAO('CategoryDAO'); $monographDao =& DAORegistry::getDAO('MonographDAO'); $category =& $categoryDao->getById($rowId); if (!is_a($category, 'Category')) { assert(false); return false; } $monograph =& $this->getMonograph(); $monographDao->removeCategory($monograph->getId(), $rowId); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete() {\n $sql = sprintf(\"DELETE FROM category WHERE id=%d\", $this->id);\n self::$connection->execute($sql);\n }", "public function delete_category()\r\n\t\t{\r\n\t\t\t$this->errno = DB_OK;\r\n\t\t\t\r\n\t\t\tif ( $this->cat_id == -1 )\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tSuch category hasn't been created\r\n\t\t\t{\r\n\t\t\t\t$this->errno = WRONG_ID;\r\n\t\t\t\treturn ;\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\t$this->con->query(\"START TRANSACTION;\");\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tTransaction is needed despite the one query as delete is on cascade\r\n\t\t\t\r\n\t\t\tif ( ! ( $result = $this->con->query ( \"DELETE FROM category WHERE cat_id=$this->cat_id\" ) ) )\r\n\t\t\t{\t\t\t\r\n\t\t\t\t$this->con->query(\"ROLLBACK;\");\r\n\t\t\t\t$this->errno = MYSQL_ERROR;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tFailed to connect\t\t\t\r\n\t\t\t\treturn ;\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif( $this->con->affected_rows == 0 )\r\n\t\t\t{\t\t\r\n\t\t\t\t$this->con->query(\"ROLLBACK;\");\r\n\t\t\t\t$this->errno = CATEGORY_DONT_EXIST;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tthis query should affect 1 row\t\t\t\r\n\t\t\t\treturn ;\t\t\t\t\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\t$this->con->query(\"COMMIT;\");\r\n\t\t\t\r\n\t\t}", "public function actionCategoryDelete()\n {\n $this->_assertCanManageCategories();\n\n $category_id = $this->_input->filterSingle('faq_id', XenForo_Input::UINT);\n\n // Delete category\n $dw = XenForo_DataWriter::create('Iversia_FAQ_DataWriter_Category');\n $dw->setExistingData($category_id);\n $dw->delete();\n\n // Delete associated questions\n $this->_getQuestionModel()->deleteOrphanQuestions($category_id);\n\n return $this->responseRedirect(\n XenForo_ControllerResponse_Redirect::SUCCESS,\n XenForo_Link::buildPublicLink('faq'),\n new XenForo_Phrase('iversia_faq_category_deleted')\n );\n }", "public function deleteAction()\n {\n // enforce permissions.\n $this->acl->check('categories', 'manage');\n\n // require post request method.\n $request = $this->getRequest();\n if (!$request->isPost()) {\n throw new P4Cms_AccessDeniedException(\n \"Cannot delete category. Request method must be http post.\"\n );\n }\n\n $id = $request->getParam('id', $request->getParam('category'));\n $category = Category_Model_Category::fetch($id);\n $category->delete();\n\n $this->view->category = $category;\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 }", "public function destroy(Categoria $categoria)\n {\n //\n }", "public function destroy(Categoria $categoria)\n {\n //\n }", "public function destroy(Categoria $categoria)\n {\n //\n }", "public function destroy(Categoria $categoria)\n {\n //\n }", "public function deleting(Category $category)\n {\n Subscription::whereHas('team', function ($q) use ($category) {\n $q->whereHas('category', function ($qq) use ($category) {\n $qq->where('id', $category->id);\n });\n })->delete();\n $category->teams()->delete();\n $category->allUsers()->delete();\n $category->activities()->delete();\n $category->events()->delete();\n $category->heroes()->delete();\n $category->champions()->delete();\n $category->coaches()->delete();\n }", "public function destroy($category)\n {\n $categories = Category::findOrFail($category);\n $categories->delete();\n }", "public function deletecategory(){\n\t\n\t\t$id = $this->request->getParameter(\"actionid\");\n\t\t$modelCategory = new CaCategory();\n\t\t$modelCategory->delete($id);\n\t\n\t\t// generate view\n\t\t$this->redirect(\"catalogadmin/categories\");\n\t}", "public function DeleteGroupCategory() {\n\t\t\t$this->objGroupCategory->Delete();\n\t\t}", "public function deleted(Category $category)\n {\n //\n }", "public function deleted(Category $category)\n {\n //\n }", "public function destroy(Category $category)\n {\n //\n }", "public function destroy(Category $category)\n {\n //\n }", "public function destroy(Category $category)\n {\n //\n }", "public function destroy(Category $category)\n {\n //\n }", "public function destroy(Category $category)\n {\n //\n }", "public function destroy(Category $category)\n {\n //\n }", "public function destroy(Category $category)\n {\n //\n }", "public function destroy(Category $category)\n {\n //\n }", "public function destroy(Category $category)\n {\n //\n }", "public function destroy(Category $category)\n {\n //\n }", "public function destroy(Category $category)\n {\n //\n }", "public function delete(DeleteCategoryRequest $request)\n {\n $result = Apiato::call('Category@DeleteCategoryAction', [$request]);\n\n // ..\n }", "public function deleteAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Game_Service_Category::getCategory($id);\r\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\r\n\t\t$result = Game_Service_Category::deleteCategory($id);\r\n\t\tif (!$result) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功');\r\n\t}", "public function destroy(Category $Category)\n {\n //\n }", "function ccategories_delete($category)\n\t{\n\t\tlusers_require(\"categories/delete\");\n\n\t\t$content = mcategories_get_content($category);\n\t\tmcategories_delete($category);\n\t\tmcontent_delete($content[\"id\"]);\n\n\t\tlcache_delete_all();\n\n\t\tluri_redirect(\"main/user/admin/categories\", l(\"Category successfully deleted.\"));\n\t}", "public function delete() {\n\t\t$sql = 'delete from cart_categories where categories_id=\"' . e($this->getId()) . '\"';\n\t\tDatabase::singleton()->query($sql);\n\t\t\n\t\t$sql = 'delete from cart_categories_description where categories_id=\"' . e($this->getId()) . '\"';\n\t\tDatabase::singleton()->query($sql);\n\t\t\n\t\t$cats = $this->getSubCategories();\n\t\tforeach ($cats as $cat) {\n\t\t\t$cat->delete();\n\t\t}\n\t}", "public function delete_category($id) {\n $this->category();\n\n $connection = new Database(\"sbrettsc_db\");\n $connection->do_sql(\"DELETE FROM category WHERE id = \" . $id);\n $this->index();\n\n }", "public function categories_delete($app, $collection_id = null, $category_id = null) {\n\t\t//Delete category\n\t\t$success = Category::delete($category_id);\n\n\t\treturn $app->toJSON(['status' => $success]);\n\t}", "public function remove_category() {\n\t\t$this->use_layout=false;\n\t\t$this->model = new $this->model_class(WaxUrl::get(\"id\"));\n\t\t$category = new CmsCategory(Request::get(\"cat\"));\n\t\t$this->model->categories->unlink($category);\n if(!$this->attached_categories = $this->model->categories) $this->attached_categories= array();\n\t\t$cat = new CmsCategory;\n\t\tif(!$this->all_categories = $cat->all() ) $this->all_categories=array();\t\t\n\t\t$this->cat_partial = $this->render_partial(\"list_categories\");\t\n\t}", "public function deleteCategory($category_id)\n {\n $category = Category::find($category_id);\n if($category)\n {\n $category->delete();\n $category_mangas = CategoryManga::where('category_id',$category_id)->get();\n foreach ($category_mangas as $category_manga)\n {\n $category_manga->delete();\n }\n }\n\n return redirect(route('panel.listCategory'));\n }", "public function delete(){\n\n\t\t$sql = new Sql();\n\n\t\t$sql->query(\"DELETE FROM tb_categories WHERE idcategory=:idcategory\",array(\n\t\t\t\":idcategory\"=>$this->getidcategory()\n\t\t));\n\n\t\tCategory::updateFile();\n\t}", "public function destroy(Category $category)\n {\n $category->delete();\n }", "public function destroy(Category $category)\n {\n $category->delete();\n }", "public function destroy(Category $category)\n {\n $category->delete();\n }", "public function delete($id_category){\n $category = \\App\\Models\\Category::find($id_category); // find the id and save it to variable category\n $category->delete();\n return redirect('/category')->with('success', 'Delete data success');\n }", "public function delete($interview_category_id)\r\n {\r\n $this->checkIfDemo();\r\n $this->AdminInterviewCategoryModel->remove($interview_category_id);\r\n }", "public function destroy($id)\n { \n $category = Category::find($id);\n $category->delete();\n }", "public function destroy($id)\n {\n $category = Category::findOrFail($id)->delete();\n\n }", "public function deleteCategory(int $id): void\n {\n }", "public function deleteCategory($id)\n {\n\n Category::findOrFail($id)->delete();\n $this->success_message = 'Category deleted successfully!';\n\n }", "function product_category_delete(){\n\t\tglobal $tpl, $config, $meta, $_r, $_l, $_u;\n\t\t\n\t\tmysql_q(\"DELETE FROM product_category WHERE id='\".add_slash($_r['id']).\"'\");\n\n\t\tredirect(\"product_category.htm\", \"\");\n\t}", "public function deleteCategory($id) {\n\t\t$stmt = $mysqli->prepare(\"DELETE FROM categorie WHERE cat_id = ?\");\n\t\t$stmt->bind_param('i', $id);\n\t\t$stmt->execute();\n\t\t$stmt->close();\n\t}", "public function destroy(CampaignCategory $campaignCategory)\n {\n //\n }", "public function delete_category($category_id){\n \n DB::table('tbl_category')\n ->where('category_id',$category_id)\n ->delete();\n return Redirect::to('/manage-category');\n }", "public function destroy(Category $category)\n {\n //dd($category);\n $category->delete();\n return redirect('/categories/create')->with('message', 'Category Deleted..');\n }", "function delete($category_id)\n {\n $query = \"DELETE FROM categories WHERE categories_id = '$category_id'\";\n $result = $this->db->delete($query);\n }", "public function delete ($id){\n\t\t\t$this->category_m->delete($id);\n\t\t\tredirect('admin/category');\n\t}", "public function deleted(Category $category)\n {\n $category->deleted_by_user_id = Auth::id();\n }", "public function destroy($id)\n {\n //\n $category = Category::find($id);\n $category->delete();\n }", "public function deleteAction($cat_id)\n\t{\n\t\t\n\t\t$objCat = new Category();\n\t\t$objCat = $objCat->delete($cat_id);\n\t\t\t\t\n\t\tredirect(\"dashboard/category/list\");\n\t}", "public function destroy(Category $category)\n {\n $category->delete();\n return redirect()->route('admin.category.index')->with('success',\"Categorie bien supprimé\");\n }", "public function destroy(Category $category)\n {\n $category->forceDelete();\n }", "public function destroy(Category $category)\n {\n $category->delete();\n return redirect('admin/category/index');\n }", "public function delete_category(){\n $query = \"DELETE FROM {$this->table} WHERE {$this->table}.cat_id = (:cat_id)\";\n $stmt = $this->conn->prepare($query);\n $stmt->bindParam(':cat_id', $this->cat_id);\n $stmt->execute();\n return $stmt;\n \n }", "public function deleteCategory(Request $request, $id)\n {\n $this->authorize('delete');\n $category = Category::find($id);\n\n $category->delete();\n\n $request->session()->flash('success-message', 'Product deleted successfully');\n return redirect()->back();\n }", "public function delete_category_relations( $category_id ) {\r\n $this->prepare(\r\n 'DELETE FROM `attribute_relations` WHERE `category_id` = :category_id'\r\n , 'i'\r\n , array( ':category_id' => $category_id )\r\n )->query();\r\n }", "public function delete($id)\n {\n $category = $this->getByHashedId($id);\n\n // Remove all associations\n foreach ($category->children as $child) {\n $child->customerGroups()->detach();\n $child->products()->sync([]);\n $child->customerGroups()->sync([]);\n $child->channels()->sync([]);\n $child->delete();\n }\n\n $category->customerGroups()->detach();\n $category->products()->sync([]);\n $category->customerGroups()->sync([]);\n $category->channels()->sync([]);\n\n event(new CategoryStoredEvent($category));\n\n return $category->delete();\n }", "public function deleteIndex($category, $id);", "public function destroy(Category $category, $id)\n {\n $category = Category::find($id);\n\n foreach($category->accessory as $accessory){\n $accessory->delete();\n }\n\n foreach($category->component as $component){\n $component->delete();\n }\n\n foreach($category->system_unit as $system_unit){\n $system_unit->delete();\n }\n\n $category->delete();\n\n $notification = array(\n 'message' => 'Accessory category has been successfully deleted.', \n 'alert-type' => 'error'\n );\n return redirect()->route('category')->with($notification);\n }", "public function destroy($id){\n\n\t\t$user = Auth::user();\n\n if (!$user || !$user->hasRole('admin'))\n\t\t\tabort(401,'Not allowed to remove categories');\n\n $category = Category::find($id);\n\n if (!$category)\n abort(404);\n\n $category->delete();\n }", "public function destroy(CourseCategory $courseCategory)\n {\n //\n }", "public function destroy(Cat $cat)\n {\n //\n $catDel = Cat::find($cat->id);\n $catDel->delete();\n\n\n }", "public function action_delete()\n {\n if($this->category->has_subcategories())\n {\n // Response faile info\n $this->request->response = View::factory('error', array(\n 'message' => '该分类有子分类,无法删除', \n ));\n }\n else\n {\n if($this->category->delete())\n {\n // Delete successfully\n // Delete search results as well\n $this->request->redirect('category/tree');\n }\n else\n {\n // Failed\n $this->request->response = View::factory('error', array(\n 'message' => '删除失败', \n ));\n }\n }\n }", "public function delete_category() {\n $category_id = $_GET['category_id'];\n\n $data['delete_category'] = $this->Category_crud->get_category_by_id($category_id);\n $this->load->view('restaurant/category/delete_category_model', $data);\n\n if (isset($_POST['delete_category_yes'])) {\n $this->Category_crud->delete_category_sub_category_item($category_id);\n redirect(rest_path('Category'));\n }\n\n if (isset($_POST['delete_category_no'])) {\n $this->Category_crud->delete_category($category_id);\n redirect(rest_path('Category'));\n }\n }", "function delete( $catID=-1 )\r\n {\r\n\r\n if ( $catID == -1 )\r\n $catID = $this->ID;\r\n\r\n $category = new eZImageCategory( $catID );\r\n\r\n $categoryList = $category->getByParent( $category );\r\n\r\n foreach ( $categoryList as $category )\r\n {\r\n $category->delete();\r\n }\r\n\r\n foreach ( $this->images() as $image )\r\n {\r\n $image->delete();\r\n }\r\n\r\n $categoryID = $category->id();\r\n\r\n $db =& eZDB::globalDatabase();\r\n\r\n $db->begin( );\r\n\r\n $res1 = $db->query( \"DELETE FROM eZImageCatalogue_Category WHERE ID='$categoryID'\" );\r\n $res2 = $db->query( \"DELETE FROM eZImageCatalogue_CategoryPermission WHERE ObjectID='$this->ID'\" );\r\n\r\n if ( ( $res1 == false ) || ( $res2 == false ) )\r\n $db->rollback( );\r\n else\r\n $db->commit();\r\n\r\n }", "public function testSuccessDeleteCategory()\n {\n $service = $this->app->make(CategoryServiceInterface::class);\n\n $categoryA = 'categoryA' ;\n \n $service = $this->app->make(CategoryServiceInterface::class);\n $cateA = $service->save(null, $categoryA);\n\n $this->assertDatabaseHas('categories', [\n 'name' => $categoryA\n ]);\n \n $service->delete($cateA->id);\n $this->assertDatabaseMissing('categories', [\n 'name' => $categoryA\n ]);\n }", "function testDeletingCategory()\n {\n \n $this->tester->seeRecord('common\\models\\Category', ['description' => 'abc']);\n\n $category = Category::find()->where(['description' => 'abc'])->One();\n $category->delete();\n\n $this->tester->dontseeRecord('common\\models\\Category', ['description' => 'abc']);;\n }", "public function testDeleteCategory()\n {\n $category = new Category();\n\n Yii::$app->db->createCommand('set foreign_key_checks=0')->execute();\n $category->setAttributes(['name' => 'name','class' => 'active','featured_campaign_id' => 1]);\n $category->save(false);\n $this->tester->canSeeRecord('backend\\models\\Category',array('name' => 'name','class' => 'active','featured_campaign_id' => 1));\n $category->delete();\n $this->assertFalse($category == null);\n Yii::$app->db->createCommand('set foreign_key_checks=1')->execute();\n }", "function Category_delete($id){\n $data= Category::findOrFail($id);\n $data -> delete();\n\n return back();\n }", "public function destroy(Category $category)\n {\n $Blog = Category::findorfail($id)->delete();\n return redirect()->back()->withSuccess('Category Deleted Successfully!');\n }", "public static function deleteCategory($categoryId)\n\t{\n\t\t\t$category = Category::find($categoryId);\n\t\t\t$category->delete();\n\t}", "public function destroy(booksCategory $booksCategory)\n {\n //\n }", "public function destroy(booksCategory $booksCategory)\n {\n //\n }", "public function destroy($id)\n {\n // \n $category1 = category::find($id);\n $category1->Products()->detach();\n $category = category::where('id', $id)->delete();\n return redirect()->route('categories.index');\n }", "public function destroy(DrugCategory $drugCategory)\n {\n $drugLanguages = DrugCategoryLanguage::all()->where('drug_category_id',$drugCategory->id);\n foreach ($drugLanguages as $lang){\n $lang->delete();\n }\n $drugCategory->delete();\n return redirect()->route('drug_categories.index')->with('success','DrugCategory is deleted.');\n }", "public function destroy($id)\n {\n Category::find($id)->delete();\n return redirect('admin/category');\n }", "public function deleteCategory($cat_id)\n {\n DB::table('categories')->where('id',$cat_id)->delete();\n // Display a toaster Deleted message..\n $notification = array(\n 'message' => 'Category Deleted successfully.',\n 'alert-type' => 'success'\n );\n return Redirect()->back()->with($notification);\n }", "public function delete($id){\n $categorie = Categories::find($id);\n //si la categorie existe, supprimer\n if($categorie){\n\n //creer un messsage flash de type success\n Session::flash('success', \"La catégorie {$categorie->title} a bien été supprimée.\");\n //delete() permet de supprimer un objet en base de données\n $categorie->delete();\n }\n\n //redirection vers la liste des categories\n return Redirect::route('categories_index');\n }", "public function deleted(BlogCategory $blogCategory)\n {\n //\n }", "public function destroy($id)\n {\n $category = Category::find($id);\n\n $subcatIds = $category->subcategories->pluck('Id');\n\n //delete articles associated with subcategory\n Article::whereIn('CategoryId',$subcatIds)->update(['IsDelete' => 1]);\n\n //delete subcategories of the category\n Subcategory::where('ParentId',$id)->update(['IsDelete' => 1]);\n\n //delete articles associated with category\n Article::where('CategoryId',$id)->update(['IsDelete' => 1]);\n\n //delete category itself\n $category->IsDelete = 1;\n\n $category->save();\n \n //flash a notification\n Session::flash('flash_message', 'Category deleted successfully.');\n\n return redirect()->route('category.show',Session::get('SiteId'));\n }", "public function delete($categoryId)\n {\n $category = Category::find($categoryId);\n $category->delete();\n $this->redirect('category-list');\n }", "public function destroy(Category $category)\n {\n unlink($category->category_image);\n Category::destroy($category->id);\n return redirect()->back()->with('success','Catgeory has been deleted');\n }", "public function deletecategory($args)\n {\n if (!SecurityUtil::checkPermission('Dizkus::', \"::\", ACCESS_ADMIN)) {\n return LogUtil::registerPermissionError();\n }\n \n if (isset($args['cat_id'])) {\n // read all the forums in this category\n $forums = $this->readforums(array('cat_id' => $args['cat_id']));\n if (is_array($forums) && count($forums)>0) {\n foreach ($forums as $forum) {\n // remove all forums in this category\n ModUtil::apiFunc('Dizkus', 'admin', 'deleteforum',\n array('forum_id' => $forum['forum_id'],\n 'ok' => 1));\n } //foreach forum\n }\n // now we can delete the category\n return DBUtil::deleteObject($args, 'dizkus_categories', null, 'cat_id');\n }\n \n return LogUtil::registerError($this->__('Error! The action you wanted to perform was not successful for some reason, maybe because of a problem with what you input. Please check and try again.'));\n }", "public function delete()\n {\n if (!$this->auth->isLogged()) {\n $this->view->redirect(\"/user/login\", \"You can not manage categories if you are not logged in!\");\n }\n if (!$this->auth->isInRole(\"admin\")) {\n $this->view->redirect(\"/user/login\", \"You can not manage categories if you are not Admin!\");\n }\n\n if (empty($this->input->get(0,\"int\"))){\n $this->view->redirect(\"/categories/manage\");\n }\n\n $categoryId = $this->input->get(0,\"int\");\n\n $categoryModel = new CategoriesModel();\n\n if (!$categoryModel->existCategoryId($categoryId)){\n $this->view->redirect(\"/categories/manage\",\"This categories do not exist!\");\n }\n\n try{\n $categoryName = $categoryModel->getCategoryNameById($categoryId);\n\n $this->view->render(\"admin/categories/delete\",[\n \"name\"=> $categoryName,\n \"id\"=> $categoryId\n ]\n );\n }catch (\\Exception $exception) {\n $this->view->redirect(\"/categories/manage\", $exception->getMessage());\n }\n\n }", "public function delete($id) {\n\n $sql = \"DELETE FROM categoria WHERE id = ? \";\n \n $stmt = $this->conexao->prepare($sql);\n $stmt->bindValue(1, $id);\n $stmt->execute();\n }", "public function destroy(Subcategoria $subcategoria)\n {\n //\n }", "function delete_categoria($idcategoria)\n {\n return $this->db->delete('categoria',array('idcategoria'=>$idcategoria));\n }", "public function delete(string $id): void\n {\n $category = $this->find($id);\n $this->repository->delete($category);\n }", "public function delete_category($id)\n { \n\t $query=$this->General_model->show_data_id('categories',$id,'category_Id','get','');\n @unlink(str_replace(base_url(),'',$query[0]->category_img));\n \n $query=$this->General_model->show_data_id('categories',$id,'category_Id','delete','');\n $this->session->set_flashdata('success','Product Category Deleted successfully'); \n redirect('superpanel/categorie');\n\t\n\t }", "public function deleted(Category $category)\n {\n // Delete all products\n Product::where('category_id', $category->id)->delete();\n }", "public static function deleteCategory($id)\n {\n \t$query = \"DELETE FROM categories WHERE id = :id\";\n \t$result = DB::delete($query, ['id' => $id]);\n\n \treturn $result;\n }", "public function delete_category ($id) {\n\t\t$category = Category::find($id);\n\t\t$category->delete();\n\n\t\treturn true;\n\t}", "public function remove_category($id) {\r\n\t\t\treturn parent::delete($id);\r\n\t\t}", "public function delCategory($idCategoria){\n\t\t$query = \"DELETE FROM final_categoria WHERE idCategoria = '\".$idCategoria.\"'\";\n\t\treturn $this->con->action($query);\n\t}", "public function destroy(Category $category)\n {\n if (Auth::user()->cant('delete', $category)) {\n return redirect()->route('admin.home')->with(['message'=>'You don\\'t have permissions']);\n }\n Category::destroy((int)$category->id);\n return redirect(url()->previous());\n }", "public function destroy($id) {\n if (Gate::check('user')) {\n Flash::error('You can not do that');\n abort(503);\n }\n $category = $this->categoryRepository->findWithoutFail($id);\n\n if (empty($category)) {\n Flash::error('Category not found');\n\n return redirect(route('categories.index'));\n }\n Storage::delete(\"$category->image\");\n // unlink(URL::to(\"/img/upload/$category->image\"));\n $this->deleteImage($category->image, 'upload');\n $this->categoryRepository->delete($id);\n\n\n // Delete food is belong to category\n $foods = \\App\\Models\\Food::where('category_id', $category->id);\n foreach ($foods as $food) {\n $this->deleteImage($food->image, 'food');\n// if ($food->image != 'avatar.jpg') {\n// @unlink(public_path() . '\\img\\food' . \"\\\\\" . $food->image); // delete image if it change\n// }\n }\n $foods->delete();\n\n Flash::success('Category deleted successfully.');\n return redirect(route('categories.index'));\n }" ]
[ "0.6824324", "0.6768495", "0.6755866", "0.672524", "0.6712552", "0.66933185", "0.66933185", "0.66933185", "0.66933185", "0.6661299", "0.6613275", "0.6604824", "0.6550935", "0.65170544", "0.648374", "0.6474441", "0.6474441", "0.6474441", "0.6474441", "0.6474441", "0.6474441", "0.6474441", "0.6474441", "0.6474441", "0.6474441", "0.6474441", "0.64670485", "0.6445312", "0.6437051", "0.64255774", "0.6424863", "0.64034975", "0.6402259", "0.6356456", "0.63384086", "0.6313359", "0.62968993", "0.62968993", "0.62968993", "0.62705183", "0.6263158", "0.6257046", "0.62471265", "0.62444896", "0.6241627", "0.62139934", "0.6196178", "0.61941206", "0.6187539", "0.6168255", "0.61448413", "0.61357266", "0.61274695", "0.61247575", "0.6119646", "0.61164826", "0.6113391", "0.61031157", "0.6087733", "0.6078224", "0.6073146", "0.60542774", "0.6030489", "0.6026892", "0.6025335", "0.601843", "0.60179687", "0.60133845", "0.6012559", "0.5995687", "0.59852636", "0.5980723", "0.59804046", "0.59620374", "0.5961738", "0.5946222", "0.59404564", "0.59404564", "0.59362775", "0.5934118", "0.5931182", "0.59286416", "0.59230876", "0.5917549", "0.5912394", "0.5907317", "0.5905699", "0.5889739", "0.5889155", "0.5886451", "0.5883266", "0.58754224", "0.587523", "0.5874117", "0.5871885", "0.58694255", "0.58673066", "0.58639127", "0.586088", "0.5855185", "0.5853762" ]
0.0
-1
Update a category association.
function updateEntry($request, $rowId, $newRowId) { $this->deleteEntry($request, $rowId); $this->insertEntry($request, $newRowId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateCategory()\n {\n Category::findOrFail($this->category_id)->update([\n 'category_name' => $this->categoryName,\n 'slug' => Str::slug($this->categoryName),\n 'class' => $this->class,\n\n ]);\n }", "public function updated(Category $category)\n {\n //\n }", "public function updated(Category $category)\n {\n //\n }", "public function update(UpdateCategoryRequest $request)\n {\n $category = Apiato::call('Category@UpdateCategoryAction', [$request]);\n\n // ..\n }", "public function update(Request $request, Category $category)\n {\n $this->validate($request, [\n 'name' => 'required|max:191',\n // 'parent_id' => 'required|not_in:0',\n 'image' => 'mimes:jpg,jpeg,png|max:1000'\n ]);\n\n $params = $request->except('_token');\n $collection = collect($params);\n\n if ($collection->has('image') && ($params['image'] instanceof UploadedFile)) {\n if ($category->image != null) {\n $this->deleteOne($category->image);\n }\n $image = $this->uploadOne($params['image'], 'categories');\n } else {\n $image = null;\n }\n\n $featured = $collection->has('featured') ? 1 : 0;\n $menu = $collection->has('menu') ? 1 : 0;\n $merge = $collection->merge(compact('menu', 'image', 'featured'));\n $category->update($merge->all());\n\n return redirect(route('admin.categories.index'))->with('success', 'Category Updated Successfully!');\n }", "public function update(Request $request, $category)\n {\n $categories = Category::findOrFail($category);\n $categories->update($request->all());\n }", "public function update(UpdateCategoryRequest $request, Category $category)\n {\n // $this->validate($request,[\n // 'name' =>['required',\n // Rule::unique('categories')->ignore($category->id)\n // ]\n // ]);\n \n // $data = request()->all();\n\n // $category->name = $data['name'];\n // $category->save();\n \n $category->update($request->all());\n session()->flash('success','Category updated Successfully');\n return redirect(route('categories.index'));\n }", "public function update(Request $request, Category $category)\n {\n $category = Category::findOrfail($category);\n // $category->update([\n // 'name' => $request->name,\n // 'description' => $request->description,\n // 'entity_id' => $request->entity,\n // ]);\n }", "public function update(Category $category, int $id): Category\n {\n }", "public function update(Request $request, $id_category){\n $category = \\App\\Models\\Category::find($id_category); // find the id and save it to variable category\n $category->update($request->all()); // update data to database\n return redirect('/category')->with('success', 'Update data success');\n }", "public function update(CategoryUpdateRequest $request, $id_cat)\n {\n $categorias = categoria::find($id_cat);\n $categorias->fill($request->all())->save();\n\n alert()->success('¡Categoria actualizada!','');\n return redirect()->route('categorias.edit',$categorias->id_cat);\n }", "public function update(UpdateCategoryRequest $request, $id)\n {\n// $category = Category::findOrFail($id);\n $category = Category::findOrFail($id);\n $category-> update($request->all());\n return redirect('/admin/category',compact('category'));\n }", "public function updated(Category $category)\n {\n $category->updated_by_user_id = Auth::id();\n }", "public function UpdatePost_Category(Request $request){\n $postId = Post::query()->find($request->postID);\n $postId->categories()->detach($request->OldcategoryId);\n $postId->categories()->attach($request->categoryId); \n\n }", "public function setUpdateCategory(?UpdateCategory $value): void {\n $this->getBackingStore()->set('updateCategory', $value);\n }", "public function update(Request $request, Category $category)\n\t{\n\t\t$this->authorize('update', $category);\n\n\t\t$request->validate([\n\t\t\t'name' => 'required|unique:categories,name,' . $category->id,\n\t\t\t'comment' => 'nullable|max:255'\n\t\t]);\n\n\t\t$category->update($request->all());\n\n\t\tAlert::flash('Category updated successfully', 'success');\n\n\t\treturn redirect('/category');\n\t}", "public function updateCategory(array $data, int $id): void\n {\n }", "public function updating(Category $category)\n {\n $category->teams()->update(['teams.status' => $category->status]);\n $category->activities()->update(['activities.status' => $category->status]);\n $category->events()->update(['events.status' => $category->status]);\n $category->allUsers()->update(['users.status' => $category->status]);\n $category->coaches()->update(['coahes.status' => $category->status]);\n }", "public function update(Request $request, Category $category, $id)\n {\n $this->validate($request,[\n 'category'=> 'required',\n 'type'=>'required'\n\n ]);\n \n $category = Category::find($id);\n\n $category->category_name =$request->category;\n $category->type=$request->type;\n \n $category->save();\n\n $notification = array(\n 'message' => 'Accessory category has been successfully updated.', \n 'alert-type' => 'success'\n );\n\n return redirect()->route('category')->with($notification);\n }", "public function update( CategoryFormRequest $request, Category $category ) {\n $category->updateCategory( $request );\n return redirect( route( 'admin.category.index' ) );\n }", "public function update(CategoryRequest $request, $id)\n {\n $category = Category::find($id);\n //$category->name = Request::get('name');\n $inputs = $request->all();\n \n $inputs['active'] = $request->has('active')?1:0;\n $category->update($inputs);\n $category->save();\n return redirect('admin/category');\n }", "public function update(Request $request, Category $category)\n {\n if(Auth::user()->cannot('updateCategory',$category)) abort(403);\n $request->validate([\n 'category' => 'required'\n ]);\n\n try {\n $category->update($request->all());\n } catch (\\Exception $th) {\n return redirect()->route('categories.index')->with('failed','Failed to update, that category already created');\n }\n\n return redirect()->route('categories.index')->with('success','Category updated successfully');\n }", "public function update(CategoryUpdateRequest $request, Category $category)\n {\n $category->fill($request->all());\n\n if($request->image) {\n $path = $request->file('image')->store('uploads');\n $category->image_url = Storage::url($path);\n }\n\n $category->save();\n\n return redirect()->intended(route('admin.categories'));\n }", "public function update( CategoryRequest $request )\n {\n $category = $this->repo->update( $request->all() );\n\n flash()->success( trans( 'Category was updated' ) );\n\n return redirect()->route( \"admin.categories.edit\", [ $category->id ] );\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n $data = $request->all();\n\n try {\n\n $category->update($data);\n flash('Categoria atualizada com sucesso')->success();\n return redirect()->route('categories.index');\n } catch (\\Exception $e) {\n\n $message = 'Erro ao atualizar a categoria';\n if (env('APP_DEBUG')) {\n\n $message .= $e->getMessage();\n }\n flash($message)->warning();\n return redirect()->back()->withInput();\n }\n }", "public function update(Request $request, Category $category)\n {\n $request->validate([\n 'category_title' => 'required|max:255|min:3',\n ]);\n\n try{\n \\DB::beginTransaction();\n $category['title'] = $request->category_title;\n $category['user_id'] = $request->user_id;\n $category->update();\n\n \\DB::commit();\n }catch (\\Exception $e){\n \\DB::rollback();\n return back()->withErrors($e->getMessage())->withInput();\n }\n unset($category);\n\n return redirect()->route('category.index');\n }", "public function update(Request $request, Category $category)\n {\n if (Auth::user()->cant('update', $category)) {\n return redirect()->route('admin.home')->with(['message'=>'You don\\'t have permissions']);\n }\n $rules = [\n 'name' => 'required',\n 'url' => 'required|unique:categories,url,'.$category->id\n /*'url' => [\n 'required',\n Rule::unique('categories')->ignore($category->id)\n ]*/\n ];\n $validator = Validator::make($request->all(), $rules);\n if ($validator->fails()) {\n return redirect()->route('categories.edit', ['id'=>$category->id])->withErrors($validator)->withInput();\n }\n\n $category->name = $request->get('name');\n $category->url = $request->get('url');\n $category->enabled = $request->filled('enabled');\n $category->meta_title = $request->get('meta_title');\n $category->meta_keywords = $request->get('meta_keywords');\n $category->meta_description = $request->get('meta_description');\n $category->short_text = $request->get('short_text');\n $category->full_text = $request->get('full_text');\n $category->save();\n return redirect()->route('categories.edit', ['id'=>$category->id]);\n }", "public function update(Request $request, category $category)\n {\n $categoryCheck = category::where('categoryname', $request->categoryname)->first();\n\n if ($categoryCheck == null) {\n category::where('id', $category->id)\n ->update(['categoryname' => $request->categoryname]);\n\n $request->session()->flash('info', 'Update category Success fully');\n return redirect()->action('CategoryController@index');\n } else {\n if ($categoryCheck->id == $category->id) {\n category::where('id', $category->id)\n ->update(['categoryname' => $request->categoryname]);\n\n $request->session()->flash('info', 'Update category Success fully');\n return redirect()->action('CategoryController@index');\n\n }\n $request->session()->flash('danger', 'category has already exit');\n return redirect()->action('CategoryController@index');\n }\n }", "public function update(CategoryRequest $request, Category $category)\n {\n $category->update([\n 'categoryname' => $request->input('categoryname'),\n 'categorydescription' => $request->input('categorydescription'),\n ]);\n \n if($request->new_photo){\n if($category->categoryphoto){\n unlink($category->categoryphoto);\n }\n $position = strpos($request->new_photo, ';');\n $sub = substr($request->new_photo, 0, $position);\n $file_extension = explode('/', $sub)[1];\n $name = time().\".\".$file_extension;\n $img = Image::make($request->new_photo)->resize(240,200);\n $upload_path = 'photos/category/';\n $image_url = $upload_path.$name;\n $img->save($image_url);\n $category->update([\n 'categoryphoto' => $image_url,\n ]);\n }\n\n return response()->json([\n 'type' => 'success',\n 'message' => \"data updated\",\n ],200);\n }", "public function update(Category $category, CategoryRequest $request)\n {\n $input = $request->all();\n $category->update($input);\n\n $this->saveThumbnail($category, $request);\n\n $this->setCategoryParent($category, $request);\n\n $this->saveCategoryFields($category, $request);\n\n $category->codes()->delete();\n if ($request->get('is_private') == '1') {\n $this->saveCategoryCodes($category, $request);\n }\n\n event(new CategoryWasUpdated($category));\n\n return redirect()->route('zxadmin.category.edit', $category->id)->with('message', 'success');\n }", "public function update(categoryRequest $request, Category $category)\n {\n $image = $request->file('img');\n\n if ( $image != null ){\n //new image upload\n $image = $this->fileHandler->fileUploadedBackend($request->file('img'),$this->storeName,'img');\n $request['image'] = $image;\n // old image unlink\n if($request->oldImg = null){\n $this->fileHandler->imageDeleteBackend($request->oldImg,$this->storeName);\n }\n \n }\n\n $request['slug'] = strtolower(str_replace(' ', '-', $request->name));\n $request['status'] = ($request->status)?1:0;\n $update = $category->update($request->all());\n if($update){\n return Redirect::route('category.index')->with('success','Category Updated Successfully.');\n }else{\n return Redirect::route('category.index')->with('warning','Category could not be update.');\n }\n }", "public function update(Request $request, Category $category)\n {\n $this->apiPatch('api.categories.update', $request->all(), ['category' => $category->id]);\n\n if (Response::HTTP_OK !== $this->getLastApiStatus()) {\n session()->flash(\n 'errors',\n [sprintf('Category \"%1$s\" could not be updated.', $category->name)]);\n } else {\n session()->flash(\n 'success',\n sprintf(\n 'Category \"%1$s\" successfully updated.',\n $request->input('name')\n )\n );\n }\n\n return redirect(route('admin.categories.edit', ['category' => $category->id]));\n }", "public function update(Request $request, Category $category)\n {\n $this->authorize('update', $category);\n\n $this->validate($request, [\n 'name' => 'required|max:32',\n 'slug' => 'max:32'\n ]);\n\n $category->name = $request->name;\n\n $requestSlug = Str::slug($request->slug, '-');\n\n if (is_null($requestSlug) || $requestSlug == '') {\n $requestSlug = Str::slug($category->name, '-');\n }\n\n if ($category->slug != $requestSlug) {\n if (Category::whereSlug($requestSlug)->exists()) {\n $category->slug = $requestSlug . '-' . dechex(time());\n } else {\n $category->slug = $requestSlug;\n }\n }\n\n $category->save();\n\n return redirect()->back()->with('success', 'Category edited.');\n }", "public function update(CategoryRequest $request)\n {\n DB::beginTransaction();\n try {\n $product_id = $request->product_id;\n $objProduct = Product::find($product_id);\n $objProduct->product_name = $request->product_name;\n $objProduct->update();\n\n CategoryProduct::where('product_id', $product_id)->delete();\n \n $categories = $request->category;\n foreach($categories as $value){\n $objProductCategory = new CategoryProduct();\n $objProductCategory->product_id = $objProduct->id;\n $objProductCategory->category_id = $value;\n $objProductCategory->save();\n }\n DB::commit();\n return redirect()->route('products')->with('success', 'Product updated successfully');\n } catch (\\Exception $e) {\n DB::rollBack();\n Log::info($e);\n return redirect()->back()->with('error', 'Something went wrong');\n }\n }", "public function update(Category $category, Request $request)\n {\n \n\n $user_check = \\Auth::user();\n if (in_array($user_check->level, [0, 1])) {\n /** @var Form $form */\n $form = \\FormBuilder::create(CategoryForm::class);\n if (!$form->isValid()) {\n return redirect()\n ->back()\n ->withErrors($form->getErrors())\n ->withInput();\n }\n $data = $form->getFieldValues();\n\n $upload = $data['image']->storeAs('public/img', $data['image']);\n // Se tiver funcionado o arquivo foi armazenado em storage/app/public/img/nomedinamicoarquivo.extensao\n \n $category->event_type_id = $request['event_type_id'];\n $category->name = $request['name'];\n $category->position = $request['position'];\n $category->image = $data['image']->getClientOriginalName();\n $category->save();\n \n\n session()->flash('message', 'Categoria editada com sucesso');\n return redirect()->route('category.index');\n } else {\n session()->flash('message', 'Desculpe! Essa área é restrita a administração.');\n return view('includes.message');\n }\n }", "public function update(Request $request, Category $category)\n {\n $category->fill([\n 'name' =>ucwords($request->name), \n 'description' =>ucfirst($request->description), \n 'estado' => $request['estado'],\n 'updated_at' =>Carbon::now(),\n ])->save();\n\n return redirect()->action('CategoryController@index');\n }", "function update_category($category_id)\n {\n $this->db->update('tbl_category',$this, array('category_id'=>$category_id));\n }", "public function update(Request $request, Catalogue $catalogue, Category $category)\n {\n $this->validate($request, [\n 'title' => 'required|max:100|unique:catalogues,title,' . $category->id,\n 'description' => 'required|max:1000',\n 'status' => 'required|max:10',\n 'image' => 'image'\n ],[\n 'title.required' => 'El título es requerido.',\n 'title.unique' => 'El título que has introducido ya existe.',\n 'title.max' => 'El titulo solo acepta un máximo de 250 caracteres.',\n 'description.required' => 'La descripción es requerida.',\n 'image.image' => 'Es necesario introducir una imagen.'\n ]);\n\n $this->verificaCatalogue($catalogue, $category);\n\n $category->fill($request->intersect(['title', 'description', 'image', 'status']));\n\n if ($request->hasFile('image')){\n\n $img = $request->file('image');\n $file_route = time() . '_' . $img->getClientOriginalName();\n\n Storage::disk('imgCategories')->put($file_route, file_get_contents($img->getRealPath()));\n\n $category->image = $file_route;\n }\n\n if ($category->isClean()) {\n return Redirect::back()->with('message', 'Debe especificar al menos un valor diferente para actualizar.');\n }\n\n $category->user_id = Auth::user()->id;\n\n if ($category->save()) {\n return Redirect::back()->with('message', 'Categoría editada correctamente.');\n }\n }", "public function update(Request $request, Category $category)\n {\n // dd($category);\n $request->validate([\n 'name'=>'required'\n ]);\n $category->name = $request->name;\n $category->slug = \\Str::slug($request->name);\n $category->parent_id = $request->parent_id;\n $category->save();\n return redirect('admin/categories')->with('success', 'Category updated!');\n }", "public function update(Request $request, Category $category)\n {\n $category->title = $request->input('title');\n $category->slugy = $request->input('slugy');\n $category->save();\n\n return redirect()->route('admin.category.index')->with(\n 'success', \"La catégorie à été modifier\"\n );\n }", "public function update(CategoryRequest $request, Category $category)\n {\n\n try {\n $category = Category::findOrFail($category->id);\n $category->name_en = $request->nameEn;\n $category->slug_en = Str::slug($request->nameEn);\n $category->description_en = $request->descriptionEn;\n $category->name_ar = $request->nameAr;\n $category->slug_ar = Str::slug($request->nameAr);\n $category->description_ar = $request->descriptionAr;\n $category->save();\n $category->products()->sync($request->products);\n return response()->json(['success' => 'Category Updated'], 200);\n } catch (ModelNotFoundException $e) {\n return response()->json(['error' => $e->getMessage()], 400);\n }\n }", "public function update(Request $request, Category $category)\n {\n $request->validate([\n 'name' => 'required | string | unique:categories,id',\n 'role' => 'required'\n ]);\n $input = $request->only(['name', 'role', 'mainid', 'subid', 'status', 'featured']);\n $category->update($input); \n\n Toastr::success('Category updated successfully :)','Success');\n return redirect()->route($this->route.'index');\n }", "public function update(ProductCategory $productCategory):void \n {\n $productCategoryDAO = new ProductCategoryDAO();\n $productCategoryDAO->update($productCategory);\n }", "public function update(CreateCategoryRequest $request,Category $category)\n {\n //\n $category->update([\n 'name_en' => $request->name_en,\n 'name_ar' => $request->name_ar,\n 'image' => null,\n 'description_ar' => $request->desc_ar,\n 'description_en' => $request->desc_en,\n 'active' => $request->active ?? 0\n ]);\n return redirect()->route('setups.category.all');\n }", "public function update(CategoryRequest $request, Category $category)\n {\n $data = $request->all();\n if ($category->update($data)) {\n return redirect()->route('admin.categories.index')->with('message', 'Successfully updated category');\n } else {\n return redirect()->back()->with('error', 'Update failed');\n }\n }", "public function update(UpdateCategoryRequest $request, Category $category)\n {\n $category->name = $request->name;\n $category->save();\n\n session()->flash('success_message', 'Category updated successfully');\n\n return redirect(route('category.index'));\n }", "public function update(Request $request, Category $category)\n {\n $category = Category::find($category->id);\n $category->name = $request->name;\n $category->save();\n\n flash('Category berhasil diupdate');\n return redirect()->route('category.index');\n }", "public function updateCategories()\n {\n $this->updateCategoriesByType();\n $this->updateCategoriesByParent();\n $this->updateCategoriesByID();\n }", "public function update(Request $request, Category $category)\n {\n $category = Category::findorfail($request->id);\n $category->category_name = $request->category_name;\n $category->save();\n return redirect()->back()->withSuccess('Category Updated Successfully!');\n }", "public function update(CategoryRequest $request, Category $category)\n {\n $category->name = $request->input('name');\n $category->parent_id = $request->input('parent_id');\n $category->saveCategory();\n return redirect()->route('admin.categories.edit', ['catid'=>$category->catid])->with(['status' => '更新成功']);\n }", "public function update(CategoryRequest $request, int $id)\n {\n $this->categoryRepository->update($request, $id);\n return redirect('admin/category');\n }", "public function update(Category $category, Request $request)\n {\n $this->category->update($category, $request->all());\n\n return redirect()->route('admin.category.index')/*\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('membercv::membercvs.title.membercvs')]))*/ ;\n }", "public function update(Request $request, Category $Category)\n {\n //\n }", "public function update(Request $request, Category $category)\n {\n /* VALIDATE DATA COMING IN FROM FORM */\n $data = $request->validate([\n 'name' => 'required',\n 'is_active' => 'required'\n ]);\n /* SAVE VALIDATED DATA TO DATABASE */\n $category->fill($data);\n $category->save();\n /* CONFIRM UPDATE AND REDIRECT USER */\n if(!$category->save()) {\n session()->flash('message', 'Contact Manager. ERROR: Category did not update');\n } else {\n session()->flash('message', 'Category Updated Successfully');\n }\n return redirect()->route('categories.index');\n }", "public function update($category, $categoryId, array $data)\n {\n try {\n $cat = $this->category->find($categoryId);\n\n $file = isset($data['file']) ? $data['file'] : '';\n\n if(!empty($file)){\n $this->uploadPath = 'uploads/product-category';\n $fileName = $this->upload($file);\n\n $data['image'] = $fileName;\n\n $this->__deleteImages($cat);\n }else{\n unset($data['image']);\n }\n\n $data['category_id'] = $category->id;\n\n $category = $cat->update($data);\n //$this->logger->info(' created successfully', $data);\n\n return $category;\n } catch (Exception $e) {\n //$this->logger->error($e->getMessage());\n return false;\n }\n }", "public function update(Request $request, Category $category)\n {\n\n $id = $category->id;\n $messages = [\n 'name.unique' => 'Já existe uma categoria com este nome.',\n 'max' => 'Valor máximo de caracteres excedido.',\n 'required' => 'Este campo é obrigatório.',\n ];\n\n $validator = \\Validator::make($request->all(), [\n\n 'name' => [\n 'bail',\n 'required',\n 'max:255',\n Rule::unique('categories')->ignore($category->id),\n ],\n 'description' => 'bail|required|max:255',\n 'status' => 'bail|required|max:1',\n\n ], $messages);\n\n if ($validator->fails()) {\n\n return redirect()->back()\n ->withErrors($validator)\n ->withInput(); \n\n }\n $category->update($request->all());\n return redirect()->route('categories.edit', $category->id)\n ->with('status', 'Categoria alterada com sucesso.');\n }", "public function update(Request $request)\n {\n //\n $this->validate($request, [\n 'slug' => 'required|alpha_dash|max:80|unique:categories,slug,' . $request->id,\n 'name' => 'required|string|max:60',\n 'description' => 'string|nullable',\n ]);\n\n $category = Category::find($request->id);\n $category->slug = $request->slug;\n $category->name = $request->name;\n \n if($category->update()){\n return redirect()->route('edit.category', ['id' => $category->id])->with(['success' => 'edited']);\n } else {\n return redirect()->route('index.category')->with(['error' => 'error']);\n }\n }", "public function updated(BlogCategory $blogCategory)\n {\n //\n }", "public function update(Request $request, Category $category, CategoryRepository $repo)\n {\n $category = $repo->update($category, $request->all());\n\n Flash::success(trans('alpaca::category.alpaca.successfully_updated'));\n\n return redirect('/backend/category');\n }", "public function update(CategoryRequest $request, $id)\n {\n $category = Category::find($id);\n\n if(!$category){\n abort(404);\n }\n\n $data = $request->all();\n \n $category->update($data);\n\n return Redirect::to('admin/category')\n ->with('flash_message', 'Category Updated Successfully!');\n }", "public function update(Request $request, Category $category)\n {\n $request->validate([\n 'name' => ['required', 'min:3', 'max:32'],\n 'title' => ['required', 'min:3', 'max:32'],\n 'status' => ['required', 'in:' . join(',', Category::POSSIBLE_STATUSES)]\n ]);\n\n $category->name = $request->input('name');\n $category->title = $request->input('title');\n $category->status = $request->input('status');\n $category->save();\n\n return redirect('users/' . Auth::id())->with('success', 'Category edited succesfully!');\n }", "public function update(CategoryUpdateRequest $request, $id)\n {\n //\n $category = Category::findOrFail($id);\n $category->fill($request->all());\n $category->save();\n $request->session()->flash('notify', 'Update Success!');\n return redirect()->route('category.index');\n }", "public function update(CategoryRequest $request, Category $category)\n {\n if ($request->has('file')) {\n $file_name = Category::upload($request->file('file'));\n $request->request->add(['image' => $file_name]);\n }\n\n $category->update($request->all());\n\n $this->flashSuccessUpdate();\n return redirect()->route('backend.master.category.index');\n }", "public function update_category ($data) {\n\t\t$slug = \\Illuminate\\Support\\Str::slug($data->category, '-');\n\t\t$category = Category::find($data->category_id);\n\t\t$category->category = $data->category;\n\t\t$category->slug = $slug;\n\t\t$category->description = $data->description;\n\n\t\t$category->save();\n\t\treturn true;\n\t}", "public function update(StoreOrUpdateCategory $request, $id)\n {\n $category = $this->categories->find($id);\n $category->name = $request->input('name');\n $category->briefing = $request->input('briefing');\n $category->save();\n\n return redirect()->route('categories.index');\n }", "public function update(Request $request, $id)\n {\n $category = $this->category->find($id);\n $category->update($request->all());\n\n if ($request->hasfile('category_image')) {\n $filePath = $this->category->saveImageForPost($request, 'category_image');\n $category->category_image = $filePath;\n $category->update();\n }\n \n flash()->success('', 'The category was updated');\n return redirect('dashboard/categories');\n }", "public function update(Request $request, Category $category)\n {\n $category->name = $request->name;\n $category->slug = Str::slug($request->slug);\n $category->save();\n\n return $this->apiResponse(ResultTypeController::Success, $category,\"Kategori Güncellendi\",200 );\n }", "public function update(Request $request, Category $category)\n {\n //отвечает за обновление\n //не включаем в обновление поле slug - оно не должно меняться\n $category->update($request->except('slug'));\n return redirect()->route('admin.category.index');\n }", "public function update(Request $request, Category $category)\n {\n $category->exp_group_name = $request->exp_group_name;\n $category->exp_group_desc = $request->exp_group_desc;\n\n if ( $request->exp_group_status == '1' or $request->exp_group_status == '0')\n {\n \n $category->exp_group_status = $request->exp_group_status;\n }\n\n\n \n\n\n\n \n $category->save();\n return redirect()->route('admin.categories.index');\n }", "public function updateCategory(Request $request, $id)\n {\n\n $category = Category::findOrFail($id);\n\n\n if ($request->hasFile('image')) {\n $file = $request->file('image');\n $image = sha1(time()) . \".\" . $file->getClientOriginalExtension();\n $file->move('admin/images/Category/', $image);\n if ($category->image) {\n unlink('admin/images/Category/' . $category->image);\n }\n $category->image = $image;\n }\n $category->update([\n 'name' => $request->get('cname'),\n 'slug' => $request->get('slug'),\n 'is_active' => $request->get('isactive'),\n\n 'description' => $request->get('description')\n ]);\n $request->session()->flash('success-message', 'Category Edited Successfully');\n return redirect()->back();\n }", "public function update(Category $category, CategoryRequest $request)\n {\n $category->update([\n 'name' => $name = $request->validated()['name'],\n 'slug' => Str::slug($name)\n ]);\n\n return redirect('dashboard/categories')->with('success', 'Category has updated successfully.');\n }", "public function update(Request $request, Category $category)\n {\n $attributes = $request->validate([\n 'name' => 'required|max:255',\n ]);\n\n $category->update($attributes);\n Session::flash('message', 'Category Is Updated Successfully');\n return redirect('/admin/categories');\n }", "public function update(CategoryCreateRequest $request, Category $category) {\n if (Gate::denies('update', $category)) {\n return redirect()->back();\n }\n\n $category->fill($request->all());\n $dirty = $category->getDirty();\n $success = $category->save();\n\n if ($success && count($dirty) > 0) {\n \\Notification::send(User::ignore(Auth::id())->get(),\n (new CategoryUpdatedNotification($category, Auth::user(), array_keys($dirty))));\n }\n\n return response()->json($category);\n }", "public function update(CaregoryRequest $request, Category $category)\n {\n $category->category_name = $request->category_name;\n $category->save();\n\n return redirect()->route('category.index')->with('feedback', 'แก้ไขข้อมูลเรียบร้อยแล้ว');\n }", "public function update(StoreCategoryRequest $request, $id)\n {\n $data = $request->all();\n // get info category\n $category = $this->category->find($id);\n // Handel category\n $moving_method = $request->get('moving_method');\n $related_id = $request->get('related_id');\n // Get parent category info\n if ($moving_method != 'none') {\n $parent = Category::find($related_id);\n if ($category->isSelfOrAncestorOf($parent)) {\n return redirect()->back()->withErrors(['Không được phép dời một nhóm vào chính nó hoặc nhóm con !'])->withInput();\n }\n $category->$moving_method($parent);\n }\n if ($request->has('related_id'))\n if ($request->hasFile('image')) {\n $upload = $request->file('image');\n if (!$upload->isValid()) {\n return redirect()->back()->withErrors([trans('general.ajax.not_request_ajax')])->withInput();\n }\n // Delete Image Of Categories\n if ($category->image) {\n File::delete('upload/categories/' . $category->image);\n }\n // End Delete\n $ext = $upload->getClientOriginalExtension();\n $newFile = str_slug($request->get('title_alias')) . '-' . time() . '.' . $ext;\n $location = public_path('upload/' . with($category->getImageFolder()));\n $upload->move($location, $newFile);\n $data['image'] = $newFile;\n }\n // Update a category\n $category->update($data);\n event(new UpdatedContentEvent( 'Category', $request, $category ));\n if ($request->get('submit') == 'save') {\n return redirect()->route('admin::categories.indexSpec', [$request->component])->with('status', trans('notices.update_success_message'));\n } else {\n return redirect()->route('admin::categories.edit', $id)->with('status', trans('notices.update_success_message'));\n }\n }", "public function update(CategoryRequest $request, Category $category)\n {\n\n $category->update($request->validated());\n\n return redirect('category.show', compact('category'))->with('status', 'Succesfully updated category.');\n }", "public function update(Request $request, Category $category)\n {\n\n\n $category = $category->fill($request->only(['title', 'description']))->save();\n\n if ($category) {\n return redirect()->route('admin.categories.index')->with('success', 'Category edit success');\n }\n return back()->with('error', 'Category edit error');\n }", "public function update(Request $request, $category)\n {\n $request->validate([\n 'name' => 'required|string|unique:categories,name,' . $category,\n 'slug' => 'required'\n ]);\n\n Category::whereId($category)->first()->update([\n 'name' => $request->name,\n 'slug' => make_slug($request->slug, '-'),\n 'description' => $request->description,\n 'status' => $request->status\n ]);\n\n return back()->with([\n 'url' => 'cats.index',\n 'type' => 'success',\n 'message' => 'تم تعديل القسم بنجاح '\n ]);\n }", "public function update(Category $category, Request $request, CategoryRequest $categoryRequest)\n {\n $category->title = $request->get('title');\n $category->alias = $request->get('alias');\n $category->parent_id = $request->get('parent_id');\n $category->save();\n\n if ($request->get('property')) {\n foreach ($request->get('property') as $key => $property) {\n Property::where('id', $key)\n ->update(['name' => $property]);\n }\n }\n\n if ($request->get('subproperty')) {\n $data = [];\n foreach ($request->get('subproperty') as $key => $property) {\n foreach ($property as $key1 => $subProperty) {\n SubProperty::where('id', $key1)\n ->update(['name' => $subProperty]);\n }\n }\n SubProperty::insert($data);\n }\n\n $categoryRequest->createProperties($category->id);\n\n if ($request->get('new_subproperty')) {\n $data = [];\n foreach ($request->get('new_subproperty') as $key => $property) {\n foreach ($property as $newSubproperty) {\n $data[] = [\n 'name' => $newSubproperty,\n 'property_id' => $key,\n ];\n }\n }\n SubProperty::insert($data);\n }\n\n $properties = Property::where('category_id', $category->id)\n ->with('subProperties')\n ->get();\n\n return response()->json([\n 'message' => 'Категорията беше успешно редактирана.',\n 'content' => view('admin.categories.edit-content', [\n 'categories' => Category::all(),\n 'category' => $category,\n 'properties' => $properties,\n 'route' => route('categories.update', $category),\n ])->render(),\n ]);\n }", "public function update(UpdateCategory $request, string $id)\n {\n // Retrieve the validated input data...\n $validated = $request->validated();\n \n $this->repository->update($id, $validated);\n\n Toastr::success('Category Successfully Updated :)', 'Success');\n\n return redirect()->route('admin.category.index');\n }", "public function update(Request $request, Category $category)\n {\n\n $category->update($this->my_validate());\n $this->ImageStore($category);\n return redirect('/admin/category/index');\n }", "public function updated(Category $category)\n {\n //\n // 1. Update Status\n Product::where('category_id', $category->id)->update([\n 'status' => $category->status\n ]); \n }", "public function testUpdateCategoryByIdWithSuccess()\n {\n $category = new Category();\n $category->setVisibility([Category::VISIBILITY_FACEBOOK, Category::VISIBILITY_MOBILE]);\n $category->setPosition(555);\n $category->setActive(false);\n\n $i18nUS = new I18n();\n $i18nUS->setLocale('en_US');\n $i18nUS->setName('Category name here');\n $i18nUS->setDescription('Description of category here');\n\n $category->setI18n([$i18nUS]);\n\n $this->resourceAPI->updateCategoryById($this->resourceId, $category);\n\n $categoryResponse = $this->resourceAPI->getCategoryById($this->resourceId);\n $category = $categoryResponse->getData()[0];\n $this->assertEquals(555, $category->getPosition());\n $this->assertEquals(false, $category->getActive());\n }", "public function update(CategoryRequest $request, $id)\n {\n $category = $request->input('category');\n\n $updatecategory = Category::find($id);\n $updatecategory->category = $category;\n $saveCategory = $updatecategory->save();\n\n if (isset($saveCategory)) {\n $request->session()->flash('flash_notification.message', 'Category was successfully updated.');\n $request->session()->flash('flash_notification.level', 'success');\n return redirect()->route('admin.category.index');\n } else {\n $request->session()->flash('flash_notification.message', 'An error occurred, please try again later. ');\n $request->session()->flash('flash_notification.level', 'danger');\n return redirect()->route('admin.category.index');\n }\n }", "public function update(Request $request, $id)\n {\n $category = category::find($id);\n $category->c_name = $request->c_name;\n $save = $category->update();\n if ($category) {\n return redirect()->route('categories.index');\n }\n }", "public function update(Request $request, Category $category)\n {\n if ($request->has('name')) {\n $category->name = $request->name;\n }\n\n if ($request->has('description')) {\n $category->description = $request->description;\n }\n\n //Dirty when something changed\n if (!$category->isDirty()) {\n return $this->errorResponse('You need to specify a different value to update', 421);\n }\n \n $category->save();\n\n return $this->showOne($category);\n }", "public function update(Request $request, Category $category)\n {\n $category->update($this->validateRequest($request));\n return redirect('/categories/create')->with('message', 'Category Updated..');\n }", "public function update(CategoryRequest $request, $id)\n {\n $input = $request->all();\n $category = Category::findorFail($id);\n\n \t\t// To update the Amazon S3 objects\n \t\tif ($request->file('category_image')) {\n \t\t\t// To check the object is exists or not\n \t\t\tif (Storage::disk('s3')->exists('uploads/category/'.$category->category_image)) {\n \t\t\t\t// To delete the object from Amazon S3 repository\n \t\t\t\tStorage::disk('s3')->delete('uploads/category/'.$category->category_image);\n \t\t\t}\n \t\t\t// To upload the object to the particular path with the permission as (Public)\n \t $amazonImgUpload = Storage::disk('s3')->put('uploads/category/'.$request->file('category_image')->getClientOriginalName(), file_get_contents($request->file('category_image')), 'public');\n \t\t}\n\n if($request->hasFile('category_image')){\n $input['category_image'] = Category::upload_file($request, 'category_image', $id);\n }\n // To get the Last Insert id and insert the value in the Category Service Table by Category Name\n $service = implode(',', $input['service_id']);\n if (!empty($service)) {\n $categoryService = CategoryService::where('category_id', '=', $id)->get();\n if (count($categoryService) > 0) {\n $result = DB::table('category_services')\n \t\t\t\t\t\t\t\t\t->where('category_id', $id) // find your user by their email\n \t\t\t\t\t\t\t\t\t->limit(1) // optional - to ensure only one record is updated.\n \t\t\t\t\t\t\t\t\t->update(array('service_id' => $service)); // update the record in the DB.\n //$result = DB::statement(\"UPDATE category_services set service_id='\".$service.\"' where category_id=\".$id);\n } else {\n $categoryInput['category_id'] = $id;\n $categoryInput['service_id'] = $service;\n CategoryService::create($categoryInput);\n }\n }\n // To update the Status\n if ($input['status'] == 1) {\n $input['status'] = 'Active';\n } elseif ($input['status'] == 2) {\n $input['status'] = 'Inctive';\n }\n $category->fill($input);\n $category->save();\n return Redirect::route($this->route)->with($this->success, trans($this->updatemsg));\n }", "public function update(Request $request, Category $category)\n {\n $this->validate($request, [\n 'name' => \"required|unique:categories,name, $category->id\"\n ]);\n\n $category->update([\n 'name' => $request->name,\n 'slug' => Str::slug($request->name),\n ]);\n\n return response()->json('success', 200);\n }", "public function update(Request $request, Category $category)\n {\n $updatedCategory = new Category();\n try {\n $category->update($request->only($updatedCategory->getFillable()));\n return response()->json([\n 'message' => 'Category updated successfully!',\n 'data' => $category\n ]);\n } catch (\\Throwable $th) {\n return response()->json([\n 'message' => 'Error updating the category.'\n ], 500);\n }\n }", "public function update(CategoryUpdateRequest $request, $id)\n {\n try {\n $this->validator->with($request->all())->passesOrFail(ValidatorInterface::RULE_UPDATE);\n\n $data = $request->all();\n\n // Change 'On/Off' value to '1/0'\n if (isset($data['is_active'])) {\n $data['is_active'] = $this->categoryRepository->setCheckboxValue($data['is_active']);\n } else {\n $data['is_active'] = 0;\n }\n\n // Insert new category\n $bridge_data = $this->categoryRepository->getBridgeDataById($id);\n $category = $this->categoryRepository->updateCategory($data, $bridge_data->child_category_id);\n\n // Uplaod image\n $image_info = $this->baseController->imageUpload($request, $category->category_id);\n if ($image_info) {\n $data['category_image'] = $image_info['category_image'];\n $this->categoryRepository->updateCategory($data, $category->category_id);\n }\n\n if ($category) {\n $response = [\n 'message' => 'Category successfully updated.',\n 'status' => 'success',\n 'data' => $category->toArray(),\n ];\n } else {\n $response = [\n 'message' => 'Category not updated.',\n 'status' => 'danger',\n ];\n }\n return redirect()->route('category_list')->with('response', $response);\n } catch (ValidatorException $e) {\n if ($request->wantsJson()) {\n return response()->json([\n 'error' => true,\n 'message' => $e->getMessageBag()\n ]);\n }\n return redirect()->back()->withErrors($e->getMessageBag())->withInput();\n }\n }" ]
[ "0.73359996", "0.69551426", "0.687674", "0.6817189", "0.6790592", "0.6757311", "0.66078854", "0.6603828", "0.658919", "0.654784", "0.6508207", "0.64690024", "0.6459317", "0.64557177", "0.6437808", "0.6435639", "0.6425056", "0.64239365", "0.64109033", "0.6409327", "0.63971496", "0.6395427", "0.6392727", "0.63843143", "0.63778687", "0.63778687", "0.63778687", "0.63778687", "0.63778687", "0.63778687", "0.63778687", "0.63778687", "0.63778687", "0.63778687", "0.63723445", "0.6371689", "0.6359406", "0.6357053", "0.6331844", "0.6328569", "0.632822", "0.6324449", "0.6321894", "0.63129467", "0.62887245", "0.62875015", "0.6281955", "0.62721974", "0.6264459", "0.6262942", "0.62595433", "0.6258887", "0.6256562", "0.6255101", "0.62518185", "0.62511295", "0.6249437", "0.6248592", "0.62428594", "0.6228966", "0.6228872", "0.62266976", "0.6226164", "0.6217421", "0.6215968", "0.6214065", "0.62091935", "0.620625", "0.620208", "0.62012583", "0.61987126", "0.61928725", "0.61912835", "0.6184695", "0.61825067", "0.6173687", "0.61736774", "0.61724734", "0.6171972", "0.6170067", "0.6161232", "0.6161047", "0.61600333", "0.61515194", "0.6150379", "0.614816", "0.6147871", "0.61337036", "0.6125346", "0.6121183", "0.6120219", "0.61114293", "0.6109867", "0.6108001", "0.60986674", "0.6096918", "0.6094956", "0.60944664", "0.6093806", "0.6091498", "0.6090953" ]
0.0
-1
set up the connection
public function open_connection() { $this->connection = new mysqli(DB_SERVER, DB_USER, DB_USR_PASS, DB_NAME); if (mysqli_connect_errno()) { exit('Connect failed: '. mysqli_connect_error()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function connect() {}", "private function connect()\n\t{\n\t\t$connectionData = $this->app->file->requireFile('config.php');\n\t\t\n\t\textract($connectionData);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tstatic::$connection = new PDO('mysql:host=' . $server . ';dbname=' . $dbname, $dbuser, $dbpass);\n\t\t\t\n\t\t\tstatic::$connection->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n\t\t\t\n\t\t\tstatic::$connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t\t\n\t\t\tstatic::$connection->exec('SET NAMES utf8');\n\t\t}\n\t\tcatch (PDOException $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\t\t\t\t\n\t}", "private function __construct()\n {\n $this->connect();\n }", "private function setConnection() {\n if( $this->_connection ) { # prevent creation of additional connection\n $this->_connection;\n }\n $db_dsn = \"mysql:host=\".$this->db_host.\";port=\".$this->db_port.\";dbname=\".$this->db_name.\";charset=\".$this->db_char;\n $this->_connection = new PDO($db_dsn,$this->db_user,$this->db_pass,$this->db_opts);\n }", "function init() {\n if ( empty( $this->hostname ) ) {\n $this->hostname = $this->gCI->gPZ['db_config'][\"hostname\"];\n }\n if ( empty( $this->username ) ) {\n $this->username = $this->gCI->gPZ['db_config'][\"username\"];\n }\n if ( empty( $this->password ) ) {\n $this->password = $this->gCI->gPZ['db_config'][\"password\"];\n }\n if ( strstr( $this->hostname, \":\" ) ) {\n list( $this->hostname, $this->port ) = explode( \":\", $this->gCI->gPZ['db_config']['hostname'] );\n } else {\n $this->port = 0;\n }\n $this->database = ( empty( $this->database ) ? $this->gCI->gPZ['db_config'][\"database\"] : $this->database );\n $this->db_conn = new mysqli( $this->hostname, $this->username, $this->password, $this->database, $this->port );\n\n if ( mysqli_connect_errno() ) {\n\n $this->gCI->fatal_error( \"Database Connect failed: %s\\n\", mysqli_connect_error()) ;\n }\n }", "public function init_connection() {\n $this->connection = mysql_connect($this->host, $this->name, $this->password);\n if(!$this->connection) {\n die('Could not connect: ' . mysql_error());\n }\n mysql_select_db($this->databaseName, $this->connection);\n mysql_query(\"set names 'utf8'\");\n }", "public function setConnection()\r\n {\r\n $this->con = $this->db->getConnection();\r\n }", "private function setConnection(){\n try {\n $this->connection = new PDO('mysql:host='.self::HOST.';dbname='.self::NAME.';', self::USER, self::PASS);\n $this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (PDOException $e) {\n die('ERROR: '.$e->getMessage());\n }\n }", "public function __construct() {\n $this->connection = $this->create_connection();\n }", "public function connect()\n {\n $this->connection->connect();\n }", "function __construct() {\n $this->createConnection();\n }", "private function _set_connection()\n {\n isset($this->_database_connection) ? $this->load->database($this->_database_connection) : $this->load->database();\n $this->_database = $this->db;\n }", "private function __construct(){\n\t\t$this->connection = new Connection();\n\t\t$this->connection\n\t\t\t->setHost(Stack::getInstance()->get('db_host'))\n\t\t\t->setUser(Stack::getInstance()->get('db_user'))\n\t\t\t->setPassword(Stack::getInstance()->get('db_pass'))\n\t\t\t->setDatabase(Stack::getInstance()->get('db_table'))\n\t\t\t->connect();\n\t}", "function _getConnection()\n {\n $this->_con = Pluf::db();\n }", "protected function setConnection () : void\n {\n $this->connection = new PDO(\"mysql:host=\" . $this->db_host, $this->db_user, $this->db_password , self::PDO_OPTIONS);\n }", "function __construct() {\n $this->_connect();\n }", "function __construct()\n\t\t{\n\t\t\t$this->conn = $this->connect();\n\t\t}", "private function setConnection(){\n\t\t$this->_connection = new mysqli($this->_host, $this->_username, \n\t\t\t$this->_password, $this->_database);\n\t\n\t\t// Error handling\n\t\tif(mysqli_connect_error()) {\n\t\t\ttrigger_error(\"Failed to conencto to MySQL: \" . mysqli_connect_error(),\n\t\t\t\t E_USER_ERROR);\n\t\t}\n\n\t}", "private function __connect() {\n $this->handle = mysql_connect($this->server, $this->user, $this->password) \n or die('<pre style=\"margin:auto;background:rgba(0,0,0,.1)\">'.mysql_error().'</pre>');\n mysql_select_db($this->dataBase, $this->handle) \n or die('<pre style=\"margin:auto;background:rgba(0,0,0,.1)\">'.mysql_error().'</pre>');\n @mysql_query(\"SET NAMES 'utf8'\");\n }", "private function connect()\n {\n try {\n self::$connection = new PDO($this->buildDSN(), $this->user, $this->pass, $this->options);\n } catch (PDOException $e) {\n die('Connection failed: ' . $e->getMessage());\n }\n\n }", "final public function p_connect() {\n \t$this->connect('', '', '', '', true);\n \t}", "private function setConnection(){\n\n\n\t\t\t$this->apiKey = Settings::get( 'apiKey' );\n\n\t\t\tif( $this->apiKey ){\n\n\t\t\t\t$this->gateway = new MailChimp( $this->apiKey );\n\n\t\t\t}else{\n\n\t\t\t\t//log an error\n\n\t\t\t}\n\n\t\t}", "private function connect()\n {\n if ($this->configuration->get('db.connector') == 'PDO') {\n $dsn = \"mysql:host=\" . $this->configuration->get('db.host') . \";dbname=\" . $this->configuration->get('db.name');\n $options = array();\n $this->db = new PDO(\n $dsn, $this->configuration->get('db.username'), $this->configuration->get('db.password'), $options\n );\n } elseif ($this->configuration->get('db.connector') == 'mysqli') {\n $this->db = mysqli_connect(\n $this->configuration->get('db.host'), $this->configuration->get('db.username'), $this->configuration->get('db.password'), $this->configuration->get('db.name')\n );\n }\n }", "private function _connect() {\r\n\t\t$this->sql = mysql_connect(\r\n\t\t\t$this->dataSource->config['host'],\r\n\t\t\t$this->dataSource->config['login'],\r\n\t\t\t$this->dataSource->config['password']\r\n\t\t);\r\n\t\t$this->sql2 = mysql_connect(\r\n\t\t\t$this->dataSource->config['host'],\r\n\t\t\t$this->dataSource->config['login'],\r\n\t\t\t$this->dataSource->config['password']\r\n\t\t);\r\n\t}", "protected function connect() {\n $this->connection = 'resource';\n echo $this->name . ' connected '.\"<br>\" ;\n }", "private function set_up_connection(){\n $string = file_get_contents('/../../settings.json', true);\n //Create json iterator\n $jsonIterator = new RecursiveIteratorIterator(new RecursiveArrayIterator(json_decode($string, TRUE)), RecursiveIteratorIterator::SELF_FIRST);\n //Read iterator for each key found\n foreach($jsonIterator as $key => $val ) {\n if(is_array($val)) {\n //to-do as we find new arrays\n $this->db = $key;\n }else{\n //to-do as we find final values\n if($key == \"name\"){\n $this->dbname = $val;\n }else if($key == \"user\"){\n $this->user = $val;\n }else if($key == \"pass\"){\n $this->pass = $val;\n }else{\n $this->server = $val;\n }\n }\n }\n }", "protected static function setConnection(){\n static::$conn = connection\\DBconnect::makeInstance();\n }", "private function connect() {\r\n\t\tunset($this->dbLink);\r\n\t\t/* create connection to database host */\r\n\t\t// $dbLink = mysql_connect(\"mysql.localhost\", \"de88623\", \"proberaum1\");\r\n\t\t$dbLink = mysql_connect(\"localhost\", \"robert\", \"YMbHFY+On2\");\r\n\t\t/* select database */\r\n\t\tmysql_select_db(\"robert_www_parkdrei_de\");\r\n\t\t/* set link to database as a object attribute */\r\n\t\t$this->dbLink = $dbLink;\r\n\t}", "function __construct()\n {\n $this->createConnection();\n\n }", "private static function connect(){\n try{\n $conn_data = json_decode(file_get_contents(__DIR__.\"/../config/connection.json\"), true);\n self::$connection = new PDO($conn_data['CONN_STRING'], $conn_data['DB_USER'], $conn_data['DB_PASS']);\n\t\t} catch (PDOException $e){\n\t\t\techo \"Database error: \".$e->getMessage();\n\t\t\tdie();\n\t\t}\n }", "function __construct()\n {\n $this->connect();\n }", "public static function init() {\n\t\t\n\t\t// get various user info\n\t\t$defaultUser = Config::getOption(\"user\");\n\t\t$defaultPass = Config::getOption(\"pass\");\n\t\t$readwriteUser = Config::getOption(\"readwrite.user\");\n\t\t$readwritePass = Config::getOption(\"readwrite.pass\");\n\t\t\n\t\t// set-up the database connection info\n\t\t$name = Config::getOption(\"name\");\n\t\t$host = Config::getOption(\"host\");\n\t\t$user = (!$readwriteUser || empty($readwriteUser)) ? $defaultUser : $readwriteUser;\n\t\t$pass = (!$readwritePass || empty($readwritePass)) ? $defaultPass : $readwritePass;\n\t\t$port = Config::getOption(\"port\");\n\t\tPheasant::setup(\"mysql://\".$user.\":\".$pass.\"@\".$host.\":\".$port.\"/\".$name);\n\t\t\n\t}", "protected function connect()\n {\n $url = $this->createUrl(\"\");\n // create curl resource\n $this->connection = curl_init();\n\n // set url\n curl_setopt($this->connection, CURLOPT_URL, $url);\n\n //return the transfer as a string\n curl_setopt($this->connection, CURLOPT_RETURNTRANSFER, 1);\n\n }", "private function init()\n {\n // connessione al mysql server\n if (!$this->link = mysql_connect( $this->hostname\n , $this->user_name\n , $this->user_pswd))\n {\n $this->set_error( 'Could not connect to mysql' );\n return;\n }\n\n // seleziona il database\n if (!mysql_select_db($this->user_db, $this->link))\n {\n $this->set_error( 'Could not select database' );\n return;\n }\n }", "static function init(){\n if (!self::$conn) {\n $KEYS = new Keys();\n $hostname = $KEYS->DATABASE_HOST;\n $dbname = $KEYS->DATABASE_NAME;\n $username = $KEYS->DATABASE_USERNAME;\n $password = $KEYS->DATABASE_PASSWORD;\n $db = $db = ($KEYS->DATABASE_TYPE == \"\")? \"mysql\": $KEYS->DATABASE_TYPE;\n $port = $port = ($KEYS->DATABASE_PORT == \"\")? \"\": \"port={$KEYS->DATABASE_PORT};\";\n \n self::$conn = null;\n \n try {\n self::$conn = new PDO(\"{$db}:host={$hostname};{$port}dbname={$dbname}\", $username, $password);\n self::$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch(PDOException $exception) {\n Response::send(null, 500, \"Connection error: \" . $exception->getMessage());\n }\n }\n }", "function __construct(){\n\n\t\t $this->connect() ;\n\t}", "public function connect() {\r\n\t\t$this->connection = mysql_connect($this->host, $this->username, $this->password);\r\n\t\t$this->selectDB($this->squema);\r\n\t}", "private function __connection()\n {\n include 'src/Config/database.php';\n try {\n $dns = \"mysql:host={$databaseConfig['host']};dbname={$databaseConfig['database']}\";\n $this->__connection = new PDO(\n $dns,\n $databaseConfig['username'],\n $databaseConfig['password']\n );\n } catch (PDOException $e) {\n echo $e->getMessage();\n die;\n }\n }", "private function setConnection()\n {\n //load db array from config file\n $params = require __DIR__ . \"/../config/db_pdo.php\";\n\n $db_dsn = $params['pdo_dsn'] . ':dbname=' . $params['name'] . ';host=' . $params['host']\n . ';charset=' . $params['charset'];\n $db_pdo = null;\n\n try {\n $db_pdo = new \\PDO($db_dsn, $params['user'], $params['password']);\n $db_pdo->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n } catch (\\PDOException $e) {\n throw new \\Exception('Database connection failed.' . $e->getMessage());\n }\n\n $this->connection = $db_pdo;\n }", "protected function setConn() {\n try {\n // Connect and create the PDO object\n self::$conn = new PDO(\"mysql:host=\".DBHOST.\"; dbname=\".DBNAME, DBUSER, DBPASS);\n\n // Sets to handle the errors in the ERRMODE_EXCEPTION mode\n self::$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n self::$conn->exec('SET character_set_client=\"utf8\",character_set_connection=\"utf8\",character_set_results=\"utf8\";'); // Sets encoding UTF-8\n \n }\n catch(PDOException $e) {\n $this->eror = 'Unable to connect to MySQL: '. $e->getMessage();\n }\n }", "function connect()\n {\n $this->db = new MysqliAdapter($this->config[$this->sectionName]);\n \n if (isset($this->config[$this->sectionName]['username']) && isset($this->config[$this->sectionName]['password']))\n {\n if (!$this->db->connect())\n {\n writeLog('Could not connect to server', E_USER_ERROR);\n exit;\n }\n writeLog(\"connect successfull\");\n } \n else \n {\n writeLog(\"no username or password\");\n $this->unauthorized();\n exit;\n }\n }", "public function setup($u, $p, $h, $db)\n\t\t{\t$this->user = $u;\n\t\t\t$this->pass = $p;\n\t\t\t$this->host = $h;\n\t\t\t$this->db = $db;\n\n\t\t\tif (isset($this->link))\n\t\t\t\t$this->disconnect();\n\n\t\t\t$this->connect();\n\t\t}", "protected function initializeConnection() {\n GatherContent\\Configuration::configure($this->email, $this->api_key);\n\n if (!$this->project_id) {\n $project = $this->retrieveProject($this->account_slug, $this->project_name);\n $this->project_id = $project->id;\n }\n\n if (!$this->template) {\n if ($this->template_id) {\n $this->template = $this->retrieveTemplate($this->template_id);\n }\n elseif ($this->template_name) {\n $this->template = $this->retrieveTemplateByName($this->project_id, $this->template_name);\n $this->template_id = $this->template->id;\n }\n }\n\n if ($this->template_id) {\n $this->include_filters['template_id'] = $this->template_id;\n }\n }", "public function connect()\n {\n $data = $this->app->file->requireFile('config.php');\n extract($data);\n try {\n static::$DB = new PDO('mysql:host=' . $server . ';dbname=' . $dbname , $dbuser , $dbpass);\n\n static::$DB->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE , PDO::FETCH_OBJ);\n static::$DB->setAttribute(PDO::ATTR_ERRMODE , PDO::ERRMODE_EXCEPTION);\n static::$DB->exec('SET NAMES utf8');\n\n }\n catch (PDOException $e){\n die($e->getMessage());\n }\n }", "protected function setupDatabaseConnection()\n {\n $db = DBConnection::getInstance($this->config);\n\n $enc = property_exists($this->config, 'dbEncoding') ? $this->config->dbEncoding : 'utf8';\n $tz = property_exists($this->config, 'dbTimezone') ? $this->config->dbTimezone : '00:00';\n\n $db->query(\n sprintf('SET NAMES \"%s\"', $enc)\n );\n\n $db->query(\n sprintf('SET time_zone = \"%s\"', $tz)\n );\n }", "private function connect() {\n $host = $this->dbConfig[$this->selected]['host'];\n $login = $this->dbConfig[$this->selected]['login'];\n $password = $this->dbConfig[$this->selected]['password'];\n $database = $this->dbConfig[$this->selected]['database'];\n try {\n $this->db = new PDO('mysql:host=' . $host . ';dbname=' . $database . ';charset=utf8', $login, $password);\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n//\t\t\t$this->db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n } catch (PDOException $e) {\n die('Could not connect to DB:' . $e);\n }\n }", "public function connect()\r\n\t{\r\n\t\t//$this->link = qracle_connect();\r\n\t}", "public function connect() {\n $this->connection = AMQPStreamConnection($this->server_ip, $this->server_port, $this->username, $this->password);\n }", "protected function openConn() {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "function __construct() {\n $this->open_connection();\n }", "private function connect(){\n\t\trequire (__DIR__ . '/../../config.php');\n\t\t$mysqlCFG =$database['mysql'];\n\t\t\n\t\tif(!self::$db){\n\t\t\t$connectionString = \"mysql:host=$mysqlCFG[host];dbname=$mysqlCFG[dbname]\";\n\t\t\ttry{\n\t\t\t\tself::$db = new \\PDO($connectionString, $mysqlCFG['user'], $mysqlCFG['password']);\n\t\t\t\tself::$db->setAttribute( \\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n\t\t\t}catch(\\PDOException $e){\n\t\t\t\tdie(\"Ocurrio un error al conectar con la base de datos: $e->getMessage()\");\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function __construct() {\n\t\t$this->_dbhost\t\t= \"alexandrgmsperso.mysql.db\";\n\t\t$this->_dbname\t\t= \"alexandrgmsperso\";\n\t\t$this->_dbusername\t= \"alexandrgmsperso\";\n\t\t$this->_dbpassword\t= \"Alexandre2007\";\n\t\t$this->startConnection();\n\t}", "private function connectToDB()\n {\n $this->handler = new DBConnect();\n $this->handler = $this->handler->startConnection();\n }", "public function connect()\n {\n }", "public function connect()\n {\n }", "public function connect()\n {\n }", "public function connect()\n {\n try {\n\n $this->config = (new Config\\Config())->getConfig(); // load config file in config class\n\n // create pdo connection to DB by using config\n $this->_dbInstance = new \\PDO('mysql:host=' . $this->config['ServerName'] . ';dbname=' . $this->config['DBName'], $this->config['UserName'], $this->config['Password'],array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\"));\n\n // set attributes for this connection\n $this->_dbInstance->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }catch(\\PDOException $e)\n {\n echo $e->getMessage();\n }\n }", "function __construct() {\n $connection= new Connection;\n $this->link = $connection->conect();\n }", "private function connect()\n {\n $connection_string = 'mysql:host=' . DB_HOST . ';dbname=' . DB_NAME . ';';\n $this->connection = new PDO($connection_string, DB_USER, DB_PASS);\n }", "public static function makeConnection()\n {\n self::$connectionManager = new ConnectionManager();\n self::$connectionManager->addConnection([\n 'host' => self::$config['host'],\n 'user' => self::$config['user'],\n 'password' => self::$config['password'],\n 'dbname' => self::$config['dbname']\n ]);\n self::$connectionManager->bootModel();\n }", "function connect()\n\t{\n\t\t$this->conn = mysql_connect($this->host, $this->user, $this->password) or $this->error(mysql_error(), __LINE__, __FILE__);\n\t\t$this->serverVersion = explode('.', preg_replace('/^(\\d+)\\.(\\d+)\\.(\\d+)(.*?)$/', '\\1.\\2.\\3', mysql_get_server_info()));\n\t\t$this->select_db();\n\t}", "abstract protected function connect();", "abstract protected function connect();", "abstract protected function connect();", "protected function openConn()\n {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "private function Connect() {\n $this->Conn = parent::getConn();\n $this->Create = $this->Conn->prepare($this->Create);\n }", "public function __construct()\n {\n $this -> connection = $this ->connecdatabase();\n }", "private function openConnection(){\n if($_SERVER[\"DOCUMENT_ROOT\"]==\"\")\n require \"../utility/connection.php\";\n else\n require $_SERVER[\"DOCUMENT_ROOT\"] . \"/mythos_pr/src/utility/connection.php\";\n\n $this->connessione=$connessione;\n\t\t}", "public function __construct( )\n {\n $this->openConnection();\n }", "public function connect()\n {\n $dsn = sprintf(\"mysql:host=%s;port=%s;dbname=%s\", $this->configuration['host'], $this->configuration['port'], $this->configuration['database']);\n $this->pdo = new PDO($dsn, $this->configuration['username'], $this->configuration['password']);\n }", "protected function connect() {\n\n $this->dbc = new mysqli( $this->hostname, $this->username, $this->password, $this->database );\n if ($this->dbc->connect_errno) {\n die( \"Failed to connect to MySQL: \" . $this->dbc->connect_error );\n }\n // set the charset\n $this->dbc->set_charset ( 'utf-8' ); \n }", "public function __construct()\n {\n $gl_config = Tools::getConfig();\n\n\n $this->_server = $gl_config['database_master']['params']['host'];\n $this->_user = $gl_config['database_master']['params']['username'];\n $this->_password = $gl_config['database_master']['params']['password'];\n $this->_type = $gl_config['database_master']['adapter'];\n $this->_database = $gl_config['database_master']['params']['dbname'];\n $this->connect();\n }", "private function openConnection() {\n $this->db = new PDO(\"mysql:host=127.0.0.1;dbname=mvc\", \"gert\", \"becode\");\n }", "abstract public function connect();", "abstract public function connect();", "abstract public function connect();", "abstract public function connect();", "abstract public function connect();", "abstract public function connect();", "abstract public function connect();", "public function __construct() {\n $dsn = \"mysql:host=\".Configuration::DATABASE_HOST.\";dbname=\".Configuration::DATABASE_NAME;\n self::connect($dsn, Configuration::DATABASE_USER, Configuration::DATABASE_PASSWORD);\n }", "public function connect(): void\n {\n $this->pdo = new PDO(\n $this->constructDns($this->config),\n $this->config['username'],\n $this->config['password'],\n $this->config['options'] ?? [],\n );\n }", "public function initialize() {\r\n if (!$this->persistent) {\r\n $this->connect();\r\n } else {\r\n $this->pconnect();\r\n }\r\n }", "public function __construct() {\n $db = new Connection();\n $this->conn = $db->connect();\n }", "private function connection(){\n\t\t\ttry{\n\n\t\t\t\t$this->connection = new PDO(\n\t\t\t\t\t$this->dsn,\n\t\t\t\t\t$this->username,\n\t\t\t\t\t$this->password\t\n\t\t\t\t);\n\t\t\t\t$this->connection->setAttribute(\n\t\t\t\t\tPDO::ATTR_ERRMODE,\n\t\t\t\t\tPDO::ERRMODE_EXCEPTION\n\t\t\t\t);\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo \"ERROR: \".$e->getmessage();\n\t\t\t\tdie();\n\t\t\t}\n\t\t}", "public function __construct() {\n// $this->db['server'] = $args['server'];\n// $this->db['username'] = $args['username'];\n// $this->db['password'] = $args['password'];\n// $this->db['database'] = $args['database'];\n $this->open_connection();\n }", "public function connect()\n\t{\n\t\ttry {\n\t\t\t$this->_connection = new PDO(\n\t\t\t\t\"mysql:host=\" . $this->_host . \n\t\t\t\t\";dbname=\" . $this->_database,\n\t\t\t\t$this->_username,\n\t\t\t\t$this->_password,\n\t\t\t\tarray(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')\n\t\t\t); \n\t\t}\n\t\tcatch(PDOException $error) {\n\t\t\tdie('<br />MySQL error: Failed to connect.<br />' . $error->getMessage());\n\t\t}\n\t}", "protected function initConnection() {\n\t\tparent::initConnection();\n\t\t$this->connection->setConfiguration([\n\t\t\t'ldapBaseGroups' => 'ou=Groups,' . $this->base,\n\t\t\t'ldapUserFilter' => 'objectclass=inetOrgPerson',\n\t\t\t'ldapUserDisplayName' => 'displayName',\n\t\t\t'ldapGroupDisplayName' => 'cn',\n\t\t\t'ldapLoginFilter' => 'uid=%uid',\n\t\t]);\n\t}", "private function connect()\n {\n if (! is_null(self::$db)) {\n return;\n }\n\n // $this->host \t= $Database->host;\n // $this->user \t= $Database->user;\n // $this->pass \t= $Database->pass;\n // $this->database\t= $Database->database;\n\n $conn = 'mysql:dbname=' . $this->dbInfo->database . ';host=' . $this->dbInfo->host.';charset=utf8';\n try {\n self::$db = new PDO($conn, $this->dbInfo->user, $this->dbInfo->pass);\n } catch (PDOException $e) {\n die('Could not connect to database (' . $conn . ')');\n }\n }", "private static function getConnection(){\n\t\tself::$cnx = Connect::conn();\n\n\t}" ]
[ "0.73242897", "0.7243904", "0.7220168", "0.72162056", "0.720581", "0.7178778", "0.71708375", "0.71683156", "0.7163123", "0.7135812", "0.7112959", "0.71115744", "0.7106947", "0.71022946", "0.7092474", "0.7073704", "0.70734805", "0.7063474", "0.7053471", "0.70516145", "0.703916", "0.7039083", "0.70202297", "0.70005006", "0.69886523", "0.6983571", "0.6982512", "0.69815165", "0.6980747", "0.69521636", "0.6949625", "0.6940062", "0.6933865", "0.6932304", "0.6894235", "0.68829036", "0.6881412", "0.6863554", "0.6840764", "0.68346065", "0.68323094", "0.6825436", "0.6825162", "0.68152094", "0.68145937", "0.6814159", "0.6810824", "0.6803719", "0.6801012", "0.68006814", "0.6797743", "0.6792226", "0.6792226", "0.6792226", "0.6792226", "0.6792226", "0.6792226", "0.6792226", "0.6792226", "0.6792226", "0.6792226", "0.6792226", "0.6782242", "0.6782221", "0.67795694", "0.67795694", "0.67795694", "0.67695224", "0.6762598", "0.6757636", "0.6752787", "0.6741161", "0.6732671", "0.6732671", "0.6732671", "0.67316425", "0.6729709", "0.671976", "0.67142755", "0.67132854", "0.6705882", "0.67045754", "0.6696639", "0.66910726", "0.66830283", "0.66830283", "0.66830283", "0.66830283", "0.66830283", "0.66830283", "0.66830283", "0.6680346", "0.6677641", "0.66772974", "0.66708124", "0.66700304", "0.66638815", "0.6663633", "0.6658563", "0.6651013", "0.6648075" ]
0.0
-1
do general queries could use some work to make it more secure (figure out a way to do prepared statements)
public function query($sql) { // settype($sql, string); $result = $this->connection->query($sql); $this->confirm_query($result); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function _query($sql);", "abstract protected function doQuery( $sql );", "abstract public function query($sql);", "abstract public function query($sql, $execute =FALSE);", "function query() {\r\n\t\t\t$args = func_get_args();\r\n\t\t\t$sql = array_shift($args);\r\n\t\t\tforeach ($args as $key => $value)\r\n\t\t\t\t$args[$key] = $this->clean($value);\r\n\t\t\treturn mysql_query(vsprintf($sql, $args));\r\n\t\t}", "function sql_query($db_hst, $db_un, $db_pw, $db, $str_SQL = \"\"){//possibly pass db cred data as an array?\n $this->db_hst = $db_hst;\n $this->db_un = $db_un;\n $this->db_pw = $db_pw;\n $this->db = $db;\n \tif($str_SQL <> \"\"){\n \t\t$this->set_sql_string($str_SQL);\n \t\t$this->apply_sql();\n \t}\n \tif($this->bolDebug == 1){echo \"FUNCTION set_sql_string()<br>&nbsp; &nbsp; \\$db_hst=$db_hst, \\$db_un=$db_un, \\$db_pw=$db_pw, \\$db=$db \\$this->str_select_SQL=\" . $this->str_select_SQL . $this->strDebugNewLine;}\n }", "private function RunBasicQuery() {\n // Prepare the Query\n $this->stmt = $this->db->prepare($this->sql);\n \n // Run the Query in the Database\n $this->stmt->execute();\n \n // Store the Number Of Rows Returned\n $this->num_rows = $this->stmt->rowCount();\n \n // Work with the results (as an array of objects)\n $this->rs = $this->stmt->fetchAll();\n \n // Free the statement\n $this->stmt->closeCursor(); \n }", "public function query($sql);", "public function query($sql);", "public function query($sql);", "public function query($sql);", "private function prepareStatements() {\n $sql = \"INSERT INTO users(userName, password, email) VALUES (:user, :pass, :email)\";\n $this->insertUser = $this->connection->prepare($sql);\n\n $sql = \"UPDATE users SET userName=:userName, password=:pass, email=:email WHERE userName=:user\";\n $this->updateUser = $this->connection->prepare($sql);\n\n $sql = \"SELECT * FROM users WHERE userName=:user\";\n $this->selectUser = $this->connection->prepare($sql);\n }", "public function doQuery($sql, $params);", "abstract protected function executeSql($sql);", "private function sqlstatements() {\n $this->select = array( );\n $this->insert = array( 'INSERT INTO :entity (xxx) VALUES (yyy)' );\n $this->update = array( );\n $this->delete = array( );\n }", "public static function query($sql);", "function GenericSQL($sql, $param_type_array, $param_array, $sql_op){\n\tglobal $mysqli;\n\n\ttry{\n\t\tif($stmt=$mysqli->prepare($sql)){\n if($param_type_array !== NULL && $param_array !== NULL)\n call_user_func_array(\n array($stmt, \"bind_param\"), \n array_merge(\n passByReference($param_type_array), \n passByReference($param_array)\n )\n );\n\n $stmt->execute();\n\n if($stmt->affected_rows === 0 && $sql_op !== SQL_SELECT){\n return NOTHING_AFFECTED;\n }elseif($stmt->affected_rows === -1 && $sql_op !== SQL_SELECT){\n return $stmt->errno;\n }elseif($sql_op === SQL_SELECT){\n $data = returnJson($stmt);\n return $data;\n }else{\n return SUCCESS; \n }\n }else{\n // Throw error\n fwrite(STDOUT, \"else\");\n return FAILURE;\n }\n\t}catch (Exception $e) {\n // Return generic error\n fwrite(STDOUT, \"exception\");\n\t\treturn FAILURE;\n }\n}", "function query(/* $sql [, ... ] */)\n {\n // SQL statement\n $sql = func_get_arg(0);\n\n // parameters, if any\n $parameters = array_slice(func_get_args(), 1);\n\n // try to connect to database\n static $handle;\n if (!isset($handle))\n {\n try\n {\n // connect to database\n $handle = new PDO(\"mysql:dbname=\" . DATABASE . \";host=\" . SERVER, USERNAME, PASSWORD);\n\n // ensure that PDO::prepare returns false when passed invalid SQL\n $handle->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); \n }\n catch (Exception $e)\n {\n // trigger (big, orange) error\n trigger_error($e->getMessage(), E_USER_ERROR);\n exit;\n }\n }\n\n // prepare SQL statement\n $statement = $handle->prepare($sql);\n if ($statement === false)\n {\n // trigger (big, orange) error\n trigger_error($handle->errorInfo()[2], E_USER_ERROR);\n exit;\n }\n\n // execute SQL statement\n $results = $statement->execute($parameters);\n\n // return result set's rows, if any\n if ($results !== false)\n {\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }\n else\n {\n return false;\n }\n }", "abstract public function execute($sql);", "protected function prepareSelectStatement() {}", "public function query(string $sql);", "abstract public function exec($sql);", "abstract public function query();", "function pdo_query($sql, $link=NULL, $params=NULL) {\r\n\r\n // separate params from $sql and $link \r\n $params = func_get_args();\r\n $sql = TRIM( array_shift($params) );\r\n $flags = array();\r\n $direct = false;\r\n \r\n\r\n // find pdo $link \r\n if (count($params)) {\r\n // $link can be the first element\r\n if (is_object(reset($params))) {\r\n $link = array_shift($params);\r\n }\r\n // or the last\r\n elseif (is_object(end($params))) {\r\n $link = array_pop($params);\r\n }\r\n }\r\n // or we use the default $pdo\r\n $link = pdo_handle($link);\r\n \r\n // is $params a list to pdo_query(), or just one array with :key=>value pairs?\r\n if (count($params)==1 && is_array($params[0])) {\r\n $params = array_shift($params);\r\n }\r\n\r\n\r\n // add PDO_MySQL driver flag / workaround for specific query types\r\n switch (strtoupper(substr($sql, 0, strspn(strtoupper($sql), \"SELECT,USE,CREATE\")))) {\r\n\r\n // ought to make ->rowCount() work\r\n case \"SELECT\":\r\n $flags[PDO::MYSQL_ATTR_FOUND_ROWS] = true;\r\n break;\r\n\r\n // temporarily disable prepared statement mode for unbindable directives\r\n case \"USE\":\r\n $direct = true;\r\n $link->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);\r\n break;\r\n\r\n default:\r\n }\r\n\r\n\r\n // unparameterized query()\r\n if ($direct) {\r\n $stmt = $link->query($sql);\r\n $link->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\r\n }\r\n // or prepare() and execute()\r\n else {\r\n if ($stmt = $link->prepare($sql, $flags)) { // no try-catch in _WARNING mode\r\n $stmt->execute($params);\r\n }\r\n }\r\n \r\n // result\r\n if (!$stmt and PDO_HELPFUL) {\r\n pdo_trigger_error(\"pdo_query() SQL query failed, see pdo_error()\", E_USER_WARNING);\r\n }\r\n elseif (PDO_SEEKABLE & !$direct) {\r\n return new PDOStatement_Seekable($stmt, $params);\r\n }\r\n else {\r\n return $stmt;\r\n }\r\n }", "function _query($sql,$inputarr=false)\n\t{\n\t\t$this->_pnum = 0;\n\t\t$this->_errorMsg = false;\n\t\tif ($inputarr) {\n\t\t/*\n\t\t\tIt appears that PREPARE/EXECUTE is slower for many queries.\n\n\t\t\tFor query executed 1000 times:\n\t\t\t\"select id,firstname,lastname from adoxyz\n\t\t\t\twhere firstname not like ? and lastname not like ? and id = ?\"\n\n\t\t\twith plan = 1.51861286163 secs\n\t\t\tno plan = 1.26903700829 secs\n\t\t*/\n\t\t\t$plan = 'P'.md5($sql);\n\n\t\t\t$execp = '';\n\t\t\tforeach($inputarr as $v) {\n\t\t\t\tif ($execp) $execp .= ',';\n\t\t\t\tif (is_string($v)) {\n\t\t\t\t\tif (strncmp($v,\"'\",1) !== 0) $execp .= $this->qstr($v);\n\t\t\t\t} else {\n\t\t\t\t\t$execp .= $v;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($execp) $exsql = \"EXECUTE $plan ($execp)\";\n\t\t\telse $exsql = \"EXECUTE $plan\";\n\n\n\t\t\t$rez = @pg_execute($this->_connectionID,$exsql);\n\t\t\tif (!$rez) {\n\t\t\t# Perhaps plan does not exist? Prepare/compile plan.\n\t\t\t\t$params = '';\n\t\t\t\tforeach($inputarr as $v) {\n\t\t\t\t\tif ($params) $params .= ',';\n\t\t\t\t\tif (is_string($v)) {\n\t\t\t\t\t\t$params .= 'VARCHAR';\n\t\t\t\t\t} else if (is_integer($v)) {\n\t\t\t\t\t\t$params .= 'INTEGER';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$params .= \"REAL\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$sqlarr = explode('?',$sql);\n\t\t\t\t//print_r($sqlarr);\n\t\t\t\t$sql = '';\n\t\t\t\t$i = 1;\n\t\t\t\tforeach($sqlarr as $v) {\n\t\t\t\t\t$sql .= $v.' $'.$i;\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\t$s = \"PREPARE $plan ($params) AS \".substr($sql,0,strlen($sql)-2);\n\t\t\t\t//adodb_pr($s);\n\t\t\t\t$rez = pg_execute($this->_connectionID,$s);\n\t\t\t\t//echo $this->ErrorMsg();\n\t\t\t}\n\t\t\tif ($rez)\n\t\t\t\t$rez = pg_execute($this->_connectionID,$exsql);\n\t\t} else {\n\t\t\t//adodb_backtrace();\n\t\t\t$rez = pg_query($this->_connectionID,$sql);\n\t\t}\n\t\t// check if no data returned, then no need to create real recordset\n\t\tif ($rez && pg_num_fields($rez) <= 0) {\n\t\t\tif (is_resource($this->_resultid) && get_resource_type($this->_resultid) === 'pgsql result') {\n\t\t\t\tpg_free_result($this->_resultid);\n\t\t\t}\n\t\t\t$this->_resultid = $rez;\n\t\t\treturn true;\n\t\t}\n\n\t\treturn $rez;\n\t}", "abstract function executeQuery($cons);", "private function query()\n {\n $lStart = microtime(true);\n\n //arguments should be query (with placeholders) followed by an array of key-value pairs\n $args = func_get_args();\n $args = array_shift($args);\n $query = array_shift($args);\n $params = $args ? array_shift($args) : [];\n\n $sth = $this->pdo->prepare($query);\n if (!$sth) {\n //prepare failed\n $this->handlePrepareError($sth, $query, $params);\n }\n\n //explicitly bind parameters as int/string so IN() doens't get quoted\n foreach ($params as $key => $value) {\n if (is_numeric($value)) {\n $sth->bindValue($key, $value, PDO::PARAM_INT);\n } elseif (is_bool($value)) {\n $sth->bindValue($key, $value, PDO::PARAM_BOOL);\n } elseif (is_null($value)) {\n $sth->bindValue($key, $value, PDO::PARAM_NULL);\n } else {\n $sth->bindValue($key, $value, PDO::PARAM_STR);\n }\n }\n\n //query invalid\n if(!$sth->execute()) {\n $this->handleExecuteError($sth, $query, $params);\n }\n $this->queryTimer += microtime(true) - $lStart;\n $this->queryCount++;\n\n $query = preg_replace('/^\\s+/', '', $query);\n if(str_starts_with(strtolower($query), 'select')) {\n //return results for SELECT\n return $sth;\n\n } elseif(str_starts_with(strtolower($query), 'insert')) {\n //return insert id for INSERT\n $id = $this->pdo->lastInsertId();\n return ($id ?: true);\n\n } else {\n //return TRUE for DELETE, UPDATE\n //NB: don't return affected rows for UPDATE since 0 affected will be interpreted as query failed)\n return true;\n }\n }", "public abstract function execute($sql);", "function query($_sql, $param = null)\n{\n\t$res = null;\n\t\n\tif (isset($param) and !is_array($param)) {\n\t\t$param = func_get_args();\n\t\tarray_shift($param);\n\t}\n\t$sql = $param? $this->setParams($_sql, $param) : $_sql;\n\t\n\t$event = $this->onBeforeQuery($sql);\n\tif ($event and !$event->propagate) return;\n\n\tif (!$this->disabled) {\n\t\t$res = $this->drv->query($sql);\n\t}\n\t\n\tif ($this->logging > 1 and !$this->drv->error) {\n\t\t$this->messages[] = \"(n) Proceed $sql\";\n\t}\n\tif ($this->logging and $this->drv->error)\n\t\t$this->messages[] = \"(e) \".$this->drv->error;\n\telse\n\t\t$this->lastQuery = $sql;\n\n $this->onAfterQuery($sql, $this->drv->error);\n\treturn $res;\n}", "function _execQ($query, $param_strs, $params){\n $db = MySQLConnect::get_instance();\n $res = $db->prepare($query);\n \t array_unshift($params, $param_strs);\n call_user_func_array(array($res, 'bind_param'), $params);\n $bool = $res->execute();\n $sonuclar = $res->get_result();\n $rows = $sonuclar->fetch_all(MYSQLI_ASSOC);\n return $rows;\n }", "protected function execute_single_query(){\n\t\t$this -> open_connection();\n\t\t$this -> conn -> query($this -> query);\n\t\t$this -> close_connection();\n\t}", "abstract public function query($sql, $errorLevel = E_USER_ERROR);", "public function query($rawQuery, $param = array()){\n \n $stmt = $this->conn->prepare($rawQuery);\n \n $this->setParams($stmt, $param);\n \n $stmt->execute();\n \n return $stmt;\n \n}", "private function _prepareQuery() \n\t{\n\t\t\t// Establish connection to the database if not already connected\n\t\tif (! $this->_connection || empty($this->_connection)) {\n\t\t\t\n\t\t\t // retrieve the database configuration from the registry\n\t\t\t$config = Registry::getSetting('dbConfig');\n\t\t\t\n\t\t\t$this->_newConnection(\n\t\t\t\t\t$config['host'], \n\t\t\t\t\t$config['database'], \n\t\t\t\t\t$config['user'], \n\t\t\t\t\t$config['password']);\n\t\t}\n\t\t\n\t\tif (! $stmt = $this->_connection->prepare ( $this->_query )) {\n\t\t\ttrigger_error ( 'Problem preparing query', E_USER_ERROR );\n\t\t}\n\t\t$this->_stmt = $stmt;\n\t}", "function database_query($sql, $params = [])\n{\n\tglobal $database_connection;\n\t$stmt = $database_connection->prepare($sql);\n\t$stmt->execute($params);\n\treturn $stmt->fetchAll();\n}", "public function exec_query($sql = null) {\n\t\t$this->setFoundRows();\n\t\tif($this->debug) {\n\t\t\ttry {\n\t\t\t\t// Execute query\n\t\t\t\t$this->query = (isset($sql) && !empty($sql)) ? $sql : $this->getFullQuery();\n\t\t\t\t$Rs = $this->Connection->Execute($this->query, $this->params);\n\t\t\t\t$Rs->last_query = $this->getSQL($this->query); // full query with parameter\n\t\t\t\t//$this->writeQueryInLog($Rs->last_query, debug_backtrace());\n\n\t\t\t\t// $this->query_debugger($Rs->last_query); // Debug queries\n\t\t\t\t\n\t\t\t\t$this->resetVariables(); // reset all variables\t\t\t\t\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$newex = new Exception($e->getMessage());\n\t\t\t\t//echo 'ex :: '.$this->getSQL($this->getFullQuery());exit;\n\t\t\t\t$this->displayException($newex);\n\t\t\t}\n\t\t} \n\t\telse {\n\t\t\t$this->query = (isset($sql) && !empty($sql)) ? $sql : $this->getFullQuery();\n\t\t\t$Rs = $this->Connection->Execute($this->query, $this->params);\n\t\t\t$Rs->last_query = $this->getSQL($this->query); // full query with parameter\n\t\t\t$this->resetVariables();\t\t\t\n\t\t}\n\t\t\n\t\t$this->query = trim($this->query);\n\t\tif(stripos($this->query, 'INSERT') === 0) {\n\t\t\treturn $this->Connection->getLastInsertedId();\n\t\t} \n\t\telseif(stripos($this->query, 'UPDATE') === 0) {\n\t\t\treturn $Rs;\n\t\t} \n\t\telse {\n\t\t\tif($Rs->RecordCount() == 0)\n\t\t\t\treturn false;\n return $Rs;\n\t\t}\n\t}", "public function query($sql = null)\r\n {\r\n if (is_null($sql))\r\n $sql = $this->buildSql();\r\n //var_dump($sql);\r\n $this->sth = $this->db->prepare($sql);\r\n if (is_null($this->binds))\r\n $result = $this->sth->execute();\r\n else \r\n $result = $this->sth->execute($this->binds);\r\n }", "public function query($sql = null);", "function SqlQuery($loc, $sql)\n{\n $conn = GetSqlConnection();\n $result = $conn->query($sql);\n if($result == false) { DieWithBadSql($loc, $sql); }\n return $result;\n}", "function sql_execute($sql)\n{\n global $ctx;\n return $ctx['sqlconn']->query($sql);\n}", "function pp_run_query($query_set)\n{\n global $debug;\n $sql_exeq_words = array(\"CREATE\", \"UPDATE\", \"INSERT\", \"DELETE\");\n $d = getDBLink();\n if (!is_array($query_set)) {\n if (in_array(substr($query_set,0,6), $sql_exeq_words)) {\n $res = $d->ExecuteSQL($query_set);\n } else {\n $res = $d->FetchAll($query_set, null);\n }\n } else {\n $format_str = '';\n $params = array($query_set[0]);\n foreach($query_set[1] as $p) $format_str .= $p[0];\n if ($format_str != \"\") {\n $params[] = $format_str;\n }\n foreach($query_set[1] as $p) $params[] = $p[1];\n if(in_array(substr($query_set[0],0,6), $sql_exeq_words)) $func='ExecuteSQL';\n else {\n $func='FetchAll';\n }\n $res = call_user_func_array(array($d, $func), $params);\n }\n return $res;\n}", "abstract function getSQL();", "function runQuery ($q) {\r\n //setup the database connection\r\n $dbSettings = getDBsettings();\r\n $db = \"mysql:host=\" . $dbSettings['DBserver'] . \";dbname=\" . $dbSettings['DBname'] . \";port=\" . $dbSettings['DBport'];\r\n $pdo = new PDO($db, $dbSettings['DBuser'], $dbSettings['DBpass']);\r\n //prepare the SQL string\r\n $stmt = $pdo->prepare($q);\r\n //execute the SQL\r\n $stmt->execute();\r\n //close the conention\r\n $pdo = null;\r\n //return the result\r\n return $stmt;\r\n}", "public function execSql(){\n\t\t$cant=func_num_args();\n\t\t$instSql=\"\";\n\t\t$instSql=$this->reemplazaParametro(func_get_args());\n//\t\techo \"<br>\".$instSql.\"<br>\";\n//\t\techo $this->tipodb.\"<br>\";\n//\t\t$this->registroLog($instSql,$_SESSION['PERMISO'][0],$_SESSION['PERMISO'][1]);\n\t\tswitch ($this->tipodb) {\n\t\t\tcase \"my\":\n\t\t\t\t$resultado=mysql_query($instSql,$this->conn);\n//echo mysql_errno().\"<br>\";\n\t\t\t\tbreak;\n\t\t\tcase \"pg\":\n\t\t\t\t$resultado=pg_query($this->conn,$instSql);\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $resultado;\n\t}", "function exec($sql);", "static private function do_the_query($arg1, $arg2 = null, $arg3 = null)\n {\n self::open_default(); // just for sure\n\n if(!isset($arg1)) throw new DBException(\"DB class error: empty query!\");\n if(is_array($arg1)) throw new DBException(\"DB class error: first argument can't ne array!\");\n if(is_array($arg2) && is_array($arg3)) throw new DBException(\"DB class error: second and third arguments can't be arrays at the same time!\");\n\n // by default = $query, [$params]\n $query = $arg1;\n $params = $arg2;\n\n if(isset($arg2) && !is_array($arg2)) // $db, $query, [$params] -> database name passed first\n {\n $database_name = $arg1;\n $query = $arg2;\n $params = $arg3;\n }\n\n $unbuffered = strpos($database_name, ':unbuffered') !== false;\n $database_name = str_replace(':unbuffered', '', $database_name);\n if($database_name == '') $database_name = 'default';\n\n if (!self::is_open($database_name) && !self::is_predicted($database_name)) throw new DBException(\"Trying to query DB connection '{$database_name}' which does not exist and has not been predicted!\");\n if (!self::is_open($database_name) && self::is_predicted($database_name)) {\n self::add_predicted($database_name);\n if(!self::is_open($database_name)) throw new DBException(\"Can't open a predicted '{$database_name}'!\");\n }\n\n if($unbuffered) {\n $db = self::connection_unbuffered($database_name);\n }\n else {\n $db = self::connection($database_name);\n }\n\n\n // do the job!\n try {\n $statement = $db->prepare($query);\n\n $simple_params = null;\n foreach ((array)$params as $k => $v) {\n if ($k === 0) // support for '?' parameters\n {\n foreach ($params as $param) {\n if (is_object($param)) throw new DBException(\"Trying to send an object in \\$params array!\", [\"query\" => $query, \"params\" => $params]);\n if (is_array($param)) throw new DBException(\"Trying to send an array in \\$params array!\", [\"query\" => $query, \"params\" => $params]);\n }\n $simple_params = $params;\n break;\n }\n\n if (is_object($v)) throw new DBException(\"Trying to send an object in \\$params array!\", [\"query\" => $query, \"params\" => $params]);\n if (is_array($v)) throw new DBException(\"Trying to send an array in \\$params array!\", [\"query\" => $query, \"params\" => $params]);\n\n $statement->bindParam(':' . str_replace([' ', ':'], '', $k), $v); // support for ':name' parameters\n }\n }\n catch(Exception $e) { throw new DBException($e->getMessage(), [\"query\" => $query, \"params\" => $params] ); }\n\n self::try_execute_the_query($statement, $simple_params, $query, $params);\n\n self::$insert_id = $db->lastInsertId();\n self::$affected_rows = $statement->rowCount();\n\n return $statement;\n }", "function query() {}", "function runQueryWithParams ($q, $p) {\r\n $dbSettings = getDBsettings();\r\n $db = \"mysql:host=\" . $dbSettings['DBserver'] . \";dbname=\" . $dbSettings['DBname'] . \";port=\" . $dbSettings['DBport'];\r\n $pdo = new PDO($db, $dbSettings['DBuser'], $dbSettings['DBpass']);\r\n //prepare the SQL string\r\n $stmt = $pdo->prepare($q);\r\n //execute the SQL\r\n $stmt->execute(array($p));\r\n //close the conention\r\n $pdo = null;\r\n //return the result\r\n return $stmt;\r\n}", "function db_raw_exec( $sql )\n{\n return Chev_PDO::instance()->raw_exec( $sql );\n}", "private function ExecuteQuery()\n\t{\n\t\tswitch($this->querytype)\n\t\t{\n\t\t\tcase \"SELECT\":\n\t\t\t{\n\t\t\t\t$this->stmt->execute();\n\t\t\t\t$this->querydata = $this->stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"INSERT\":\n\t\t\tcase \"UPDATE\":\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$this->beginTransaction();\n\t\t\t\t\t$this->stmt->execute();\n\t\t\t\t\t$this->commit();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcatch (PDOException $e)\n\t\t\t\t{\n\t\t\t\t\t$this->rollBack();\n\t\t\t\t\techo(\"Query failed: \" . $e->getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function ExecutePreparedQuery($sql, $vars)\n\t{\n\t\tif(empty($pdo))\n\t\t{\n\t\t\t$connectDb = \"mysql:host=\" . $dbServer . \";dbname=\" . $dbName;\n\t\t\t$pdo = new pdo($connectDb, $dbUser, $dbPass);\n\t\t\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$query = $pdo->prepare($sql);\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\techo(\"<b><font color=\\\"red\\\">Error executing sql query:</font><br><br>\");\n\t\t\tprint_r($e->getMessage());\n\t\t\tdie();\n\t\t}\n\t\tif($query)\n\t\t\t$query->execute($vars);\n\t\telse\n\t\t{\n\t\t\tprint_r($pdo->errorInfo);\n\t\t\tdie();\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\treturn $query->fetchAll(PDO::FETCH_ASSOC);\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\t// An insert will throw, this is crappy and should probably be handled better\n\t\t\treturn \"\";\n\t\t}\n\t}", "abstract public function exec($query='');", "public function query()\n {\n $bindings = func_get_args();\n $sql = array_shift($bindings);\n\n if (count($bindings) == 1 and is_array($bindings[0])){\n $bindings = $bindings[0];\n }\n\n try{\n $query = $this->connection()->prepare($sql);\n\n foreach ($bindings as $key => $value){\n $query->bindValue($key + 1 , _e($value));\n }\n $query->execute();\n\n return $query;\n }\n catch (PDOException $e){\n echo $sql;\n pre($this->bindings);\n die($e->getMessage());\n }\n\n }", "function query_db($TYPE,$DB_TABLE,$DB_WHERECLAUSE,$DB_WHERECLAUSEEQUALTO,$TO_BE_FETCHED,$DB_ORDERBY,$DB_GROUPBY = NULL,$INSERT_ITEMS = NULL,$INSERT_VALUES = NULL,$DB_ORDERBY_ORDER = NULL)\n{\n\tglobal $dba;\n\t$return=\"\";\n\t$FETCHED=\"\";\n\tswitch($TYPE){\n\t\tcase 'INSERT':\n\t\t\t$sql = \"INSERT INTO \".$DB_TABLE.\" (\".$INSERT_ITEMS.\")\nVALUES (\".$INSERT_VALUES.\")\";\n\n\t\t\tif(!$result = $dba->query($sql)){\n\t\t\t\t/* SOMETHING HAPPENED; QUERY WENT WONKY */\n\t\t\t\t$result = $dba->error.\" <br /><br /> SQL: \".$sql;\n\t\t\t\techo $result;\n\t\t\t} else {\n\n\t\t\t}\n\t\tbreak;\n\t\tcase 'SELECT':\n\t\t\t//check to see if WHERE clause is not blank\n\t\t\tif($DB_WHERECLAUSE!=\"\"){\n\t\t\t\t// CHECKING FOR SPECIFICS\n\t\t\t\t// -- check to see if there are multiple where options\n\t\t\t\t// first explode the where\n\t\t\t\t$DB_WHERECLAUSE_LIST\t\t= explode(\",\",$DB_WHERECLAUSE);\n\t\t\t\t$DB_WHERECLAUSEEQUALTO_LIST\t= explode(\",\",$DB_WHERECLAUSEEQUALTO);\n\n\t\t\t\t//now check to see if there are more than 1\n\t\t\t\tif((count($DB_WHERECLAUSE_LIST) > 1) && (count($DB_WHERECLAUSEEQUALTO_LIST > 1))){\n\t\t\t\t\t/* MULTIPLE WHERES */\n\t\t\t\t\t$sql = \"SELECT * FROM `\".$DB_TABLE.\"`\";\n\t\t\t\t\tfor($i=0; $i<count($DB_WHERECLAUSE_LIST)-1; $i++){\n\t\t\t\t\t\t//first or extra? if first : WHERE ; else : AND\n\t\t\t\t\t\tif($i==0){$sql .= \"WHERE \";}\n\t\t\t\t\t\tif($i>0){$sql .= \" AND \";}\n\n\t\t\t\t\t\t// Find out if there is a :COMMA: found in the string\n\t\t\t\t\t\t$pos = strpos($DB_WHERECLAUSEEQUALTO_LIST[$i],\":COMMA:\");\n\t\t\t\t\t\tif ($pos != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// rewrite the where\n\t\t\t\t\t\t\t$THEWHERE = str_replace(\":COMMA:\",\",\",$DB_WHERECLAUSEEQUALTO_LIST[$i]);\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$THEWHERE = $DB_WHERECLAUSEEQUALTO_LIST[$i];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$sql .= \"`\".$DB_WHERECLAUSE_LIST[$i].\"` \".$THEWHERE.\"\";\n\t\t\t\t\t}\n\t\t\t\t\tif($DB_ORDERBY_ORDER!=NULL){\n\t\t\t\t\t\tif($DB_GROUPBY!=NULL){$sql .= \" GROUP BY \".$DB_GROUPBY.\" ORDER BY \".$DB_ORDERBY.\" \".$DB_ORDERBY_ORDER.\"\";}else{$sql .= \" ORDER BY \".$DB_ORDERBY.\" \".$DB_ORDERBY_ORDER.\"\";}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif($DB_GROUPBY!=NULL){$sql .= \" GROUP BY \".$DB_GROUPBY.\" ORDER BY \".$DB_ORDERBY.\" ASC\";}else{$sql .= \" ORDER BY \".$DB_ORDERBY.\" ASC\";}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t/* SINGLE WHERE */\n\t\t\t\t\tif($DB_ORDERBY_ORDER!=NULL){\n\t\t\t\t\t\t$sql = \"\n\t\t\t\t\t\t\tSELECT * FROM `\".$DB_TABLE.\"`\n\t\t\t\t\t\t\tWHERE `\".$DB_WHERECLAUSE_LIST[0].\"` = '\".$DB_WHERECLAUSEEQUALTO_LIST[0].\"' ORDER BY \".$DB_ORDERBY.\" \".$DB_ORDERBY_ORDER.\"\n\t\t\t\t\t\t\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$sql = \"\n\t\t\t\t\t\t\tSELECT * FROM `\".$DB_TABLE.\"`\n\t\t\t\t\t\t\tWHERE `\".$DB_WHERECLAUSE_LIST[0].\"` = '\".$DB_WHERECLAUSEEQUALTO_LIST[0].\"' ORDER BY \".$DB_ORDERBY.\" ASC\n\t\t\t\t\t\t\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif($DB_ORDERBY_ORDER!=NULL){\n\t\t\t\t\t$sql = \"\n\t\t\t\t\t\tSELECT * FROM `\".$DB_TABLE.\"` ORDER BY \".$DB_ORDERBY.\" \".$DB_ORDERBY_ORDER.\"\n\t\t\t\t\t\";\n\t\t\t\t} else {\n\t\t\t\t\t$sql = \"\n\t\t\t\t\t\tSELECT * FROM `\".$DB_TABLE.\"` ORDER BY \".$DB_ORDERBY.\" ASC\n\t\t\t\t\t\";\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\tif(!$result = $dba->query($sql)){\n\t\t\t\t/* SOMETHING HAPPENED; QUERY WENT WONKY */\n\t\t\t\t$result = $dba->error.\" <br /><br /> SQL: \".$sql.\"<br /><br />WHERE CLAUSE: \".$DB_WHERECLAUSE.\"<br /><br />WHERE CLAUSE EQUAL TO: \".$DB_WHERECLAUSEEQUALTO;\n\t\t\t\techo $result;\n\t\t\t} else {\n\t\t\t\t/* GOOD QUERY; DO SHIT */\n\n\t\t\t\t/* OH THIS IS ALL DEBUG SHIT...DO NOT UNCOMMENT THIS\n\t\t\t\t*/\n\t\t\t\t//echo \"WHERE: \".$DB_WHERECLAUSE;\n\t\t\t\t//echo \"<br />WHERE = TO: \".$DB_WHERECLAUSEEQUALTO;\n\t\t\t\t//echo \"<br />TBF: \".$TO_BE_FETCHED;\n\t\t\t\t//echo \"<br />SQL: \".$sql;\n\n\t\t\t\twhile($FETCH=$result->fetch_assoc()){\n\t\t\t\t\t$FETCHED.=$FETCH[$TO_BE_FETCHED].\",\";\n\t\t\t\t\t$return=$FETCHED;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@$result->free();\n\t\tbreak;\n\t\tcase 'UPDATE':\n\t\t\t//check to see if WHERE clause is not blank\n\t\t\tif($DB_WHERECLAUSE!=\"\"){\n\t\t\t\t// CHECKING FOR SPECIFICS\n\t\t\t\t// -- check to see if there are multiple where options\n\t\t\t\t// first explode the where\n\t\t\t\t$DB_WHERECLAUSE_LIST\t\t= explode(\",\",$DB_WHERECLAUSE);\n\t\t\t\t$DB_WHERECLAUSEEQUALTO_LIST\t= explode(\",\",$DB_WHERECLAUSEEQUALTO);\n\n\t\t\t\t//now check to see if there are more than 1\n\t\t\t\tif((count($DB_WHERECLAUSE_LIST) > 1) && (count($DB_WHERECLAUSEEQUALTO_LIST > 1))){\n\t\t\t\t\t/* MULTIPLE WHERES */\n\t\t\t\t\t$sql = \"UPDATE `\".$DB_TABLE.\"` SET \".$INSERT_ITEMS.\" = '\".$INSERT_VALUES.\"' \";\n\t\t\t\t\tfor($i=0; $i<count($DB_WHERECLAUSE_LIST)-1; $i++){\n\t\t\t\t\t\t//first or extra? if first : WHERE ; else : AND\n\t\t\t\t\t\tif($i==0){$sql .= \"WHERE \";}\n\t\t\t\t\t\tif($i>0){$sql .= \" AND \";}\n\t\t\t\t\t\t$sql .= \"`\".$DB_WHERECLAUSE_LIST[$i].\"` \".$DB_WHERECLAUSEEQUALTO_LIST[$i].\"\";\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t/* SINGLE WHERE */\n\t\t\t\t\t$sql = \"\n\t\t\t\t\t\tUPDATE `\".$DB_TABLE.\"` SET \".$INSERT_ITEMS.\" = '\".$INSERT_VALUES.\"' WHERE `\".$DB_WHERECLAUSE_LIST[0].\"` = '\".$DB_WHERECLAUSEEQUALTO_LIST[0].\"'\n\t\t\t\t\t\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$sql = \"\n\t\t\t\t\tUPDATE `\".$DB_TABLE.\"` SET \".$INSERT_ITEMS.\" = '\".$INSERT_VALUES.\"'\n\t\t\t\t\";\n\t\t\t}\n\n\t\t\t//MySqli Update Query\n\t\t\t$results = $dba->query($sql);\n\n\t\t\t//MySqli Delete Query\n\t\t\t//$results = $dba->query(\"DELETE FROM products WHERE ID=24\");\n\n\t\t\tif($results){\n\t\t\t\t//echo 'Success! record updated / deleted';\n\t\t\t}else{\n\t\t\t\techo 'Error : ('. $dba->errno .') '. $dba->error.'<br />';\n\t\t\t\techo \"WHERE: \".$DB_WHERECLAUSE;\n\t\t\t\techo \"<br />WHERE = TO: \".$DB_WHERECLAUSEEQUALTO;\n\t\t\t}\n\t\tbreak;\n\t\tcase 'DELETE':\n\t\t\t//check to see if WHERE clause is not blank\n\t\t\tif($DB_WHERECLAUSE!=\"\"){\n\t\t\t\t// CHECKING FOR SPECIFICS\n\t\t\t\t// -- check to see if there are multiple where options\n\t\t\t\t// first explode the where\n\t\t\t\t$DB_WHERECLAUSE_LIST\t\t= explode(\",\",$DB_WHERECLAUSE);\n\t\t\t\t$DB_WHERECLAUSEEQUALTO_LIST\t= explode(\",\",$DB_WHERECLAUSEEQUALTO);\n\n\t\t\t\t//now check to see if there are more than 1\n\t\t\t\tif((count($DB_WHERECLAUSE_LIST) > 1) && (count($DB_WHERECLAUSEEQUALTO_LIST > 1))){\n\t\t\t\t\t/* MULTIPLE WHERES */\n\t\t\t\t\t$sql = \"DELETE FROM `\".$DB_TABLE.\"`\";\n\t\t\t\t\tfor($i=0; $i<count($DB_WHERECLAUSE_LIST)-1; $i++){\n\t\t\t\t\t\t//first or extra? if first : WHERE ; else : AND\n\t\t\t\t\t\tif($i==0){$sql .= \"WHERE \";}\n\t\t\t\t\t\tif($i>0){$sql .= \" AND \";}\n\t\t\t\t\t\t$sql .= \"`\".$DB_WHERECLAUSE_LIST[$i].\"` \".$DB_WHERECLAUSEEQUALTO_LIST[$i].\"\";\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t/* SINGLE WHERE */\n\t\t\t\t\t$sql = \"\n\t\t\t\t\t\tDELETE FROM `\".$DB_TABLE.\"` WHERE `\".$DB_WHERECLAUSE_LIST[0].\"` = '\".$DB_WHERECLAUSEEQUALTO_LIST[0].\"'\n\t\t\t\t\t\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$sql = \"\n\t\t\t\t\tDELETE FROM `\".$DB_TABLE.\"`\n\t\t\t\t\";\n\t\t\t}\n\n\t\t\t//MySqli Update Query\n\t\t\t$results = $dba->query($sql);\n\n\t\t\t//MySqli Delete Query\n\t\t\t//$results = $dba->query(\"DELETE FROM products WHERE ID=24\");\n\n\t\t\tif($results){\n\t\t\t\t//echo 'Success! record updated / deleted';\n\t\t\t}else{\n\t\t\t\techo 'Error : ('. $dba->errno .') '. $dba->error.'<br />';\n\t\t\t\techo \"WHERE: \".$DB_WHERECLAUSE;\n\t\t\t\techo \"<br />WHERE = TO: \".$DB_WHERECLAUSEEQUALTO;\n\t\t\t}\n\t\tbreak;\n\t\tcase 'TRUNCATE':\n\t\t\t$sql = \"\n\t\t\t\tTRUNCATE TABLE `\".$DB_TABLE.\"`\n\t\t\t\";\n\n\t\t\t//MySqli Update Query\n\t\t\t$results = $dba->query($sql);\n\n\t\t\t//MySqli Delete Query\n\t\t\t//$results = $dba->query(\"DELETE FROM products WHERE ID=24\");\n\n\t\t\tif($results){\n\t\t\t\t//echo 'Success! record updated / deleted';\n\t\t\t}else{\n\t\t\t\techo 'Error : ('. $dba->errno .') '. $dba->error.'<br />';\n\t\t\t\techo \"WHERE: \".$DB_WHERECLAUSE;\n\t\t\t\techo \"<br />WHERE = TO: \".$DB_WHERECLAUSEEQUALTO;\n\t\t\t}\n\t\tbreak;\n\t}\n\treturn $return;\n}", "public function runQuery($sql){\n $stmt = $this->conn->prepare($sql);\n return $stmt;\n }", "function exec_sql_query($db, $sql, $params = array()) {\n try {\n $query = $db->prepare($sql);\n if ($query and $query->execute($params)) {\n return $query;\n }\n } catch (PDOException $exception) {\n handle_db_error($exception);\n }\n return NULL;\n}", "function exec_sql_query($db, $sql, $params = array()) {\n try {\n $query = $db->prepare($sql);\n if ($query and $query->execute($params)) {\n return $query;\n }\n } catch (PDOException $exception) {\n handle_db_error($exception);\n }\n return NULL;\n}", "protected function query($sql, array $params)\n {\n }", "private function runQuery () {\n\n // Prepare the constructed SQL statement\n if ($this->_query = $this->_pdo->prepare($this->_sql)) {\n\n // Set a counter to one to use when binding\n $x = 1;\n \n // Loop through the binding array\n foreach($this->_bindArray as $param) {\n \n // Run the bindValue function to match the correct value to the correct placing\n $this->_query->bindValue($x, $param);\n\n // Increment the counter\n $x++;\n \n }\n \n // Run the execute function\n $this->execute();\n }\n }", "function exec_query($conn, $query) {\n\tif ($conn) {\n\t\ttry {\n\t\t\t$stmt = $conn->prepare($query);\n\t\t\t$stmt->execute();\n\t\t\treturn $stmt->fetchAll();\n\t\t} catch (PDOException $e) {\n\t\t\techo \"<div>Could not access db: \" . $e->getMessage() . \"</div>\";\n\t\t}\n\t}\n\treturn NULL;\n}", "function initQueries(){\n // create Prepared Statements\n $this->statementUpdate = $this->connection->prepare(\"UPDATE user SET e_id = ?,\n email = ?,\n password = ? WHERE u_id = ?\");\n $out = $this->statementUpdate->bind_param(\"sssi\",$this->data['e_id'], $this->data['email'], $this->data['password'], $this->data['u_id']);\n // print_r($out);\n $this->statementInsert = $this->connection->prepare(\"INSERT INTO user (\n `e_id`, `email`,\n `password`) VALUES (?, ?, ?)\");\n // one function to find them\n $this->statementRetrieve = $this->connection->prepare(\"SELECT * FROM user\n WHERE e_id = ?\");\n // In the Darkness Bind them\n $this->statementRetrieve->bind_param(\"s\",$this->data['e_id']);\n\n // $this->statementInsert->bind_param(\"sissssiis\", $this->data['e_id'], $this->data['dept_id'], $this->data['dob'], $this->data['doj'], $this->data['qualification'],$this->data['designation'], $this->data['age'], $this->data['pfno'], $this->data['superior_id']);\n }", "abstract public function preparedQuery($sql, $parameters, $errorLevel = E_USER_ERROR);", "private function prepareDbStatements() {\n $sql = \"INSERT INTO results_daily (daycode,\n id_host,\n uptime,\n downtime,\n unknowntime,\n generated_ts,\n planned_checks,\n completed_checks,\n day_details,\n log\n )\n VALUES\n (:daycode,\n :id_host,\n :uptime,\n :downtime,\n :unknowntime,\n :generated_ts,\n :planned_checks,\n :completed_checks,\n :day_details,\n :log);\";\n $this->stmt_insert_aggregated_data = $this->dbhandler->prepare($sql);\n //Prepare statement to retrieve results to aggregate...\n $sql = \"SELECT * FROM vw_checks_schedule_with_results\n WHERE id_host = :id_host AND daycode = :daycode\n ORDER BY ts_check;\";\n $this->stmt_retrieve_results = $this->dbhandler->prepare($sql);\n //PREPARE SQL STATEMENT FOR FLAG CHECKS SCHEDULED AS AGGREGATED\n $sql = \"UPDATE host_checks_schedule\n SET aggregated = 1\n WHERE daycode = :daycode\n AND id_host = :id_host;\";\n $this->stmt_set_results_aggregated = $this->dbhandler->prepare($sql);\n }", "public function execute($sql);", "public function execute($sql);", "function q($sql,$conn) {\n\t$dev = FALSE;\n\n\t$res =& $conn->query($sql);\n\tif(PEAR::isError($res)) {\n\t\tif($dev) {\n\t\t\techo $res->getMessage().'<br />';\n\t\t\techo '<pre>';\n\t\t\tprint_r($conn->dsn);\n\t\t\techo '</pre>';\n\t\t}\n\t\treturn FALSE;\n\t} else {\n\t\treturn $res;\n\t}\n}", "function executeQuery($query);", "protected function prepareStatements()\n {\n if (!empty($this->statements)) {\n return;\n }\n $this->statements['load'] = $this->db->prepare(\n 'SELECT * FROM `' . $this->options['table'] . '` WHERE `userId` = :userId '\n . 'AND `scope` = :scope AND `name` = :name AND `args` = :args'\n );\n\n $this->statements['save'] = $this->db->prepare(\n 'INSERT INTO `' . $this->options['table'] . '` (`userId`, `scope`, `name`, `args`, `xml`) VALUES '\n . '(:userId, :scope, :name, :args, :xml)'\n );\n\n $this->statements['delete'] = $this->db->prepare(\n 'DELETE FROM`' . $this->options['table'] . '` WHERE `userId` = :userId '\n . 'AND `scope` = :scope AND `name` = :name AND `args` = :args'\n );\n }", "abstract public function prepareSelect();", "abstract public function execute($query);", "function query($sql,$calculateRows=false,$fastHint=false);", "public function exec_qry($sql_to_prep, $array_qry_vals = \"\") {\n \t$type = \"Query\";\n \t$loca = \"exec_qry\";\n \ttry {\n \t\t// $array_qry_vals =somethinglike= array(':calories' => 150, ':color' => 'red');\n \t\t$this->lastQuery = $sql_to_prep;\n \t\t// sth = statement handler\n \t\t$sth = $this->pdo->prepare($sql_to_prep);\n \t\t\n\t\tif (is_a($sth, \"PDOStatement\")){\n \t\t\t// best pass ary params (not: $sth->bindParam(':var', $cals);)\n \t\t\tif (empty($array_qry_vals)) {\n \t\t\t\t$sth->execute();\n \t\t\t\treturn $sth; // success return statement handler\n \t\t\t}\n \t\t\t$sth->execute($array_qry_vals);\n \t\t\treturn $sth; // success return statement handler\n \t\t} else { // FAIL\n \t\t\t// statement failed\n \t\t\t$reas = \"Error with statement\";\n \t\t\t$code = $sql_to_prep;\n \t\t\t$this->db_fail($type, $loca, $reas, $code);\n \t\t}\n \t} catch (PDOException $e) { // FAIL\n \t\t$reas = \"PDOException\";\n \t\t$code = $sql_to_prep . \"<br />\" . $e->getMessage(). \"<br />\";\n \t\t$this->db_fail($type, $loca, $reas, $code);\n \t} /* DEBUG CATCH FINALLY catch (Exception $e) {\n \t\t$reas = \"Gen. Exception\"; // FAIL\n \t\t$code = $sql_to_prep . \"<br />\" . $e->getMessage(). \"<br />\";\n \t\t$this->db_fail($type, $loca, $reas, $code);\n \t} finally { // FAIL (Unanticipated)\n \t\t// success: \n \t\t // Error Code: 00000\n\t\t//\tError Info: \tArray([0] => 00000...\n \t\t\n \t\t$reas = \"try may have failed finally\";\n \t\t$code = $sql_to_prep;\n \t\t$this->db_fail($type, $loca, $reas, $code);\n \t\t\n \t} *** END DEBUG CATCH FINALLYwithin exec_qry */\n }", "function goSQL($sql) {\n\t\t$res = $this->mysqli->query ( $sql );\n\t\t$err = $this->mysqli->connect_error;\n\t\t$this->errorInfo = $this->mysqli->error;\n\t\tif (! $err)\n\t\t\treturn $res;\n\t\telse\n\t\t\treturn false;\n\t}", "function db_query($query, $link_id,$debug=false, $die_on_debug=true, $silent=false,$executedto=\"Local\") {\n if ($link_id!=\"mlks\"){\n\t\n \t\n \n\tif ($GLOBALS['DB_DEBUG']) {\n\t\techo \"<pre>\" . htmlspecialchars($query) . \"(\".$executedto.\")</pre>\";\nif ($die_on_debug&&$GLOBALS['DB_DIE_ON_DEBUG']) die;\n\t\n\t}\n/*\n$query=(substr($query,0,stripos($query,\"FROM\"))).strtolower(substr($query,stripos($query,\"FROM\")));\n$query=LowTblNames($query,\",\");\n*/\n\t$qid = mysqli_query($link_id,$query);\n\n\n\tif (! $qid && ! $silent) {\n\t\tif ($GLOBALS['DB_DEBUG']||$debug) {\n\t\t\techo \"<h2>Can't execute query</h2>\";\n\t\t\techo \"<pre>\" . htmlspecialchars($query) . \"</pre>\";\n\t\t\techo \"<p><b>MySQL Error</b>: \", mysqli_error($link_id);\n\t\t} else {\n\t\t\t$file=fopen(\"./errorlog/mysqlerrors.html\",\"ab\");\n\t\t\tfwrite($file,\"<p>user \".$GLOBALS['USER'][\"user\"][\"firstname\"].\" \".$GLOBALS['USER'][\"user\"][\"lastname\"].\" from \".$GLOBALS['USER'][\"user\"][\"us_cc_id\"].\" at \".date('r').\"</p>\");\n\t\t\tfwrite($file,\"<h2>Can't execute query</h2>\".\"<pre>\" . htmlspecialchars($query) . \"</pre>\".\"<p><b>MySQL Error</b>: \".mysqli_error($link_id));\n\t\t\t$serializedPost = serialize($_POST);\n\t$res = date('l jS \\of F Y h:i:s A');\n\t\n\t$message = \"<br><i>executed at: \".$res.\" details: \".$executedto.\"</i><br><b>\".$query.\" </b>\".$serializedPost.\"<br>\";\t\n\tfwrite($file,$message);\n\t\t\tfclose($file);\n\t\t\techo \"<h2>Database error encountered</h2>\";\n\t\t}\n\n\t\tif (($GLOBALS['DB_DIE_ON_FAIL'])&&(!$silent)) {\n\t\t\techo \"<p>Oops, problem at :</p><p> $executedto </p>\";\n\n\t\t\tdb_log($query,$executedto);\n\t\t\tdie();\n\t\t}\n\t}elseif(! $qid && $silent){\n return $qid;\n }\n\t//db_log($query,$executedto);\n if ($debug) {\n\t\techo \"<pre>\" . htmlspecialchars($query) . \"(\".$executedto.\")</pre>\";\n }\n\treturn $qid;\n }\n //db_log($query,$executedto);\n return \"aaa\";\n}", "private function func_execute () {\n $this -> connection = parent::func_query ($this -> query, $this -> query_data);\n }", "static public function execSQL($raw_sql) {\n if (self::$_static_handler == null) {\n self::$_static_handler = slDatabaseManager::getConnection();\n }\n $res = null;\n if (!is_array($raw_sql)) $raw_sql = array($raw_sql);\n foreach($raw_sql as $sql) {\n $res = self::$_static_handler->query($sql);\n }\n return $res;\n }", "public function safeExecution($sql,array $param){\n $conn = $this->connect();\n if(empty($param)){\n $nrOfVar = 0;\n }\n else{\n $stmt = $conn->prepare($sql);\n $nrOfVar = count($param);\n }\n switch($nrOfVar){\n case 0:\n break;\n case 1:\n $stmt->bind_param('s',$param[0]);\n break;\n case 2:\n $stmt->bind_param('ss',$param[0],$param[1]);\n break;\n case 3:\n $stmt->bind_param('sss',$param[0],$param[1],$param[2]);\n break;\n case 4:\n $stmt->bind_param('ssss',$param[0],$param[1],$param[2],$param[3]);\n break;\n case 5:\n $stmt->bind_param('ssss',$param[0],$param[1],$param[2],$param[3],$param[4]);\n break;\n }\n if($nrOfVar == 0){\n $result = mysqli_query($conn,$sql);\n }else {\n $stmt->execute();\n $result = $stmt->get_result();\n }\n return $result;\n }", "function execute_query() {\n $args = func_get_args();\n $args_count = func_num_args();\n if ($args_count == 1) {\n $sql = $args[0];\n }\n else {\n $sql = $args[0];\n }\n\n global $db_host, $db_user, $db_pass, $db_name;\n $conn = new mysqli($db_host, $db_user, $db_pass, $db_name);\n if ($conn->connect_errno) {\n echo T_(\"<h1>데이터베이스에 연결하던 도중 오류가 발생했습니다.</h1>\");\n exit;\n }\n $conn->query(\"SET time_zone = '+9:00'\");\n $stmt = $conn->prepare($sql);\n if ($args_count != 1) {\n $sliced = array_slice($args, 1);\n call_user_func_array(array($stmt, \"bind_param\"), make_values_referenced($sliced));\n }\n $stmt->execute();\n $stmt->store_result();\n\n if ($stmt->errno) {\n $stmt->close();\n $conn->close();\n return false; // error: false\n }\n else {\n $stmt->close();\n $conn->close();\n return true; // success: true\n }\n}", "public function query($sql) {\n $this->statement = $this->dbHandler->prepare($sql);\n }", "protected function execute_single_query() {\n\t\tif($_POST) {\n\t\t\t$this->open_connection();\n\t\t\t$this->conn->query($this->query);\n\t\t\t\n\t\t} else {\n\t\t\t$this->mensaje = 'Metodo no permitido';\n\t\t}\n\t}", "function doQuery(&$sql,$dsn=\"default\") {\n\t\t//use this tableName\n\t\t$db = DB::getHandle($dsn);\n\n\t\t$db->query($sql);\n\n\t \treturn;\n\t}", "function doQuery(&$sql,$dsn=\"default\") {\n\t\t//use this tableName\n\t\t$db = DB::getHandle($dsn);\n\n\t\t$db->query($sql);\n\n\t \treturn;\n\t}", "protected function execute_single_query() \n\t\t{\n \t\t\t$this->open_connection();\n \t\t\t$this->conn->query($this->query);\n \t\t\t$this->close_connection();\n\t\t}", "function query(\\database $dbase){\n //\n //Get the sql string \n $sql=$this->to_str();\n //\n // Execute the $sql on columns to get the $result\n $dbase->query($sql);\n \n }", "function query($stmt,$values) {\n\t\ttry {\n\t\t $qStmt = $this->dbconn->prepare($stmt);\n\t\t\t$qStmt->execute($values);\n\t\t\treturn $qStmt->fetchAll();\n\t\t} catch(PDOException $e) {\n\t\t\treturn $e;\n\t\t}\n\t}", "public function preparequery($sql, $type, $inputs){\n if(!$this->getConnection()) {\n return false;\n }\n\n else{\n $stmt = $this->conn->prepare($sql);\n $stmt->bind_param($type);\n $stmt->execute();\n if ($stmt->errno) {\n return false;\n } else {\n $stmt->close();\n return true;\n }\n\n $this->result = mysqli_query($this->conn, $sql);\n }\n}", "public function _prepare() {\n if( !DBwrite::connected() ) {\n DBwrite::connect();\n }\n\n $query = $this->query;\n foreach( $this->key_value_map as $key => $value ) {\n $query = str_replace(\n '#'.$key, \n $this->sanitizeValue( $key, $value ),\n $query\n );\n }\n \n $this->real_query = $query;\n return $this->real_query;\n }", "public static function SQL($key=null) {\n $queries = array(\n 'drop table user' => \"DROP TABLE IF EXISTS User;\",\n 'drop table group' => \"DROP TABLE IF EXISTS Groups;\",\n 'drop table user2group' => \"DROP TABLE IF EXISTS User2Groups;\",\n 'create table user' => \"CREATE TABLE IF NOT EXISTS User (id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, acronym TEXT, name TEXT, email TEXT, password TEXT, created TIMESTAMP default CURRENT_TIMESTAMP, updated TIMESTAMP NULL default NULL);\",\n 'create table group' => \"CREATE TABLE IF NOT EXISTS Groups (id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, acronym TEXT, name TEXT, created TIMESTAMP default CURRENT_TIMESTAMP, updated TIMESTAMP NULL default NULL);\",\n 'create table user2group' => \"CREATE TABLE IF NOT EXISTS User2Groups (idUser INTEGER, idGroups INTEGER, created TIMESTAMP default CURRENT_TIMESTAMP, PRIMARY KEY(idUser, idGroups));\",\n 'insert into user' => 'INSERT INTO User (acronym,name,email,password) VALUES (?,?,?,?);',\n 'insert into group' => 'INSERT INTO Groups (acronym,name) VALUES (?,?);',\n 'insert into user2group' => 'INSERT INTO User2Groups (idUser,idGroups) VALUES (?,?);',\n 'check user password' => 'SELECT * FROM User WHERE password=? AND (acronym=? OR email=?);',\n 'get group memberships' => 'SELECT * FROM Groups AS g INNER JOIN User2Groups AS ug ON g.id=ug.idGroups WHERE ug.idUser=?;',\n 'update profile' => \"UPDATE User SET name=?, email=?, updated=CURRENT_TIMESTAMP WHERE id=?;\",\n 'update password' => \"UPDATE User SET password=?, updated=CURRENT_TIMESTAMP WHERE id=?;\",\n 'select users by type' => \"SELECT acronym FROM `User` u join User2Groups u2g on u.id=u2g.idUser where u2g.idGroups=?;\",\n 'update user make admin' => \"INSERT INTO User2Groups (idUser,idGroups) VALUES ((select id from User where acronym=?),1);\",\n 'update user remove admin' => \"DELETE FROM User2Groups where idGroups=1 and idUser=(select id from User where acronym=?);\",\n 'delete user from all' => 'set @id=(SELECT id FROM `User` where acronym=?);delete from Content where idUser=@id; delete from User2Groups where idUser=@id;delete from User where id=@id;',\n\n );\n if(!isset($queries[$key])) {\n throw new Exception(\"No such SQL query, key '$key' was not found.\");\n }\n return $queries[$key];\n }", "abstract public function\r\n\t\tget_query_for_something();", "function db_perform($table_name, $data = array(), $sql_action = SQL_INSERT, $where = '') {\n\t$sql = null;\n\tswitch ($sql_action) {\n\t\tcase SQL_INSERT: {\n\t\t\t$field_list = array();\n\t\t\t$value_list = array();\n\t\t\tforeach($data as $field => $value) {\n\t\t\t\t$field_list[] = \"`\" . $field . \"`\";\n\t\t\t\t$value_list[] = \"'\" . db_input($value) . \"'\";\n\t\t\t}\n\t\t\t$field_string = implode(',', $field_list);\n\t\t\t$value_string = implode(',', $value_list);\n\n\t\t\t$sql = \"INSERT INTO `\" . db_input($table_name) . \"` (\" . $field_string . \") VALUES (\" . $value_string . \")\";\n\t\t\tbreak;\n\t\t}\n\n\t\tcase SQL_UPDATE: {\n\t\t\t$sql = \"UPDATE `\" . db_input($table_name) . \"` SET \";\n\t\t\t$set_list = array();\n\t\t\tforeach($data as $field => $value) {\n\t\t\t\t$set_list[] = \"`\" . $field . \"`\" . \" = '\" . db_input($value) . \"'\";\n\t\t\t}\n\t\t\t$sql .= implode(', ', $set_list);\n\t\t\t$sql .= \" \" . $where;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif(false == is_null($sql)) {\n\t\treturn db_query($sql);\n\t}\n}", "function dbquery() {\n\tglobal $kLastQuery, $kDBConnection;\n\n // connect now, if haven't before\n if (!$kDBConnection) {\n $kDBConnection = dbconnect();\n }\n\n\t$args = func_get_args();\n\t$query = call_user_func_array('dbprep', $args);\n\n\t$kLastQuery = $query;\n\n\t$query = preg_replace('/([^,\\(\\)\\s~]*)~[^,\\(\\)\\s]*/', '$1', $query);\n\t\n\t// if it was a INSERT, UPDATE, or DELETE, see how many rows were affected\n if (preg_match('/^INSERT|^UPDATE|^DELETE/i', $query)) {\n\t\t$result = mysql_query($query) or trigger_error(dberror() . \"\\n\\nThe query was: \" . $query);\n\t\t$count = mysql_affected_rows();\n\t\tif ($count > 1) {\n\t\t\t$fixquery = str_replace('%', '%%', $query);\n\t\t\tEWarning(EC_REALS_DATABASE, \"Query affected multiple rows: $fixquery => $count\",\n\t\t\t\t\t \"Query affected \" . $count . \" rows\");\n\t\t}\n\t} else {\n // Replace ^NINSERT, ^NUPDATE, ^NDELETE with INSERT, UPDATE, DELETE\n $query = preg_replace('/^N(INSERT|UPDATE|DELETE)/i', '$1', $query);\n\t\t$result = mysql_query($query) or trigger_error(dberror() . \"\\n\\nThe query was: \" . $query);\n\t}\n\n\tif (preg_match('/^INSERT/i', $query)) {\n\t\treturn mysql_insert_id();\n\t} elseif (preg_match('/^(UPDATE|DELETE)/i', $query)) {\n\t\treturn mysql_affected_rows();\n\t} else {\n\t\treturn $result;\n\t}\n}", "function sql_query($query, $values = array(), $fetchMode = PDO::FETCH_ASSOC) {\n\t$sql = sql_connect();\n\tif( !$sql ){\n\t\treturn false;\n\t}\n\n\t$preparedQuery = $query;\n\tsql_dump($preparedQuery . (sizeof($values) ? ' with ' . print_r($values, true) : ''));\n\n\t$q = $sql->prepare($query);\n\t$result = $q->execute($values);\n\tif( $fetchMode != null ){\n\t\t$res = $q->fetchAll($fetchMode);\n\t\t$q->closeCursor();\n\t}else{\n\t\t$q->closeCursor();\n\t\treturn $result;\n\t}\n\tif( sizeof($res) == 0 ){\n\t\treturn false;\n\t}\n\treturn $res;\n}", "public function query($query = \"NONEE\"){\n\t\t\n\t\tif($update = $query === \"NONEE\")\n\t\t\t$query = $this->query; \t\t\t\t\t\n\t\t\n\t\t$this->query_total++;\n\t\t\n\t\t$query_check = trim($query);\n\t\t\n\t\tif($this->debug){\n\t\t\techo \"<br/><strong style=\\\"color:#E4C100\\\">&lt;DEBUG&gt;</strong><br/>\";\n\t\t\techo $this->comment != \"\" ? \"<span style=\\\"color:#D3C26E;font-style:italic\\\">#\".$this->comment.\"</span><br/>\" : \"\";\n\t\t\techo \"<span style=\\\"color:#E4C100\\\">\".$query.\"</span><br/><strong style=\\\"color:#E4C100\\\">&lt;/DEBUG&gt;</strong><br/>\";\n\t\t}\n\t\t\n\t\t$resultset = $this->showErrors ? mysqli_query($this->connection,$query) : @mysqli_query($this->connection,$query);\n\t\t\n\t\t$proceed_log = $this->log && ( \n\t\t(stripos($query_check,\"INSERT\") === 0 && $this->log_options{0} === '1')\n\t\t||\n\t\t(stripos($query_check,\"DELETE\") === 0 && $this->log_options{1} === '1')\n\t\t||\n\t\t(stripos($query_check,\"UPDATE\") === 0 && $this->log_options{2} === '1')\n\t\t||\n\t\t(stripos($query_check,\"SELECT\") === 0 && $this->log_options{3} === '1'));\n\t\t\n\t\tif(stripos($query_check,\"INSERT\") === 0 || stripos($query_check,\"DELETE\") === 0 || stripos($query_check,\"UPDATE\") === 0)\n\t\t\tif(!$resultset)\n\t\t\t\t$this->transaction = false;\n\t\t\n\t\tif($proceed_log){\n\t\t\t$log_fields = \"query,date,user\";\n\t\t\t$log_values=\"'\".$this->secure($query).\"',NOW(),\".$this->log_user;\n\t\t}\n\t\t\n\t\tif(!$resultset){\n\t\t\tif($this->showErrors){ \n\t\t\t\techo \"<br/><strong style=\\\"color:red\\\">&lt;QERROR&gt;</strong><br/>\";\n\t\t\t\techo $this->comment != \"\" ? \"<span style=\\\"color:#E88888;font-style:italic\\\">#\".$this->comment.\"</span><br/>\" : $this->comment.\"nada\";\n\t\t\t\techo \"<span style=\\\"color:red\\\">\".mysqli_error($this->connection).\" at \".$query_check.\"</span><br/><strong style=\\\"color:red\\\">&lt;/QERROR&gt;</strong><br/>\";\n\t\t\t}\n\t\t\tif($proceed_log){\n\t\t\t\t$log_fields .= \",error\";\n\t\t\t\t$log_values .= \",'\".mysqli_error($this->connection).\"'\";\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif($proceed_log){\t\t\t\n\t\t\t@mysqli_query($this->connection,\"INSERT INTO \".$this->log_table.\"($log_fields) VALUES($log_values)\");\n\t\t}\n\t\t\n\t\tif(!$resultset && $this->closeOnError) \n\t\t\texit;\n\t\t\n\t\tif($update)\n\t\t\t$this->resultset = $resultset;\n\t\t\n\t\treturn $resultset; \n\t}", "function exeSql($sql, $pars, $isLimit = 1){ \n $ini = parse_ini_file('config.ini');\n $servername = $ini['db_name'];\n $username = $ini['db_user'];\n $password = $ini['db_password'];\n\n // Create connection\n $conn = new mysqli($servername, $username, $password);\n \n // Check connection\n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n }\n \n for ($i=0; $i < count($pars); $i++)\n $sql = str_replace(\"{\".$i.\"}\", $pars[$i], $sql); \n\n if($isLimit)\n $sql .= \" LIMIT 30 \";\n\n \n\n $data = mysqli_query($conn, $sql); \n\n return $data; \n }", "function customQuery($query) \t{\n $res = $this->execute($query);\n\t\t return $res;\n\t}", "function statement_prep($connection, $sql) {\n\t\n\tif($stmt = $connection->prepare($sql)) {\n\t\t\n\t\t/*No Bind params */\n\t\t\n\t\t/*execute statement*/\n\t\t$stmt->execute();\n\t\t\n\t\t/*get result*/\n\t\t$result=$stmt->get_result();\n\t\t\n\t\t$stmt->close();\n\t\t\n\t} else {\n\t\t\t$result=null;\n\t\t\techo 'Prepared statement error: %s\\n'. $connection->error;\n\t}\n\t\n\treturn $result;\n}", "private function query($conn, $sql, $params=null){\n\t\t$stm=null;\n\t\t$status=FALSE;\n\t\tif (is_array($params) && count($params)>0){\n\t\t\t$stm=$conn->prepare($sql); \n\t\t\t$status=$stm->execute($params);\n\t\t}\n\t\telse{\n\t\t\t$status=$stm=$conn->query($sql);\n\t\t}\n\t\tif ($status===FALSE){ \n\t\t\treturn FALSE;\n\t\t}\n\t\telse{\n\t\t\treturn $stm;\n\t\t}\n\t}", "function sql_check($query) {\n\tsql_connect();\n\tglobal $defaultdb;\n\t$return = $defaultdb->check($query);\n\treturn $return;\n}", "private function execute() {\n $this->statement = $this->pdo->prepare($this->queryString);\n\n foreach ($this->params as $boundParam) {\n $this->statement->bindValue($boundParam->name, $boundParam->value, $boundParam->type);\n }\n\n $this->statement->execute();\n }", "function execute_sql($qry, $purpose=\"select\")\n\n\t{\n\n\n\n\t\t$param_array = func_get_args();\n\n\t\t$GLOBALS['logger_obj']->debug('<br>METHOD database_manipulation::execute_sql() - PARAMETER LIST : ', $param_array, true);\n\n\n\n\t\t$error_title = 'Error In Method : database_manipulation::execute_sql()';\n\n\t\t\n\n\t\t$res = mysql_query($qry);\n\n\t\t\n\n\t\t$error_str = '';\n\n\t\t\n\n\t\t$error_str .= mysql_error();\n\n\t\t\n\n\t\t$no_rows = 0;\n\n\t\tswitch($purpose)\n\n\t\t{\n\n\t\t\n\n\t\t\tcase \"select\":\n\n\t\t\t\t$no_rows = mysql_num_rows($res);\n\n\t\t\t\tbreak;\n\n\t\t\t\t\n\n\t\t\tcase \"insert\":\n\n\t\t\t\t$no_rows = mysql_affected_rows();\n\n\t\t\t\t$insert_id = mysql_insert_id();\n\n\t\t\t\tbreak;\n\n\t\t\t\t\n\n\t\t\tcase \"update\":\n\n\t\t\t\t$no_rows = mysql_affected_rows();\n\n\t\t\t\tbreak;\n\n\t\t\t\t\n\n\t\t\tcase \"delete\":\n\n\t\t\t\t$no_rows = mysql_affected_rows();\n\n\t\t\t\tbreak;\n\n\t\t\t\t\n\n\t\t} //end switch\n\n\t\t\n\n\t\t$error_str .= mysql_error();\n\n\n\n\t\tif($purpose == \"insert\")\n\n\t\t\t\n\n\t\t\t$temp_arr = array($res, $no_rows, $insert_id);\n\n\t\t\n\n\t\telse\n\n\t\t\n\n\t\t\t$temp_arr = array($res, $no_rows);\n\n\t\t\n\n\t\tif(strlen($error_str) > 0)\n\n\t\t$error_str .= \"<br>SQL STATEMENT : \" . $qry;\n\n\t\t\n\n\t\t//optimize the database, so that no overhead will be there after the record deletion..\n\n\t\tif($purpose == \"delete\")\n\n\t\t{\n\n\t\t\t//$optimize_qry = \"optimize \";\n\n\t\t\t$this->optimize_database();\n\n\t\t}\n\n\t\t\n\n\t\t$GLOBALS['logger_obj']->error($error_title, $error_str, 'mysql');\n\n\t\t\n\n\t\t$GLOBALS['logger_obj']->debug('<br>METHOD database_manipulation::execute_sql() - Return Value : ', $temp_arr, true);\n\n\n\n\t\treturn $temp_arr;\n\n\t\n\n\t}", "public function test_execute_compound_query()\n\t{\n\t\t$db = Database::factory();\n\n\t\t$this->setExpectedException('Database_Exception', 'SQL syntax', 1064);\n\n\t\t$db->execute_query(\n\t\t\t'SELECT * FROM '.$db->quote_table($this->_table).';'\n\t\t\t.'SELECT * FROM '.$db->quote_table($this->_table)\n\t\t);\n\t}" ]
[ "0.727776", "0.7207666", "0.7022217", "0.6750099", "0.6684724", "0.6612367", "0.6580364", "0.654905", "0.654905", "0.654905", "0.654905", "0.6546919", "0.6536867", "0.6527944", "0.6520951", "0.6515992", "0.65128535", "0.6503257", "0.6484793", "0.6484117", "0.6479988", "0.647753", "0.64642507", "0.64587134", "0.6434226", "0.6431161", "0.64285266", "0.64112574", "0.6407075", "0.6402968", "0.6388348", "0.63838136", "0.63620645", "0.63484347", "0.63417876", "0.6323982", "0.632003", "0.6312709", "0.63031435", "0.62792623", "0.62650514", "0.6252076", "0.625177", "0.6239616", "0.62280726", "0.62232804", "0.62218076", "0.62216336", "0.62211907", "0.6217761", "0.6214848", "0.6214664", "0.6208079", "0.62052065", "0.6205166", "0.62000525", "0.62000525", "0.61979055", "0.61935127", "0.61903965", "0.61902654", "0.61824197", "0.61803776", "0.6178974", "0.6178974", "0.61733", "0.6171456", "0.61671644", "0.61645836", "0.61634433", "0.61569893", "0.6147597", "0.61439127", "0.61432153", "0.61412776", "0.6139625", "0.6133422", "0.61284125", "0.61209464", "0.6118268", "0.6117775", "0.6117775", "0.6116775", "0.6111071", "0.6103717", "0.6101489", "0.6101488", "0.6101386", "0.6100835", "0.6098574", "0.6098419", "0.60954607", "0.609168", "0.60886574", "0.60738605", "0.6072302", "0.6066756", "0.6053402", "0.6052544", "0.60499126", "0.6048953" ]
0.0
-1
prepare the values for use in the database could use some work to make itmore secure (add some type of sanitation)
public function database_prep($value) { $value = $this->connection->escape_string($value); return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prepareForDb() {\n $this->description = sql_escape($this->description);\n $this->postsHeader = sql_escape($this->postsHeader);\n $this->postBody = sql_escape($this->postBody);\n $this->postsFooter = sql_escape($this->postsFooter);\n $this->formLogged = sql_escape($this->formLogged);\n $this->form = sql_escape($this->form);\n $this->navigation = sql_escape($this->navigation);\n $this->name = sql_escape($this->name);\n $this->nameLin = sql_escape($this->nameLin);\n $this->memberName = sql_escape($this->memberName);\n $this->date = sql_escape($this->date);\n $this->time = sql_escape($this->time); \n $this->nextPage = sql_escape($this->nextPage);\n $this->previousPage =sql_escape($this->previousPage);\n $this->firstPage = sql_escape($this->firstPage);\n $this->lastPage = sql_escape($this->lastPage);\n\t$this->gravDefault = sql_escape($this->gravDefault);\n }", "public function _prepare() {\n if( !DBwrite::connected() ) {\n DBwrite::connect();\n }\n\n $query = $this->query;\n foreach( $this->key_value_map as $key => $value ) {\n $query = str_replace(\n '#'.$key, \n $this->sanitizeValue( $key, $value ),\n $query\n );\n }\n \n $this->real_query = $query;\n return $this->real_query;\n }", "protected function prepare_fields()\n {\n }", "protected function prepareForValidation()\n {\n if($this->name != null) {\n $this->merge([\n 'name' => filter_var($this->name, FILTER_SANITIZE_STRING),\n ]);\n }\n\n if($this->email != null) {\n $this->merge([\n 'email' => filter_var(trim($this->email), FILTER_SANITIZE_EMAIL),\n ]);\n }\n\n if($this->leader != null) {\n $this->merge([\n 'leader' => filter_var($this->leader, FILTER_SANITIZE_STRING),\n ]);\n }\n\n if($this->gruplac != null) {\n $this->merge([\n 'gruplac' => filter_var(trim($this->gruplac), FILTER_SANITIZE_URL),\n ]);\n }\n\n if($this->minciencias_code != null) {\n $this->merge([\n 'minciencias_code' => filter_var(trim($this->minciencias_code), FILTER_SANITIZE_STRING),\n ]);\n }\n\n if($this->minciencias_category != null) {\n $this->merge([\n 'minciencias_category' => filter_var($this->minciencias_category, FILTER_SANITIZE_STRING),\n ]);\n }\n\n if($this->website != null) {\n $this->merge([\n 'website' => filter_var(trim($this->website), FILTER_SANITIZE_URL),\n ]);\n }\n\n if($this->educational_institution_id != null) {\n $this->merge([\n 'educational_institution_id' => (integer) filter_var($this->educational_institution_id, FILTER_SANITIZE_NUMBER_INT),\n ]);\n }\n }", "protected function prepareForValidation()\n {\n $this->merge([\n 'nome' => $this->nome,\n 'nascimento' => convertDateToDatabase($this->nascimento),\n 'cpf' => returnOnlyNumbers($this->cpf),\n 'email' => $this->email,\n ]);\n }", "private function prepareData(){\n\t\t\t$this->text = trim($this->text);\n\t\t\t$this->user_id = intval($this->user_id);\n\t\t\t$this->parent_id = intval($this->parent_id);\n\t\t}", "protected function prepareForValidation()\n {\n \n //Filling uncaught parameters to blank default value\n foreach($this->columns_rules as $column => $rules){\n if(empty($this->get($column))) {\n $this->request->add([$column => '']); \n }\n }\n\n }", "abstract protected function prepareVars(array $data);", "protected function prepareForValidation()\n {\n $this->merge([\n self::ATTRIBUTE_REFERER => $this->prepareArray($this->input(self::ATTRIBUTE_REFERER)),\n self::ATTRIBUTE_IP => $this->prepareArray($this->input(self::ATTRIBUTE_IP)),\n ]);\n }", "protected function sanitize() {}", "protected function prepareForValidation()\n {\n\n $attrs = $this->all();\n $attrs['day'] = ucfirst($attrs['day']);\n $hours = $this->transformHoursAndMinutes();\n $attrs['time_start'] = $hours[0];\n $attrs['time_end'] = $hours[1];\n $this->replace($attrs);\n }", "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n\n $this->vars['model'] = $this->model;\n $this->vars['category'] = Kategory::where(\"is_active\", \"1\")->lists('name', 'id');\n if (!empty($this->getLoadValue())) {\n $a= $this->vars['value'] = $this->getLoadValue();\n } else {\n $a= $this->vars['value'] = [];\n }\n }", "protected function prepareForValidation()\n {\n if($this->keywords != null) {\n $keywordsSanitize = trim(strtolower($this->keywords));\n\n $this->merge([\n 'keywords' => json_encode(explode(',', $keywordsSanitize), true),\n ]);\n }\n\n if($this->roles_requirements != null) {\n $this->merge([\n 'roles_requirements' => json_encode(explode(',', $this->roles_requirements), true),\n ]);\n }\n\n if($this->tools_requirements != null) {\n $this->merge([\n 'tools_requirements' => json_encode(explode(',', $this->tools_requirements), true),\n ]);\n }\n }", "abstract public function prepareData();", "public function __sanitise() { $this->username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_SPECIAL_CHARS);\n $this->password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\n $hashed_password = password_hash($password, PASSWORD_BCRYPT);\n $this->email = filter_input(INPUT_POST, 'email', FILTER_SANITIZE_SPECIAL_CHARS);\n $this->usertype = filter_input(INPUT_POST, 'lib_code', FILTER_SANITIZE_SPECIAL_CHARS);\n }", "function dbSetVars() {\n\n foreach ($this->fields() as $f) {\n if ($this->$f === false) continue;\n $this->db->set($f,$this->$f);\n }\n\n }", "public function prepareVars()\n {\n $this->vars['value'] = $this->getKeyValue();\n $this->vars['field'] = $this->formField;\n $this->vars['nameValue'] = $this->getNameValue();\n $this->vars['descriptionValue'] = $this->getDescriptionValue();\n $this->vars['addresses'] = $this->getAddresses();\n $this->vars['listWidget'] = $this->listWidget;\n $this->vars['searchWidget'] = $this->searchWidget;\n\n $this->vars['title'] = $this->title;\n $this->vars['prompt'] = str_replace('%s', '<i class=\"icon-th-list\"></i>', e(trans($this->prompt)));\n\n }", "public function prepareVars()\n {\n $this->vars['defaultCurrency'] = $this->defaultCurrency;\n $this->vars['defaultValue'] = $this->getPriceValue($this->defaultCurrency->id);\n $this->vars['currencies'] = Currency::orderBy('sort_order', 'ASC')->get();\n $this->vars['field'] = $this->formField;\n }", "public function clean()\n {\n // Set to default values\n $this->sSql = '';\n $this->aValues = [];\n }", "function _prepare() {}", "public function sanitiseData(): void\n {\n $this->firstLine = self::sanitiseString($this->firstLine);\n self::validateExistsAndLength($this->firstLine, 1000);\n $this->secondLine = self::sanitiseString($this->secondLine);\n self::validateExistsAndLength($this->secondLine, 1000);\n $this->town = self::sanitiseString($this->town);\n self::validateExistsAndLength($this->town, 255);\n $this->postcode = self::sanitiseString($this->postcode);\n self::validateExistsAndLength($this->postcode, 10);\n $this->county = self::sanitiseString($this->county);\n self::validateExistsAndLength($this->county, 255);\n $this->country = self::sanitiseString($this->country);\n self::validateExistsAndLength($this->country, 255);\n }", "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 }", "abstract public function sanitize();", "private function prepareValues(PDOStatement &$stmt) {\n foreach (static::$tableSchema as $columnName => $type) {\n if ($type == 4) {\n $sanitizedValue = filter_var($this->$columnName, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);\n $stmt->bindValue(\":{$columnName}\", $sanitizedValue);\n } else {\n $stmt->bindValue(\":{$columnName}\", $this->$columnName, $type);\n }\n }\n }", "protected function prepare()\n\t{\n\t}", "protected function prepareForValidation()\n {\n $input = array_filter(\n $this->all(['voucher-start', 'voucher-end', 'centre', 'date-sent']),\n 'strlen'\n );\n\n foreach ($input as $key => $value) {\n if (in_array($key, ['voucher-start', 'voucher-end'])) {\n $clean = Voucher::cleanCodes((array)$value);\n $input[$key] = strtoupper((array_shift($clean)));\n }\n }\n // replace old input with new input\n $this->replace($input);\n }", "protected function prepareValidations() {}", "public function sanitize_input_fields()\n {\n }", "public function sanitize($data){\n\t\treturn $new_data = $this->mysql_prep($data);\n\t\t}", "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n }", "protected function prepareForValidation()\n {\n $merge = [];\n\n if ($this->valtotal) {\n $merge['valtotal'] = Format::strToFloat($this->valtotal);\n }\n\n $this->merge($merge);\n }", "function getSanitizedValues() {\r\n //TODO: actually clean the values. Could probably put it in the \r\n // case above...\r\n //\r\n //TDOD: consider using $_POST instead of $_GET!\r\n //\r\n // Also, this is probably overkill when we could just copy the\r\n // entirety of $_POST...not that we can guarantee people won't\r\n // jam malicious data into it.\r\n $cleanVals = array();\r\n $cleanVals['datetime'] = date(GlApp::DATE_FORMAT, strtotime($_REQUEST['datetime']));\r\n $cleanVals['mileage'] = $_REQUEST['mileage'];\r\n $cleanVals['location'] = $_REQUEST['location'];\r\n $cleanVals['pricepergallon'] = $_REQUEST['pricepergallon'];\r\n $cleanVals['gallons'] = $_REQUEST['gallons'];\r\n $cleanVals['grade'] = $_REQUEST['grade'];\r\n $cleanVals['pumpprice'] = $_REQUEST['pumpprice'];\r\n $cleanVals['notes'] = htmlspecialchars($_REQUEST['notes']);\r\n \r\n return $cleanVals;\r\n}", "function setInputValues()\n {\n // Set input type based on GET/POST\n $inputType = ($_SERVER['REQUEST_METHOD'] === 'POST') ? INPUT_POST : INPUT_GET;\n // Init global variables\n global $typeID, $classID, $makeID, $price, $model, $year;\n global $sort, $sortDirection;\n // Set each variable, escape special characters\n $typeID = filter_input($inputType, 'typeID', FILTER_VALIDATE_INT);\n $classID = filter_input($inputType, 'classID', FILTER_VALIDATE_INT);\n $makeID = filter_input($inputType, 'makeID', FILTER_VALIDATE_INT);\n $sort = filter_input($inputType, 'sort', FILTER_VALIDATE_INT);\n $sortDirection = filter_input($inputType, 'sortDirection', FILTER_VALIDATE_INT);\n $price = filter_input($inputType, 'price', FILTER_VALIDATE_INT);\n $year = filter_input($inputType, 'year', FILTER_VALIDATE_INT);\n $model = htmlspecialchars(filter_input($inputType, 'model'));\n }", "private function prepareValues($values)\n {\n $transferValues = [\n '_username' => $this->_username,\n '_password' => $this->_password,\n ];\n /// get the request values urlencode und utf8encode first.\n foreach ($values as $key => $value) {\n $transferValues[$key] = $value;\n }\n // return changed transfer values\n return $transferValues;\n }", "protected function prepareForValidation()\n {\n $this->merge([\n 'current_password' => trim($this->current_password),\n 'password' => trim($this->password),\n ]);\n }", "abstract protected function _prepare();", "function prepareValue ($data)\n {\n return \"'\".pg_escape_string($data).\"'\";\n }", "function prepare_field_for_db($field)\n {\n }", "protected function prepareForValidation()\n {\n if($this->input('slug')){\n $this->merge(['slug' => make_slug($this->input('slug'))]);\n }else{\n $this->merge(['slug' => make_slug($this->input('title'))]);\n }\n }", "abstract protected function prepareData( $data );", "function sanitizeArray(&$array)\n{\n $excludeListForSanitization = array('query');\n// $excludeListForSanitization = array();\n\n foreach ($array as $k => $v) {\n\n // split to key and value\n list($key, $val) = preg_split(\"/=/\", $v, 2);\n if (!isset($val)) {\n continue;\n }\n\n // when magic quotes is on, need to use stripslashes,\n // and then addslashes\n if (PHP_VERSION_ID < 50400 && get_magic_quotes_gpc()) {\n $val = stripslashes($val);\n }\n // note that we must use addslashes here because this function is called before the db connection is made\n // and sql_real_escape_string needs a db connection\n $val = addslashes($val);\n\n // if $key is included in exclude list, skip this param\n if (!in_array($key, $excludeListForSanitization)) {\n\n // check value\n if (strpos($val, '\\\\')) {\n list($val, $tmp) = explode('\\\\', $val);\n }\n\n // remove control code etc.\n $val = strtr($val, \"\\0\\r\\n<>'\\\"\", \" \");\n\n // check key\n if (preg_match('/\\\"/i', $key)) {\n unset($array[$k]);\n continue;\n }\n\n // set sanitized info\n $array[$k] = sprintf(\"%s=%s\", $key, $val);\n }\n }\n}", "private function _prepareFields()\n\t{\n\t\t$result = [];\n\n\t\tforeach ($this->_fields as $field => $params) {\n\n\t\t\tif ($field == 'languageTable') {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$tmp = '`' . $field . '` ' . $params['type'];\n\n\t\t\tif (in_array($params['type'], ['char', 'varchar'])) {\n\t\t\t\t$length = isset($params['length']) ? $params['length'] : 100;\n\t\t\t\t$tmp .= '(' . $length . ')';\n\t\t\t}\n\n\t\t\t$tmp .= ($params['null']) ? ' NULL' : ' NOT NULL';\n\t\t\t$tmp .= ($params['default'] || $params['default'] === 0) ? ' DEFAULT ' . $params['default'] : '';\n\n\n\t\t\tif ($field == 'id') {\n\t\t\t\t$tmp .= ' AUTO_INCREMENT PRIMARY KEY';\n\t\t\t}\n\n\t\t\t$result[] = $tmp;\n\t\t}\n\n\t\treturn implode(',', $result);\n\t}", "protected function prepare_value($value, $schema)\n {\n }", "function sanitizeFields()\n\t{\n\t\tif(isset($this->sanitize) && isset($this->data[$this->name]))\n\t\t{\n\t\t\tforeach($this->data[$this->name] as $field => $value)\n\t\t\t{\n\t\t\t\tif(isset($this->sanitize[$field]))\n\t\t\t\t{\n\t\t\t\t\tif(!is_array($this->sanitize[$field]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data[$this->name][$field] = $this->sanitize($this->data[$this->name][$field], $this->sanitize[$field]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tforeach($this->sanitize[$field] as $action)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->data[$this->name][$field] = $this->sanitize($this->data[$this->name][$field], $action);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "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}", "function sanitizeDBData($input) {\n $halfSan = filter_var($input, FILTER_SANITIZE_EMAIL);\n\n //sets slashes infront of \" ' and \\\n $output = filter_var($halfSan, FILTER_SANITIZE_MAGIC_QUOTES);\n\n return $output;\n}", "private function prepareData(){\n $this->params['crud_url'] = '/'.trim($this->params['crud_url'],'/');\n }", "protected function prepareForValidation(): void\n {\n // $this->merge([\n // 'created_by' => Auth::user()->id\n // ]);\n // $this->merge([\n // 'updated_by' => Auth::user()->id\n // ]);\n\n // $this->merge([\n // 'status' => 'Active',\n // 'name' => $this->input('display_name'),\n // 'password' => ''\n // ]);\n\n\n // $this->merge([\n // 'slug' => str_slug($this->input('title'))\n // ]);\n // $this->merge([\n // 'posted_at' => Carbon::parse($this->input('posted_at'))\n // ]);\n }", "function processPostVars()\n {\n $this->id = $_POST['id'];\n $this->login = trimStrip($_POST['login']);\n $this->surname = trimStrip($_POST['surname']);\n $this->firstname = trimStrip($_POST['firstname']);\n $this->hash = trimStrip($_POST['hash']);\n $this->yearno = (integer)trimStrip($_POST['yearno']);\n $this->groupno = (integer)trimStrip($_POST['groupno']);\n $this->email = trimStrip($_POST['email']);\n $this->calendaryear = intval($_POST['calendaryear']);\n $this->coeff = (float)$_POST['coeff'];\n }", "public function mysql_prepare_value($value) {\r\r\n\t\t$magic_quotes_active = get_magic_quotes_gpc();\r\r\n\t\t$new_version_php = function_exists(\"mysql_real_escape_string\");\r\r\n\t\t\r\r\n\t\tif($new_version_php){\r\r\n\t\t\t//undo any magic quote effects so mysql_real_escape_string can do the work\r\r\n\t\t\tif($magic_quotes_active) { $value = stripslashes($value); }\r\r\n\t\t\t$value = mysql_real_escape_string($value);\r\r\n\t\t} else {\r\r\n\t\t\t\t//if magic quotes aren't already on then add slashes manually\r\r\n\t\t\t\tif( !$magic_quotes_active ) { $values = addslashes( $value ); }\r\r\n\t\t\t\t//if magic quotes are active, then the slashes already exist\r\r\n\t\t\t}\r\r\n\t\treturn $value;\r\r\n\t}", "protected function preprocessData() {}", "function mysql_prep($v){\n\t\tglobal $myconn;\n\t\t$v = trim($v);\n\t\t$v = $myconn->real_escape_string($v);\n\t\t\n\t\treturn $v;\n\t}", "function prepare_insert($data = []){\n // if there is no data to set, then return an empty string\n if($data == []){\n return '';\n }\n $set_sql = $this->create_set($data);\n // check again to make sure there were proper columns listed in the SET\n if(strlen($set_sql) == 0){\n return '';\n }\n $return_string = \"INSERT INTO {$this->table_name} $set_sql;\";\n return $return_string;\n }", "public function prepare();", "public function prepare();", "function hash_mysql_sanitize($pdata){\n\t\nif( isset($pdata) ){\n\n\t//make sure that $pdata is cleaned. put this in a header.\n\tforeach( $pdata as $key => $value ){\n\t\t//clean up!\n\t\tmysql_real_escape_string($value);\n\t}\n}\n\nreturn $pdata;\n}", "abstract public function prepareToStore();", "function sqlInjections($data){\n\t$value1=mysqli_real_escape_string($GLOBALS['link'],$data);\n\t$value1=trim($value1);\n\treturn $value1;\n\t}", "protected function prepareForValidation()\n {\n $expectedSalary = removeCommaFromNumbers($this->request->get('expected_salary'));\n\n $this->request->set('expected_salary', $expectedSalary);\n }", "public function prepare() {\n if (!isset($this->Created))\n $this->Created = date('YmdHis', time());\n\n if (isset($this->ConfirmPassword))\n unset($this->ConfirmPassword);\n\n $this->Password = Auth::getHash($this->Password);\n// $this->ProfileImage = $this->_processProfileImage();\n }", "public function prepareVars()\n {\n if ($this->formField->disabled) {\n $this->previewMode = true;\n }\n\n $permissionsData = $this->formField->getValueFromData($this->model);\n if (!is_array($permissionsData)) {\n $permissionsData = [];\n }\n\n $this->vars['checkboxMode'] = $this->getControlMode() === 'checkbox';\n $this->vars['permissions'] = $this->getFilteredPermissions();\n $this->vars['baseFieldName'] = $this->getFieldName();\n $this->vars['permissionsData'] = $permissionsData;\n $this->vars['field'] = $this->formField;\n }", "public function sanitize()\n {\n $purifier = $this->_purifier;\n $this->_sanitized_data = array_map(\n function ($field) use ($purifier) {\n return $purifier->purify($field);\n },\n $this->_data\n );\n }", "function sanitize($data){\r\n $conn = db ();\r\n return mysqli_real_escape_string($conn, $data);\r\n}", "private function getPrepared()\n {\n $array = $this->ToArray();\n unset($array['currentPage']);\n unset($array['pageCount']);\n unset($array['errors']);\n unset($array['insert']);\n unset($array['table']);\n unset($array['Adapter']);\n unset($array['pdoFetch']);\n unset($array['cmsFetchMode']);\n unset($array[$this->primaryName]);\n unset($array['primaryName']);\n $prepared['update'] = '';\n foreach($array as $k=>$v)\n {\n $prepared['values'][':'.$k] = $v;\n $prepared['update'] .= '`'.$k.'`'.\"=\".':'.$k.',';\n }\n if ($prepared['update']{strlen($prepared['update'])-1} == ',')\n {\n $prepared['update'] = substr($prepared['update'],0,-1);\n }\n $prepared['set'] = implode(', ', array_keys($array));\n return $prepared;\n }", "function insert_stmt(){\n\t\tglobal $in;\n\t\tif ($this->attributes['BYTB']!='' )$this->fields_value_bytb($this->attributes['BYTB']);\n\t\t\n\t\t\n\t\tif ($this->attributes['TB']!='no'){\n\t\t\t$i=0;\n\t\t\tforeach ($this->values as $key => $val){\t\t\t\t\n\t\t\t\t$this->field_stmt[$i]=\"{$key}\";\n\t\t\t\t$this->value_stmt[$i]=\"{$in[$key]}\";\n\t\t\t\t\n\t\t\t\tif($in[$key]==1){\n\t\t\t\t\t$i++;\n\t\t\t\t\t$this->field_stmt[$i]=\"D_{$key}\";\n\t\t\t\t\t#GC 20/04/2015 gestione popolamento decode\n\t\t\t\t\tif (isset($this->attributes['DECODE'][$key])) $this->value_stmt[$i]=\"{$this->attributes['DECODE'][$key]}\";\n\t\t\t\t\telse $this->value_stmt[$i]=$val;\n\t\t\t\t}\n\t\t\t\t#GC 20/04/2015 gestione sbiancamento decode\n\t\t\t\tif($in[$key]==0){\n\t\t\t\t\t$i++;\n\t\t\t\t\t$this->field_stmt[$i]=\"D_{$key}\";\n\t\t\t\t\t$this->value_stmt[$i]=\"\";\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn;\n\t}", "private function prepareStatements() {\n $sql = \"INSERT INTO users(userName, password, email) VALUES (:user, :pass, :email)\";\n $this->insertUser = $this->connection->prepare($sql);\n\n $sql = \"UPDATE users SET userName=:userName, password=:pass, email=:email WHERE userName=:user\";\n $this->updateUser = $this->connection->prepare($sql);\n\n $sql = \"SELECT * FROM users WHERE userName=:user\";\n $this->selectUser = $this->connection->prepare($sql);\n }", "protected function _prep_args() {\n\t\t// this is the data prepared for binding.\n\t\t// these fields are ordered as they are in the table\n\t\t$args = array(\n\t\t\t'the_id' => $this->id,\n\t\t\t'date_created' => $this->date_created,\n\t\t\t'completed' => $this->completed,\n\t\t\t'template_id' => $this->template_id,\n\t\t);\n\n\t\treturn $args;\n\t}", "function processPostVars()\n {\n $this->id = $_POST['id'];\n $this->role = $_POST['role'];\n $this->firstname = trimStrip($_POST['firstname']);\n $this->surname = trimStrip($_POST['surname']);\n $this->email = trimStrip($_POST['email']);\n $this->login = trimStrip($_POST['login']);\n $this->password = trimStrip($_POST['pass1']);\n }", "protected function prepareForValidation()\n {\n $this->merge([\n 'insumos' => json_decode($this->insumos, true),\n ]);\n }", "public function processBind()\n {\n $bind = [];\n\n foreach ($this->fields as $field)\n {\n\n if($field == $this->tablePK)\n {\n $bind[\":id\"] = $this->data[$field];\n }\n else\n {\n $bind[\":$field\"] = $this->data[$field];\n }\n }\n $this->bind = $bind;\n }", "function mysql_prep($value){\n $magic_quotes_active=get_magic_quotes_gpc();//to check if magic quotes has been activated returns 0 if off and 1 if on\n $newness_of_php=function_exists(\"mysql_real_escape_string\");//to check if the function is present in php; whether new or old php version\n \n if($newness_of_php){\n if($magic_quotes_active){$value= stripslashes($value);}\n $value=mysql_real_escape_string($value);\n }else{\n if(!$magic_quotes_active){$value=addslashes($value);} \n }\n return $value;\n }", "private function prepareForDB(&$bindings) { //$this ndak berubah, cuma $bindings untuk preparedStatements yang berubah isinyo.\n foreach ($bindings as $k=>$v) if (gettype($v) == \"boolean\") $bindings[$k] = ($v) ? 'true' : '0';\n foreach (static::jsonColumns() as $col) { if (isset($bindings[$col])) $bindings[$col] = json_encode($bindings[$col]); }\n }", "function _prepare_filter_data () {\n\t\t// Filter session array name\n\t\t$this->_filter_name\t= $_GET[\"object\"].\"_filter\";\n\t\t// Connect common used arrays\n\t\tif (file_exists(INCLUDE_PATH.\"common_code.php\")) {\n\t\t\tinclude (INCLUDE_PATH.\"common_code.php\");\n\t\t}\n\t\t// Fields in the filter\n\t\t$this->_fields_in_filter = array(\n\t\t\t\"engine\",\n\t\t\t\"text\",\n\t\t);\n\t}", "function clean_for_db_reinsert($value) {\n//$value = str_replace(\"'\", \"''\", $value);\n$value = addslashes($value);\n$value = str_replace(\"\\'\", \"''\", $value);\n\treturn $value;\n\n}", "protected function prepareMyData(){\n\t\tglobal $C;\n if( $this->id > 0 ){\n $this->get( \"`id`={$this->id}\" );\n $this->unstoreSfield();\n }\n\t\t$C->setID( $this->data['parent'] );\n\t\t$C->get( \"`id`={$this->data['parent']}\" );\n\t\t$C->unstoreSfield();\n $p = $C->getData();\n if( is_array( $p ) ){\n\t\t\tT::assign( \"parent\", $p[\"name\"] );\n\t\t\t$fieldlist=array();\n if( is_array( $p[\"fields\"] ) )\n foreach( $p[\"fields\"] as $key => $item ){\n $fieldlist[] = array( \"cnt\" => $key, \"name\" => $item, \"value\"=> $this->data[$this->sfield][$key] );\n }\n\t\t\tT::assign( \"fieldlist\", $fieldlist );\n }\n\t\tT::assign( \"f\", $this->sfield );\n\t\tT::assign( \"item\",$this->data );\t\t\n\t}", "protected function _clean()\r\n\t{\r\n\t\t$this->taintValue = null;\r\n\t\t$this->normalizedValue = null;\r\n\t\r\n\t\t$this->parameterInfo = null;\r\n\t\t$this->bFetched = false;\r\n\t\t\r\n\t\t$this->validationInfo = null;\r\n\t\t$this->isValid = false;\r\n\t}", "private function PrepStatement()\n\t{\n\t\t$this->stmt = $this->prepare($this->query->statement);\n\t\tif($this->query->parameters !==NULL && $this->query->paramtype !==NULL\n\t\t\t&& count($this->query->parameters) == count($this->query->paramtype))\n\t\t{\n\t\t\tforeach ($this->query->parameters as $parameter => $value)\n\t\t\t{\n\t\t\t\t$this->stmt->bindValue($parameter, $value, $this->query->paramtype[$parameter]);\n\t\t\t}\n\t\t}\n\t\telseif ($this->query->parameters!==NULL)\n\t\t{\n\t\t\tforeach ($this->query->parameters as $parameter => $value)\n\t\t\t{\n\t\t\t\t$this->stmt->bindValue($parameter, $value, pdo::PARAM_STR);\n\t\t\t}\n\t\t}\n\t}", "public function preparePersistentParameters() {\n $this->persistParams = $this->controller->getProperty('persistParams','');\n if (!empty($this->persistParams)) $this->persistParams = $this->modx->fromJSON($this->persistParams);\n if (empty($this->persistParams) || !is_array($this->persistParams)) $this->persistParams = array();\n return $this->persistParams;\n }", "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName() . '[]';\n\n $this->vars['model'] = $this->model;\n $this->vars['subscribers'] = Subscriber::all()->lists('count', 'id');\n if (!empty($this->getLoadValue())) {\n $this->vars['value'] = $this->getLoadValue();\n } else {\n $this->vars['value'] = [];\n }\n\n }", "function mysql_prep($value){\n\t\t$magic_quotes_active = get_magic_quotes_gpc();\n\t\t$new_enough_php = function_exists(\"mysql_real_escape_string\"); // ie PHP >= v4.3.0\n\n\t\tif($new_enough_php){\n\t\t\t// undo any magic quotes effects so mysql_real_escape_quotes can do the work\n\t\t\tif($magic_quotes_active){\n\t\t\t\t$value = stripcslashes($value);\n\t\t\t}\n\t\t\t$value = mysql_real_escape_string($value);\n\t\t}else {\n\t\t\t// if magic quotes aren't on then add slashes manually \n\t\t\tif(!$magic_quotes_active){\n\t\t\t\t$value = addslashes($value);\n\t\t\t\t// if magic quotes are on the slashes already exits\n\t\t\t}\n\t\t}\n\t\treturn $value;\n\t}", "function dbprep() {\n global $kProtectFunction, $kFormatOptions, $kDebugQueries;\n\n\t$args = func_get_args();\n\t$format = array_shift($args);\n\n\t// generate final query\n\tif (empty($args)) {\n\t\t$format = str_replace(\"%%\", \"%\", $format);\n\t\t$query = $format;\n } else if (empty($kFormatOptions)) {\n $asargs = array_map($kProtectFunction, $args); // protect arguments\n $query = vsprintf($format, $asargs);\n\t} else {\n $format = str_replace(\"%%\", PERCENT_PLACEHOLDER, $format);\n if ($kDebugQueries) {\n $format = dbtestquery($format, $args);\n }\n\n $specs = preg_match_all(\"/%[${kFormatOptions}]/\", $format, $matches);\n $asargs = array_map($kProtectFunction, $matches[0], $args); // protect arguments\n\t\t$allspecs = array_map('prefixPercent', str_split($kFormatOptions));\n\t\t$format = vsprintf(str_replace($allspecs, \"%s\", $format), $asargs);\n\t\t$query = str_replace(PERCENT_PLACEHOLDER, \"%\", $format);\n }\n \n\treturn $query;\n}", "private function collectData() {\n $this->Name = $this->sanitize($_POST['Name']);\n $this->Street1 = $this->sanitize($_POST['Street1']);\n $this->Street2 = $this->sanitize($_POST['Street2']);\n $this->CityName = $this->sanitize($_POST['CityName']);\n $this->StateOrProvince = $this->sanitize($_POST['StateOrProvince']);\n $this->Country = $this->sanitize($_POST['Country']);\n $this->PostalCode = $this->sanitize($_POST['PostalCode']);\n }", "public function sanitize() {\n }", "function _replacePlaceholdersInSQL(&$data){\n // allow current user name in filter:\n $data['sql'] = str_replace('%user%', $_SERVER['REMOTE_USER'], $data['sql']);\n // allow current date in filter:\n $data['sql'] = str_replace('%now%', dformat(null, '%Y-%m-%d'),$data['sql']);\n }", "public function prepare() {}", "public function prepare() {}", "public function sanitize(){\r\n\t\t$post = array();\r\n\t\tforeach($_POST as $key => $val){\r\n\t\t\tif(!get_magic_quotes_gpc()){\r\n\t\t\t\t$post[$key] = mysql_real_escape_string($val);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $post;\r\n\t}", "public function prepare():void\n {\n\n // Get IP address\n if ($this->reg_ip == '') { \n $this->reg_ip = IpAddress::get();\n }\n\n // Get user-agent\n if ($this->reg_user_agent == '') { \n $this->reg_user_agent = UserAgent::get();\n }\n\n // Lookup ip address\n if ($this->reg_country == '' && $this->reg_ip != '') { \n $res = LookupIP::query($this->reg_ip);\n foreach ($res as $key => $value) {\n $key = 'reg_' . $key; \n $this->$key = $value;\n }\n }\n\n }", "public function prepareVars()\n {\n $this->vars['relationManageId'] = $this->manageId;\n $this->vars['relationLabel'] = $this->config->label ?: $this->field;\n $this->vars['relationManageTitle'] = $this->manageTitle;\n $this->vars['relationField'] = $this->field;\n $this->vars['relationType'] = $this->relationType;\n $this->vars['relationSearchWidget'] = $this->searchWidget;\n $this->vars['relationToolbarWidget'] = $this->toolbarWidget;\n $this->vars['relationManageMode'] = $this->manageMode;\n $this->vars['relationManageWidget'] = $this->manageWidget;\n $this->vars['relationToolbarButtons'] = $this->toolbarButtons;\n $this->vars['relationViewMode'] = $this->viewMode;\n $this->vars['relationViewWidget'] = $this->viewWidget;\n $this->vars['relationViewModel'] = $this->viewModel;\n $this->vars['relationPivotWidget'] = $this->pivotWidget;\n $this->vars['relationSessionKey'] = $this->relationGetSessionKey();\n $this->vars['relationExtraConfig'] = $this->extraConfig;\n }", "public function prepareFieldset();", "public function sanitizing_attributes_sql($atr){\n\t\t$atr1 = $mysqli->real_escape_string($atr); //escapes special chars\n\t\treturn $atr1;\n\t}", "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n\n $path = explode('\\\\', get_class($this->model));\n\n $this->vars['task_id'] = array_pop($path) . '-' . $this->model->{$this->taskKey};\n $this->vars['task_name'] = $this->model->{$this->taskName};\n\n $this->vars['app_name'] = HarvestSettings::get('app_name', 'Harvest');\n $this->vars['app_url'] = Request::url();\n }", "public function db_prep_set() {\n if ($this->created_on === null || $this->created_on < new DateTime('0000-00-00')) {\n $this->created_on = DB::T(DB::NOW);\n if (Conf::$USER !== null) {\n $this->created_by = Conf::$USER->id;\n }\n }\n else {\n $this->last_updated_on = DB::T(DB::NOW);\n if (Conf::$USER !== null) {\n $this->last_updated_by = Conf::$USER->id;\n }\n }\n }", "function sanitize($input) {\n if (is_array($input)) {\n foreach($input as $var=>$val) {\n $output[$var] = sanitize($val);\n }\n }else{\n if (get_magic_quotes_gpc()) {\n $input = stripslashes($input);\n }\n $input = cleanInput($input);\n $output = mysql_real_escape_string($input);\n }\n return $output;\n}", "protected function prepareForValidation()\n {\n $request = $this->request->all();\n if(!empty($request['country']) && $request['country']=='All'){\n unset($request['country']);\n }\n $this->replace($request);\n }", "private static function prepare_values($values, $type_name)\n {\n }", "function prepValueForDB($value) {\n\t\tif($value === true) {\n\t\t\treturn 1;\n\t\t} if(!$value || !is_numeric($value)) {\n\t\t\treturn \"0\";\n\t\t} else {\n\t\t\treturn addslashes($value);\n\t\t}\n\t}", "protected function prepare_item_for_database($request)\n {\n }", "protected function prepare_item_for_database($request)\n {\n }", "public function prepareVars()\n {\n if ($this->showLogRelations !== null) {\n $this->showLogRelations = (array) $this->showLogRelations;\n }\n\n $this->vars['name'] = $this->formField->getName();\n $this->vars['model'] = $this->model;\n $this->vars['showUndoChangesButton'] = $this->showUndoChangesButton;\n }", "public function prepareVars()\n {\n $this->vars['history'] = $this->model->revision_history;\n $this->vars['chapter_id'] = $this->model->id;\n }" ]
[ "0.696646", "0.6576932", "0.65470254", "0.654405", "0.65187263", "0.64911646", "0.6406387", "0.6348825", "0.63153535", "0.6283605", "0.62646216", "0.62606996", "0.61720127", "0.61602646", "0.615262", "0.61425775", "0.61281264", "0.61190873", "0.6099726", "0.60993445", "0.6082326", "0.60460603", "0.60389626", "0.6030076", "0.60261106", "0.60240126", "0.6016654", "0.6011055", "0.59966886", "0.5982114", "0.59754634", "0.5953447", "0.59527385", "0.5945564", "0.5929035", "0.59258616", "0.59239864", "0.59034497", "0.58700264", "0.5847854", "0.5842771", "0.5821424", "0.580973", "0.5800443", "0.5789808", "0.5787564", "0.5778253", "0.5777581", "0.57744884", "0.5771883", "0.57712835", "0.57559294", "0.5735219", "0.57311076", "0.57311076", "0.5729042", "0.5724817", "0.5719321", "0.5709978", "0.5702341", "0.5701663", "0.569669", "0.56862575", "0.56841105", "0.5681694", "0.5676601", "0.56727934", "0.56692433", "0.5668654", "0.5657974", "0.56460696", "0.5639955", "0.5636195", "0.5633275", "0.562231", "0.5618841", "0.5618438", "0.5617347", "0.5617135", "0.56109524", "0.56038296", "0.5600231", "0.55967736", "0.5595706", "0.5589477", "0.558785", "0.558201", "0.5570878", "0.5565499", "0.55647105", "0.5553158", "0.555137", "0.5547472", "0.5542106", "0.55366963", "0.5536665", "0.55331206", "0.5528979", "0.5528979", "0.55254644", "0.5509017" ]
0.0
-1
get the number of rows effected
public function num_rows($result) { return mysqli_num_rows($result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNumRowsAffected(){\n\t\treturn $this->instance->getNumRowsAffected();\n\t}", "function getNumAffectedRows() {\r\n\t\t\treturn($this->privateVars['affectedrows']);\r\n\t\t}", "public function getNumAffectedRows()\n {\n \treturn $this->connections[$this->activeConnection]->affected_rows;\n }", "public function getNumRowsAffected() {\n\t\treturn $this->rowsAffected;\n\t}", "function Affected_Rows()\n {\n $this->init();\n return ($this->db->Affected_Rows());\n }", "public function getNumRows()\n {\n \treturn $this->previouslyExecuted->num_rows;\n }", "public function rows_affected() {\n\t\tif ($this->q) {\n\t\t\treturn $this->q->numrows();\n\t\t}\n\n\t\treturn 0;\n\t}", "public abstract function row_count();", "function RowCount() {}", "public function rowCount()\r\n\t{\r\n\t\treturn $this->rowsAffected;\r\n\t}", "public function affectedRows() : int\n\t{\n\t\treturn $this->handle->affectedRows();\n\t}", "function AffectedRows ();", "public function affectedRows(): int\n {\n //for some reason this need to be explicitly swapped, or will be optimized away\n $broken = $this->getConn()->affected_rows;\n return $broken;\n }", "public function getAffectedRowsCount(): int\n {\n }", "function NumAffected($result=null)\n\t{\n\t\treturn oci_num_rows($result);\n\t}", "function numRows()\n {\n $this->getRows();\n return $this->row_counter;\n }", "public function affectedRows() : int;", "function numAffected() {\n return mysql_affected_rows($this->db);\n }", "public function affectedRows() {\r\n return $this->query->rowCount();\r\n }", "function affectedRows(){\n\t\treturn sqlite_changes($this->id);\n\t}", "public function affectedRows(): int\n\t{\n\t\t//log_message('error', 'affectedRows');\n\t\treturn is_object($this->resultID) ? $this->resultID->rowCount() : 0;\n\t}", "public function affected_rows() {\n return $this->stmt->rowCount();\n }", "public function affected_rows()\n\t{\n\t\t// Return number of rows affected\n\t\treturn $this->statement->rowCount();\n\t}", "public function getAffectedRows(): int\n {\n return $this->pdoStatement->rowCount();\n }", "public function affectedRows()\n {\n return $this->query->rowCount();\n }", "function affected_rows() {\n\t\t// return mssql_affected_rows($this->Query_ID);\n\t\t$rsRows = mssql_query(\"Select @@rowcount as rows\", $this->Link_ID);\n\t\tif ($rsRows) { \n\t\t return mssql_result($rsRows, 0, \"rows\");\n\t\t}\n\t}", "public function count() {\n return count($this->__rows__);\n }", "function AffectedRows()\n\t{\n\t\treturn $this->__affectedRows;\n\t}", "public function getAffectedRows()\n\t{\n\t\treturn 0;\n\t}", "public function countRows(): int\n {\n $result = $this->_getResult()->numRows(); // Returns an integer on success and an \\PEAR_Error object on failure\n return is_int($result) ? $result : 0;\n }", "public function affectedRows(): int {\n\t\treturn $this->stmt->rowCount();\n\t}", "abstract public function AffectedRows();", "function fvls_db_AffectedRows(){\n\t\tglobal $FLVS_db_link;\n\n\t\treturn $FLVS_db_link->affected_rows;\n\t}", "function sql_affected_rows($res)\n {\n return $res->rowCount();\n }", "function affected_rows($query)\n\t{\n\t\treturn $query->rowCount();\n\t}", "function sql_num_rows($res)\n {\n // DELETE, INSERT, UPDATE\n // do not use : SELECT\n return $res->rowCount();\n }", "function affected_rows() {\r\n\t\treturn $this->dbh->affected_rows();\r\n\t}", "function Affected_Rows()\n\t{\n return sqlsrv_rows_affected($this->_queryID);\n\t}", "public function countRows()\n {\n return count($this->rows);\n }", "public function getNumRows();", "function affectedRows();", "function AffectedRows() {\n return @mysql_affected_rows();\n }", "public function affectedRows(){\n return (int) mysql_affected_rows($this->connection);\n }", "public function getAffectedRows() {\r\n\t\treturn $this->PDOStatement->rowCount();\r\n\t}", "public function rowsAffected() {\n\t\tif (is_null($this->rowsAffected)) {\n\t\t\tthrow new Exception('Query did not affect rows');\n\t\t}\n\n\t\treturn $this->rowsAffected;\n\t}", "public function affectedRows()\r\n\t{\r\n\t\treturn (int) mysqli_affected_rows($this->link);\r\n\t}", "public function getTheRows(){\n if($this->dboutcomes == false){\n return false;\n }\n //get the total number of rows affected\n return mysqli_num_rows($this->dboutcomes);\n }", "function affected_rows();", "public function num_rows() {\n\t\treturn $this->GetNumRows();\n\t}", "function numrows() {\r\n\t\treturn $this->numrows;\r\n\t}", "public function getAffectedRows() {\n\t\treturn $this->last_sth->rowCount();\n\t}", "public function getNumRows(){\n\t\treturn $this->instance->getNumRows();\n\t}", "function getRowCounter()\n {\n $this->getRows();\n return $this->row_counter;\n }", "public function getAffectedRows(){\n\t\treturn $this->connection->affected_rows;\n\t}", "function AffectedRows() {\n\t\t\t$result = pg_affected_rows($this->result);\n\t\t\treturn $result;\n\t\t}", "public function getRowsAffected()\r\n\t{\r\n\t\treturn mssql_rows_affected($this->mssql);\r\n\t}", "function aff_rows()\n\t{\n\t\treturn pg_affected_rows($this->last);\n\t}", "abstract public function getNumRows();", "abstract public function getNumRows();", "public function getAffectedItemsCount() {}", "public function count() {\n return $this->row_count();\n }", "function affectedRows() \n \t{\n \t\treturn @mysql_affected_rows($this->linkId);\n \t}", "public function count()\n\t{\n\t\treturn (int) $this->getStatement()->rowCount();\n\t}", "public function affected_rows();", "public function getNumberOfRows();", "public function number_of_rows()\n {\n if (is_bool($this->result))\n {\n return $this->mysqli->affected_rows;\n }\n else\n {\n return $this->result->num_rows;\n }\n }", "abstract public function getAffectedRows();", "function num_rows() {\r\n\t\treturn $this->dbh->num_rows();\r\n\t}", "public function sql_affected_rows() {}", "public function sql_affected_rows() {}", "function db_driver_affected_count($resource)\n{\n global $_db;\n\n return pg_affected_rows($resource);\n}", "public function rowCount()\n {\n return sasql_num_rows($this->result);\n }", "public abstract function GetNumRows();", "public function getRowCount()\n {\n return $this->row_count;\n }", "public function getRowCount()\n {\n return $this->row_count;\n }", "public function getRowCount()\n {\n return $this->row_count;\n }", "public function getAffectedRows();", "public function getAffectedRows();", "public function nbRows();", "public function getAffectedRows()\n {\n $this->connect();\n\n if ($this->prepared instanceof Statement) {\n return $this->prepared->rowCount();\n } else {\n return 0;\n }\n }", "function affected_rows()\n\t{\n\t\treturn $this->m_affected_rows;\n\t}", "public function rowCount()\n {\n return oci_num_rows($this->sth);\n }", "function affected_rows() {\r\n\t\treturn mysql_affected_rows($this->link);\r\n\t}", "public function get_rows_count()\n\t{\n\t\treturn count($this->get_rows());\n\t}", "function NumRows() {}", "public function num_rows() {\n\t\t\treturn $this->count();\n\t\t}", "public function getRowCount() {\n return $this->Read->rowCount();\n }", "public function numOfRows();", "public function GetRowCount() : INT\r\n {\r\n return($this->preparedStatement->rowCount());\r\n }", "public function getInvalidRowsCount()\n {\n return count($this->_invalidRows);\n }", "public function getAffectedRows()\r\n\t{\r\n\t\treturn $this->db->getAffectedRows();\r\n\t}", "public function count()\n {\n return count($this->_rows);\n }", "public function count()\n\t{\n\t\treturn $this->query->rowCount();\n\t}", "public function affectedRows()\n {\n return sasql_affected_rows($this->connection);\n }", "public function get_row_count() {\n return 0;\n }", "public function getNumRows() {\n\t\treturn $this->_num_rows;\n\t}", "function getNumRows() {\r\n\t\t\tif($this->privateVars['resultset']) {\r\n\t\t\t\tif(@mysql_num_rows($this->privateVars['resultset']))\r\n\t\t\t\t\treturn mysql_num_rows($this->privateVars['resultset']);\r\n\t\t\t}\r\n\t\t\treturn -1;\r\n\t\t}", "public function getNumberOfRows()\r\n {\r\n return count($this->data);\r\n }", "abstract public function affectedRows();", "abstract public function affectedRows();", "function get_row_count() {\n $query = \"SELECT COUNT(*) FROM failure;\";\n $count = select_scalar($query);\n return $count;\n}" ]
[ "0.81607217", "0.81477815", "0.79739535", "0.794796", "0.769695", "0.7660528", "0.76161826", "0.75886214", "0.75542426", "0.75450855", "0.7537448", "0.7532377", "0.7523018", "0.74400747", "0.74341184", "0.74175", "0.74134773", "0.741347", "0.7413226", "0.74126375", "0.7411813", "0.74084574", "0.73938954", "0.7381765", "0.73765445", "0.73752624", "0.72977626", "0.7293501", "0.72904104", "0.72866833", "0.7281802", "0.7280905", "0.72801274", "0.72677296", "0.7263426", "0.72470695", "0.7240328", "0.7231455", "0.72314197", "0.7219269", "0.72185016", "0.7217614", "0.7213947", "0.72082245", "0.72001225", "0.7162955", "0.71623415", "0.7152107", "0.71477854", "0.7146667", "0.71459246", "0.7145035", "0.71401227", "0.7134193", "0.7127314", "0.71240747", "0.7120317", "0.71143746", "0.71143746", "0.71091205", "0.7094492", "0.7092937", "0.7092595", "0.7088964", "0.7073131", "0.7064693", "0.7063731", "0.70631397", "0.7060576", "0.7060576", "0.7059149", "0.70427287", "0.70329255", "0.70311195", "0.70311195", "0.70311195", "0.7030374", "0.7030374", "0.70292026", "0.7025275", "0.70143586", "0.7013761", "0.70118725", "0.70101637", "0.69957733", "0.6993883", "0.6993609", "0.6992793", "0.6989727", "0.69887215", "0.6986568", "0.69864386", "0.6985701", "0.6982432", "0.6982193", "0.6981413", "0.6977819", "0.697258", "0.69715494", "0.69715494", "0.69660807" ]
0.0
-1
returns the last auto generated id
public function insert_id() { return mysqli_insert_id($this->connection); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getLastID()\n {\n return $this->driver->getInsertId();\n }", "public function getLastId()\n {\n return $this->adodb->insert_Id();\n }", "public function lastId();", "function get_last_id()\n {\n // TODO: Implement get_last_id() method.\n }", "public static function lastId()\n {\n return self::connect()->lastInsertId();\n }", "public function getLastId();", "public function getLastId();", "public function getLastId(){\n return $this->con->insertId();\n }", "public function getLastID() {\n return $this->db->insert_id();\n }", "public static function get_last_id(){\r\n\t\treturn self::$last_id;\r\n\t}", "public function getAutoIncrementID()\n {\n $this->sql_query->query(\"SELECT LAST_INSERT_ID()\");\n $result = $this->sql_query->getSingleResult();\n return $result[0];\n }", "public function lastInsertId();", "public function lastInsertId();", "public function lastInsertId();", "public function getLastInsertId();", "public function getLastInsertId();", "public function getLastInsertId();", "public function last_id() {\n return $this->_connection->lastInsertId();\n }", "public function lastID() {\n return $this->getPDO()->lastInsertId();\n }", "function get_last_id() {\n if ($this->is_valid())\n return @mysql_insert_id($this->connection);\n }", "public function lastId()\n\t{\n\t\treturn $this->_instance->lastInsertId();\n\t}", "public function getLastInsertID();", "public function get_last_id() {\n\t\treturn $this->last_id;\n\t}", "public function getLastId() {\n return $this->LastInsertId;\n }", "function getLastid(){\n $this->lastid = mysqli_insert_id($this->dcon);\n return $this->lastid;\n }", "function getLastId()\n {\n return mysqli_insert_id($this->Db);\n }", "public function lastId()\n\t{\n\t\treturn mysqli_insert_id($this->connection);\n\t}", "public function lastId()\n\t{\n\t\treturn $this->lastInsertID();\n\t}", "public function lastId()\r\n {\r\n return $this->getKey('last_id');\r\n }", "function lastId()\n {\n return mysql_insert_id();\n }", "public function lastId() : int\n\t{\n\t\treturn $this->handle->lastId();\n\t}", "public function lastId(): int\n {\n return $this->lastId;\n }", "public function getLastInsertedID(){\n // Return last created id\n return $this->connection->insert_id();\n }", "public function lastID(): int;", "public function lastId () {\n\treturn mysql_insert_id();\n }", "function lastId() {\r\n return mysql_insert_id();\r\n }", "abstract public function getLastInsertId();", "function lastId() {\n return mysqli_insert_id($this->con);\n }", "public function lastId()\n {\n return $this->mysqli->insert_id;\n }", "public static function getId() {\n\t\treturn self::getConexao()->lastInsertId();\n\t}", "public function lastInsertedId()\n {\n $query = 'MATCH (n) RETURN MAX(id(n)) AS lastIdCreated';\n\n $statement = $this->getCypherQuery($query, []);\n $result = $statement->getResultSet();\n\n return $result[0][0];\n }", "public function lastInsertId () {\r\n return $this->cachedLastInsertId; // $this->db->lastInsertId();\r\n }", "function lastID()\r\n\t{\r\n\t\tassert($this->link != null);\r\n\t\treturn intval($this->link->lastInsertId());\r\n\t}", "protected function getNextId()\n {\n return Field::max('id') + 1;\n }", "function last_id(){\n\t\treturn(-1);\n\t}", "public static function lastInsertId(): string {\r\n return self::getConnection()->lastInsertId();\r\n }", "public function get_new_id()\n {\n $query = \"select MAX(id) as id from team\";\n $res = $this->db->query($query);\n $res->result_array();\n $last_id = ($res->result()[0]->id)+1;\n return $last_id;\n }", "public function lastId(){\n return $this->lastId;\n }", "public function getLastId()\n {\n return $this->wallpaperMapper->getMaxId();\n }", "public static function getLastInsertId() : string\n {\n return static::getConn()->lastInsertId();\n }", "public function getLastInsertId(): int;", "function getLastInsertID(){\r\n $query = 'SELECT DISTINCT LAST_INSERT_ID() FROM ' . $this->table_name; \r\n $stmt = $this->dbConn->prepare($query);\r\n \r\n $stmt->execute();\r\n \r\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\r\n \r\n $lastID = $row['LAST_INSERT_ID()'];\r\n \r\n return $lastID;\r\n }", "public function getLastInsertedId(): string\n {\n return $this->db->lastInsertId();\n }", "public function lastID(){\n return $this->_lastInsertID;\n }", "public static function getLastInsertId()\n {\n return self::$sql->lastInsertId();\n }", "static function getLastID()\r\n {\r\n $tableUser = DatabaseManager::getNameTable('TABLE_USER');\r\n\r\n $query = \"SELECT MAX(id) AS Max FROM $tableUser\";\r\n\r\n return DatabaseManager::singleFetchAssoc($query)[\"Max\"];\r\n }", "public function getLastInsertId()\r\n {\r\n return $this->getMaster()->lastInsertId();\r\n }", "public function id() {\n return $this->lastInsertId();\n }", "public function insertGetId()\n {\n return $this->lastId;\n }", "public function insertGetId()\n {\n return $this->lastId;\n }", "public function getLastInsertId()\n {\n return $this->PDO->lastInsertId();\n }", "function lastInsertId()\n\t{\n\t\treturn @$this->functions['insert_id']($this->connection_master);\n\t}", "public function getLastInsertId()\n {\n return $this->getPdo()->lastInsertId();\n }", "public function getLastInsertedId() {\n\t\treturn $this->lastInsertedID;\n\t}", "public function getId(): int {\n return $this->database->lastInsertId();\n }", "public function get_last_insert_id()\n\t\t{\n\t\t\treturn( $this->last_insert_id );\n\t\t}", "public function getLastId()\n {\n return $this->galleryMapper->getMaxId();\n }", "function generate_id() {\n $this->last_image_id ++;\n return $this->last_image_id;\n }", "public function lastId(): int\n {\n return (int) $this->pdo->lastInsertId();\n }", "function get_last_inserted_id() {\n return $this->db->insert_id();\n }", "function lastID(){\n return pg_last_oid($this->consulta);\n }", "function gLastId(){\n return mysql_insert_id();\n\t}", "function db_last_id()\n{\n return mysqli_insert_id(DB::get_connection());\n}", "public function getLastInsertId(){\n\t\treturn $this->connection->insert_id;\n\t}", "public function getLastInsertId(){\n return $this->lastInsertId;\n }", "public function getLastInsertId()\n {\n return $this->wpDatabase->insert_id;\n }", "public function lastInsertedId()\n {\n $id = $this->pdo->lastInsertId();\n return $id;\n }", "public function getLastInsertId()\n {\n return $this->getHandler()->getConnection()->lastInsertId();\n }", "public function getLastInsertID()\n {\n\t return $this->connections[ $this->activeConnection]->insert_id;\n }", "function getLastInsertID(){\r\n\t\t\r\n\t\treturn $this->connection->insert_id;\r\n\t}", "public function getLastId() \n {\n if(!Patient::all() -> isEmpty()){\n $recentId = Patient::orderBy('patient_id', 'desc')->first()->patient_id;\n return $recentId;\n }\n }", "public function getLastInsertedId()\r\n\t{\r\n\t\treturn $this->db->getLastInsertedId();\r\n\t}", "public function getNextId()\n {\n return $this->oMapper->getNextId();\n }", "function lastInsertId() \r\n\t{\r\n\t\t \r\n\t\treturn $this->socket->insert_id;\r\n\t\t \r\n\t}", "public function lastInsertId()\n {\n return @db2_last_lastInsertId($this->connection);\n }", "function getLastID(){\r\n $sql = $this->db->prepare(\"SELECT LAST_INSERT_ID()\");\r\n if($sql->execute()){\r\n $id = $sql->fetchColumn(0);\r\n return $id;\r\n }\r\n else\r\n return false;\r\n }", "public function lastInsertId(){\n return $this->pdo->lastInsertId();\n }", "function lastInsertId() {\n return $this->pdo->lastInsertId();\n }", "public function lastInsertId() {\n return $this->connection->lastInsertId();\n }", "function last_inserted_id() {\n return mysql_insert_id($this->db_conn);\n }", "function getLastinsertId (){\n return $this->pdo->lastInsertId();\n }", "public function getLastInsertId()\n {\n return $this->lastInsertId;\n }", "public function lastInsertID()\r\n {\r\n return @mysql_insert_id();\r\n }", "public function getLastInsertedID(){\r\n try {\r\n //Get & return last inserted ID\r\n return $this->db->lastInsertId();\r\n }\r\n catch(Exception $e){\r\n exit($this->echoException($e));\r\n }\r\n catch(PDOException $e){\r\n exit($this->echoPDOException($e));\r\n }\r\n }", "function insert_id()\n {\n // $link = $this->connect();\n // Get the ID generated from the previous INSERT operation\n $last_id = mysqli_insert_id($this->link);\n // return last ID\n return $last_id;\n }", "function getLastInsertID() {\n return mysql_insert_id($this->CONNECTION);\n }", "public static function lastInsertId()\n\t{\n\t\treturn mysqli_insert_id(self::$link);\n\t\t//SELECT LAST_INSERT_ID()\n\t}", "public function generate_insert_id() {\n $result = $this->db2->query(\"SELECT insert_id FROM `insert_header_all` ORDER BY insert_id DESC LIMIT 0,1\");\n if ($result->num_rows() > 0) {\n $data = $result->row();\n $insert_id = $data->insert_id;\n//generate user_id\n $insert_id = str_pad( ++$insert_id, 5, '0', STR_PAD_LEFT);\n return $insert_id;\n } else {\n $insert_id = 'insert_1001';\n return $insert_id;\n }\n }", "public function lastInsertId(){\n return $this->link->lastInsertId();\n }", "public static function lastID($db){\n\t\t\treturn $db->lastInsertId(); \n\t\t}", "public function last_insert_id() {\n\t\treturn $this->adapter->lastInsertId();\n\t}" ]
[ "0.8669435", "0.8664125", "0.85991955", "0.85081035", "0.85065204", "0.84682345", "0.84682345", "0.8441129", "0.84272724", "0.84209627", "0.84083253", "0.8397421", "0.8397421", "0.8397421", "0.8387966", "0.8387966", "0.8387966", "0.83781326", "0.8355932", "0.835185", "0.8325084", "0.8311901", "0.8288963", "0.82805234", "0.82425344", "0.8223754", "0.8216378", "0.8204075", "0.81866574", "0.8176862", "0.8168878", "0.81636834", "0.8156175", "0.8147216", "0.8145624", "0.81416804", "0.81401944", "0.8136631", "0.8120196", "0.8101071", "0.80934006", "0.806722", "0.8060184", "0.8046085", "0.80414987", "0.80270565", "0.801352", "0.8012361", "0.7996891", "0.79906255", "0.79515266", "0.7945378", "0.79433954", "0.7930556", "0.7922136", "0.7921283", "0.7920426", "0.7913869", "0.78997564", "0.78997564", "0.78885454", "0.78857756", "0.787708", "0.78682363", "0.7867453", "0.786737", "0.78585553", "0.7845644", "0.7844596", "0.7841612", "0.78379947", "0.78360164", "0.7825825", "0.7817011", "0.7812911", "0.7812582", "0.78062236", "0.7803269", "0.7802577", "0.7799799", "0.7793662", "0.7787689", "0.7777339", "0.77755725", "0.7773057", "0.7763377", "0.77614117", "0.77577007", "0.77558666", "0.77552205", "0.7754661", "0.775398", "0.7753508", "0.77513623", "0.7737989", "0.77343255", "0.77335113", "0.7732326", "0.77288157", "0.77243865", "0.7717321" ]
0.0
-1
returns the number of effected rows on the last query
public function affected_rows() { return mysqli_affected_rows($this->connection); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNumRowsAffected(){\n\t\treturn $this->instance->getNumRowsAffected();\n\t}", "public function rows_affected() {\n\t\tif ($this->q) {\n\t\t\treturn $this->q->numrows();\n\t\t}\n\n\t\treturn 0;\n\t}", "function getNumAffectedRows() {\r\n\t\t\treturn($this->privateVars['affectedrows']);\r\n\t\t}", "public function getNumAffectedRows()\n {\n \treturn $this->connections[$this->activeConnection]->affected_rows;\n }", "public function GetLastAffectedCount()\r\n\t{\r\n\t\tif ($this->IsConnected())\r\n\t\t{\r\n\t\t\treturn $this->_db->affected_rows;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "function aff_rows()\n\t{\n\t\treturn pg_affected_rows($this->last);\n\t}", "function affected_rows($query)\n\t{\n\t\treturn $query->rowCount();\n\t}", "function NumAffected($result=null)\n\t{\n\t\treturn oci_num_rows($result);\n\t}", "function numAffected() {\n return mysql_affected_rows($this->db);\n }", "function affected_rows() {\n\t\t// return mssql_affected_rows($this->Query_ID);\n\t\t$rsRows = mssql_query(\"Select @@rowcount as rows\", $this->Link_ID);\n\t\tif ($rsRows) { \n\t\t return mssql_result($rsRows, 0, \"rows\");\n\t\t}\n\t}", "public function getAffectedRows() {\n\t\treturn $this->last_sth->rowCount();\n\t}", "public function affectedRows() {\r\n return $this->query->rowCount();\r\n }", "function affectedRows(){\n\t\treturn sqlite_changes($this->id);\n\t}", "function Affected_Rows()\n {\n $this->init();\n return ($this->db->Affected_Rows());\n }", "function db_driver_affected_count($resource)\n{\n global $_db;\n\n return pg_affected_rows($resource);\n}", "function sql_affected_rows($res)\n {\n return $res->rowCount();\n }", "public function affectedRows()\n {\n return $this->query->rowCount();\n }", "public function sql_affected_rows() {}", "public function sql_affected_rows() {}", "public function getNumRowsAffected() {\n\t\treturn $this->rowsAffected;\n\t}", "public function lastAffected()\n {\n return ($this->_result) ? db2_num_rows($this->_result) : false;\n }", "public function affected_rows() {\n return $this->stmt->rowCount();\n }", "function lastAffected ()\n {\n return $this->_result? pg_affected_rows($this->_result): false;\n }", "function fvls_db_AffectedRows(){\n\t\tglobal $FLVS_db_link;\n\n\t\treturn $FLVS_db_link->affected_rows;\n\t}", "function Affected_Rows()\n\t{\n return sqlsrv_rows_affected($this->_queryID);\n\t}", "function AffectedRows() {\n\t\t\t$result = pg_affected_rows($this->result);\n\t\t\treturn $result;\n\t\t}", "public function affected_rows()\n\t{\n\t\t// Return number of rows affected\n\t\treturn $this->statement->rowCount();\n\t}", "public function getAffectedRows(){\n\t\treturn $this->lastAffectedRows;\n\t}", "function AffectedRows() {\n return @mysql_affected_rows();\n }", "public function rowCount()\r\n\t{\r\n\t\treturn $this->rowsAffected;\r\n\t}", "public function affectedRows() : int\n\t{\n\t\treturn $this->handle->affectedRows();\n\t}", "public function getAffectedRows()\n\t{\n\t\treturn 0;\n\t}", "abstract public function getAffectedRows();", "function affected_rows();", "function affected_rows() {\r\n\t\treturn $this->dbh->affected_rows();\r\n\t}", "public function getNumRows()\n {\n \treturn $this->previouslyExecuted->num_rows;\n }", "public function getAffectedRows(): int\n {\n return $this->pdoStatement->rowCount();\n }", "public function getAffectedRows()\r\n\t{\r\n\t\treturn $this->db->getAffectedRows();\r\n\t}", "public function affected_rows();", "function sql_num_rows($res)\n {\n // DELETE, INSERT, UPDATE\n // do not use : SELECT\n return $res->rowCount();\n }", "public function affectedRows(){\n return (int) mysql_affected_rows($this->connection);\n }", "public function getAffectedRows();", "public function getAffectedRows();", "public function getAffectedRowsCount(): int\n {\n }", "public function lastAffected()\n {\n if (!empty($this->_queryStats)) {\n foreach (['rows inserted', 'rows updated', 'rows deleted'] as $key) {\n if (array_key_exists($key, $this->_queryStats)) {\n return $this->_queryStats[$key];\n }\n }\n }\n\n return false;\n }", "function affected_rows($resultQuery=''){\n\t\tif(!$this->id_connection){\n\t\t\treturn false;\n\t\t}\n\t\tif(!$resultQuery){\n\t\t\t$resultQuery = $this->last_result_query;\n\t\t\tif(!$resultQuery){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif(($numberRows = pg_affected_rows($resultQuery))!==false){\n\t\t\treturn $numberRows;\n\t\t} else {\n\t\t\tthrow new DbException($this->error(), $this->no_error());\n\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "public function getAffectedRows() {\r\n\t\treturn $this->PDOStatement->rowCount();\r\n\t}", "public function affectedRows(): int\n\t{\n\t\t//log_message('error', 'affectedRows');\n\t\treturn is_object($this->resultID) ? $this->resultID->rowCount() : 0;\n\t}", "public function affectedRows(): int\n {\n //for some reason this need to be explicitly swapped, or will be optimized away\n $broken = $this->getConn()->affected_rows;\n return $broken;\n }", "public function affectedRows(): int {\n\t\treturn $this->stmt->rowCount();\n\t}", "function affected_rows() {\r\n\t\treturn mysql_affected_rows($this->link);\r\n\t}", "public function affectedRows() : int;", "function wrapper_affected_rows($query_id) {\n\t\t$link_id = $this->link_id;\n\n\t\tif (function_exists($this->functions['affected_rows'])) {\n\t\t\treturn @$this->functions['affected_rows']($link_id);\n\t\t} else {\n\t\t\t$res = @mssql_query(\"SELECT @@rowcount\", $this->link_id);\n\t\t\t$rows = @mssql_result($res, 0, 0);\n\t\t\treturn (int)$rows;\n\t\t}\n\t}", "function affected_rows() {\n return mysql_affected_rows($this->db_conn);\n }", "public function getAffectedRows(){\n\t\treturn $this->connection->affected_rows;\n\t}", "function affectedRows() \n \t{\n \t\treturn @mysql_affected_rows($this->linkId);\n \t}", "public function affectedRows()\r\n\t{\r\n\t\treturn (int) mysqli_affected_rows($this->link);\r\n\t}", "function my_affected_rows( ){ \r\n\t\tglobal $connection; \r\n\t\treturn $connection->affected_rows(); \r\n\t\t\r\n\t}", "function dbrows() {\r\n\tglobal $msq;\r\n\treturn mysqli_affected_rows($msq);\r\n}", "public function affected_rows($result_query=''){\n\t\tif(($numberRows = ibase_affected_rows())!==false){\n\t\t\treturn $numberRows;\n\t\t} else {\n\t\t\t$this->lastError = $this->error();\n\t\t\tthrow new DbException($this->error(), $this->no_error());\n\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "public function getAffectedItemsCount() {}", "public function sql_affected_rows()\n {\n return $this->link->affected_rows;\n }", "public function rowsAffected() {\n\t\tif (is_null($this->rowsAffected)) {\n\t\t\tthrow new Exception('Query did not affect rows');\n\t\t}\n\n\t\treturn $this->rowsAffected;\n\t}", "function AffectedRows()\n\t{\n\t\treturn $this->__affectedRows;\n\t}", "function lastAffected() {\n\t\tif ($this->_result) {\n\t\t\treturn mysql_affected_rows($this->connection);\n\t\t}\n\t\treturn null;\n\t}", "function lastNumRows() {\n\t\tif ($this->hasResult()) {\n\t\t\treturn mysql_num_rows($this->_result);\n\t\t}\n\t\treturn null;\n\t}", "function lastNumRows() {\n\t\tif ($this->_result) {\n\t\t\tsqlite_num_rows($this->_result);\n\t\t}\n\t\treturn false;\n\t}", "function affected_rows($resultQuery=''){\n\t\tif(!$this->Id_Connection){\n\t\t\treturn false;\n\t\t}\n\t\tif(!$resultQuery){\n\t\t\t$resultQuery = $this->lastResultQuery;\n\t\t\tif(!$resultQuery){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif(($numberRows = pg_affected_rows($resultQuery))!==false){\n\t\t\treturn $numberRows;\n\t\t} else {\n\t\t\t$this->lastError = $this->error();\n\t\t\t$this->log($this->error(), Logger::ERROR);\n\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "public function affectedRows()\n {\n return sasql_affected_rows($this->connection);\n }", "function affecte_db() {\n\t\t$tmp = mysql_affected_rows();\n\t\treturn ($tmp);\n\t}", "public function getAffectedRows()\n {\n $this->connect();\n\n if ($this->prepared instanceof Statement) {\n return $this->prepared->rowCount();\n } else {\n return 0;\n }\n }", "public static function affectedRows()\n\t{\n\t\treturn mysqli_affected_rows(self::$link);\n\t}", "public function affected_rows(){\n return mysql_affected_rows($this->connection);\n }", "function num_rows_db($query) {\n\t\t$tmp = mysql_num_rows($query);\n\t\treturn ($tmp);\n\t}", "function affectedRows();", "public function getTheRows(){\n if($this->dboutcomes == false){\n return false;\n }\n //get the total number of rows affected\n return mysqli_num_rows($this->dboutcomes);\n }", "function affected_rows()\n\t{\n\t\treturn $this->m_affected_rows;\n\t}", "function database_affected_rows()\n {\n\t return mysql_affected_rows($this->database_connection);\n\t}", "public function count()\n\t{\n\t\treturn (int) $this->getStatement()->rowCount();\n\t}", "function get_affected_rows(){\n\t\treturn $this->affected_rows;\n\t}", "function affectedRows()\n {\n return mysql_affected_rows();\n }", "public static function getAffectedRows()\n\t{\n\t\treturn self::getConnection()->getAffectedRows();\n\t}", "public function getRowsAffected()\r\n\t{\r\n\t\treturn mssql_rows_affected($this->mssql);\r\n\t}", "public function getAffectedRows()\n {\n return $this->_result !== null\n ? $this->_result->rowCount(): 0;\n }", "function lastNumRows ()\n {\n return $this->_result? pg_num_rows($this->_result): false;\n }", "public function affected_rows() {\n\t\treturn mysqli_affected_rows($this->connection);\n\t}", "public static function affectedRows() {\n\treturn self::$instance->affectedRows();\n }", "public static function affectedRows()\n\t{\n\t\treturn self::getConnection()->getAffectedRows();\n\t}", "public function count() {\n\t\t$results = $this->execute();\n\t\treturn $results ? count($results) : 0;\n\t}", "public function count()\n\t{\n\t\treturn $this->query->rowCount();\n\t}", "public function affectedRows();", "public function affectedRows();", "public function affectedRows();", "public function affectedRows();", "public function affected( )\n {\n if ( !underQL::$db_handle )\n return 0;\n\n return @ mysql_affected_rows( underQL::$db_handle );\n }", "public function getNumExecutedQueries()\n {\n return count($this->queries);\n }", "public function get_affected_rows() {\r\n\t\treturn mysql_affected_rows ();\r\n\t}", "protected abstract function getRowsAffected(Result $result);", "protected function _queryCount() {\n\t\treturn count($this->_queries());\n\t}", "abstract public function affectedRows();" ]
[ "0.7499812", "0.749392", "0.74622834", "0.74519736", "0.7378824", "0.737828", "0.7336636", "0.73179305", "0.730054", "0.7287956", "0.7278766", "0.7198497", "0.7196491", "0.7195291", "0.71715146", "0.7161452", "0.713207", "0.71221864", "0.71221864", "0.7118341", "0.7083316", "0.707675", "0.7059113", "0.7045936", "0.7041707", "0.7030038", "0.70250446", "0.7019885", "0.70027924", "0.70024323", "0.69845265", "0.6968584", "0.69682026", "0.69640833", "0.69580775", "0.69436944", "0.6931919", "0.6924304", "0.6922085", "0.6911729", "0.6900623", "0.6892693", "0.6892693", "0.68855345", "0.6883634", "0.6878967", "0.68778235", "0.6868294", "0.6867842", "0.68549037", "0.68454975", "0.68338263", "0.6832125", "0.6825559", "0.68139136", "0.68133813", "0.67937154", "0.679027", "0.678774", "0.6774545", "0.67666155", "0.6764749", "0.67433333", "0.6741625", "0.6738295", "0.6735753", "0.67309016", "0.67292935", "0.67291087", "0.67286557", "0.6722612", "0.6720613", "0.67204285", "0.6716604", "0.67096746", "0.67070144", "0.6695357", "0.6685814", "0.6680827", "0.6680078", "0.6678009", "0.66628236", "0.6653058", "0.6644147", "0.6638062", "0.66362363", "0.66349936", "0.6619408", "0.66182965", "0.65971494", "0.6579248", "0.6579248", "0.6579248", "0.6579248", "0.6578794", "0.6573711", "0.6567094", "0.65647817", "0.6564665", "0.6559127" ]
0.66449004
83
returns the results in an array object
public function fetch_array($results) { return mysqli_fetch_array($results); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function results(): array;", "public function result() : array;", "public function getResult(): array;", "public function getResult(): array;", "public function resultToArray() {\n $array = array();\n\n if (is_array($this->_result)) {\n foreach ($this->_result as $res) {\n if (is_array($res)) {\n $array[] = $res;\n } else {\n $array[] = $this->fromObjectToArray($res);\n }\n }\n } else {\n $array[] = $this->fromObjectToArray($this->_result);\n }\n\n return $array;\n }", "public function results()\n {\n //by default data get as array/stdclasses\n\n // to trunit to arrays of arrays\n // return json_decode(json_encode($this->_results), true);\n return $this->_results;\n // gives array data with column name and itsvalue not index array\n }", "public function getResult()\n {\n return array();\n }", "public function get_result_arr()\n {\n return $this->result_object;\n }", "public function resultArray() {\n return $this->result_array;\n }", "public function getResultArray() : ?array{\n return $this->results;\n }", "public function getResults(): array {\n return $this->results;\n }", "public function getResults(): array\n {\n return $this->results;\n }", "public function result_array()\n {\n $output = array();\n\n if (is_bool($this->result))\n {\n return $output;\n }\n\n while ($row = $this->result->fetch_assoc())\n {\n $output[] = $row;\n }\n\n $this->free_result();\n\n return $output;\n }", "function results()\r\n {\r\n $result = array();\r\n if(!$this->res_id)\r\n {\r\n $this->error_msg = \"Could not execute query to $this->db_name database, wrong result id\";\r\n return 0;\r\n }\r\n while($row = mysql_fetch_object($this->res_id))\r\n {\r\n array_push($result, $row);\r\n }\r\n return $result;\r\n }", "protected function initializeResultArray() {}", "public function getResults();", "public abstract function getResults();", "public function getResult()\n {\n return $this->toArray();\n }", "public function getResult() : array\n {\n $result = [];\n foreach ($this->input as $key => $data) {\n $result[$key] = $data['data'];\n }\n return $result;\n }", "private function _getData():array {\n\n # Set result\n $result = [];\n\n # Return result\n return $result;\n\n }", "function result_to_array($results) {\n $items = [];\n while ($item = mysqli_fetch_array($results)) {\n $items[] = $item;\n }\n return $items; \n }", "public function getResult():array {\n\n # Return value\n return $this->values;\n\n }", "public function getAsArray();", "public function getResults()\n {\n if (self::RESULT_JSON != $this->resultFormat) {\n throw new \\BadMethodCallException(\"Cannot call '\" . __METHOD__ . \"' when using Array\");\n }\n\n return $this->results;\n }", "public function fetchResults(){\n $resultsValues = $this->data;\n return $resultsValues;\n }", "function obtenerArray(){\r\n\t\treturn mysql_fetch_array( $this->rs() );\r\n\t}", "public static function as_object_array($result) {\n\t\t$output = array();\n foreach ($result as $r) {\n $output[] = $r->as_array();\n }\n return $output;\n }", "public function getAllResult() {\n $rowsArray = array();\n while($row = mysql_fetch_array($this->result)) {\n $rowsArray[] = $row;\n }\n return $rowsArray;\n }", "public function Results(){\r\n\t\treturn self::get_results();\r\n\t}", "public function result_array()\n\t{\n\t\tif (count($this->result_array) > 0)\n\t\t{\n\t\t\treturn $this->result_array;\n\t\t}\n\t\telseif (count($this->result_object) > 0)\n\t\t{\n\t\t\tfor ($i = 0, $c = count($this->result_object); $i < $c; $i++)\n\t\t\t{\n\t\t\t\t$this->result_array[$i] = (array) $this->result_object[$i];\n\t\t\t}\n\n\t\t\treturn $this->result_array;\n\t\t}\n\t\telseif (is_array($this->row_data))\n\t\t{\n\t\t\tif (count($this->row_data) === 0)\n\t\t\t{\n\t\t\t\treturn $this->result_array;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$row_index = count($this->row_data);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$row_index = 0;\n\t\t\t$this->row_data = array();\n\t\t}\n\n\t\t$row = NULL;\n\t\twhile ($row = $this->_fetch_assoc())\n\t\t{\n\t\t\t$this->row_data[$row_index++] = $row;\n\t\t}\n\n\t\t// Un-comment the following line, in case it becomes needed\n\t\t// $this->_data_seek();\n\t\treturn $this->result_array = $this->row_data;\n\t}", "public function fetch_array()\n\t{\n\t\t$array = array();\n\t\tif (current($this->result)) {\n\t\t\tforeach (current($this->result) AS $value) {\n\t\t\t\t$array[] = $value;\n\t\t\t}\n\t\t\tforeach (current($this->result) AS $key => $value) {\n\t\t\t\t$array[$key] = $value;\n\t\t\t}\n\t\t}else {\n\t\t\t$array = FALSE;\n\t\t}\n\t\tnext($this->result);\n\t\treturn $array;\n\t}", "public function return_results_objects($result){\n\n $objectsArr = [];\n foreach($result as $result){\n $obj = new $this->model();\n $obj->populate_object_data($result);\n $objectsArr[] = $obj;\n }\n\n return $objectsArr;\n\n }", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "private function resultToArray($res) {\r\n\r\n $lista = array();\r\n $i = 0;\r\n\r\n\t\t\tif($this->response) {\r\n\r\n\t while ($fila = mysql_fetch_assoc($this->response)) {\r\n\t $lista[$i] = $fila;\r\n\t $i = $i + 1;\r\n\t }\r\n\r\n\t\t\t}\r\n\r\n return $lista;\r\n\r\n }", "public function showResults(): array\n {\n return [\n 'result' => $this->result,\n 'resultCount' => count($this->result),\n ];\n }", "public function results($sql){\n\t\t\tif (!empty($sql['output'])){\n\t\t\t\tif ($sql['output'] == \"array\" || $sql['output'] == \"object\"){\n\t\t\t\t\t$type = $sql['output'];\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$type = \"array\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$type = \"array\";\n\t\t\t}\n\n\t\t\t$args = func_get_args();\n\t\t\tarray_shift($args);\n\n\t\t\tif (isset($args[0]) and is_array($args[0])){\n\t\t\t\t$args = $args[0];\n\t\t\t}\n\n\t\t\t$result = $this->run_query($sql,$args);\n\t\n\t\t\t$return = array();\n\n\t\t\twhile ($row = mysqli_fetch_assoc($result)){\n\t\t\t\tif ($type == \"array\"){\n\t\t\t\t\t$return[] = $row;\n\t\t\t\t}\n\t\t\t\tif ($type == \"object\"){\n\t\t\t\t\t$return[] = (object) $row;\n\t\t\t\t}\t\t\t\n\t\t\t}\n\n\t\t\tif ($result){\n\t\t\t\tif ($type == \"array\"){\n\t\t\t\t\treturn $return;\n\t\t\t\t}\n\t\t\t\tif ($type == \"object\"){\n\t\t\t\t\treturn (object) $return;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function results(){\n return $this->_result;\n }", "public function getResults()\n\t{\n\t\t# code...\n\t\treturn $this->results;\n\t}", "function db_result_to_array($result){\n\t\t\t\t\t\t\t$res_array = array();\n\n\t\t\t\t\t\t\tfor($count=0; $row= @mysql_fetch_array($result); $count++)\n\t\t\t\t\t\t\t\t$res_array[$count] = $row;\n\t\t\t\t\t\t\treturn $res_array;\n\t\t\t\t\t\t}", "function getResult() {\n $rows = array();\n while ($row = mysqli_fetch_assoc($this->theResult)) {\n $rows[] = $row;\n }\n return $rows;\n }", "function getResultArray($sql) {\n require_once(\"Y_DB_MySQL.class.php\");\n $db = new My();\n $array = array();\n $db->Query($sql);\n \n while ($db->NextRecord()) {\n array_push($array, $db->Record);\n }\n \n $db->Close();\n return $array;\n }", "function toArray() ;", "function toArray() ;", "public function AsArray();", "abstract public function getResults(): mixed;", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "private function getObjByResult($result){ \n //verifica tamanho do array\n if(count($result)>1){ \n $objects=array(); \n foreach ($result as $k => $v){ \n $objects[$k]=$this->getObjByRow($result[$k]);\n }\n return $objects;\n }\n else{ \n return array($this->getObjByRow($result[0]));\n }\n }", "function resultToArray($result) {\n\t\t$rows = array();\n\t\twhile($row = $result->fetch_assoc()) {\n\t\t\t$rows[] = $row;\n\t\t}\n\t\treturn $rows;\n\t}", "public function results() {\n\t\treturn $this->results;\n\t}", "abstract public function getArray();", "public function getResults()\n {\n return $this->get ();\n }", "function returnArrays()\r\n\t\t{\r\n\t\tif (mysql_num_rows($this->result) > 0)\r\n\t\t\t{\r\n\t\t\twhile($row=mysql_fetch_assoc($this->result))\r\n\t\t\t\t{\r\n\t\t\t\t$arrays[]=$row;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\treturn $arrays;\r\n\t\t}", "function resultToArray($result) {\n $rows = array();\n while($row = $result->fetch_assoc()) {\n $rows[] = $row;\n }\n return $rows;\n }", "public function results()\n\t{\n\t\t// using any existing $resource, process the results into a stdClass object:\n\t\t$out = array();\n\n\t\t// if the resource exists, proceed:\n\t\tif (isset(self::$resource))\n\t\t{\n\t\t\t// loop through the results and add them to the object:\n\t\t\twhile ($row = mysql_fetch_assoc(self::$resource))\n\t\t\t{\n\t\t\t\t$out[] = (object)$row;\n\t\t\t}\n\t\t}\n\n\t\t// return $out as an object:\n\t\treturn (object)$out;\n\t}", "public function toArray(): array\n {\n return (array) $this->result();\n }", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();" ]
[ "0.85386854", "0.8094445", "0.7960147", "0.7960147", "0.7736405", "0.77341837", "0.7731637", "0.7723116", "0.7711215", "0.7566526", "0.7496674", "0.74563175", "0.7449519", "0.74096084", "0.7371655", "0.7347912", "0.7288262", "0.728137", "0.7226118", "0.72102714", "0.71984553", "0.71822065", "0.71749884", "0.7174713", "0.7143532", "0.7137958", "0.7134361", "0.71243817", "0.7102806", "0.7091573", "0.70686585", "0.7067081", "0.70499605", "0.70499605", "0.70499605", "0.70499605", "0.70499605", "0.70499605", "0.70475376", "0.70199007", "0.70074636", "0.699661", "0.6986823", "0.6972878", "0.69681853", "0.695155", "0.6945873", "0.6945873", "0.69420505", "0.6925633", "0.6921823", "0.6921823", "0.6921823", "0.6921823", "0.69204396", "0.69204396", "0.69204396", "0.69204396", "0.69204396", "0.69204396", "0.69204396", "0.69204396", "0.69204396", "0.69204396", "0.691963", "0.691963", "0.69193137", "0.69149935", "0.6914582", "0.69129705", "0.6909009", "0.6906726", "0.69055086", "0.6883557", "0.6882751", "0.68763536", "0.68763536", "0.68763536", "0.68763536", "0.68763536", "0.68763536", "0.68763536", "0.68763536", "0.68763536", "0.68763536", "0.68763536", "0.68763536", "0.68763536", "0.68763536", "0.68763536", "0.68763536", "0.68763536", "0.68763536", "0.68763536", "0.68763536", "0.68763536", "0.68763536", "0.68763536", "0.68763536", "0.68763536", "0.68763536" ]
0.0
-1
does the query and returns the top of the stack of returns
public function query_and_fetch_one($sql="") { $rows = $this->query_and_fetch($sql); return ($rows) ? array_shift($rows) : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function top();", "public function get_top($args) {\n $payload = [];\n if (isset($args['q'])) $payload = $this->queries->get_query($args['q'], $payload);\n if (isset($args['sources'])) $payload = $this->queries->get_sources($args['sources'], $payload);\n if (isset($args['language'])) $payload = $this->queries->get_language($args['language'], $payload);\n if (isset($args['country'])) $payload = $this->queries->get_country($args['country'], $payload);\n if (isset($args['pageSize'])) $payload = $this->queries->get_page_size($args['pageSize'], $payload);\n if (isset($args['page'])) $payload = $this->queries->get_page_count($args['page'], $payload);\n return $this->queries->connect($this->queries->constants->urls['top'], $payload, $this->api_key);\n }", "function db_query_first($sql, $args=array()) {\n $sth = db_query($sql, $args);\n $row = $sth->fetch(PDO::FETCH_BOTH);\n $sth->closeCursor();\n return $row ? $row : NULL;\n}", "public function showPreviousQuery(){\n\n\t\t\treturn $this->lastQuery;\n\t\t}", "public function top()\n {\n }", "function query() {}", "function query_first($sfConn, $queryFields, $querySource, $queryMatch)\n {\n\t\techo(\"<P> query_first: \" . $queryFields . \" Source: \" . $querySource . \" Match?: \" . $queryMatch . \"<P>\");\n try\n {\n // The query process\n if (empty($queryMatch))\n\t\t\t\t{ \n\t\t\t\t$querysf = \"select \" . $queryFields . \" FROM \" . $querySource;\n\t\t\t\techo(\"<P> No WHERE: <P> \" . $querysf . \"<P>\");\n\t\t\t\t$queryResults = $sfConn->query($querysf);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t$querysf = \"select \" . $queryFields . \" FROM \" . $querySource . \" WHERE \" . $queryMatch;\n\t\t\t\techo(\"<P> WHERE: <P> \" . $querysf . \"<P>\");\n\t\t\t\t$queryResults = $sfConn->query($querysf);\n\t\t\t\t}\n\n\t\t $queryResultsf = new QueryResult($queryResults);\n\t\t $recordsf = $queryResultsf->records[0];\n\t\t\t $recnums = $queryResultsf->size;\n\n\t\t\tif ($queryResultsf->size > 0)\n\t\t\t\t{\n\t\t\t\techo(\"<P> Query results size: \" . $queryResultsf->size . \" <P>\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo(\"<P> Query results size = 0 \" . $queryResultsf->size . \" <P>\");\n\t\t\t\t}\n\t\t\t gprint();\n\t\t\t gprint();\n\t\t\t gprint (\"the contents of queryResult are \" . print_r($queryResults));\n\t\t\t\tgprint (\"the contents of queryResultsf are \" . print_r($queryResultsf));\n\n // Put the result counts into an array to pass back as the result.\n $successful = array();\n array_push($successful, $queryResultsf);\n return $successful;\n exit;\n }\n\n catch (exception $e)\n {\n // This is reached if there is a major problem in the data or with\n // the salesforce.com connection. Normal data errors are caught by\n // salesforce.com\n\t\t\techo(\"<P> Major SalesForce error <P>\");\n echo $e->GetMessage();\n return false;\n exit;\n }\n \n }", "function AddTopDB2($strSQL, $n)\n{\t\n\treturn $strSQL.\" fetch first \".$n.\" rows only\";\n}", "abstract public function\r\n\t\tget_query_for_something();", "public function top() {\n return current($this->stack);\n }", "public function getTop();", "public function top()\n {\n return current($this->stack);\n }", "public function top()\n {\n return current($this->stack);\n }", "function rank_top_sql() {\n Debug::Oblast('RANKADMIN_SQL');\n // TODO: nazov / server_name zistovat neskor z amxid -> serverid -> nazov\n // Ak vysledny pocet viac ako 1 -> Admin na viacerych serveroch\n $sqltxt = \"\n SELECT DISTINCT user_id, user_name, user_avatar, vip, slot, `sb`.`nazov`, \n \";\n $sqltxt .= hlasovanie_sql_head();\n // TODO: Tu maju byt vsade len JOIN, ale kedze admini a fusion_user neje synchronizovane\n // WARNING: Pri admin servers nemoze byt LIMIT 1 lebo nahodou vytiahne to kde nic nieje\n $sqltxt .= \" FROM `phpbanlist`.`amx6_amxadmins` a\n \tJOIN ( SELECT user_name, user_id, user_avatar, vip, slot, amxid, cs_meno FROM `cstrike`.`fusion_users` ) u\n ON a.id = u.amxid\n JOIN ( SELECT admin_id, server_id FROM `phpbanlist`.`amx6_admins_servers` ) sa\n on `a`.`id` = `sa`.`admin_id` \n JOIN ( SELECT amx, nazov FROM `cstrike`.`servers` LIMIT 1 ) sb\n on `sa`.`server_id` = `sb`.`amx`\n \";\n $sqltxt .= hlasovanie_sql_body();\n $sqltxt .= \" ORDER BY znamka DESC LIMIT 3\";\n $sql = DB::Query($sqltxt);\n Debug::Oblast('RANKADMIN_SQL');\n //echo $sqltxt;\n return $sql;\n}", "function sql_query($query) {\n\t\t// Added to log select queries\n\t\tforeach($this->preProcessHookObjects as $preProcessHookObject) { /* @var $preProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPreProcessHookInterface */\n\t\t\t$preProcessHookObject->sql_query_preProcessAction($query);\n\t\t}\n\n\t\t$pointer = parent::sql_query($query);\n\n\t\t// Added to log select queries\n\t\tforeach($this->postProcessHookObjects as $postProcessHookObject) { /* @var $postProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPostProcessHookInterface */\n\t\t\t$postProcessHookObject->sql_query_postProcessAction($query);\n\t\t}\n\n\t\treturn $pointer;\n\t}", "function sql_query($query) {\n\t\t// Added to log select queries\n\t\tforeach($this->preProcessHookObjects as $preProcessHookObject) { /* @var $preProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPreProcessHookInterface */\n\t\t\t$preProcessHookObject->sql_query_preProcessAction($query);\n\t\t}\n\n\t\t$pointer = parent::sql_query($query);\n\n\t\t// Added to log select queries\n\t\tforeach($this->postProcessHookObjects as $postProcessHookObject) { /* @var $postProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPostProcessHookInterface */\n\t\t\t$postProcessHookObject->sql_query_postProcessAction($query);\n\t\t}\n\n\t\treturn $pointer;\n\t}", "public function query_fetchlist()\n {\n if (($this->mode > 0) and is_array($this->sql_query_list)) {\n $this->sql_query_list = $this->sort_array_by_col($this->sql_query_list);\n foreach ($this->sql_query_list as $debug_query) {\n $sql_query_debug .= debug::row_double(sprintf(\"<b>%8.4f ms</b>\", $debug_query[0]), $debug_query[1]);\n if (!($debug_query[2]==\"\")) {\n $sql_query_debug .= debug::row_double(\"\", \"<span style=\\\"color:red\\\"><b>Error : \".$debug_query[2].\"</b></span>\");\n }\n }\n return $sql_query_debug;\n }\n }", "public abstract function get_query();", "public function Query(){\r\n\t\treturn self::get_query();\r\n\t}", "function getTopTrending($connection){\n $query = \"SELECT ft.*,fs.student_name AS trendingName,fs.student_profile AS trendingProfile FROM forum_trending ft LEFT JOIN forum_student fs on ft.user_id=fs.id ORDER BY coins DESC LIMIT 10\";\n //echo $query;\n $result = $connection->query($query);\n return $result;\n }", "public function queryFirst($query_string, $param = null) {\r\n\t$stmt = $this->query($query_string, $param);\r\n// echo $this->lastQuery;\r\n// var_dump($this->lastParams);\r\n\t$out = $this->fetch($stmt);\r\n\t$this->free_result($stmt);\r\n\treturn $out;\r\n }", "public static function query();", "private function query() {\n return ApplicationSql::query($this->_select, $this->_table, $this->_join, $this->_where, $this->_order, $this->_group, $this->_limit, $this->_offset);\n }", "public function getTopRow() {\n\t\treturn $this->_result->fetch_array();\n\t}", "function db_query($query,$exit=0) {\r\n\r\n\tif ($exit) {\r\n\t\t\r\n\t\techo $query;\r\n\t\texit;\r\n\t\t\r\n\t} else {\r\n\t\r\n\t\t$rc = @mysql_query($query);\r\n\t\t\r\n\t\tif ($rc) return $rc;\r\n\t\telse {\r\n\t\t\r\n\t\t\techo $query;\r\n\t\t\texit;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n}", "function query( $query ){\r\n\t\t\r\n\t\tif( ( $query || $query=$this->query ) && !isset( $this->result[$query] ) ){\r\n\t\t\tif( $this->result[$query] = mysql_query( $query, $this->link ) ){\t\r\n\t\t\t\tmysql::$nquery++;\r\n\t\t\t\treturn $this->result[ $this->query = $query ];\r\n\t\t\t}\r\n\t\t\telse{\r\n \t\ttrigger_error( mysql_error($this->link) . \"<br/><font color=\\\"red\\\">$query</font><br/>\", E_USER_ERROR );\r\n \t\t// if debug mode on query error stop the execution\r\n\t \tif( isset($GLOBALS['debug']) && $GLOBALS['debug'] == true )\r\n\t\t \texit;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn $this->result[ $query ];\r\n\t}", "function _topNode () {\r\n $args = func_get_args ();\r\n if (!count ($args)) {\r\n return; // oops?\r\n }\r\n $method = array_shift ($args);\r\n $stack_count = count ($this->_stack);\r\n $method = array (&$this->_stack[$stack_count-1], $method);\r\n if (!is_callable ($method)) {\r\n return; // oops?\r\n }\r\n return call_user_func_array ($method, $args);\r\n }", "public function getTop()\n\t{\n\t\treturn $this->stackArray[0]??null;\n\t}", "public function insertAtTop()\n {\n return $this->insertAtRank(1);\n }", "function query_more($sfConn, $queryLocator)\n {\n\t\techo(\"<P> query_more <P>\");\n try\n {\n // The query process\n\t\techo(\"<P> Query more <P>\");\necho(\"<P> QUERYLOCATOR, call!!! \" . \t$queryLocator . \" !! \" . \"<P>\");\n\t\t$queryResults = $sfConn->queryMore($queryLocator);\n\t\t\t\n // Put the result counts into an array to pass back as the result.\n $successful = array();\n array_push($successful, $queryResults);\n return $successful;\n exit;\n }\n\n catch (exception $e)\n {\n // This is reached if there is a major problem in the data or with\n // the salesforce.com connection. Normal data errors are caught by\n // salesforce.com\n\t\t\techo(\"<P> Major SalesForce error <P>\");\n echo $e->GetMessage();\n return false;\n exit;\n }\n \n }", "function find_prior_customer_process($c,$qaction,$user,$pass,$conn,$db)\n{\n $out=array();\n \n $link = mssql_connect($conn, $user, $pass);\n\n if (!$link)\n {\n die('Error! Unable to connect to database! ('. __LINE__ .')');\n }\n \n $dselect= mssql_select_db($db, $link);\n \n if (!$dselect)\n {\n die('Error! Unable to select database! ('. __LINE__ .')');\n }\n \n //$action_map=action_map($qaction);\n\n $qry = mssql_query(\"select [quickbooks_queue_id],[qb_status],[msg] from [quickbooks_queue] where qb_action='\". trim($qaction) .\"' and [ident]=\". $c .\";\");\n $row = mssql_fetch_array($qry);\n $nrow = mssql_num_rows($qry);\n \n if ($nrow > 0)\n {\n if ($row['qb_status']=='s')\n {\n $qry1 = mssql_query(\"select [quickbooks_ident_id],[qb_ident],[map_datetime] from [quickbooks_ident] where qb_object='\". action_map($qaction) .\"' and [unique_id]=\". $c .\";\");\n $row1 = mssql_fetch_array($qry1);\n $nrow1 = mssql_num_rows($qry1);\n \n if ($nrow1 > 0)\n {\n return $out=array(true,$row['quickbooks_queue_id'],$row['qb_status'],$row1['qb_ident']);\n }\n else\n {\n return $out=array(false,$row['quickbooks_queue_id'],$row['qb_status'],'QB ListID Error');\n }\n }\n else\n {\n return $out=array(false,$row['quickbooks_queue_id'],$row['qb_status'],$row['msg']);\n }\n }\n else\n {\n return $out=array(false,'','','Process Not Found');\n }\n}", "public function query()\n\t{\n\t\t\n\t}", "public function first(){\n $this->execute();\n if(count($this->results) > 0){\n return current($this->results);\n } else {\n return null;\n }\n }", "public function fetchDataFront()\n\t{\n\t\t$this->db->order_by($this->id,$this->order);\n\t\t$this->db->limit(1);\n\t\treturn $this->db->get($this->table)->result();\n\t}", "function runQuery()\r\n\t\t{\r\n\t\tif(!$this->conn)\r\n\t\t\t{\r\n\t\t\t$this->createConnect();\r\n\t\t\t}\r\n\t\tif($this->query)\r\n\t\t\t{\r\n\t\t\t$this->errors=\"\";\r\n\t\t\t$this->query.=\";\";\r\n\t\t\t$this->result = mysql_query($this->query);\r\n\t\t\tif(mysql_affected_rows()>=0)\r\n\t\t\t\t{\r\n\t\t\t\tunset($this->query);\r\n\t\t\t\t}\r\n\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\techo \"<br>Error:<br>\";\r\n\t\t\t\t$debugging=debug_backtrace();\r\n\t\t\t\tforeach ($debugging as $debug)\r\n\t\t\t\t\t{\r\n\t\t\t\t\techo \"<b>File :</b> \".$debug[\"file\"].\"<br />\";\r\n\t\t\t\t\techo \"<b>Line :</b> \".$debug[\"line\"].\"<br />\";\r\n\t\t\t\t\techo \"<b>Function :</b> \".$debug[\"function\"].\"<br />\";\r\n\t\t\t\t\techo \"<b>Cause :</b> \".mysql_error().\"<br />\";\r\n\t\t\t\t\t}\r\n\t\t\t\techo \"<b>Query :</b> \".$this->query.\"<hr>\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\telse\r\n\t\t\t{\r\n\t\t\techo \"<br>-- NULL Query --\";\r\n\t\t\t}\r\n\t\tif (!is_resource($this->result))\r\n\t\t\t{\r\n\t\t\t$this->errors=mysql_error();\r\n\t\t\tif($this->transaction)\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->transaction=FALSE;\r\n\t\t\t\t\t$this->query=\"ROLLBACK TRANSACTION\";\r\n\t\t\t\t\t$this->runQuery();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public function execute()\n {\n \tif ( $this->cur_query != \"\" )\n \t{\n \t\t$res = $this->query( $this->cur_query );\n \t}\n \t\n \t$this->cur_query \t= \"\";\n \t$this->is_shutdown \t= false;\n\n \treturn $res;\n }", "public function _query()\n {\n }", "function find_by_sql($sql)\n{\n global $db;\n $result = $db->query($sql);\n $result_set = $db->while_loop($result);\n return $result_set;\n}", "function find_by_sql($sql)\n{\n global $db;\n $result = $db->query($sql);\n $result_set = $db->while_loop($result);\n return $result_set;\n}", "public function first()\n {\n $sql = $this->get() . ' LIMIT 1';\n $this->query = $sql;\n }", "abstract public function query();", "function queries_run(){\n\t\tglobal $database_sql_queries;\n\t\treturn($database_sql_queries);\n\t}", "protected function get_query($sql) {\n $this->open_link();\n $result = $this->conx->query($sql);\n while ($this->rows[] = $result->fetch_assoc());\n $result->free();\n $this->close_link();\n array_pop($this->rows);\n \n return $this->rows[0];\n }", "public function peek() {\r\n\t\treturn $this->stack[count($this->stack)-1];\r\n\t}", "protected function queryMore()\n {\n $result = $this->client->queryMore($this->queryResult->getQueryLocator());\n $this->setQueryResult($result);\n $this->rewind();\n }", "private function preExe(){\n\t\t$pre = $this->prepare($this->_query);\n\t\t$pre->execute();\n\t\treturn $pre->fetchAll();\n\t}", "public function top(): ResponseInterface;", "public function askQuery(){\n try {\n // Sparql11query.g:78:3: ( ASK ( datasetClause )* whereClause ) \n // Sparql11query.g:79:3: ASK ( datasetClause )* whereClause \n {\n $this->match($this->input,$this->getToken('ASK'),self::$FOLLOW_ASK_in_askQuery293); \n // Sparql11query.g:79:7: ( datasetClause )* \n //loop13:\n do {\n $alt13=2;\n $LA13_0 = $this->input->LA(1);\n\n if ( ($LA13_0==$this->getToken('FROM')) ) {\n $alt13=1;\n }\n\n\n switch ($alt13) {\n \tcase 1 :\n \t // Sparql11query.g:79:7: datasetClause \n \t {\n \t $this->pushFollow(self::$FOLLOW_datasetClause_in_askQuery295);\n \t $this->datasetClause();\n\n \t $this->state->_fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop13;\n }\n } while (true);\n\n $this->pushFollow(self::$FOLLOW_whereClause_in_askQuery298);\n $this->whereClause();\n\n $this->state->_fsp--;\n\n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return ;\n }", "public function first(){\n\n //using the above (results) method here\n return $this->results()[0]; //depends on the version of your PHP server\n //return $this->results[0];\n }", "public function run(){\n $sql = $this->sql();\n return $this->query($sql,$this->args);\n }", "protected function fetchAdjacentGreater(){\r\n $query = static::prepareSQL(\r\n 'SELECT *\r\n FROM %table\r\n WHERE %orderby_col > ?\r\n AND parent_id = ?\r\n ORDER BY %orderby_col\r\n LIMIT 1'\r\n );\r\n\r\n $query->execute([$this->{$this->orderby}, $this->parent_id]);\r\n return $query->fetch();\r\n }", "function nextResult()\n {\n return $this->dbh->nextResult($this->result);\n }", "function get_row($query=null,$y=0) {\n\n\t\t\t// If there is a query then perform it if not then use cached results..\n\t\t\tif ( $query ) {\n\t\t\t\t$this->query($query);\n\t\t\t}\n\n\t\t\treturn $this->last_result[$y]?$this->last_result[$y]:null;\n\t\t}", "function query()\n\t{\n\t\treturn $this->query;\n\t}", "protected function get_results_from_query() \n\t\t{\n \t\t\t$this->open_connection();\n \t\t\t$result = $this->conn->query($this->query);\n \t\t\twhile ($this->rows[] = $result->fetch_assoc());\n \t\t\t$result->close();\n \t\t\t$this->close_connection();\n \t\t\tarray_pop($this->rows);\n\t\t}", "public function executeQuery() {\r\n\t\t$query = $this->query;\r\n\t\t$query->matching($query->logicalAnd($this->queryConstraints));\r\n//$parser = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Extbase\\\\Persistence\\\\Generic\\\\Storage\\\\Typo3DbQueryParser'); \r\n//$queryParts = $parser->parseQuery($query); \r\n//\\TYPO3\\CMS\\Core\\Utility\\DebugUtility::debug($queryParts, 'Query Content');\r\n\t\t$queryResult = $query->execute()->toArray();\r\n\t\t$this->setSelectedPageUids($queryResult);\r\n\t\t$this->resetQuery(); \r\n\t\treturn $queryResult;\r\n\t}", "function query() {\n }", "function kv_stock_top($limit = 10, $width = \"100\", $type = 0, &$pg = null)\n{\n $today = Today();\n if ($type == 2)\n $sec = 'SA_ASSETSANALYTIC';\n elseif ($type == 1)\n $sec = 'SA_WORKORDERANALYTIC';\n else\n $sec = 'SA_ITEMSTRANSVIEW';\n $begin = begin_fiscalyear();\n $begin1 = date2sql($begin);\n $today1 = date2sql($today);\n if ($type == 0) {\n\n $sql = \"SELECT SUM((trans.unit_price * trans.quantity) * d.rate) AS total, s.stock_id, s.description, \n SUM(trans.quantity) AS qty, SUM((s.material_cost + s.overhead_cost + s.labour_cost) * trans.quantity) AS costs FROM\n \" . TB_PREF . \"debtor_trans_details AS trans, \" . TB_PREF . \"stock_master AS s, \" . TB_PREF . \"debtor_trans AS d \n WHERE trans.stock_id=s.stock_id AND trans.debtor_trans_type=d.type AND trans.debtor_trans_no=d.trans_no\n AND (d.type = \" . ST_SALESINVOICE . \" OR d.type = \" . ST_CUSTCREDIT . \") \";\n } else {\n $sql = \"SELECT SUM(m.qty * (s.material_cost + s.labour_cost + s.overhead_cost)) AS total, s.stock_id, s.description, \n SUM(qty) AS qty FROM \" . TB_PREF . \"stock_master AS s, \" . TB_PREF . \"stock_moves AS m \n WHERE s.stock_id=m.stock_id \";\n if ($type == 1)\n $sql .= \"AND s.mb_flag='M' \";\n elseif ($type == 2)\n $sql .= \"AND s.mb_flag='F' \";\n }\n if ($type != 2)\n $sql .= \"AND tran_date >= '$begin1' \";\n $sql .= \"AND tran_date <= '$today1' GROUP by s.stock_id ORDER BY total DESC, s.stock_id \n LIMIT $limit\";\n $result = db_query($sql);\n\n if ($type == 0)\n $th = array(trans(\"Item\"), trans(\"Sales\"), trans(\"Costs\"), trans(\"Quantity\"));\n else\n $th = array(trans(\"Item\"), trans(\"Amount\"), trans(\"Quantity\"));\n //start_table(TABLESTYLE, \"width='$width%'\");\n echo '<table class=\"table table-hover\">\n <thead class=\"text-warning\">\n <tr><th>Item</th> <th style=\"text-align:right\">Sales</th> <th style=\"text-align:right\">Costs</th> <th style=\"text-align:right\">Quantity</th>\n </tr> </thead>';\n\n //table_header($th);\n\n $k = 0; //row colour counter\n $i = 0;\n while ($myrow = db_fetch($result)) {\n alt_table_row_color($k);\n $name = $myrow[\"description\"];\n label_cell($name);\n amount_cell($myrow['total']);\n if ($type == 0)\n amount_cell($myrow['costs']);\n qty_cell($myrow['qty']);\n if ($pg != NULL) {\n $pg->x[$i] = $name;\n $pg->y[$i] = $myrow['total'];\n if ($type == 0)\n $pg->z[$i] = $myrow['costs'];\n }\n $i++;\n end_row();\n }\n end_table(1);\n\n}", "protected function get_result_from_query(){\n\t\t$this ->open_connection();\n\t\t$result = $this -> conn -> query($this -> query);\n\t\twhile($this -> rows[] = $result ->fetch_assoc());\n\t\t$result -> close();\n\t\t$this -> close_connection();\n\t\tarray_pop($this -> rows); // Extraé y devuelve el último valor\n\t}", "function query($sql,$calculateRows=false,$fastHint=false);", "protected function fetchAdjacentLesser(){\r\n $query = static::prepareSQL(\r\n 'SELECT *\r\n FROM %table\r\n WHERE %orderby_col < ?\r\n AND parent_id = ?\r\n ORDER BY %orderby_col DESC\r\n LIMIT 1'\r\n );\r\n\r\n $query->execute([$this->{$this->orderby}, $this->parent_id]);\r\n return $query->fetch();\r\n }", "public function paging(){\n\t\t$sql = \"SELECT * FROM berita\";\n\t\t$query = $this->db->query($sql) or die ($this->db->error);\n\t\treturn $query;\n\t}", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function first(){\n // return $this->_results[0];\n return $this->results()[0];\n }", "public function get_query_result()\n\t{\n\t\t$sql = \"select * from test_db\";\n\t\t$query = $this->db->query($sql);\n\n\t\t//Complete array result\n\t\t$result = $query->result_array();\n\n\t\t//result of first row\n\t\t$firsts_row = $query->first_row();\n\t}", "public function getTopTen(){\n $result=$this->con->query(\"SELECT firstname, lastname, score FROM user ORDER BY score DESC LIMIT 10;\");\n \n return $result;\n \n \n}", "function yy_r87(){ $this->_retvalue = new Stmt\\Expr(\"ASC\", $this->yystack[$this->yyidx + 0]->minor); }", "function AddTop($strSQL, $n)\n{\n\t$tstr = strtoupper($strSQL);\n\t$ind1 = strpos($tstr,\"SELECT\");\n\treturn substr($strSQL,0,$ind1+6).\" top \".$n.\" \".substr($strSQL,$ind1+6);\n}", "public function quack();", "function __query( &$q ){\n\t\t// esperando o $db->end();\n\t\tif( $this->smart_rollback ){\n\t\t\treturn false;\n\n\t\t}else if( $this->_has_validation_error ){\n\t\t\t// if( $this->_first_query_with_error ){\n\t\t\t// \t$this->_first_query_with_error = false;\n\t\t\t// \t$this->last_return = false;\n\t\t\t// \treturn false;\n\t\t\t// }\n\t\t\tif( $this->transaction_count ){\n\t\t\t\t$this->last_return = false;\n\t\t\t return false;\n\t\t\t}\n\t\t\t$this->_has_validation_error = false;\n\n\n\t\t\t// se for difserente de rollback, algo estah erradoVV\n\t\t}else{\n\t\t\t$this->validation_errors = false;\n\t\t}\n\t\tif( $this->echo_queries ){\n\t\t\tif( $this->echo_queries === DB::PLAIN_TEXT )\n\t\t\t\techo $q;\n\t\t\telse\n\t\t\t\techo strtr($q,array('>'=>'&gt;','<'=>'&lt;','&'=>'&amp;')).'<br/>';\n\t\t}\n\t\tif( $this->mode === DB::POSTGRESQL ){\n\t\t\t$r = pg_query( $this->link, $q );\n\t\t}elseif( $this->mode === DB::MYSQLI ){\n\t\t\t$r = $this->link->query( $q );\n\t\t}else{\n\t\t\t$r = mysql_query( $q, $this->link );\n\t\t}\n\n\t\t$err;\n\t\tif( $this->mode === DB::POSTGRESQL )\n\t\t\t$err = pg_last_error($this->link);\n\t\telseif( $this->mode === DB::MYSQLI )\n\t\t\t$err = $this->link->errno;\n\t\telse\n\t\t\t$err = mysql_errno($this->link);\n\n\t\tif( $err and $this->transaction_count ){\n\t\t\tif( $this->mode === DB::MYSQLI ){\n\t\t\t\t$this->trans_error = $this->link->errno;\n\t\t\t\t$this->trans_errno = $err;\n\t\t\t}elseif( $this->mode === DB::MYSQL ){\n\t\t\t\t$this->trans_error = mysql_errno($this->link);\n\t\t\t\t$this->trans_errno = $err;\n\t\t\t}\n\t\t\t$this->_query('ROLLBACK');\n\t\t\t$this->smart_rollback = true;\n\t\t\t$this->last_return = false;\n\t\t\treturn false;\n\t\t}\n\n\t\tif( $err ){\n\t\t\t$this->fire_error( \"<strong>The data base return an error: </strong>\".\n\t\t\t\t$this->db_error() );\n\t\t\t$this->last_return = false;\n\t\t\treturn false;\n\t\t}\n\t\tif( $r === true ){\n\t\t\t$this->last_return = true;\n\t\t\treturn true;\n\t\t}\n\t\t$this->last_return = 2;\n\t\treturn new DB_Result( $r, $this->link, $this->mode );\n\t}", "function lastQuery() {\n\t\treturn $this->lastQuery;\n\t}", "function query($slt, $table, $where=false)\n\t{\n\t\t//echo \"<br>\";\n\t\treturn mysql_query(\"select \".$slt.\" from \".$table.\" where \".$where);\n\t}", "static function getLastQuery()\r\n {\r\n return $_SESSION[\"last_query\"];\r\n }", "function get_action($dbc) {\n\t#Create a query to get all previous transactions. It orders by descending to show the newest first in the history table.\n\t$query = \"SELECT id, bid, char_name, buyer_name, update_date FROM action ORDER BY id DESC\" ;\n\t$results = mysqli_query( $dbc , $query ) ;\n\tcheck_results($results) ;\n\tif( $results )\n\t{\n\t\tif($results->num_rows === 0){ //There *can* be nothing in action, unlike smash. If that's the case, just return a -1.\n\t\t\tmysqli_free_result( $results ) ;\n\t\t\treturn -1;\n\t\t}\n\t\t$rowarr=array();\n\t\twhile ( $row = mysqli_fetch_array( $results , MYSQLI_ASSOC ) ){\n\t\t\tarray_push($rowarr, $row);\n\t\t}\n \t\tmysqli_free_result( $results ) ;\n\t\treturn $rowarr;\n }\n}", "function GetTopLevel( $spr, $level, $lang_id=NULL )\n {\n $db = DBs::getInstance();\n if( empty($lang_id) ) $lang_id = $this->lang_id;\n $q = \"SELECT * FROM `\".$spr.\"` WHERE `cod`='\".$level.\"'\";\n if( !empty($lang_id) ) $q = $q.\" AND `lang_id`='\".$lang_id.\"'\";\n $q = $q.\" GROUP BY `cod`\";\n $res = $db->db_Query( $q );\n //echo '<br> $q='.$q.' $res='.$res.' $db->result='.$db->result;\n if( !$res OR !$db->result )return false;\n $row = $db->db_FetchAssoc();\n return $row;\n }", "function get_previous_page(){\n\t\t$query = \"SELECT * FROM \" . Database::$table . \" ORDER BY timestamp DESC LIMIT 1\";\n\t\treturn Database::get_all_results($query);\n\t}", "public function execute() {\n\n // Add convenience tag to mark that this is an extended query. We have to\n // do this in the constructor to ensure that it is set before preExecute()\n // gets called.\n if (!$this->preExecute($this)) {\n return NULL;\n }\n\n // A NULL limit is the \"kill switch\" for pager queries.\n if (empty($this->limit)) {\n return;\n }\n $this->ensureElement();\n\n $total_items = $this->getCountQuery()->execute()->fetchField();\n $current_page = pager_default_initialize($total_items, $this->limit, $this->element);\n $this->range($current_page * $this->limit, $this->limit);\n\n // Now that we've added our pager-based range instructions, run the query normally.\n return $this->query->execute();\n }", "function GetQueryV ( $cSQL )\n{\n $rows = $this->_db->getAll($cSQL,null,DB_FETCHMODE_ASSOC);\n if ( DB::isError($rows) ) {\n $this->_ERROR_(\"SQL('$cSQL') -> \".$rows->getMessage(),$this->_DebugMode);\n return null;\n }\n//!!echo \"<br/>GetQueryV('$cSQL')<br/>\"; var_dump($rows);\n return $rows;\n}", "function process_query_index( $query )\n\t{\n\t\treturn $query;\n\t}", "public function Query(){\n\t}", "public function Query(){\n\t}", "public function Query(){\n\t}", "public function query();", "public function query();", "public function query();", "function fetchThree() {\n // inner SELECT takes all, but only returns the first three in reverse order; outer SELECT then reorder those three in ascending order\n $query='SELECT * FROM \n (SELECT * FROM ads ORDER BY id DESC LIMIT 0 , 3) \n ORDER BY id ASC';\n $stmt=$dbc->query($query);\n }", "function createQuery() ;", "function fetchStatement($account, $mysql_meta, $timeakhir) {\n\tglobal $DB;\n\t$statement = array();\n// Get reminding Account Status Details\n\t$query = \"SELECT \" . $mysql_meta . \".mt4_users.*\n\tFROM \" . $mysql_meta . \".mt4_users\n\tWHERE login ='$account' \";\n//tradeLog(\"227;query:\".$query);\n\t$result = $DB->execresultset($query);\n\tforeach($result as $row) {\n\t\t$status = $row;\n\t\t$status['user_decimal'] = '2';\n\t}\n\t$query = \"SELECT mt4_trades.*\n\tFROM \" . $mysql_meta . \".mt4_trades\n\tWHERE login ='$account'\n\tAND CMD IN ('0','1') and CLOSE_TIME ='1970-01-01 00:00:00'\n\torder by mt4_trades.TICKET desc\n\t\";\n//tradelog(\"tempstatement-181=\" . $query);\n\t$result = $DB->execresultset($query);\n\tforeach($result as $row) {\n\t\t$row['ACCNO'] = $row['LOGIN'];\n//tradelog(\"Temp_Statement-185-ACCNO:\" . $row[ACCNO]);\n\t\t$positions[] = $row;\n\t}\n\t$query = \"SELECT mt4_trades.*\n\tFROM \" . $mysql_meta . \".mt4_trades\n\tWHERE login ='$account'\n\tAND CMD IN ('0','1') and CLOSE_TIME > '$timeakhir'\n\torder by mt4_trades.TICKET desc\n\t\";\n//tradelog(\"tempstatement-211=\" . $query);\n\t$result = $DB->execresultset($query);\n\tforeach($result as $row) {\n\t\t$row['ACCNO'] = $row['LOGIN'];\n//tradelog(\"Temp_Statement-185-ACCNO:\" . $row[ACCNO]);\n\t\t$positions[] = $row;\n\t}\n\tif (count($positions) > 0) {\n//$positions = array_reverse($positions);\n\t\t$status['PL'] = 0;\n\t\t$statement['settled'] = array();\n\t\tforeach ($positions AS $row) {\n\t\t\twhile (list($key, $val) = each($row)) {\n\t\t\t\t$row[$key] = trim($val);\n\t\t\t}\n\t\t\t$counter_decimal = $row['DIGITS'] + 1;\n\t\t\t$row['Commission'] = number_format($row['COMMISSION'], 2, \".\", \"\");\n\t\t\t$row['FLCOMM'] = number_format($row['COMMISSION'], 2, \".\", \"\");\n\t\t\t$row['PL'] = number_format($row['PROFIT'], 2, \".\", \"\");\n//tradeLog(\"B_Open_position_report2-345=\" . $row[TICKET]);\n\t\t\t$row['Unit'] = $row['VOLUME'] / 100;\n\t\t\t$TotalFloating = 0;\n\t\t\tif ($row['CMD'] == '0') {\n\t\t\t\t$row['BuyPrice'] = number_format($row['OPEN_PRICE'], $counter_decimal, \".\", \"\");\n\t\t\t\t$row['BuyDisplayDate'] = substr($row['OPEN_TIME'], 6, 2) . \"/\" . substr($row['OPEN_TIME'], 4, 2) . \"/\" . substr($row['OPEN_TIME'], 0, 4);\n\t\t\t\t$row['CurrentPrice'] = $row['CLOSE_PRICE'];\n\t\t\t\t$row['Floating'] = $row['PROFIT'];\n\t\t\t\t$TotalFloating += $row['Floating'] + $row['FLCOMM'];\n\t\t\t} else {\n\t\t\t\t$row['SellPrice'] = number_format($row['OPEN_PRICE'], $counter_decimal, \".\", \"\");\n\t\t\t\t$row['SellDisplayDate'] = substr($row['OPEN_TIME'], 6, 2) . \"/\" . substr($row['OPEN_TIME'], 4, 2) . \"/\" . substr($row['OPEN_TIME'], 0, 4);\n\t\t\t\t$row['CurrentPrice'] = $row['CLOSE_PRICE'];\n\t\t\t\t$row['Floating'] = $row['PROFIT'];\n\t\t\t\t$TotalFloating += $row['Floating'] + $row['FLCOMM'];\n\t\t\t}\n\t\t\tif ($row['CLOSE_TIME'] == '1970-01-01 00:00:00') {\n\t\t\t\t$statement['open'][] = $row;\n\t\t\t} else {\n\t\t\t\t$status['PL'] = $status['PL'] + $row['PROFIT'];\n\t\t\t\t$statement['settled'][] = $row;\n\t\t\t}\n\t\t}\n\t}\n\n\t$query = \"SELECT mt4_trades.*\n\tFROM \" . $mysql_meta . \".mt4_trades\n\tWHERE login ='$account'\n\tAND CMD IN ('6','7')\n\tand OPEN_TIME > '$timeakhir'\n\torder by mt4_trades.TICKET desc\n\t\";\n//tradelog(\"tempstatement-246=\" . $query);\n\t$result = $DB->execresultset($query);\n\t$status['MARGININ'] = 0;\n\t$status['MARGINOUT'] = 0;\n\tforeach($result as $row) {\n//tradelog(\"tempstatement-249=\" . $row[CMD]);\n\t\tif ($row['CMD'] == '6') {\n\t\t\t$status['MARGININ'] = $status['MARGININ'] + $row['PROFIT'];\n\t\t}\n\t\tif ($row[CMD] == '7') {\n\t\t\t$status['MARGINOUT'] = $status['MARGINOUT'] + $row['PROFIT'];\n\t\t}\n//tradelog(\"tempstatement-249=MarginIn:\" . $status[MARGININ]);\n\t}\n\t$status['floatingsemua'] = $status['EQUITY'] - $status['PREVBALANCE'] - $status['MARGININ'] - $status['MARGINOUT'] - $status['PL'];\n\tif ($status['MARGIN'] == '0' || $status['MARGIN'] == '') {\n\t\t$status['eqratio'] = \"~%\";\n\t} else {\n\t\t$status['eqratio'] = number_format($status['EQUITY'] * 100 / $status['MARGIN'], 2, \".\", \"\") . \"%\";\n\t}\n\t$statement['status'] = $status;\n\treturn $statement;\n}", "function oneQuery($sql){\n\t\treturn $this->fetch($this->query($sql))[0];\n\t}", "function Query($start=0,$slice=0,$res_type=\"LIST\",$p_query=\"\") {\n \n $query=$this->initQuery($start,$slice,$p_query);\n $this->res_type=$res_type;\t\n $err = $this->basic_elem->exec_query($query);\n //\tprint \"$query $res_type $p_query<BR>\\n\";\n if ($err != \"\") return($err); \n\n $this->nb = $this->basic_elem->numrows(); \n \n if ($this->nb ==0) {\n\treturn FALSE;\n }\n if ($res_type == \"ITEM\") {\n\t$this->cindex=0; // current index row\n\treturn $this->basic_elem->res;\n }\n if ($start >= $this->nb) {$start=0;}\n if ($slice == 0) {$slice = $this->nb;}\n\n if (($start+$slice) >= $this->nb) {\n $end = $this->nb;\n } else {\n $end = $start + $slice;\n }\n for ($c=0; $c<$this->nb;$c++) {\n \n $result = $this->basic_elem->fetch_array($c);\n if (($res_type == \"LIST\") || ($res_type == \"LISTC\")) {\n $this->list[$c] = new $this->class($this->dbaccess,\"\",$result,$this->basic_elem->dbid);\n } else {\n while (list($k,$v)=each( $result)) {\n $this->list[$c][$k]=$v;\n }\n }\n \n }\n\n return($this->list);\n }", "public function top()\n {\n return $this->getIterator()->top();\n }", "function getLatest($select,$table,$order,$limit=5){\n global $con;\n $getStmt= $con->prepare(\"SELECT $select FROM $table ORDER BY $order DESC LIMIT $limit\");\n $getStmt->execute();\n $rows= $getStmt->fetchAll();\n return $rows;\n}", "public function first() {\n\t\t$result = $this->get_result();\n\n\t\treturn array_shift( $result );\n\t}" ]
[ "0.62136656", "0.59463894", "0.5537124", "0.55353594", "0.5529779", "0.55255455", "0.5511396", "0.5504911", "0.54848653", "0.5481586", "0.5451717", "0.54491377", "0.54491377", "0.5430048", "0.5422491", "0.5422491", "0.53855056", "0.53740525", "0.53571564", "0.53394157", "0.53292143", "0.53215975", "0.53200346", "0.5319655", "0.5312446", "0.52844137", "0.52669305", "0.5265936", "0.5263668", "0.52617407", "0.5256908", "0.5252216", "0.5250632", "0.5243761", "0.52422655", "0.5231442", "0.5223587", "0.5215996", "0.5215996", "0.5214076", "0.5213677", "0.5212333", "0.5203483", "0.5199001", "0.51960415", "0.51881534", "0.5183228", "0.51743203", "0.5172811", "0.51680887", "0.5161856", "0.5161354", "0.51610374", "0.51516235", "0.51489043", "0.51287717", "0.5124735", "0.51216173", "0.5100771", "0.50903237", "0.5084777", "0.5081701", "0.5077734", "0.5077734", "0.5077734", "0.5077734", "0.5077734", "0.5077734", "0.5077734", "0.5077734", "0.5077734", "0.50777006", "0.50653243", "0.506188", "0.5059618", "0.50572467", "0.50379014", "0.5034153", "0.5026523", "0.5025649", "0.5023767", "0.5023515", "0.50222594", "0.5021988", "0.5015251", "0.50148255", "0.5009906", "0.5006411", "0.5006411", "0.5006411", "0.50001585", "0.50001585", "0.50001585", "0.49998134", "0.4999179", "0.49947536", "0.49940386", "0.49913755", "0.49830088", "0.49821675", "0.4981668" ]
0.0
-1
does the query and returns all of the rows returned
public function query_and_fetch($sql="") { $results = $this->query($sql); $rows = array(); while ($row = $this->fetch_array($results)) { $rows[] = $row; } return ($rows) ? $rows : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function queryAll() {\r\n $sql = \"SELECT * FROM $this->table\";\r\n $stmt = ConnectionFactory::prepare($sql);\r\n $stmt->execute();\r\n return $stmt->fetchAll();\r\n }", "public function fetchAll(){\n $adapter = $this->adapter;\n $sql = new Sql($this->adapter);\n $select = $sql->select();\n $select->from('flota');\n $selectString = $sql->getSqlStringForSqlObject($select);\n $data = $adapter->query($selectString, $adapter::QUERY_MODE_EXECUTE);\n \n return $data;\n }", "public function fetchAll()\r\n {\r\n $this->query();\r\n return $this->sth->fetchAll();\r\n }", "function QueryAll()\n\t{\n\t\t$dalSQL = \"select * from \".$this->_connection->addTableWrappers( $this->m_TableName );\n\t\treturn $this->_connection->query( $dalSQL );\n\t}", "public function getAll(){\n $adapter = $this->createAdapter();\n $results = $adapter->query($this->getSelectStatement());\n return $results;\n $adapter = null;\n }", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function getAll()\n {\n $sql = \"SELECT * FROM `%s`\";\n $this->_sql[] = sprintf($sql, $this->_table);\n $this->_parameters[] = array();\n return $this->run();\n }", "function readAll(){\n\n\t\t$query = \"SELECT * FROM \" . $this->table_name .\"\";\n\t\t$stmt = $this->conn->prepare($query);\n\t\t$stmt->execute();\n\t\treturn $stmt;\n\t}", "public function all(): ResultSetContract;", "private function query() {\n return ApplicationSql::query($this->_select, $this->_table, $this->_join, $this->_where, $this->_order, $this->_group, $this->_limit, $this->_offset);\n }", "protected function getAll()\n {\n $statement = $this->connection->query($this->sqlToString());\n return $this->fetchAll($statement);\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM consultation_vp';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM cst_hit';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "function get_all_records(){\n\t\tglobal $db;\n\t\t$sql=\"SELECT * FROM $this->table order by id asc\";\n\t\t$db->query($sql);\n\t\t$row=$db->fetch_assoc_all();\n\t\treturn $row;\n\t}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM answer';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function result_set() {\n $this -> execute();\n return $this -> stmt -> fetchAll();\n }", "public function resultset(){\n\t\t$this->execute() ;\n\t\treturn $this->statement->fetchAll(PDO::FETCH_ASSOC) ;\n\t}", "abstract public function get_rows();", "public static function all()\n {\n self::select(self::tableName());\n return self::fetchAll();\n }", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM tbl_empleado';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM alojamientos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "protected function get_results_from_query() \n\t\t{\n \t\t\t$this->open_connection();\n \t\t\t$result = $this->conn->query($this->query);\n \t\t\twhile ($this->rows[] = $result->fetch_assoc());\n \t\t\t$result->close();\n \t\t\t$this->close_connection();\n \t\t\tarray_pop($this->rows);\n\t\t}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM patient_info';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function fetchAll() {\n\t\t$queryBuilder = $this->db->createQueryBuilder();\n\t\t$queryBuilder\n\t\t\t->select('*')\n\t\t\t->from($this->table_name, 't1')\n\t\t;\n\t\t$result = $queryBuilder->execute()->fetchAll();\n\n\t\treturn $result;\n\t}", "public function fetchAll()\r\n {\r\n $sql = new Sql($this->dbAdapter);\r\n $select = $sql->select();\r\n $select\r\n ->from(array('a_s' => $this->table))\r\n ->order('a_s.sector_order ASC');\r\n \r\n $selectString = $sql->getSqlStringForSqlObject($select);\r\n $execute = $this->dbAdapter->query($selectString, Adapter::QUERY_MODE_EXECUTE);\r\n $result = $execute->toArray();\r\n return $result;\r\n }", "public static function getAll() {\n $conn = self::connect();\n $row = $conn->getAll(self::baseQuery());\n return $row;\n }", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM contenidos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "public function queryAll()\n {\n $statement = sprintf(\"SELECT %s, %s, %s, %s, %s FROM %s WHERE deleted = 0\",\n static::FIELDS[0], static::FIELDS[1], static::FIELDS[2], static::FIELDS[3], static::FIELDS[4], static::TABLE);\n $req = $this->db->query($statement);\n $response = $req->fetchAll(PDO::FETCH_ASSOC);\n\n return json_encode($response);\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM recibo';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function fetchAll()\n {\n //*** your code goes here\n //*** if there is an error, return an array which includes an error code of 2 and message == ERROR_UNABLE\n $listing = $this->table->select();\n if ($listing) {\n $data = [];\n $hydrator = $this->table->getResultSetPrototype()->getHydrator();\n foreach ($listing as $entity) $data[] = $hydrator->extract($entity);\n $result = ['success' => 1, 'data' => $data];\n } else {\n $result = ['success' => 0, 'error' => 1, 'message' => self::ERROR_UNABLE];\n }\n return $result;\n }", "public function get_all() {\n $where = func_get_args();\n $this->_set_where($where);\n\n $this->_callbacks('before_get', array($where));\n\n if ($this->result_mode == 'object') {\n $result = $this->db->get($this->_table())->result();\n } else {\n $result = $this->db->get($this->_table())->result_array();\n }\n\n foreach ($result as &$row) {\n $row = $this->_callbacks('after_get', array($row));\n }\n\n return $result;\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_nomor_peserta';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function getAll() {\n $prepareStatement = $this->pdo->prepare($this->sql);\n $prepareStatement->execute($this->param);\n\n # close connection\n Connection::disconnect();\n\n return $prepareStatement->fetchAll($this->fetch);\n }", "public function findAll(){\n \n\t\t$sql = 'SELECT * FROM ' . self::TABLENAME;\n\n \t$db = new Database(); // se creeaza conexiunea la baza de date\n\t\t$stmt = $db->getConnection()->prepare($sql);\n\t\t$stmt->execute();\n\t\t$results = $stmt->fetchAll();\n\t\n\t\treturn $results; \n }", "public function findAll(){\n \n\t\t$sql = 'SELECT * FROM ' . self::TABLENAME;\n\n \t$db = new Database(); // se creeaza conexiunea la baza de date\n\t\t$stmt = $db->getConnection()->prepare($sql);\n\t\t$stmt->execute();\n\t\t$results = $stmt->fetchAll();\n\t\n\t\treturn $results; \n }", "public function all()\n {\n $sql = $this->get();\n $this->query = $sql;\n }", "public function getAll()\n {\n $sql = \"SELECT * FROM \" . self::table . \";\";\n\n $conn = $this->dbc->Get();\n $statement = $conn->prepare($sql);\n $statement->execute();\n $data = $statement->fetchAll();\n $conn = null;\n\n return $data;\n }", "public function fetchRowset()\n\t{\n\t\t$this->_query();\n\n\t\treturn $this->stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\t}", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM clientes';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "public function resultSet(){\n $this->execute();\n return $this->statement->fetchAll(PDO::FETCH_OBJ);\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM tbl_task';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function findAll() {\n $this->select();\n return $this->execute();\n }", "public function resultSet(){\n\t\t$this->execute();\n\t\treturn $this->stmt->fetchAll(PDO::FETCH_OBJ);\n\t}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_jadwal_ujian';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function fetchAll()\n {\n $this->execute();\n return $this->dbStmt->fetchAll(PDO::FETCH_ASSOC);\n }", "protected function getAll(){\n\t\t\n\t\t$connection = DB::connect();\n\t\t\n\t\t$sql = \"SELECT * FROM $this->_tableName\";\n\t\t$result = '';\n\t\t\n\t\ttry {\n\t\t\t$stmt = $connection->query($sql);\n\t\t\t$result = $stmt->fetchAll();\n\t\t\n\t\t\treturn $result;\n\t\t\n\t\t} catch (PDOException $e){\n\t\t\tdie('Error: '.$e->getMessage().'<br/>');\n\t\t}\n\t}", "public function fetchAll() {\n $this->execute();\n return $this->stmt->fetchAll(PDO::FETCH_OBJ);\n }", "function readAll() {\n $query = \"SELECT \n id, name, description\n FROM\n \" . $this->table_name . \" \n ORDER BY\n name\";\n\n $stmt = $this->conn->prepare($query);\n\n //execute query\n $stmt->execute();\n\n return $stmt;\n }", "public function getResults()\n {\n return $this->execute();\n }", "function get_all(){\r\n\t\t$rows = array();\r\n\t\twhile($row = $this->get_row()){\r\n\t\t\t$rows[] = $row;\r\n\t\t}\r\n\t\treturn $rows;\r\n\t}", "function selectAll() {\n $query = $this->getStatement(\n \"SELECT * FROM `$this->table` WHERE 1 ORDER BY id\"\n );\n $query->execute();\n return $query->fetchAll();\n }", "public function getAll()\n {\n $sql = \"SELECT * FROM $this->table\";\n $req = Database::getBdd()->prepare($sql);\n $req->execute();\n return $req->fetchAll();\n }", "function read(){\n \n // select all query\n $query = \"SELECT * from \" . $this->table_name . \"\";\n \n // prepare query statement\n $stmt = $this->conn->prepare($query);\n \n // execute query\n $stmt->execute();\n \n return $stmt;\n }", "public function query()\n\t\t{\n\t\t\t\n\t\t\t$this->prep = $this->pdo->prepare($this->query);\n\n\t\t\tif($this->prep){\n\t\t\t\t$this->prep->execute();\n\n\t\t\t\treturn $this->prep->fetchall(PDO::FETCH_ASSOC);\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "public function get(){\n $this->query = \"SELECT \".$this->select.\" FROM $this->table WHERE \";\n $wheres = $this->mergeWhere().\" OR \".$this->mergeOrWhere();\n $query = $this->query.$wheres;\n $statement = $this->prepare($query);\n $statement->execute($this->bindings);\n return $statement->fetchAll();\n }", "public function getAll()\n {\n return $this->prepare(DB::findAll($this->table));\n }", "public function all($params = null)\n {\n $query = $this->db->prepare(\"SELECT * FROM `$this->tableName`\");\n\n $result = $query->execute();\n\n //maybe there is a reason to make only !empty().\n if (!empty($result) && $result)\n {\n return $query->fetchAll(\\PDO::FETCH_ASSOC);\n } else {\n var_dump($query);\n }\n\n }", "public function readAll ()\n {\n\n $query = \"SELECT\n book_id,type_id,name,isbn,author,publisher,price\n FROM \". \" $this->table_name \";\n\n\n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n// $row = $stmt->fetch(PDO::FETCH_ASSOC);\n return $stmt;\n }", "function get_all()\n {\n\n $query = \"SELECT * FROM \".$this->table_name;\n //prepare query\n $stmt = $this->conn->prepare($query);\n\n\n try{\n if( $stmt->execute())\n return $stmt;\n\n } catch(PDOException $exception){\n echo \"Connection error: \" . $exception->getMessage();\n }\n\n return false;\n\n }", "public function all()\n {\n $sql = \"SELECT * FROM {$this->table()}\";\n return $this->db->query($sql)->fetchAll();\n }", "protected function get_results_from_query() {\n\t\t//para vaciar posibles resultados previos\n\t\t$this->rows = array();\n\t\t\n\t\t$this->crear_conexion();\n\t\t$this->set_charset();\n\t\t$result = $this->conn->query($this->query);\n\t\twhile ($row = $result->fetch_assoc())\n\t\t\t$this->rows[] = $row;\n\t\t$result->close();\n\t\t$this->cerrar_conexion();\n\t\t//array_pop($this->rows);\t//trae uno de más por el while\n\t\t//return $this->rows;\n\t}", "public function select_all(string $query)\n{\n $this->strquery = $query;\n $result = $this->conexion->prepare($this->strquery);\n $result->execute();\n $data = $result->fetchall(PDO::FETCH_ASSOC);\n return $data; \n}", "public function readAll(){\n //select all data\n $query = \"SELECT\n id, num_compte, cle_rib, num_agence, duree_epargne, frais, solde, created\n FROM\n \" . $this->table_name . \"\n ORDER BY\n num_compte\";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n \n return $stmt;\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM tbl_coverage';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM tbl_journal_lines';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function fetchAll(){\n\t\treturn $this->instance->fetchAll();\n\t}", "protected function executeQuery() {\n return array();\n }", "public abstract function fetchAll();", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM office';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function readAll(){\n $rq = \"SELECT * FROM Objets\";\n $stmt = $this->pdo->prepare($rq);\n $data = array();\n if(!$stmt->execute($data)){\n throw new Exception($pdo->errorInfo());\n }\n return $result = $stmt->fetchAll();\n }", "public function fetchAll()\n {\n $result = $this->select();\n return $result;\n }", "public function All()\n {\n $query = \"SELECT * FROM $this->table\";\n $result = $this->query($query);\n return $this->convertArray($result);\n }", "public function fetchAll() {\r\n\t\treturn $this->getMapper()->fetchAll();\r\n\t\t\r\n\t}", "public function all() {\n $query = $this->query( $this->_active_query->getQuery(), $this->_active_query->getParams() );\n return new QueryResult($query);\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM turma_disciplina';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "function get_all(){\n\t\tglobal $conn;\n\t\t//$sql = 'SELECT * FROM user';\n\t\t//$r = $conn->prepare($sql);\n\t//\t\treturn $r;\n\t//\treturn $r;\n\n\t\t$stmt = $conn->prepare('SELECT *FROM user');\n\t// Ejecutamos el Statement.\n\t\t$stmt->execute();\n\t\treturn $stmt;\n\n\t}", "public function getRows()\n {\n $query = $this->getQuery();\n \n if (!empty($this->columns)) {\n $query->select(implode(', ', $this->columns));\n }\n \n foreach ($this->sort as $key => $value) {\n $query->sortBy($key, $value);\n }\n \n if ($this->range) {\n $query->limit($this->start, $this->range);\n }\n \n if (!empty($this->group)) {\n $query->groupBy($this->group);\n }\n \n return $this->database->query($query, $this->database->getBinds());\n }" ]
[ "0.8268262", "0.77189904", "0.7698051", "0.76956666", "0.76696205", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76635677", "0.76416254", "0.7627644", "0.7621301", "0.7614713", "0.75501513", "0.75394243", "0.75010014", "0.7419542", "0.740665", "0.7389063", "0.7387385", "0.737788", "0.73414624", "0.7341021", "0.7336665", "0.73276186", "0.7303318", "0.7294351", "0.7292883", "0.7286224", "0.72862023", "0.7273051", "0.72729075", "0.72546256", "0.7237457", "0.7223514", "0.721881", "0.7213947", "0.7213947", "0.71902704", "0.71890855", "0.717634", "0.7169767", "0.71689767", "0.7168099", "0.7166497", "0.7161446", "0.7159061", "0.71548337", "0.7145984", "0.7130009", "0.7125435", "0.7119794", "0.7108662", "0.7101577", "0.7100427", "0.7094437", "0.70873314", "0.70873076", "0.7086759", "0.707347", "0.7072627", "0.7072396", "0.7068646", "0.7063122", "0.70617586", "0.70598125", "0.70597106", "0.7053942", "0.70524615", "0.7052187", "0.70475924", "0.7046567", "0.7043532", "0.70376045", "0.70367163", "0.70322627", "0.70322335", "0.7027986", "0.70271796", "0.7022541" ]
0.0
-1
does the query and returns the rows returned in form of an std object
public function query_and_fetch_obj($sql="") { $results = $this->query($sql); $rows = array(); while ($object = $results->fetch_object()) { $rows[] = $object; } return ($rows) ? $rows : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resultSet(){\n $this->execute();\n return $this->statement->fetchAll(PDO::FETCH_OBJ);\n }", "public function resultSet(){\n\t\t$this->execute();\n\t\treturn $this->stmt->fetchAll(PDO::FETCH_OBJ);\n\t}", "public function resultSet()\n\t{\n\t\t$this->execute();\n\t\treturn $this->stm->fetchAll(PDO::FETCH_OBJ);\n\t}", "public function queryRow()\n\t{\n\t\treturn $this->queryInternal('fetch',$this->_fetchMode);\n\t}", "public function get(){\n\n if(is_null($this->columns)) $this->columns = ['*'];\n $select_statement = $this->grammer->compileSelect($this);\n \n \n $result = $this->connection->get($select_statement); \n \n if(!empty($this->model)){\n \n return $this->return_results_objects($result);\n\n }else{\n \n return $this->return_result_as_array($result);\n }\n \n }", "public function getResult() {\n $this->execute();\n return $this->statement->fetchAll(PDO::FETCH_OBJ);\n }", "public function asObject() {\n\t\treturn $this->_sth->fetchAll(PDO::FETCH_OBJ);\n\t}", "public function fetchAll(){\n $adapter = $this->adapter;\n $sql = new Sql($this->adapter);\n $select = $sql->select();\n $select->from('flota');\n $selectString = $sql->getSqlStringForSqlObject($select);\n $data = $adapter->query($selectString, $adapter::QUERY_MODE_EXECUTE);\n \n return $data;\n }", "private function query() {\n return ApplicationSql::query($this->_select, $this->_table, $this->_join, $this->_where, $this->_order, $this->_group, $this->_limit, $this->_offset);\n }", "public function resultSet(){\n $this->executeQuery($this->statement);\n return $this->fetchAll($this->statement);\n }", "abstract public function get_rows();", "public function resultSet(){\r\n $this->execute();\r\n return $this->stmt->fetchAll(PDO::FETCH_OBJ);\r\n /*PDO::FETCH_OBJ\r\n assim podemos imprimir como objeto exemplo\r\n foreach($users as user){\r\n echo $user->name . '<br>';\r\n ao invés de echo $user['name];\r\n */\r\n }", "public function get(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n\t\t\t\t\t ;\n return $this->db->getRows(array(\"where\"=>$condition,\"return_type\"=>\"single\"));\n\t\t\t\t\t }", "public function resultset(){\n\t\t$this->execute() ;\n\t\treturn $this->statement->fetchAll(PDO::FETCH_ASSOC) ;\n\t}", "function get()\n\t{\n\t\tif (empty($this->use_db)) $this->use_db = false; //use default connection\n\t\t$this->sql = 'SELECT * FROM ' . $this->table;\n\t\t$this->apply_filters();\n\t\t$this->apply_sort();\n\t\treturn $this->fetch_records();\n\t}", "public function fetchObject()\n {\n return sasql_fetch_object($this->result);\n }", "public function all(): ResultSetContract;", "public function all(){ \n $arraytoret = array();\n $query='select *\n from Usuario';\n $results = $this->driver->exec($query);\n return $this->factory($results);\n}", "public function getResult()\n {\n $data = [\n 'query' => $this->getQuery(),\n 'table' => $this->table,\n ];\n\n if (isset($this->columns)) {\n $data['columns'] = $this->columns;\n }\n if (isset($this->with)) {\n $data['with'] = $this->with;\n }\n if (isset($this->where)) {\n $data['where'] = $this->where;\n }\n if (isset($this->data)) {\n $data['data'] = $this->data;\n }\n if (isset($this->order)) {\n $data['order'] = $this->order;\n }\n if (isset($this->limit)) {\n $data['limit'] = $this->limit;\n }\n\n return $data;\n }", "public function get_rows()\n\t{\n//\t\t$rows = new object_list($this->connections_from(array(\"type\" => \"RELTYPE_CHILD\", \"to.class_id\" => crm_bill_row_obj::CLID)));\n\t\t$rows = new object_list(array(\n\t\t\t\"class_id\" => crm_bill_row_obj::CLID,\n\t\t\t\"CL_CRM_BILL_ROW.RELTYPE_CHILD(CL_CRM_BILL_ROW_GROUP).oid\" => $this->id(),\n\t\t\tnew obj_predicate_sort(array(\"jrk\" => \"asc\")),\n\t\t));\n\t\treturn $rows;\n\t}", "public function getRows($q){ // get array of rows objects\r\t\t$this->connect();\t//connect if not connected \r\t\t$query=$this->query($q);\r\t\t$result=array();\r\t\twhile ($data=sqlite_fetch_object($query)){\r\t\t\t$result[]=$data;\r\t\t}\r\t\treturn $result;\r\t}", "public function resultaSet(){\n $this->execute();\n return $this->statemet->fetchAll(PDO::FETCH_OBJ);\n }", "public static function query( $query ) {\n global $edb;\n $conn = $edb->connect();\n try {\n $query = $conn->query($query);\n do {\n if ($query->columnCount() > 0) {\n $results = $query->fetchAll(PDO::FETCH_OBJ);\n }\n }\n while ($query->nextRowset());\n\n $conn = null;\n\n return $results;\n }\n catch (PDOException $e) {\n $conn = null;\n die ('Query failed: ' . $e->getMessage());\n }\n }", "public function fetch()\n {\n return mysql_fetch_object($this->res);\n }", "public function results()\n\t{\n\t\t// using any existing $resource, process the results into a stdClass object:\n\t\t$out = array();\n\n\t\t// if the resource exists, proceed:\n\t\tif (isset(self::$resource))\n\t\t{\n\t\t\t// loop through the results and add them to the object:\n\t\t\twhile ($row = mysql_fetch_assoc(self::$resource))\n\t\t\t{\n\t\t\t\t$out[] = (object)$row;\n\t\t\t}\n\t\t}\n\n\t\t// return $out as an object:\n\t\treturn (object)$out;\n\t}", "protected function get_results_from_query() \n\t\t{\n \t\t\t$this->open_connection();\n \t\t\t$result = $this->conn->query($this->query);\n \t\t\twhile ($this->rows[] = $result->fetch_assoc());\n \t\t\t$result->close();\n \t\t\t$this->close_connection();\n \t\t\tarray_pop($this->rows);\n\t\t}", "public function fetch_all(){\n $data = array();\n while( ($obj = oci_fetch_object($this->result)) != false ){\n $data[] = $obj;\n }\n return $data;\n }", "private function execute_query($sql) {\n \n // execute the query\n $result = $this->db->Execute($sql);\n // initialise the data array\n $data = array();\n // convert the resultset into a Moodle style object\n if(!empty($result)) {\n while (!$result->EOF) {\n $obj = new stdClass;\n foreach (array_keys($result->fields) as $key) {\n $obj->{$key} = $result->fields[$key];\n }\n $index = reset($result->fields);\n $data[$index] = $obj;\n $result->MoveNext();\n }\n }\n\n // return an array of objects\n return $data;\n \n }", "function sql_fetch_object($res)\n {\n $results = NULL;\n if ( $res && is_object( $res ) )\n $results = $res->fetchObject(); \n return $results;\n }", "function get_results($query=null) {\n\n\t\t\t// If there is a query then perform it if not then use cached results..\n\t\t\tif ( $query ) {\n\t\t\t\t$this->query($query);\n\t\t\t}\n\n\t\t\t// Send back array of objects. Each row is an object\n\t\t\treturn $this->last_result;\n\t\t}", "public function readAll(){\n $rq = \"SELECT * FROM Objets\";\n $stmt = $this->pdo->prepare($rq);\n $data = array();\n if(!$stmt->execute($data)){\n throw new Exception($pdo->errorInfo());\n }\n return $result = $stmt->fetchAll();\n }", "protected function get_result_from_query(){\n\t\t$this ->open_connection();\n\t\t$result = $this -> conn -> query($this -> query);\n\t\twhile($this -> rows[] = $result ->fetch_assoc());\n\t\t$result -> close();\n\t\t$this -> close_connection();\n\t\tarray_pop($this -> rows); // Extraé y devuelve el último valor\n\t}", "function _fetch_object()\n\t{\n\t\treturn sqlsrv_fetch_object($this->result_id);\n\t}", "public function getData( $sql ) {\n if ( $this->isConnected() == false )\n $this->connect();\n $table = mysqli_query( $this->connection, $sql );\n if ( !$table ) {\n $this->error();\n }\n $result = new ArrayList();\n while ($row = mysqli_fetch_object( $table )) {\n $r = new Object( $row );\n $result->add( $r );\n }\n\n return $result;\n }", "public function getAll()\n {\n $sql = \"SELECT * FROM \".$this->table;\n $req = Database::getBdd()->prepare($sql);\n $req->execute();\n return $req->fetchAll(PDO::FETCH_OBJ);\n \n }", "public function result(){\n\t\t$this->execute() ;\n\t\treturn $this->statement->fetch(PDO::FETCH_ASSOC) ;\n\t}", "public static function getAll() {\n $conn = self::connect();\n $row = $conn->getAll(self::baseQuery());\n return $row;\n }", "function getResRow($tsql,$method=PDO::FETCH_ASSOC){ \n $rs=$this->DBH->prepare($tsql);\n $rs->execute();\n $row=$rs->fetch($method);\n \n return $row;\n }", "public function fetch()\r\n {\r\n $this->query();\r\n return $this->sth->fetch();\r\n }", "public function asRow() {\n\t\treturn $this->_sth->fetchAll(PDO::FETCH_NUM);\n\t}", "public function readAll(){\r\n $query = \"SELECT * FROM docente;\";\r\n $statement = $this->cdb->prepare($query);\r\n $statement->execute();\r\n $rows = $statement->fetchAll(\\PDO::FETCH_OBJ);\r\n return $rows; \r\n }", "public function get(){\n $this->query = \"SELECT \".$this->select.\" FROM $this->table WHERE \";\n $wheres = $this->mergeWhere().\" OR \".$this->mergeOrWhere();\n $query = $this->query.$wheres;\n $statement = $this->prepare($query);\n $statement->execute($this->bindings);\n return $statement->fetchAll();\n }", "public function get(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n\t\t\t\t\t $condition = array(\"ide\" =>$this->ide);\n return $this->db->getRows(array(\"where\"=>$condition,\"return_type\"=>\"single\"));\n\t\t\t\t\t }", "public function get()\n {\n return self::fetchAll();\n }", "public function query($sql) {\n return $this->data($sql);\n }", "function FetchObject() {\n\t\t\treturn pg_fetch_object($this->result);\n\t\t}", "public function fetchRow();", "public abstract function FetchRow();", "public function result_object()\n\t{\n\t\tif (count($this->result_object) > 0)\n\t\t{\n\t\t\treturn $this->result_object;\n\t\t}\n\t\telseif (count($this->result_array) > 0)\n\t\t{\n\t\t\tfor ($i = 0, $c = count($this->result_array); $i < $c; $i++)\n\t\t\t{\n\t\t\t\t$this->result_object[] = (object) $this->result_array[$i];\n\t\t\t}\n\n\t\t\treturn $this->result_object;\n\t\t}\n\t\telseif (is_array($this->row_data))\n\t\t{\n\t\t\tif (count($this->row_data) === 0)\n\t\t\t{\n\t\t\t\treturn $this->result_object;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$row_index = count($this->row_data);\n\t\t\t\tfor ($i = 0; $i < $row_index; $i++)\n\t\t\t\t{\n\t\t\t\t\t$this->result_object[$i] = (object) $this->row_data[$i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$row_index = 0;\n\t\t\t$this->row_data = array();\n\t\t}\n\n\t\t$row = NULL;\n\t\twhile ($row = $this->_fetch_object())\n\t\t{\n\t\t\t$this->row_data[$row_index] = (array) $row;\n\t\t\t$this->result_object[$row_index++] = $row;\n\t\t}\n\n\t\t// Un-comment the following line, in case it becomes needed\n\t\t// $this->_data_seek();\n\t\treturn $this->result_object;\n\t}", "protected function get_results_from_query() {\n\t\t\t\t\n\t\t\t\t$this->open_connection();\n\t\t\t\t\n\t\t\t\tif (!$this->conn) {\n\t\t\t\t\tthrow new Excepcion('No se pudo Conectar a la BD: ' . mysql_error());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\t\t\n\t\t\t\t\t$result = $this->conn->query($this->query);\n\t\t\t\t\n\t\t\t\t\t\tif (!$result) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tthrow new Excepcion('No se pudo ejecutar la consulta a la BD: ' . mysql_error());\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\treturn $result;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$result->close();\t\t\t\t\n\t\t\t\t$this->close_connection();\t\t\n\t\t\t\n\t\t}", "function get_all_records(){\n\t\tglobal $db;\n\t\t$sql=\"SELECT * FROM $this->table order by id asc\";\n\t\t$db->query($sql);\n\t\t$row=$db->fetch_assoc_all();\n\t\treturn $row;\n\t}", "abstract public function query();", "public function fetch()\n {\n return (array)$this->query();\n }", "public function result_set() {\n $this -> execute();\n return $this -> stmt -> fetchAll();\n }", "public function get(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n\t\t\t\t\t $condition = array(\"IDP\" =>$this->IDP);\n return $this->db->getRows(array(\"where\"=>$condition,\"return_type\"=>\"single\"));\n\t\t\t\t\t }", "public function get() {\n $where = func_get_args();\n $this->_set_where($where);\n\n $this->_callbacks('before_get', array($where));\n\n if ($this->result_mode == 'object') {\n $row = $this->db->get($this->_table())->row();\n } else {\n $row = $this->db->get($this->_table())->row_array();\n }\n\n $row = $this->_callbacks('after_get', array($row));\n\n return $row;\n }", "public function all(){\n\n $a= parent::bdd()->query(\"SELECT * FROM auteur\");\n $b= $a->fetchall(\\PDO::FETCH_OBJ);\n\n return $b;\n\n }", "public function row() {\n\t\tif ($this->returned) return false;\n\t\t$this->returned = true;\n\t\treturn $this->query;\n\t}", "public function tableDataQuery()\n {\n $con = $this->getConnection();\n $query = \"SELECT * FROM Cart;\";\n\n if ($result = $con->query($query))\n {\n $object = $result->fetch_objetct();\n return $object;\n } else\n {\n return false;\n }\n }", "public function exec_SELECTgetSingleRow() {}", "abstract public function getRow($query);", "public function fetch_object($query);", "public function resultSet()\n {\n $this->execute();\n return $this->stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "public function read(){\n $query = \"SELECT * FROM {$this->table}\";\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n return $stmt;\n }", "public function results()\r\n\t{\r\n\t\treturn $this->model->get($this->select);\r\n\t}", "public function fetchQuery(){\n $bag=array();\n while($row=$this->select->fetch_assoc()){\n array_push($bag,$row);\n // or $bag[]=$row\n }\n return $bag;\n }", "public function results()\n {\n //by default data get as array/stdclasses\n\n // to trunit to arrays of arrays\n // return json_decode(json_encode($this->_results), true);\n return $this->_results;\n // gives array data with column name and itsvalue not index array\n }", "public function fetchAll()\r\n {\r\n $sql = new Sql($this->dbAdapter);\r\n $select = $sql->select();\r\n $select\r\n ->from(array('a_s' => $this->table))\r\n ->order('a_s.sector_order ASC');\r\n \r\n $selectString = $sql->getSqlStringForSqlObject($select);\r\n $execute = $this->dbAdapter->query($selectString, Adapter::QUERY_MODE_EXECUTE);\r\n $result = $execute->toArray();\r\n return $result;\r\n }", "function result()\n {\n return $this->rows;\n }", "public function queryAll() {\r\n $sql = \"SELECT * FROM $this->table\";\r\n $stmt = ConnectionFactory::prepare($sql);\r\n $stmt->execute();\r\n return $stmt->fetchAll();\r\n }", "public static function getAll(){\n\t\t$sql = \"select * from \".self::$tablename;\n\t\t$query = Executor::doit($sql);\n\t\treturn Model::many($query[0],new TemparioData());\n\t}", "public function getAll()\n {\n $sql = \"SELECT * FROM `%s`\";\n $this->_sql[] = sprintf($sql, $this->_table);\n $this->_parameters[] = array();\n return $this->run();\n }", "public function getFromCache_queryRow() {}", "function fetchRow ()\n {\n return pg_fetch_array($this->_result);\n }", "public function fetchResult();", "public function GetResults() {\n return $this->rs; \n }", "public function getResults()\n {\n return $this->execute();\n }", "function resultado(){\n\t\t\treturn $this->result=mysql_fetch_object($this->query);\n\t\t\t}", "public function singleRow(){\n $this->execute();\n return $this->statement->fetch(PDO::FETCH_OBJ);\n }", "abstract public function FetchRow();", "public function getAll()\n {\n $sql = \"SELECT * FROM \" . self::table . \";\";\n\n $conn = $this->dbc->Get();\n $statement = $conn->prepare($sql);\n $statement->execute();\n $data = $statement->fetchAll();\n $conn = null;\n\n return $data;\n }", "function results()\r\n {\r\n $result = array();\r\n if(!$this->res_id)\r\n {\r\n $this->error_msg = \"Could not execute query to $this->db_name database, wrong result id\";\r\n return 0;\r\n }\r\n while($row = mysql_fetch_object($this->res_id))\r\n {\r\n array_push($result, $row);\r\n }\r\n return $result;\r\n }", "public function getRows()\n {\n $query = $this->getQuery();\n \n if (!empty($this->columns)) {\n $query->select(implode(', ', $this->columns));\n }\n \n foreach ($this->sort as $key => $value) {\n $query->sortBy($key, $value);\n }\n \n if ($this->range) {\n $query->limit($this->start, $this->range);\n }\n \n if (!empty($this->group)) {\n $query->groupBy($this->group);\n }\n \n return $this->database->query($query, $this->database->getBinds());\n }", "public function fetch() {\n\t\t$this->checkResultSet();\n\t\treturn $this->fetchRowAssoc();\n\t}", "public function get_query_result()\n\t{\n\t\t$sql = \"select * from test_db\";\n\t\t$query = $this->db->query($sql);\n\n\t\t//Complete array result\n\t\t$result = $query->result_array();\n\n\t\t//result of first row\n\t\t$firsts_row = $query->first_row();\n\t}", "public function fetchAll() {\n $this->execute();\n return $this->stmt->fetchAll(PDO::FETCH_OBJ);\n }", "public function getData(){\n $sql = \"SELECT*FROM $this->tablename\";\n\n $result = mysqli_query($this->conn, $sql);\n if(mysqli_num_rows($result)>0){\n return $result;\n }\n\n }", "public function getObject()\n {\n return mysqli_fetch_object($this->resulset);\n }", "public function fetchAll()\n {\n // LEFT JOIN patient ON patient.patientId = doc_calendar.patientId\n $select = new \\Zend\\Db\\Sql\\Select ;\n $select->from('doc_calendar');\n $user_session = new Container('user');\n\n $select->where(\" doc_calendar.doctorId = '{$user_session['user']->getId()}'\");\n $select->join(array(\"p\" => \"patient\"), \"doc_calendar.patientId = p.patientId\");\n\n $dbAdapter = $this->tableGateway->getAdapter();\n $statement = $dbAdapter->createStatement();\n\n $select->prepareStatement($dbAdapter, $statement);\n $driverResult = $statement->execute(); // execute statement to get result\n\n $resultSet = new ResultSet();\n $resultSet->initialize($driverResult);\n $rows = array();\n foreach($resultSet as $row) {\n $rows[] = $row->getArrayCopy();\n }\n\n return $rows;\n }", "public function query();", "public function query();", "public function query();", "public function findAll(): QueryResultInterface;", "public static function find_by_query($sql){\n global $database;\n $result_set = $database->query($sql);\n $the_object_array = array();\n while($row = mysqli_fetch_array($result_set)){\n \n $the_object_array[] = static::instantation($row);// Getting array\n }\n\n return $the_object_array;\n }", "public function fetchAll()\n {\n return new QueryResult(\n $this->execute()->fetchAll(PDO::FETCH_ASSOC),\n $this->entity\n );\n }", "public function queryAllUsers(){\n try{\n $object=array();\n\n if($stmt=$this->DataBaseCon->prepare(\"SELECT userID,userEmail,userPhoto FROM UsersDataSet\")){\n $stmt->execute();\n $stmt->bind_result($userID, $userEmail,$userPhoto);\n while ($stmt->fetch())\n {\n $array =array('userID'=>$userID, 'userEmail'=>$userEmail,'userPhoto'=>$userPhoto);\n array_push($object,$array);\n }\n $stmt -> close();\n return $object;\n }\n else{\n return false;\n }\n\n }catch(Expection $e){\n return false;\n }\n }", "public function fetch($sql){\r\n\t\t\tglobal $link;\r\n\t\t\t$result = mysqli_query($link,$sql);\r\n\t\t\t$arr = array();\r\n\t\t\twhile($rows = mysqli_fetch_object($result))\r\n\t\t\t\t$arr[] = $rows;\r\n\t\t\treturn $arr;\r\n\t\t}", "public function All()\n {\n $query = \"SELECT * FROM $this->table\";\n $result = $this->query($query);\n return $this->convertArray($result);\n }", "public function query()\n\t\t{\n\t\t\t\n\t\t\t$this->prep = $this->pdo->prepare($this->query);\n\n\t\t\tif($this->prep){\n\t\t\t\t$this->prep->execute();\n\n\t\t\t\treturn $this->prep->fetchall(PDO::FETCH_ASSOC);\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "public function results($sql){\n\t\t\tif (!empty($sql['output'])){\n\t\t\t\tif ($sql['output'] == \"array\" || $sql['output'] == \"object\"){\n\t\t\t\t\t$type = $sql['output'];\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$type = \"array\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$type = \"array\";\n\t\t\t}\n\n\t\t\t$args = func_get_args();\n\t\t\tarray_shift($args);\n\n\t\t\tif (isset($args[0]) and is_array($args[0])){\n\t\t\t\t$args = $args[0];\n\t\t\t}\n\n\t\t\t$result = $this->run_query($sql,$args);\n\t\n\t\t\t$return = array();\n\n\t\t\twhile ($row = mysqli_fetch_assoc($result)){\n\t\t\t\tif ($type == \"array\"){\n\t\t\t\t\t$return[] = $row;\n\t\t\t\t}\n\t\t\t\tif ($type == \"object\"){\n\t\t\t\t\t$return[] = (object) $row;\n\t\t\t\t}\t\t\t\n\t\t\t}\n\n\t\t\tif ($result){\n\t\t\t\tif ($type == \"array\"){\n\t\t\t\t\treturn $return;\n\t\t\t\t}\n\t\t\t\tif ($type == \"object\"){\n\t\t\t\t\treturn (object) $return;\n\t\t\t\t}\n\t\t\t}\n\t\t}" ]
[ "0.73988134", "0.7305839", "0.72928053", "0.7228977", "0.72263503", "0.70772344", "0.7074983", "0.7039261", "0.7036826", "0.6973914", "0.69605076", "0.6955435", "0.69418496", "0.69280523", "0.6915921", "0.6904987", "0.68473095", "0.6803712", "0.67959136", "0.679169", "0.67503315", "0.6731519", "0.6723879", "0.67130286", "0.6708317", "0.6700403", "0.66920656", "0.66844815", "0.66725683", "0.6643172", "0.6638661", "0.6637103", "0.66317636", "0.6616059", "0.66088516", "0.65968907", "0.65926135", "0.6580089", "0.657122", "0.65662014", "0.6560643", "0.65568846", "0.655677", "0.6556653", "0.6555209", "0.65462416", "0.654401", "0.6537085", "0.6536312", "0.6527856", "0.65170217", "0.6516952", "0.6516143", "0.6507964", "0.65075904", "0.64977217", "0.64971626", "0.6484577", "0.6481862", "0.648142", "0.6480416", "0.6479852", "0.64793", "0.64764667", "0.64742905", "0.6472704", "0.6472493", "0.64723504", "0.6471849", "0.6469914", "0.64568436", "0.6453291", "0.64510834", "0.6436935", "0.64347756", "0.6433747", "0.64303875", "0.6427504", "0.6427", "0.641554", "0.6415153", "0.6413514", "0.6412613", "0.64121413", "0.6411168", "0.6410119", "0.6410012", "0.6405391", "0.6404974", "0.6402645", "0.6402645", "0.6402645", "0.6398061", "0.6389415", "0.6387539", "0.6386251", "0.6385005", "0.6378971", "0.6378473", "0.6377847" ]
0.6657652
29
returns true or false if the row exists or not
public function query_and_count($sql) { $exists = array_shift($this->query_and_fetch_one($sql)); return ($exists > 0) ? true : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function hasRow();", "public function exists()\r\n {\r\n $sql = $this->builder->exists($this);\r\n\r\n $rs = $this->db->select_one($sql, $this->get_binds_values());\r\n\r\n $row = (array) $rs;\r\n\r\n return (bool) $row['exist'];\r\n }", "public function exists(){\r\n\r\n\t\ttry {\r\n\t\t\tglobal $ks_db;\r\n\t\t\tglobal $ks_log;\r\n\r\n\t\t\t$bReturn = false;\r\n\r\n\t\t\tif (! isset ( $this->id )) {\r\n\t\t\t\techo \"Fatal Error: Id is not set for the object! Please do \\$objA->setId(\\$dsh_id); in: \" . __METHOD__;\r\n\t\t\t\texit ();\r\n\t\t\t}\r\n\r\n\t\t\t$sql = \"SELECT COUNT(*) as totalRow FROM $this->sqlTable WHERE dsh_id = ?\";\r\n\r\n\t\t\t//count how many rows found\r\n\t\t\t$totalRow = $ks_db->fetchOne ( $sql, $this->id );\r\n\r\n\t\t\tif ($totalRow > 0) {\r\n\t\t\t\t$bReturn = true;\r\n\t\t\t}else {\r\n\t\t\t\t$bReturn = false;\r\n\t\t\t}\r\n\r\n\t\t\treturn $bReturn;\r\n\r\n\t\t} catch(Exception $e) {\r\n\t\t\t$ks_log->info ( 'Fatal Error: ' . __METHOD__ . '. ' . $e->getMessage () );\r\n\t\t\t$ks_log->info ( '<br>SQL Statement: ' . $sql);\r\n\t\t\techo \"Fatal Error: \" . __METHOD__ . '. ' . $e->getMessage ();\r\n\t\t\techo \"SQL Statement: \" . $sql;\r\n\t\t}\r\n\t}", "function recordExists()\n {\n global $objDatabase;\n\n $query = \"\n SELECT 1\n FROM \".DBPREFIX.\"module_shop\".MODULE_INDEX.\"_products\n WHERE id=$this->id\";\n $objResult = $objDatabase->Execute($query);\n if (!$objResult || $objResult->EOF) return false;\n return true;\n }", "public function exists()\n {\n $result = self::select(\"*\",0,\"invoice_no = ?\", $this->invoice_no);\n if($result->rowCount() >= 1)\n return true;\n return false;\n }", "private function checkIsExists(): bool\n {\n $where = [\n $this->table. '.vendorId' => $this->vendorId,\n $this->table. '.campaign' => $this->campaign,\n ];\n\n if (!is_null($this->id)) {\n $where[$this->table. '.id !='] = $this->id;\n }\n\n $id = $this->readImproved([\n 'what' => [$this->table. '.id'],\n 'where' => $where\n ]);\n\n return !is_null($id);\n }", "private function checkIsExists(): bool\n {\n $id = $this->readImproved([\n 'what' => [$this->table. '.id'],\n 'where' => [\n $this->table. '.listId' => $this->listId,\n $this->table. '.campaignId' => $this->campaignId,\n ]\n ]);\n\n return !is_null($id);\n }", "private function _exists($uid){\n $select = $this->select()\n ->from($this->_name,array('uid'))\n ->where('uid = ?', $uid);\n $row = $this->fetchRow($select);\n\t\t\n // Zend_Debug::dump($select->__toString());\n if($row){\n return true;\n }\n return false;\n \n }", "public function isAlreadyExist(){\n \n $query = \"SELECT *\n FROM \" . $this->table . \" \n WHERE email='\".$this->email.\"'\";\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n // execute query\n $stmt->execute();\n if($stmt->rowCount() > 0){\n return true;\n }else{\n return false;\n }\n }", "public function exists(){\r\n\r\n\t\ttry {\r\n\t\t\tglobal $ks_db;\r\n\t\t\tglobal $ks_log;\r\n\t\t\t\r\n\t\t\t$bReturn = false;\r\n\t\t\t\r\n\t\t\tif (! isset ( $this->id )) { \r\n\t\t\t\techo \"Fatal Error: Id is not set for the object! Please do \\$objA->setId(\\$id); in: \" . __METHOD__;\r\n\t\t\t\texit ();\r\n\t\t\t}\r\n\r\n\t\t\t$sql = \"SELECT COUNT(*) as totalRow FROM $this->sqlTable WHERE lp_id = ?\";\r\n\r\n\t\t\t//count how many rows found\r\n\t\t\t$totalRow = $ks_db->fetchOne ( $sql, $this->id );\r\n\t\t\t\r\n\t\t\tif ($totalRow > 0) {\r\n\t\t\t\t$bReturn = true;\r\n\t\t\t}else {\r\n\t\t\t\t$bReturn = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $bReturn;\r\n\t\t\t\r\n\t\t} catch(Exception $e) {\r\n\t\t\t$ks_log->info ( 'Fatal Error: ' . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage () );\r\n\t\t\t$ks_log->info ( '<br>SQL Statement: ' . $sql);\r\n\t\t\techo \"Fatal Error: \" . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage ();\r\n\t\t\techo \"SQL Statement: \" . $sql;\r\n\t\t}\r\n\t}", "function is_rowid_exist($rowid,$db_table='') {\r\n $db_table = $db_table == '' ? $this->db_table : $GLOBALS['dbpre'].$db_table;\r\n $sql = 'select 1 from '.$db_table.' where rowid='.intval($rowid);\r\n $res = mysql_query($sql) or die('<br>'.$sql.'<br>'.mysql_error()); #do to database\r\n return mysql_num_rows($res);\r\n }", "public function hasRowKey(){\n return $this->_has(1);\n }", "public function hasRowKey(){\n return $this->_has(1);\n }", "public function hasRowKey(){\n return $this->_has(1);\n }", "function isAlreadyExist(){\n $query = \"SELECT *\n FROM\n \" . $this->db_table . \" \n WHERE\n username='\".$this->username.\"'\";\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n // execute query\n $stmt->execute();\n if($stmt->rowCount() > 0){\n return true;\n }\n else{\n return false;\n }\n }", "function is_exists($id) {\n $query = \"SELECT\n id\n FROM\n \" . $this->table_name . \" \n WHERE\n id = ?\n LIMIT\n 0,1\";\n \n // prepare query statement\n $stmt = $this->conn->prepare( $query );\n \n // bind id of user to be updated\n $stmt->bindParam(1, $id);\n \n // execute query\n $stmt->execute();\n \n // get retrieved row\n return ($stmt->rowCount() > 0);\n }", "function is_exists( $data, $table )\n {\n\t$this->db->where( $data );\n\t$query = $this->db->get($table);\n\t\n\tif ($query->num_rows() > 0){\n\t\treturn true;\n\t}\n\telse{\n\t\treturn false;\n\t}\n }", "public function exists(){\n\n\t\treturn (!empty($this->_data)) ? true : false;\n\n\t}", "public function exists()\n {\n return ($this->id) ? true : false;\n }", "public function checkIfExists(){\n $query = \"SELECT EXISTS(SELECT * FROM `Locations` \n WHERE `AccStrAdd` = :stradd AND `AccZip` = :zip AND `AccAptNum` = :aptnum)\";\n try {\n $stmt = $this->dbh->prepare($query);\n $stmt->bindParam(\":stradd\", $this->accStrAdd);\n $stmt->bindParam(\":zip\", $this->accZip);\n $stmt->bindParam(\":aptnum\",$this->accAptNum);\n $stmt->execute();\n } catch (Exception $e){\n error_log(\"Error: \" . $e->getMessage());\n }\n\n $row = $stmt->fetch(PDO::FETCH_NUM);\n\n if($row[0] == \"1\"){\n return true;\n } else {\n return false;\n }\n }", "function dbResultExists($query) {\n\t$result = dbQuery($query);\n\t$row = mysqli_fetch_array($result);\n\tif(!empty($row)) { return(true); }\n\treturn(false);\n}", "function exists()\n {\n return false;\n }", "public function exists(){\n\t\treturn ($this->count() > 0);\n\t}", "public function exists(): bool;", "public function exists(): bool;", "public function exists(): bool;", "public function exists()\n {\n return false;\n }", "public function isRowExist(array $rowData): bool\n {\n $connection = $this->getConnection();\n\n //Raw query is more faster on big bunch of data\n //phpcs:ignore Magento2.SQL.RawQuery.FoundRawSql\n $select = 'SELECT 1 FROM `' . $this->getMainTable() . '` WHERE ';\n $select .= 'method_id=' . (int)$rowData[ShippingTableRateInterface::METHOD_ID];\n unset($rowData[ShippingTableRateInterface::METHOD_ID]);\n\n foreach ($rowData as $columnKey => $value) {\n $description = $this->describeTable->getColumnDescribe($columnKey);\n if ($description['IDENTITY']) {\n continue;\n }\n\n $value = $rowData[$columnKey] ?? $description['DEFAULT'];\n\n if ($value === null && $description['NULLABLE']) {\n $select .= ' AND `' . $columnKey . '` IS NULL';\n continue;\n }\n\n // because for users value in db null or '' are the same\n if ($value === '' && $description['NULLABLE'] && $description['DATA_TYPE'] === 'varchar') {\n $select .= ' AND (`' . $columnKey . '` IS NULL OR `'\n . $columnKey . '` = ' . $this->quoteValue->quoteValue($columnKey, $value) . ')';\n continue;\n }\n\n $value = $this->quoteValue->quoteValue($columnKey, $value);\n\n $select .= ' AND `' . $columnKey . '` = ' . $value;\n }\n\n $select .= ' LIMIT 1';\n //phpcs:ignore Magento2.SQL.RawQuery.FoundRawSql\n $select = 'SELECT EXISTS (' . $select . ')';\n\n return (bool)$connection->fetchOne($select);\n }", "public function Exists();", "public function hasRowKey(){\n return $this->_has(2);\n }", "public function hasRowKey(){\n return $this->_has(2);\n }", "public function hasRowKey(){\n return $this->_has(2);\n }", "public function hasRowKey(){\n return $this->_has(2);\n }", "private function exist() {\n $stmt = $this->pdo->prepare(\"SELECT * FROM $this->table WHERE \"\n . \"product_category_id= :cat_id and product_id= :prod_id \");\n $stmt->bindValue(\":cat_id\", $this->product_category_id, \\PDO::PARAM_INT);\n $stmt->bindValue(\":prod_id\", $this->product_id, \\PDO::PARAM_INT);\n $stmt->execute();\n return $stmt->fetch();\n }", "function exists() {\n\t return !empty($this->id);\n\t}", "public function exists() {\n\t\tglobal $config;\n\t\t\n\t\tif(!empty($this->data['id']))\n\t\t\t$where = 'id = '.$this->data['id'];\n\t\telseif(!empty($this->data['fbid']))\n\t\t\t$where = 'fbid = '.$this->data['fbid'];\n\t\n\t\t$result = $config['database']->query(\"\n\t\t\tSELECT id\n\t\t\tFROM nuusers\n\t\t\tWHERE $where\n\t\t\tLIMIT 1\n\t\t\");\n\t\t\n\t\treturn $result->num_rows;\n\t}", "public function exists()\n {\n return ($this->id > 0) ? true : false;\n }", "function exist() {\n\t\t\t$exist = $this->db->prepare(\"SELECT 1 FROM REPORT WHERE titleFileVideo = ? AND idArt = ?\");\n\t\t\t$exist->execute(array($this->titleFileVideo, $this->idArt));\n\t\t\treturn count($exist->fetchAll()) >= 1;\n\t\t}", "public function exists() {\n\t\treturn !is_null($this->id);\n\t}", "function existe($tabla,$campo,$where){\n\treturn (count(CON::getRow(\"SELECT $campo FROM $tabla $where\"))>0)?true:false;\n}", "function exists() {\n\t\tif ($this->exists) return true;\n\t\treturn false;\n\t}", "private function isClientExists(): bool {\n $sql = 'SELECT * FROM clients WHERE phone = :phone LIMIT 1';\n\n $db = static::getDB();\n $stmt = $db->prepare( $sql );\n\n $stmt->bindValue( ':phone', $this->phone, PDO::PARAM_STR );\n\n $stmt->execute();\n\n if ( $result = $stmt->fetch( PDO::FETCH_ASSOC ) ) {\n $this->id = $result['id'];\n\n return true;\n }\n\n return false;\n }", "function isDataExists($tableName, $id, $key) {\n $ci = & get_instance();\n $ci->load->database();\n if ($tableName && $id && $key) {\n $query = $ci->db->get_where($tableName, array($key => $id));\n return ($query->num_rows()) ? true : false;\n }\n return false;\n}", "function exists($id) {\n\t\t$res = $this->query('SELECT EXISTS (SELECT * FROM `'.$this->table.'` WHERE `'.$this->primaryKey.'` = \\''.$this->escape($id).'\\')');\n\t\t$row = $res->fetch_row();\n\t\t$res->free();\n\t\treturn (bool) $row[0];\n\t}", "public function exists();", "public function exists();", "public function exists();", "public function hasRowContents(){\n return $this->_has(1);\n }", "function exists() {\r\n\t\t$sql_inicio \t= \" select * from \".$this->table.\" where \";\r\n\t\t$sql_fim \t\t= \" \".($this->get($this->pk) ? \" and \".$this->pk.\" <> \".$this->get($this->pk) : \"\").\" limit 1 \";\r\n\t\t\r\n\t\t$sql \t= \"con_id = \".$this->get(\"con_id\").\" and exa_id = \".$this->get(\"exa_id\").\" \";\r\n\t\tif (mysql_num_rows(Db::sql($sql_inicio.$sql.$sql_fim))){\r\n\t\t\t$this->propertySetError (\"con_id\", \"Já existe no banco de dados.\");\r\n\t\t\t$this->propertySetError (\"exa_id\", \"Já existe no banco de dados.\");\r\n\t\t}\r\n\t}", "function topicExists(){\n\t $query = \"SELECT * FROM \" . $this->table_name . \" WHERE name = ? LIMIT 0,1\";\n\t $stmt = $this->conn->prepare( $query );\n\t $stmt->bindParam(1, $this->name);\n\t $stmt->execute();\n\t $num = $stmt->rowCount();\n\t if($num>0){\n\t \treturn true;\n\t }\n\t return false;\n\t}", "public function isExistName($name)\n\t{\n //$row = $rowset->current();\n // if (!$row) {\n\t\t//return false;\n //throw new \\Exception(\"Could not find row $id\");\n //}\n //return true;\n\t\t\n\t\t$valid = true;\n\t\t$name \t= trim($name);\t\t\n\t\t$adapter\t= $this->tableGateway->getAdapter();\n\t\t//$adapter = null;\n\n\t\t if (null === $adapter) {\n\t\t\tthrow new \\Exception('No database adapter present');\n\t\t}\n\n\t\t\n\t\t$validator = new RecordExists(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t'table' => 'advertisement',\n\t\t\t\t\t\t'field' => 'name',\n\t\t\t\t\t\t'adapter' => $adapter\n\t\t\t\t\t\t)\n\n\t\t);\n\n\t\t// We still need to set our database adapter\n\t\t$validator->setAdapter($adapter);\n\t\t// Validation is then performed as usual\n\t\tif ($validator->isValid($name)) {\n\t\t\t\t\t$valid = true;\n\t\t} else {\t\n\t\t\t\t\t$valid = false;\t\t\t\n\t\t}\t\t\n\t\treturn $valid;\n\t\t\n\t\t// username is invalid; print the reason\n\t\t//$//messages = $validator->getMessages();\n\t\t//foreach ($messages as $message) {\n\t\t//echo \"$message\\n\";\n\t\t//}\n\n }", "function username_exist($username) {\n\n $sql = \"SELECT id FROM users WHERE username = '$username'\";\n\n $result = query($sql);\n if(row_count($result) == 1) {\n return true;\n } else {\n return false;\n }\n}", "public function hasRows()\n\t{\n\t\treturn count($this->getRows()) > 0;\n\t}", "function validate_row_exists(array $inputs, array &$form): bool\n{\n if(App::$db->rowExists('wall', $inputs['id'])){\n return true;\n }\n\n return false;\n}", "private function isTalantExists($tal_name) {\n\t\t$stmt = $this->conn->prepare(\"SELECT tal_name from talants WHERE status = 1 and tal_name = ? \");\n $stmt->bind_param(\"s\",$tal_name);\n $stmt->execute();\n\t\t$stmt->store_result();\n $num_rows = $stmt->num_rows;\n $stmt->close();\n return ($num_rows > 0); //if it has more than zero number of rows; then it sends true\n }", "public function hasRecord();", "function exist() {\n\t\t\t$exist = $this->db->prepare(\"SELECT 1 FROM HISTORIC WHERE nameFile = ? AND idArt = ? \");\n\t\t\t$exist->execute(array($this->nameFile, $this->idArt));\n\t\t\treturn count($exist->fetchAll()) >= 1;\n\t\t}", "public function exists()\r\n {\r\n global $g_comp_database_system;\r\n\r\n $l_sql = \"SELECT * FROM isys_report WHERE \" . \"(isys_report__title = '\" . $g_comp_database_system->escape_string($this->m_title) . \"');\";\r\n\r\n $l_resource = $g_comp_database_system->query($l_sql);\r\n if ($g_comp_database_system->num_rows($l_resource) > 0)\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n } // if\r\n }", "public function exists() {}", "public function rowExists(string $table_name, $row_id): bool\n {\n return isset($this->getData()[$table_name][$row_id]);\n }", "public function isUserExisting($username){\n\t\t$sqlQuery = \"SELECT count(*) as isExisting \";\n\n\t\t$sqlQuery .= \"FROM user_table \";\n\n\t\t$sqlQuery .= \"WHERE user_name='$username' \";\t\t\n\t\t//Calls the method from the DAOFactory and passes in the query to be execute, and the result is stored\n\t\t$result = $this->getDbManager()->executeSelectQuery($sqlQuery);\n\t\t\n\t\tif ($result[0][\"isExisting\"] == 1) return (true);\n\n\t\telse return (false);\n\t}", "function exists()\r\n\t{\r\n\t\treturn ( ! empty($this->id));\r\n\t}", "protected function exists() {}", "function existe($tabla,$campo,$where){\n\t$query=$GLOBALS['cn']->query('SELECT '.$campo.' FROM '.$tabla.' '.$where);\n\treturn (mysql_num_rows($query)>0)?true:false;\n}", "protected function metaRowExists($id_meta){\r\n\t$res = Db::result(\"SELECT * FROM \"._SQLPREFIX_.$this->metaDataTableName.\" WHERE id_meta = \".(int)$id_meta.\" AND \".$this->metaConnectId.\" = \".$this->id);\r\n\treturn count($res);\r\n}", "public function existsData () {\n\t\tif (is_null($this->bExistsData)) {\n\t\t\t$sQuery = \"\n\t\t\t\tPREFIX skos: <\" . self::SKOS_CORE . \">\n\n\t\t\t\tSELECT ?concept\n\t\t\t\tWHERE {\n\t\t\t\t\t?concept a skos:Concept .\n\t\t\t\t}\n\t\t\t\tLIMIT 1\";\n\t\t\t$aRow = $this->oStore->query($sQuery, 'row');\n\t\t\t$this->bExistsData = count($aRow) ? TRUE : FALSE;\n\t\t}\n\n\t\treturn $this->bExistsData;\n\t}", "public function exists()\n {\n return !empty($this->ID);\n }", "function checkExist($table, $anchor, $data)\n {\n $sql = \"SELECT * FROM $table WHERE $anchor=?\";\n $statement = $this->pdo->prepare($sql);\n $statement->execute([$data]);\n if ($result = $statement->fetch(PDO::FETCH_ASSOC)) {\n return true;\n }\n return false;\n\n }", "public function exists()\n {\n return true;\n }", "public function exist(): bool { // 返回是否已经在数据库中存在\n return $this->InformationValid;\n }", "public function exists()\n {\n return (bool)$this->where->count(1);\n }", "public function isUserExists($username)\n {\n $rs = $this->con->query(\"SELECT count(1) from tbl_usuario WHERE userlogin = '$username'\");\n $row = $rs->fetch_array();\n $rs->close();\n $result = (bool) $row[0];\n return $result;\n // var_dump($row);\n\n // $stmt = $this->con->prepare(\"SELECT id_usuario from tbl_usuario WHERE userlogin = ?\");\n // $stmt->bind_param(\"s\", $username);\n // $stmt->execute();\n // $stmt->store_result();\n // $num_rows = $stmt->num_rows;\n // $stmt->close();\n // return $num_rows > 0;\n }", "public function exist()\n {\n return ($this->count() > 0);\n }", "function user_is($id) {\n $query =\"SELECT EXISTS(SELECT id FROM users WHERE id = '$id')\";\n $result = $this->conn->query($query);\n\n if (!$result) die (\"Database access failed: \" . $this->conn->error);\n\n $result->data_seek(0);\n if ($result->fetch_array(MYSQLI_NUM)[0]) {\n $result->close();\n return true;\n } else {\n $result->close();\n return false;\n }\n }", "function IfExists($natregno) {\r\n $conn = conn();\r\n $sql = \"SELECT * FROM users WHERE national_id='$natregno'\";\r\n $stmt = $conn->prepare($sql);\r\n $stmt->execute();\r\n $result = $stmt->fetchAll();\r\n if (!empty($result)) {\r\n return 1;\r\n }\r\n return 0;\r\n $conn = NULL;\r\n }", "function IfExists($natregno) {\r\n $conn = conn();\r\n $stmt = $conn->prepare(\"SELECT * FROM employee WHERE Natregno='$natregno';\");\r\n $stmt->execute();\r\n $result = $stmt->fetchAll();\r\n if (empty($result)) {\r\n return 1;\r\n }\r\n return 0;\r\n $conn = NULL;\r\n }", "function exists ($name)\r\n {\r\n # create encoded_key_string\r\n $encoded_key_string = parent::_encode_key_string(USER_NAME_FIELD_NAME.\"='\".$name.\"'\");\r\n\r\n $record = parent::select_record($encoded_key_string);\r\n if (count($record) > 0)\r\n {\r\n $this->_log->debug(\"user already exists (name=\".$name.\")\");\r\n\r\n return TRUE;\r\n }\r\n else if (strlen($this->get_error_message_str()) == 0)\r\n {\r\n $this->_log->debug(\"user does not exist (name=\".$name.\")\");\r\n\r\n return FALSE;\r\n }\r\n else\r\n return FALSE;\r\n }", "public function exists()\n {\n return !empty($this->data);\n }", "public function exists()\r\n {\r\n }", "public function valid()\n {\n return isset($this->resultSet[$this->key()]);\n }", "abstract public function exists();", "abstract public function exists();", "function exist($name, $db) {\n $resultSet = $db -> query(\"SELECT * from Pokedex WHERE name = '$name'\");\n $count = $resultSet->rowCount();\n return (!$count == 0);\n }", "function exists($id);", "public function exists()\n\t{\n\t\treturn in_array($this->name, $this->driver->getTables());\n\t}", "function func_existeDato($dato, $tabla, $columna){\n selectConexion('onmworkflow');\n $query = \"select * from $tabla where $columna = '$dato' ;\";\n $result = pg_query($query) or die (\"Error al realizar la consulta\");\n if (pg_num_rows($result)>0)\n {\n return true;\n } else {\n return false;\n }\n }", "public function exists()\n {\n }", "public function exists()\n {\n }", "public function exists() {\n\t\tglobal $wpdb, $bp;\n\n\t\t// Check cache first\n\t\t$cached = wp_cache_get( $this->field_id, 'bp_xprofile_data_' . $this->user_id );\n\n\t\tif ( $cached && ! empty( $cached->id ) ) {\n\t\t\t$retval = true;\n\t\t} else {\n\t\t\t$retval = $wpdb->get_row( $wpdb->prepare( \"SELECT id FROM {$bp->profile->table_name_data} WHERE user_id = %d AND field_id = %d\", $this->user_id, $this->field_id ) );\n\t\t}\n\n\t\treturn apply_filters_ref_array( 'xprofile_data_exists', array( (bool)$retval, $this ) );\n\t}", "public function exists() {\n\t\ttry {\n\t\t\t$this->load();\n\t\t\treturn true;\n\t\t} catch ( \\Exception $e ) {\n\t\t\treturn false;\n\t\t}\n\t}", "public function exists() : bool {\n return DB::tableExists($this->_name);\n }", "private static function checkIfTodoListTableExists()\n {\n $query = \"SELECT 1 FROM Todo_List\";\n $result = mysqli_query(Core_DbConnectionModel::getInstance(), $query);\n\n //this part allows you to do something if the result is false or just return $result, however, you should check for MySQL error just in-case.\n $tableExistStatus = ($result !== false) ? true : false;\n\n return $tableExistStatus;\n }", "public function titleExists($title){ // returns true if title title in titles\n $stmt = $this->conn->prepare ( 'SELECT * FROM titles WHERE title = :title' );\n $stmt->bindParam ( ':title', $title );\n $stmt->execute ();\n $stmt->fetch ();\n if ($stmt->rowCount () === 0)\n return FALSE;\n else\n return TRUE;\n }", "function userExists($username){\r\n $sql = \"SELECT username FROM users WHERE username = '$username'\";\r\n $count = $this->q()->num_rows;\r\n if ($count > 0 ){ return true; } else{ return false; }\r\n }", "public function exists()\n {\n return ! is_null($this->first([Grammar::VIRTUAL_META_ID_COLUMN]));\n }", "public function exists() {\n\t\t\t$matchFields = array(\n\t\t\t 'freeway_incidents.highway_id' => $this->highway_id,\n\t\t\t 'freeway_incidents.direction_id' => $this->direction_id,\n\t\t\t 'freeway_incidents.from_at' => $this->from_at,\n\t\t\t 'freeway_incidents.to' => $this->to,\n\t\t\t 'freeway_incidents.event_start' => $this->event_start\n\t\t\t);\n\t\t\t\n\t\t\t$q = new Query();\n\t\t\t$q->addTable('freeway_incidents');\n\t\t\tforeach ($matchFields as $field => $value) {\n\t\t\t\t$q->addWhere($field, $value);\n\t\t\t}\n\t\t\t$data = $this->db->getRow($q);\n\t\t\t\n\t\t\tif ($data) {\n\t\t\t\t$this->original_data = $data;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\treturn false;\n\t\t}", "public static function exists($adinumber=\"\") {\n global $database;\n \n $sql = \"SELECT * FROM \".static::$table_name.\" \";\n $sql .= \"WHERE adinumber = '{$adinumber}' \";\n $sql .= \"LIMIT 1\";\n $result_array = self::find_by_sql($sql);\n return !empty($result_array) ? true : false;\n }", "public function hasPrimaryKey()\n {\n return count($this->getPrimaryKey()) > 0;\n }", "private function checkUserExistence() {\n\t\t\t\t$query = \"select count(email) as count from register where email='$this->email'\";\n\t\t\t\t$resource = returnQueryResult($query);\n\t\t\t\t$result = mysql_fetch_assoc($resource);\n\t\t\t\tif($result['count'] > 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}", "private function Check_If_User_Exists($query){\r\n\r\n // Send query into server\r\n $this->_db->get_Row($query);\r\n\r\n // Return result of query\r\n // True - if find\r\n // False - in dont\r\n return ($this->_db->count() > 0 ) ? true : false;\r\n }", "public function userExists()\r\n {\r\n $sql = \"SELECT COUNT(*) FROM (SELECT * FROM doctors WHERE email = :email) AS subquery\";\r\n\r\n $query = $this->db_connection->prepare($sql);\r\n $query->bindValue(':email', $this->email);\r\n $query->execute();\r\n\r\n while($result_row = $query->fetch() ){\r\n if($result_row[0] == 1) return true;\r\n else return false;\r\n }\r\n\r\n return false; \r\n }" ]
[ "0.7958596", "0.7773271", "0.7614724", "0.75973517", "0.75940245", "0.753846", "0.75078905", "0.74876904", "0.74408644", "0.74222624", "0.7421657", "0.7387881", "0.7387881", "0.7387881", "0.7387102", "0.73818314", "0.736933", "0.73478866", "0.7272259", "0.7270323", "0.7242152", "0.72126263", "0.7207259", "0.7203834", "0.7203834", "0.7203834", "0.71781003", "0.71704996", "0.71624464", "0.7129201", "0.7129201", "0.7129201", "0.7129201", "0.7124796", "0.71204525", "0.7112947", "0.7105489", "0.7103933", "0.70983595", "0.7090778", "0.70860165", "0.7082001", "0.70772946", "0.7055715", "0.7052279", "0.7052279", "0.7052279", "0.70281357", "0.7012492", "0.70042425", "0.6996387", "0.69915694", "0.69802123", "0.696841", "0.69658136", "0.6961413", "0.6954621", "0.693805", "0.69338024", "0.6933236", "0.69321483", "0.69254696", "0.6924541", "0.6920055", "0.69064564", "0.6904288", "0.69014794", "0.68977386", "0.6891055", "0.6887402", "0.6881171", "0.68806124", "0.68677974", "0.6867035", "0.68618053", "0.6858046", "0.68564045", "0.68404615", "0.6821913", "0.6801955", "0.68012875", "0.68012875", "0.6797282", "0.677432", "0.6764543", "0.6757142", "0.6755823", "0.6755132", "0.6753849", "0.6752674", "0.67468953", "0.6731217", "0.6726395", "0.6714723", "0.6714591", "0.6711469", "0.6707791", "0.67070615", "0.66965127", "0.66938424", "0.6693473" ]
0.0
-1
kills the process and lets the admin/user know that there was an error with the database comunication.
private function confirm_query($result) { if(!$result) { // if (mysqli_connect_errno()) // { // echo 'Connect failed: '. mysqli_connect_error(); // } die("Database Query Failed: " . mysqli_error($connection)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function killProcess($pid)\n{\n $mapper = systemToolkit::getInstance()->getMapper('process', 'process');\n $process = $mapper->searchOneByField('pid', $pid);\n if($process) {\n $mapper->delete($process);\n }\n}", "function kill_Process()\n {\n $this->set_kill_Command();\n //Fire Script \n $this->fire_Script();\n $response = array(\"status\"=>$this->status,\n \"script_ouput\"=>$this->script_output,\n \"executation_time\"=>$this->time_interval,\n \"message\"=>$this->message);\n \n echo json_encode($response, JSON_PRETTY_PRINT);\n }", "public function kill();", "public function stopProcess() {\n // Do not change the status of an idle migration\n db_update('migrate_status')\n ->fields(array('status' => MigrationBase::STATUS_STOPPING))\n ->condition('machine_name', $this->machineName)\n ->condition('status', MigrationBase::STATUS_IDLE, '<>')\n ->execute();\n }", "protected function killProcess(): void\n {\n if (($pid = $this->getAttribute('pid')) === null) {\n return;\n }\n\n if ($this->systemCommands()->isProcessRunning($pid)) {\n $this->systemCommands()->killProcess($pid);\n }\n }", "public function stop() {\n try {\n $pid = $this->getPidFile()->read();\n\n Logger::log(\"Killing THIS PID: \" . $pid, \\Zend_Log::WARN);\n posix_kill($pid, SIGTERM);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n $this->_exit();\n }", "public function cerrar_pg () {\r\n pg_close($this->link);\r\n }", "public function shutdown()\n {\n if ($this->db) {\n $db->disconnect();\n }\n }", "function kill($error) {\n echo $error.\"<br /><br />\";\n die();\n }", "public function kill_process($pid)\n {\n\n if (!is_numeric($pid)) return false;\n $pid = (int)$pid;\n $sql = \"KILL $pid\";\n\n return $this->db->query($sql);\n }", "function db_disconnect()\n\t{\n\t\tpg_close($this->db_connection);\n\t}", "public function stop()\n {\n if (OS::isWin()) {\n $cmd = \"taskkill /pid {$this->pid} -t -f\";\n } else {\n $cmd = \"kill -9 {$this->pid}\";\n }\n shell_exec($cmd);\n }", "public static function killProcesses() {\n foreach(self::$__pIds as $pid => $active) {\n if(self::$__infoKill) {\n echo sprintf(self::$__infoKill, date('r'), $pid) . PHP_EOL;\n }\n exec('kill ' . $pid);\n unset(self::$__pIds[$pid]);\n };\n }", "public function KillCurrentDatabaseHandler()\r\n {\r\n // check if our database handler exists\r\n if($this->_DatabaseHandler !== null)\r\n {\r\n // Kill connection\r\n $this->_DatabaseHandler->kill($this->_DatabaseHandler->thread_id);\r\n // Close connection\r\n $this->_DatabaseHandler->close();\r\n // Dereference the closed object\r\n $this->_DatabaseHandler = null; \r\n }\r\n }", "public function kill(): void;", "function killProcess(string $id) : void\n {\n shell_exec(\"kill $id\");\n }", "public function __destruct() {\n\t\t$thread_id = $this->mysqli->thread_id;\n\t\t$this->mysqli->kill($thread_id);\n\t\t$this->mysqli->close();\n\t}", "public function killChild()\n\t{\n\t\tif (!$this->child) {\n\t\t\t$this->logger->log(LogLevel::DEBUG, 'No child to kill.');\n\t\t\treturn;\n\t\t}\n\n\t\t$context = array('child' => $this->child);\n\t\t$this->logger->log(LogLevel::INFO, 'Killing child at {child}', $context);\n\t\tif (exec('ps -o pid,s -p ' . $this->child, $output, $returnCode) && $returnCode != 1) {\n\t\t\t$context = array('child' => $this->child);\n\t\t\t$this->logger->log(LogLevel::DEBUG, 'Child {child} found, killing.', $context);\n\t\t\tposix_kill($this->child, SIGKILL);\n\t\t\t$this->child = null;\n\t\t} else {\n\t\t\t$context = array('child' => $this->child);\n\t\t\t$this->logger->log(LogLevel::INFO, 'Child {child} not found, restarting.', $context);\n\t\t\t$this->shutdown();\n\t\t}\n\t}", "public function disconnect(){\n\t\n\t//TODO: Custom Error reporting\n\ttry {\n\t\t\n\t\t\t$this->_db = NULL;\n\t\t\t}\n\tcatch(PDOException $e) {\n\t\t\t//xxx Custom Error thingy!!!\n\t\t\t_b($e->getMessage());\n\t\t}\n\t\t\t\t\n\t}", "static function kill_temp_db() {\n\t\tif(self::using_temp_db()) {\n\t\t\t$dbConn = DB::getConn();\n\t\t\t$dbName = $dbConn->currentDatabase();\n\t\t\tif($dbName && DB::getConn()->databaseExists($dbName)) {\n\t\t\t\t// Some DataExtensions keep a static cache of information that needs to \n\t\t\t\t// be reset whenever the database is killed\n\t\t\t\tforeach(ClassInfo::subclassesFor('DataExtension') as $class) {\n\t\t\t\t\t$toCall = array($class, 'on_db_reset');\n\t\t\t\t\tif(is_callable($toCall)) call_user_func($toCall);\n\t\t\t\t}\n\n\t\t\t\t// echo \"Deleted temp database \" . $dbConn->currentDatabase() . \"\\n\";\n\t\t\t\t$dbConn->dropDatabase();\n\t\t\t}\n\t\t}\n\t}", "static function kill_temp_db() {\n\t\tif(self::using_temp_db()) {\n\t\t\t$dbConn = DB::getConn();\n\t\t\t$dbName = $dbConn->currentDatabase();\n\t\t\tif($dbName && DB::query(\"SHOW DATABASES LIKE '$dbName'\")->value()) {\n\t\t\t\t// echo \"Deleted temp database \" . $dbConn->currentDatabase() . \"\\n\";\n\t\t\t\t$dbConn->dropDatabase();\n\t\t\t}\n\t\t}\n\t}", "public function kill()\n {\n $this->log(\"Killing process {$this->pid}\");\n $command = \"kill {$this->pid}\";\n exec($command, $output);\n\n if ($this->processIsRunning()) {\n $this->log(\"Process {$this->pid} cannot die!\");\n return false;\n }\n\n $this->log(\"Process {$this->pid} is dead.\");\n return true;\n }", "public function terminate(Process $process);", "function stdapi_sys_process_kill($req, &$pkt) {\n # that isn't enabled by default, but better to try it and avoid shelling\n # out when unnecessary.\n my_print(\"doing kill\");\n $pid_tlv = packet_get_tlv($req, TLV_TYPE_PID);\n $pid = $pid_tlv['value'];\n if (is_callable('posix_kill')) {\n $ret = posix_kill($pid, 9);\n $ret = $ret ? ERROR_SUCCESS : posix_get_last_error();\n if ($ret != ERROR_SUCCESS) {\n my_print(posix_strerror($ret));\n }\n } else {\n $ret = ERROR_FAILURE;\n if (is_windows()) {\n my_cmd(\"taskkill /f /pid $pid\");\n # Don't know how to check for success yet, so just assume it worked\n $ret = ERROR_SUCCESS;\n } else {\n if (\"foo\" == my_cmd(\"kill -9 $pid && echo foo\")) {\n $ret = ERROR_SUCCESS;\n }\n }\n }\n return $ret;\n}", "function halt( $msg ) {\r\n printf( \"Database error: %s\r\nn\", $msg );\r\n printf( \"MySQL Error: %s (%s)\r\nn\", $this->Errno, $this->Error );\r\n die( \"Session halted.\" );\r\n }", "function db_killAuthUser($userid)\n{\n $userid = db_esc($userid);\n db_run(\"DELETE FROM \".TBL_AUTH.\" WHERE userid='$userid'\");\n}", "public function endProcess() {\n if ($this->previousErrorHandler) {\n set_error_handler($this->previousErrorHandler);\n $this->previousErrorHandler = NULL;\n }\n if ($this->processing) {\n $this->status = MigrationBase::STATUS_IDLE;\n $fields = array('class_name' => get_class($this), 'status' => MigrationBase::STATUS_IDLE);\n db_merge('migrate_status')\n ->key(array('machine_name' => $this->machineName))\n ->fields($fields)\n ->execute();\n\n // Complete the log record\n if ($this->logHistory) {\n db_merge('migrate_log')\n ->key(array('mlid' => $this->logID))\n ->fields(array(\n 'endtime' => microtime(TRUE) * 1000,\n 'finalhighwater' => $this->getHighwater(),\n 'numprocessed' => $this->total_processed,\n ))\n ->execute();\n }\n\n $this->processing = FALSE;\n }\n self::$currentMigration = NULL;\n }", "public function terminate();", "public function disconnect()\n {\n \t//$GLOBALS['log']->debug('Calling DBManager::disconnect()');\n $close = $this->backendFunctions['close'];\n if(isset($this->database)){\n $this->freeResult();\n if ( is_resource($this->database) || is_object($this->database) )\n\t\t\t\t$close($this->database);\n unset($this->database);\n }\n }", "public function stop() {\n\t\tLogger::getRootLogger ()->info ( \"Stopping IPsec\" );\n\t\t$pid = file_exists ( self::PID_PATH ) ? Functions::shellCommand ( \"pgrep -F \" . self::PID_PATH ) : 0;\n\t\tif ($pid > 0) {\n\t\t\tFunctions::shellCommand ( \"/bin/kill {$pid}\" );\n\t\t}\n\t}", "public function terminate()\n {\n $this->logger->debug(MessageFormatter::receivedTerminateSignal('Supervisor'));\n\n foreach ($this->consumerProcesses as $processGroup) {\n $processGroup->sendStopSignal();\n }\n\n foreach ($this->consumerProcesses as $processGroup) {\n $processGroup->stopCompletely();\n }\n\n die();\n }", "function halt( $msg )\n {\n printf( \"\n<strong>Database error:</strong> %s\nn\", $msg );\n printf( \"<strong>MySQL Error</strong>: %s (%s)\nn\", $this->Errno, $this->Error );\n die( \"Session halted.\" );\n }", "function reset_process(){ $this->model->closing(); }", "public function Kill( $message = '' )\r\n\t{\r\n\t\tif( strlen( $message ) > 0 )\r\n\t\t{\r\n\t\t\texit( $message );\r\n\t\t} \r\n\t\telse\r\n\t\t{\r\n\t\t\texit( $this->Error() );\r\n\t\t}\r\n\t}", "public function shutdown()\n {\n if($this->connection != null) {\n @$result = $this->connection->done();\n $this->connection = null;\n if (Net_LDAP2::isError($result)) {\n $error = 'Could not close KVDag_LdapDatabase connection';\n throw new AgaviDatabaseException($error);\n }\n }\n }", "function halt($msg) {\n printf(\"<strong>Database error:</strong> %sn\", $msg);\n printf(\" <strong>MySQL Error</strong>: %s (%s)n\", $this->Errno, $this->Error);\n die(\"Session halted.\");\n }", "public function run() {\n $this->script_start($this->class_name.'::'.__FUNCTION__);\n try {\n $this->process();\n $this->console_writer->flush();\n } catch (\\Exception $exception) {\n $this->has_error = true;\n $this->db->rollback();\n $this->error = $exception->getMessage();\n echo $this->console_writer->sprintf(\"\\e[0;31mE: %s\\e[0m\", $exception->getMessage()).PHP_EOL;\n echo $exception->getTraceAsString().PHP_EOL;\n $this->script_end();\n throw $exception;\n }\n $this->script_end();\n }", "function dbError() {\n exit(\"Error connecting to the database\");\n}", "private function close() {\n if (!empty($this->_dbConn)) {\n pg_close($this->_dbConn);\n unset($this->_dbConn);\n }\n }", "public function stopProcess($pid, $grace = 5)\n { $log = usingLog()->startAction(\"stop process '{$pid}' on host '{$this->args[0]}'\");\n\n // is the process running at all?\n if (!fromHost($this->args[0])->getPidIsRunning($pid)) {\n $log->endAction(\"process is not running\");\n return;\n }\n\n // yes it is, so stop it\n // send a TERM signal to the screen session\n $log->addStep(\"send SIGTERM to process '{$pid}'\", function() use ($pid) {\n if ($this->getIsLocalhost()) {\n posix_kill($pid, SIGTERM);\n }\n else {\n usingHost($this->args[0])->runCommand(\"kill {$pid}\");\n }\n });\n\n // has this worked?\n $isStopped = $log->addStep(\"wait for process to terminate\", function() use($pid, $grace, $log) {\n for($i = 0; $i < $grace; $i++) {\n if (!fromHost($this->args[0])->getPidIsRunning($pid)) {\n return true;\n }\n\n // process still exists\n sleep(1);\n }\n\n return false;\n });\n\n // did the process stop?\n if ($isStopped) {\n $log->endAction();\n return;\n }\n\n $log->addStep(\"send SIGKILL to process '{$pid}'\", function() use($pid) {\n if ($this->getIsLocalhost()) {\n posix_kill($pid, SIGKILL);\n }\n else {\n usingHost($this->args[0])->runCommand(\"kill -9 {$pid}\");\n }\n sleep(1);\n });\n\n // success?\n if (fromHost($this->args[0])->getProcessIsRunning($pid)) {\n $log->endAction(\"process is still running :(\");\n throw new E5xx_ActionFailed(__METHOD__);\n }\n\n // all done\n $log->endAction(\"process has finished\");\n }", "public function tearDown() {\n if(self::$__infoKill) {\n echo sprintf(self::$__infoKill, date('r'), $this->__pid) . PHP_EOL;\n }\n exec('kill ' . $this->__pid);\n unset(self::$__pIds[$this->__pid]);\n\n parent::tearDown();\n }", "function kill($msg = STR_EMP, $fatal = false) {\n\tif($fatal) {\n\t\techo \"**** FATAL ERROR:\\n\";\n\t}\n\techo $msg . \"\\n\";\n\techo \"............process ended\\n\";\n\texit;\n}", "private function serveStop()\n {\n foreach ($this->pid as $pid) {\n $command = \"kill -9 {$pid} > /dev/null 2> /dev/null &\";\n @exec($command, $output);\n }\n }", "public function Terminate ();", "private function primeDatabaseServer(): void\n {\n try {\n $this->connection->getSchemaManager()->dropAndCreateDatabase(BuoyRepository::BUOY_DATABASE_NAME);\n } catch (\\Exception $e) {\n return;\n }\n }", "public function killCommand()\n {\n $this->registry->set(Registry::DAEMON_KILL_KEY, time());\n $this->outputLine('Broadcast kill signal');\n }", "function pg_cancel_query($connection): void\n{\n error_clear_last();\n $result = \\pg_cancel_query($connection);\n if ($result === false) {\n throw PgsqlException::createFromPhpError();\n }\n}", "public function cancelOperation() {\n printf(\"Cancelling...\\n\");\n $this->_cancelled = true;\n posix_kill($this->_pid, SIGKILL);\n pcntl_signal_dispatch();\n }", "private function stop_ATD()\n\t{\n\t\texecuteCommand('killall run-lowmem.sh', '', $result, $return_status);\n\t}", "abstract public function delete__do_process ();", "public function reload()\n {\n if ($this->config['server_type'] == 'process') {\n $pid = $this->getPid('worker');\n } else {\n $pid = $this->getPid('master');\n }\n\n if (empty($pid)) {\n die(\"{$this->config['process_name']} has not process\".PHP_EOL);\n }\n\n exec(\"kill -USR1 \" . implode(' ', $pid), $output, $return);\n\n if ($return === false) {\n die(\"{$this->config['process_name']} reload fail\".PHP_EOL);\n }\n echo \"{$this->config['process_name']} reload success\".PHP_EOL;\n }", "public function exit_recovery_mode()\n {\n }", "function disconnect(){\n\t\t$this->dbconn = null;\n\t\t$this->logger->info('RECOLIN DB DB disconnected successfully');\n\t}", "public function CloseDB(){\n\n\t\t\t$this->failedQuery = true;\n\n\t\t\tswitch($this->databaseType){\n\n\t\t\t\tcase 1:\n\t\t\t\t\tmysqli_close($this->connection);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 2:\n\t\t\t\t\todbc_close($this->connection);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 3:\n\t\t\t\t\t$this->connection = NULL;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "public function EndBD(){\n pg_close($this->BDCon) or die(\"No se pudo CERRAR la conexion a la BD\");\n $this->BDCon = null;\n }", "function dbdisconn ($p_idconn) {\n if (mysql_close ($p_idconn)) {\n\t return true;\n\t }\n\t else {\n\t echo (\"Conexión no cerrada: \". mysql_error($p_idconn));\n\t return false;\n\t }\n }", "public function quit($close_on_error = true)\n {\n }", "private function shutDownFunction() {\n\t\t$error = error_get_last();\n\t\tif ( isset( $error ) ) {\n\t\t\tif ( $error['type'] === E_ERROR ) {\n\t\t\t\tEE::warning( 'An Error occurred. Initiating clean-up.' );\n\t\t\t\t$this->logger->error( 'Type: ' . $error['type'] );\n\t\t\t\t$this->logger->error( 'Message: ' . $error['message'] );\n\t\t\t\t$this->logger->error( 'File: ' . $error['file'] );\n\t\t\t\t$this->logger->error( 'Line: ' . $error['line'] );\n\t\t\t\t$this->rollback();\n\t\t\t}\n\t\t}\n\t}", "public static function cleanDatabase()\n {\n $user = DAuthorisationManager::getUser();\n // Cleanup invalid tasks.\n $validTasks = DClassManager::getClasses(DScheduledTask::class);\n self::search()\n ->filterByField(self::FIELD_TASK, $validTasks, DFieldSearch::OPERATOR_NOT_IN)\n ->delete($user);\n // Cleanup failed tasks.\n $runningTasks = self::search()\n ->filterByField(self::FIELD_STARTED, null, DFieldSearch::OPERATOR_NOT_EQUAL)\n ->getFields(array(\n self::FIELD_PROCESS_ID,\n self::FIELD_TASK,\n ));\n foreach ($runningTasks as $runningTask) {\n // Try to find the process for each event.\n try {\n DProcess::find($runningTask[ self::FIELD_PROCESS_ID ]);\n // If it doesn't exist, cancel the task.\n } catch (DInvalidProcessIdException $e) {\n /* @var $task DScheduledTask */\n $qualifiedName = $runningTask[ self::FIELD_TASK ];\n $task = new $qualifiedName();\n $task->cancel();\n }\n }\n }", "public function handle()\n {\n $connection = $this->getConnection();\n $this->delete($connection);\n }", "public function disconnect() {\n $this->exec('exit;');\n $this->connection = null;\n }", "protected function _teardownDb()\n {\n list ($host, $port, $db) = $this->_getUrlParts();\n $db = trim($db, '/');\n \n try {\n Sopha_Db::deleteDb($db, $host, $port);\n } catch (Sopha_Db_Exception $e) {\n if ($e->getCode() != 404) {\n throw $e;\n }\n }\n }", "public function __destruct() {\n if ($this->conn != FALSE) {\n //pg_close($this->conn);\n }\n }", "public static function terminate(): void {\n\t\tself::$sessionInstance->terminate ();\n\t}", "public function close_db_connection(){\n\t\n\t\tif(!$this->persist_connection){\n\t\n\t\t\tif(!@mysql_close($this->connection)){\n\t\t\t\t\t\n\t\t\t\tthrow new Exception(\"Connection close failed &nbsp;: &nbsp \" . $this->server . \"\");\n\t\t\t\t\t\n\t\t\t}\n\t\n\t\t}else{\n\t\n\t\t\tthrow new Exception(\"Persistant connection can't be closed &nbsp;: &nbsp \" . $this->server . \" \");\n\t\t}\n\t}", "public function disconnect() {\n $this->exec('echo \"EXITING\" && exit;');\n $this->connection = null;\n }", "function db_disconnect()\n{\n\tglobal $dbh;\n\n\tif (!isset($dbh))\n\t\t// Already disconnected.\n\t\treturn;\n\n\t$dbh->close();\n\t$dbh = NULL;\n\treturn;\n}", "public function destroy(Process $process)\n {\n //\n }", "public function handle($process)\n {\n if ($process == 'up') {\n dd(\"up\");\n Artisan::call('up'); \n }\n\n if ($process == 'down') {\n dd(\"Do\");\n Artisan::call('down'); \n }\n\n if ($process == 'del') {\n dd(\"Del\");\n DB::statement(\"SET foreign_key_checks=0\");\n $databaseName = DB::getDatabaseName();\n $tables = DB::select(\"SELECT * FROM information_schema.tables WHERE table_schema = '$databaseName'\");\n foreach ($tables as $table) {\n $name = $table->TABLE_NAME;\n //if you don't want to truncate migrations\n if ($name == 'migrations') {\n continue;\n }\n \n Schema::dropIfExists($name);\n }\n DB::statement(\"SET foreign_key_checks=1\"); \n }\n\n\n \n }", "function disconnect()\r\n {\r\n if(!mysql_close($this->link))\r\n {\r\n $this->error_msg = \"Could not close the $this->db_name database\";\r\n return 0;\r\n }\r\n return 1;\r\n }", "function shutdown()\n\t{\n\t\tif (class_exists('Db'))\n\t\t{\n\t\t\tDb::close_connection();\n\t\t}\n\t}", "function close_db(){\n $this->_dbh = null;\n \n }", "function close_db(){\n $this->_dbh = null;\n \n }", "public function disconnect() {\n $this->db = null;\n }", "function pm_die_if_error( $database_object ) {\n\n $newline = \"\\n\";\n\n if( DB::isError( $this->$database_object ) ) {\n\n echo $newline . '<br><br>' . $newline;\n\n if( $this->debug ) {\n echo 'Last recorded statement: ' . $this->statement;\n echo $newline . '<br><br>' . $newline;\n die ( $this->$database_object->getMessage() . '<br>' . $newline );\n }\n else # try not to give a potential hacker any useful info\n die ( 'An error has occurred.' . '<br>' . $newline );\n }\n }", "public function disconnect()\n {\n $this->db->dispose();\n }", "function kill_session($session_ID)\r\n{\r\n\tglobal $DBhost;\r\n\tglobal $DBuser;\r\n\tglobal $DBpasswd;\r\n\tglobal $DBname;\r\n\tglobal $mysql;\r\n\r\n\tconnect_DB();\r\n\t$SQL =\"delete from session where ID = $session_ID\";\r\n\tif($result=mysql_query($SQL)) {\r\n\t\t\t\t\t$ret = 1;\r\n\t} else\t{\r\n\t\t\t\t\t$ret = 0;\r\n\t}\r\n\treturn $ret;\r\n}", "protected function shutDown()\n {\n if (!is_null(System::getInstance()->database())) {\n System::getInstance()->set('database', null);\n }\n }", "public function shutdown()\n {\n $this->dbTable = null;\n }", "public function handle_exit_recovery_mode()\n {\n }", "function halt( $msg )\n {\n $this->Error = @mysql_error( $this->Link_ID );\n $this->Errno = @mysql_errno( $this->Link_ID );\n\n if ( $this->locked )\n {\n $this->unlock();\n }\n\n if ( $this->Halt_On_Error == \"no\" )\n return;\n\n $this->haltmsg( $msg );\n\n if ( $this->Halt_On_Error != \"report\" )\n die( \"Session halted.\" );\n }", "function die_silently($conn, $error_str)\n{\n OCIRollback($conn);\n OCILogoff($conn);\n // You can uncomment these when debugging\n //$error_line = $error_str.\"<BR>\\n\";\n //echo $error_line;\n exit;\n}", "public static function deleteDeadProcesses(Application $application): void {\n\t\t$timeout_seconds = -abs($application->configuration->getPath([__CLASS__, 'timeout_seconds'], 100));\n\n\t\ttry {\n\t\t\t$you_are_dead_to_me = Timestamp::now()->addUnit($timeout_seconds);\n\n\t\t\ttry {\n\t\t\t\t$iterator = $application->ormRegistry(__CLASS__)->querySelect()->appendWhere([\n\t\t\t\t\t'server' => Server::singleton($application), 'locked|<=' => $you_are_dead_to_me,\n\t\t\t\t])->ormIterator();\n\t\t\t\tforeach ($iterator as $lock) {\n\t\t\t\t\t/* @var $lock Lock */\n\t\t\t\t\tif (!$lock->isProcessAlive()) {\n\t\t\t\t\t\t// Delete this way so hooks get called per dead server\n\t\t\t\t\t\t$lock->application->logger->warning('Releasing lock {code} (#{id}), associated with dead process, locked on {locked}', $lock->members());\n\t\t\t\t\t\t$lock->release();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (Throwable $e) {\n\t\t\t\t$application->logger->error($e);\n\t\t\t}\n\t\t\t/* @var $lock Lock */\n\t\t} catch (KeyNotFound|Semantics) {\n\t\t}\n\t}", "function Close(){\n\t\tpg_close($this->con);\n\t}", "private function processKill($row) {\r\n\t\tif( !$this->killExists($row) )\r\n\t\t{\r\n\t\t\t//$this->output .= $row['killID'].\"\\n\";\r\n\t\t\t//echo '<pre>'; print_r($row); die;\r\n\t\t\t\r\n\t\t\t$this->processVictim($row, strval($row['killTime']));\r\n\t\t\tforeach($row->rowset[0]->row as $inv) $this->processInvolved($inv, strval($row['killTime']), $row);\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public function handle()\n {\n abort(500);\n }", "public function __destruct(){\r\n //Turn off the lights, and stuff\r\n $this->database->disconnect();\r\n }", "public function quit(){\n try {\n $this->execute('quit', $statusCode, 500);\n } catch (VarnishException $exception) {\n\n }\n\n $this->disconnect();\n }", "public function stop()\n {\n die;\n }", "public function kill()\n {\n session_regenerate_id();\n $_SESSION[CCID] = array(); // session_unset();\n session_destroy();\n }", "public function disconnect() {\n $this->db = null;\n }", "public function disconnectDatabase()\n {\n $this->database->close();\n $this->database = null;\n }", "function destroy_connection(){\n\t\t//if($this->dbconn != null)\n\t\t//\t$this->dbconn->disconnect();\n\t\tunset($this->dbconn);\n\t}", "protected function disconnect()\n {\n $this->conn_queries = 0;\n @$this->dbh->close();\n }", "function DbDisconnect() { \n \t\t$this->close = @mysql_close($this->linkId) or die (\"Error in disconnecting to server: \".mysql_error()); \n\t}", "public static function stop() {\n\t\tself::$con->close();\n\t}", "function ProcessMonitor(&$db)\n {\n $this->child_name = 'ProcessMonitor';\n parent::Base($db);\n // check the the actual user can really do this\n if ( !(galaxia_user_can_monitor()))\n {\n unset($this);\n galaxia_show_error('forbidden access to ProcessMonitor object');\n }\n }", "private function _disconnect()\n {\n //\tDisconnect\n $this->_db->conn = null;\n $this->_db->clear();\n }", "public function cancel()\n\t{\n\t\t$this->pdoStatement = null;\n\t}", "function dbdisconnect($db_conn){\n\t$db_conn->close();\n}", "private function _disconnect()\n\t{\n\t\t// you can't close a persistent connection, so don't bother disconnecting\n\t\tif ($this->_persistent === true)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (is_resource($this->_connection) === true)\n\t\t{\n\t\t\tif (mysql_close($this->_connection) === false)\n\t\t\t{\n\t\t\t\tthrow new DbDatabaseException('',\n\t\t\t\t\tDatabaseException::CONNECTION_INVALID);\n\t\t\t}\n\t\t}\n\t\t// clear the connection string\n\t\tunset($this->_connection);\n\t\t$this->_connection = null;\n\t}" ]
[ "0.6326109", "0.6316993", "0.6275521", "0.62620145", "0.6206211", "0.6044775", "0.60399026", "0.6006221", "0.59997934", "0.595228", "0.5950814", "0.5854195", "0.5829255", "0.5809293", "0.5759796", "0.57533145", "0.57218564", "0.57056826", "0.5704565", "0.5685869", "0.5674553", "0.5667568", "0.5639449", "0.5597873", "0.55952483", "0.5589119", "0.5588351", "0.55530506", "0.5533495", "0.5532942", "0.5511794", "0.550443", "0.5476769", "0.54684275", "0.5407625", "0.53977436", "0.5377282", "0.53650534", "0.53620446", "0.5358188", "0.5352726", "0.5327015", "0.5320097", "0.5300057", "0.52994436", "0.52958393", "0.52879053", "0.5286106", "0.52757466", "0.5274119", "0.526665", "0.52626616", "0.5255221", "0.5252404", "0.525036", "0.52491814", "0.5244061", "0.5230107", "0.52285457", "0.5216972", "0.52151024", "0.5214392", "0.5207928", "0.5197671", "0.51894224", "0.5186641", "0.5161537", "0.5160028", "0.51561034", "0.51556706", "0.5155145", "0.5150604", "0.5150604", "0.51490146", "0.5145287", "0.5144171", "0.5140273", "0.51387435", "0.51347935", "0.51280946", "0.51249766", "0.51110476", "0.50971556", "0.50952667", "0.50934374", "0.5090556", "0.5081646", "0.5079161", "0.5076266", "0.5074128", "0.5065263", "0.50621444", "0.5061948", "0.50585043", "0.5053825", "0.5051167", "0.5050483", "0.5048545", "0.5043726", "0.5034374", "0.5028929" ]
0.0
-1
Display a listing of the resource.
public function index() { $data = Product::where('status', 1)->orderBy('id')->paginate(10); $resource = $this->resource; return view('dashboard.views.'.$this->resources.'.index',compact('data', 'resource')); }
{ "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 editing the specified resource.
public function edit($lang, $id) { $resource = $this->resource; $resource['action'] = 'Approve'; $item = Product::findOrFail($id); return view('dashboard.views.' .$this->resources. '.edit', compact('item', 'resource')); }
{ "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(Form $form)\n {\n //\n }", "public function edit()\n { \n return view('admin.control.edit');\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(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "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($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($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(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()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(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 $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit()\n {\n return view('initializer::edit');\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_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\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.7855196", "0.76957726", "0.7273917", "0.7241426", "0.71717227", "0.7064183", "0.70528984", "0.69836885", "0.694763", "0.69469565", "0.6941572", "0.69301945", "0.6903868", "0.68989486", "0.68989486", "0.68787694", "0.68641657", "0.6860115", "0.6857286", "0.68464494", "0.6834566", "0.68116575", "0.68075293", "0.6805924", "0.6801357", "0.6796291", "0.67915684", "0.67915684", "0.67874014", "0.678544", "0.67787844", "0.6777662", "0.67675763", "0.676299", "0.6746726", "0.6745706", "0.67450166", "0.67450166", "0.6739429", "0.6734577", "0.6725992", "0.67127997", "0.6694406", "0.6692487", "0.6689421", "0.66884303", "0.6687299", "0.6685663", "0.6682167", "0.66701853", "0.66697115", "0.6666091", "0.6666091", "0.66627705", "0.6661716", "0.6661522", "0.6657919", "0.6656454", "0.6653187", "0.6642113", "0.66332614", "0.66324973", "0.66275465", "0.66275465", "0.6619777", "0.6619387", "0.6617973", "0.66154003", "0.66110945", "0.6607966", "0.66065043", "0.6596376", "0.65953517", "0.65941286", "0.6591486", "0.6590759", "0.6588404", "0.658161", "0.6580548", "0.6579757", "0.6577171", "0.65761065", "0.657386", "0.65686774", "0.6567784", "0.65672046", "0.6566417", "0.65615803", "0.65615714", "0.65615714", "0.65592474", "0.65586483", "0.65568006", "0.6556628", "0.65564895", "0.6555322", "0.65551996", "0.6555016", "0.654888", "0.65477645", "0.65451735" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $lang, $id) { $rules = [ "status" => "required" ]; $validator = Validator::make($request->all(), $rules); if($validator->fails()) { flashy()->error($validator->errors()->all()[0]); return back(); } $input = $request->all(); $date = Carbon::now()->addMonths(3); $input['last'] = $date ; $item = Product::find($id); $item->update($input); $user = $item->user_id; $name = $item->name; $notification['title'] = 'تم اضافة الاعلان بنجاح'; $notification['body'] = "تم اضافة اعلانك $name بنجاح"; $notification['id'] = $id; $notification['fcm_token'] = FcmToken::Where('user_id', $user)->pluck('fcm_token'); $this->pushNotification($notification); App::setLocale($lang); flashy(__('dashboard.updated')); return redirect()->route($this->resource['route'].'.index', $lang); }
{ "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
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
Remove the specified resource from storage.
public function destroy($lang, $id) { $item = Product::findOrFail($id); if (strpos($item->image, '/uploads/') !== false) { $image = str_replace( asset('').'storage/', '', $item->image); Storage::disk('public')->delete($image); } $item->delete(); App::setLocale($lang); flashy(__('dashboard.deleted')); return redirect()->route($this->resource['route'].'.index', $lang); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Get list of servers associated with the admin account
public function servers(bool $returnRaw = false, bool $forceRefresh = false) : array { $servers = $this->sendGetXmlRequest($this->resolvePlexResource('servers.xml', 'pms'), function(array $response) : array { $servers = []; if (array_key_exists('@attributes', $response['Server'])) { (new Servers)->extractServerInformation($servers, $response['Server']['@attributes']); } else { foreach ($response['Server'] as $server) { (new Servers)->extractServerInformation($servers, $server['@attributes']); } } return $servers; }); if ($returnRaw) { return $servers['data']; } return $servers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getServers();", "public function getServers() {}", "function os2forms_server_communication_get_servers() {\n $query = db_select('os2forms_server_communication_servers_list', 's');\n $query->fields('s', array('id', 'server_name', 'url', 'username', 'psw'));\n $servers = $query->execute()\n ->fetchAllAssoc('id');\n\n return $servers;\n}", "public function getServers() {\n\t\treturn $this->dbHandler->getAllServer();\n\t}", "public static function getAdminsList()\n {\n $data_to_load = [];\n if(DatabaseManager::fetchInto(\"main\", $data_to_load, \"SELECT * FROM `admin_users`\") === false)\n Status::message(Status::ERROR, \"Couldn't retrieve `admin_users` from DB\");\n \n Status::message(Status::SUCCESS, $data_to_load);\n }", "function getServers() {\n\t\treturn $this->servers;\n\t}", "public static function getServersList()\n {\n return CHtml::listData(self::model()->findAll(), 'host', 'host');\n }", "public function getServerList() {}", "static public function getServers() {\n\t\tself::loadSettings();\n\t\treturn self::$servers;\n\t}", "public function index()\n {\n return view('servers.list',[\n 'servers' => $this->repository->getServersForAuth()\n ]);\n }", "public static function getservers() {\n\t\t$product_id = OnAppCDN::getValue( 'id' );\n\n\t\t$sql = \"SELECT\n\t\t\t\t\ttblservers.*,\n\t\t\t\t\ttblservergroupsrel.groupid,\n\t\t\t\t\ttblproducts.servergroup\n\t\t\t\tFROM\n\t\t\t\t\ttblservers\n\t\t\t\t\tLEFT JOIN tblservergroupsrel ON\n\t\t\t\t\t\ttblservers.id = tblservergroupsrel.serverid\n\t\t\t\t\tLEFT JOIN tblproducts ON\n\t\t\t\t\t\ttblproducts.id = $product_id\n\t\t\t\tWHERE\n\t\t\t\t\ttblservers.type = 'onappcdn'\";\n\n\t\t$sql_servers_result = full_query( $sql );\n\n\t\t$servers = array();\n\t\twhile( $server = mysql_fetch_assoc( $sql_servers_result ) ) {\n\t\t\tif( is_null( $server[ 'groupid' ] ) ) {\n\t\t\t\t$server[ 'groupid' ] = 0;\n\t\t\t}\n\t\t\t$server[ 'password' ] = decrypt( $server[ 'password' ] );\n\t\t\t$servers[ $server[ 'id' ] ] = $server;\n\t\t\t$servers[ $server[ 'id' ] ][ 'address' ] = $server[ 'ipaddress' ] != '' ? $server[ 'ipaddress' ] : $server[ 'hostname' ];\n\n\t\t\tif( $server[ 'secure' ] == 'on' ) {\n\t\t\t\t$servers[ $server[ 'id' ] ][ 'address' ] = 'https://' . $servers[ $server[ 'id' ] ][ 'address' ];\n\t\t\t}\n\t\t}\n\n\t\treturn $servers;\n\t}", "function findAllAdministrators() {\r\n\r\n\t\treturn ($this->query('SELECT * FROM admins;'));\r\n\r\n\t}", "public static function get_admins();", "function getAdminList() {\n $dbConnect = getDbConnection();\n\n $query = 'SELECT * FROM admins';\n $statement = $dbConnect->prepare($query);\n\n $statement->execute();\n $resultSet = $statement->get_result();\n\n $statement->close();\n $dbConnect->close();\n\n return $resultSet;\n }", "static function getAllAdmin()\n {\n\n $con=Database::getConnection();\n $req=$con->prepare('SELECT * FROM admin a, partners p WHERE a.idPart=p._idPart');\n $req->execute(array());\n return $req->fetchAll();\n }", "public function getWebsitesAdmin()\n {\n $res = $this->searchAdmin();\n if ($res) {\n array_push($this->site_ids, array('access' => 'admin', 'ids' => array()));\n if ($res['count'] > 0) {\n foreach ($res as $r) {\n if (is_array($r)) {\n array_push($site_ids[1]['ids'], $this->getSiteId($r[strtolower($this->to_get_admin)][0]));\n }\n }\n }\n }\n }", "public function getAdmins()\n\t{\n\t\t$query = <<<QUERY\nSELECT\n\t*\nFROM\n\tplayer\nWHERE\n\trole LIKE '%admin%'\nQUERY;\n\n\t\treturn $this->database->query( $query, 'Get admins from player table' );\n\t}", "function get_server_list($username) {\n\t$servers = array();\n\n\ttry {\n\t\t# Query for the requested user\n\t\t$dbh = get_dbh();\n\t\t$stmt = $dbh->prepare('SELECT name FROM servers WHERE username = ?');\n\t\t$stmt->execute(array($username));\n\n\t\t$rs = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\tforeach ($rs as $row) {\n\t\t\t$servers[] = $row['name'];\n\t\t}\n\t} catch (PDOException $e) {\n\t\terror(0, 'DB error in get_server_list: ' . $e->getMessage());\n\t}\n\n\treturn $servers;\n}", "public function getAdmins()\n {\n $query = $this->newQuery();\n $query->where('admin', true);\n\n return $this->doQuery($query, false, false);\n }", "public function index()\n {\n return view('admin.servers.index');\n }", "public function readAdmins(){\r\n $results = array();\r\n\r\n if ( null !== $this->getDB() ) {\r\n $dbs = $this->getDB()->prepare('select * from admin');\r\n\r\n if ( $dbs->execute() && $dbs->rowCount() > 0 ) {\r\n $results = $dbs->fetchAll(PDO::FETCH_ASSOC);\r\n }\r\n } \r\n return $results;\r\n }", "public static function getAdmin() {\n\t\t$conn = Connection::get ();\n\t\t\n\t\t$select = $conn->query ( \"SELECT id_admin, identifiant_admin, mdp_admin, nom_admin, prenom_admin FROM admin\" );\n\t\t$result = array ();\n\t\t\n\t\twhile ( $row = $select->fetch () ) {\n\t\t\t$result [] = $row;\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public static function admins()\n {\n return User::all()->where('idpapel', 1)->where('stusuario', 'ati')->toArray();\n }", "public static function getAdminAuth()\n\t{\n\t\tif (empty(MHTTPD::$config['Admin']['admin_user'])) {\n\t\t\treturn false;\n\t\t}\n\t\treturn array(\n\t\t\t'realm' => 'server admin',\n\t\t\t'user' => MHTTPD::$config['Admin']['admin_user'],\n\t\t\t'pass' => MHTTPD::$config['Admin']['admin_pass'],\n\t\t);\n\t}", "public function indexAdmin ()\n {\n $listOfUsers = $this->userRequest->usersIndexForAdmin();\n return $listOfUsers;\n }", "function find_all_admins() {\n\t\tglobal $connection;\n\n\t\t$query = \"SELECT * FROM admins ORDER BY username ASC\";\n\t\t$admin_list = mysqli_query($connection, $query);\n\t\tconfirm_query($admin_list);\n\t\treturn $admin_list;\n\t}", "public function &getListaAdmins() {\n $admins = array();\n $query = \"select * from admins\";\n \n $mysqli = Db::getInstance()->connectDb();\n if (!isset($mysqli)) {\n error_log(\"[getListaAdmins] impossibile inizializzare il database\");\n $mysqli->close();\n return $admins;\n }\n $result = $mysqli->query($query);\n if ($mysqli->errno > 0) {\n error_log(\"[getListaAdmins] impossibile eseguire la query\");\n $mysqli->close();\n return $admins;\n }\n\n while ($row = $result->fetch_array()) {\n $admins[] = self::creaAdminDaArray($row);\n }\n\n $mysqli->close();\n return $admins;\n }", "public function obtainWebservers()\n {\n return $this->performRequest('GET', '/webservers');\n }", "function adminUserList()\n {\n $arrClms = array(\n 'pkAdminID',\n 'AdminUserName',\n 'AdminCountry',\n 'AdminRegion'\n );\n $varWhr = \"AdminType = 'user-admin'\";\n $varOrderBy = 'AdminUserName ASC ';\n $arrRes = $this->select(TABLE_ADMIN, $arrClms, $varWhr);\n //pre($arrRes);\n return $arrRes;\n }", "public function serverList () {\n $servers = Server::all();\n return view('server/index', ['servers' => $servers]);\n }", "public function getServerList(): array\n {\n $replace = array(\n \"\\xFF\\xFF\\xFF\\xFFgetserversResponse\\n\",\n \"\\\\EOF\",\n \"\\\\EOT\"\n );\n\n $servers = array();\n\n $this->write(\"\\xFF\\xFF\\xFF\\xFFgetservers \".$this->protocol.\" full empty\");\n $data = $this->read_master();\n\n foreach ($data as $row) {\n $row = str_replace($replace, \"\", $row);\n $row = explode(\"\\x5c\", $row);\n foreach ($row as $server) {\n if (strlen($server) == 6) {\n $serverInfo = unpack(\"Nip/nport\", $server);\n $servers[] = new Server(long2ip($serverInfo[\"ip\"]), $serverInfo[\"port\"]);\n }\n }\n }\n\n return $servers;\n }", "public function admins()\n {\n return $this->newQuery('getUsers', ['type' => 'AdminUsers']);\n }", "function getAdministrators() {\n\t\tif (is_null($this->admin_users)) {\n\t\t\t$this->admin_users = array();\n\t\t\t$sql = 'SELECT * FROM '.prefix('administrators').' ORDER BY `rights` DESC, `id`';\n\t\t\t$admins = query_full_array($sql, true);\n\t\t\tif ($admins !== false) {\n\t\t\t\tforeach($admins as $user) {\n\t\t\t\t\tif (array_key_exists('password', $user)) { // transition code!\n\t\t\t\t\t\t$user['pass'] = $user['password'];\n\t\t\t\t\t\tunset($user['password']);\n\t\t\t\t\t}\n\t\t\t\t\tif (!array_key_exists('valid', $user)) { // transition code!\n\t\t\t\t\t\t$user['valid'] = 1;\n\t\t\t\t\t}\n\t\t\t\t\t$this->admin_users[$user['id']] = $user;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->admin_users;\n\t}", "static function getServiceList()\n {\n return session::get('ServerService');\n }", "public function listServers ( $q = '', $user_id ) { }", "public function getAllTeamsAdmin() {\n\t\t$url = WEBSERVICE. \"teams/getAllTeamsAdmin\";\n\t\t$this->HTTPRequest->setUrl($url);\n\t\t$this->HTTPRequest->setMethod(\"GET\");\n\t\t$arrayResponse = $this->HTTPRequest->sendHTTPRequest();\n\t\treturn $arrayResponse;\n\t}", "public function selectServers() {\n \n $query = $this->conection->query(\"SELECT nameserver FROM Servidor\");\n $result = array();\n while ($rst = $this->conection->result($query)) {\n\n $name = $rst[\"nameserver\"]; \n array_push($result, $name);\n }\n\n $this->conection->free($query);\n //$this->conection->closeConection();\n return $result;\n }", "public function index()\n {\n return Admins::all();\n }", "public function serverList($details = true, array $filter = array())\n {\n $url = $this->getUrl(Resource\\Server::resourceName() . (($details) ? '/detail' : ''), $filter);\n\n return $this->collection('OpenCloud\\Compute\\Resource\\Server', $url);\n }", "public function mainAction() {\n return array(\n 'admins' => $this->get('snowcap_admin')->getAdmins(),\n );\n }", "private function get_siteadmins() {\n global $DB;\n $sql = \"SELECT rgt.userid, rgt.gmail\n FROM mdl_repository_gdrive_tokens rgt\n JOIN mdl_config cfg\n ON cfg.name = 'siteadmins'\n WHERE find_in_set(rgt.userid, cfg.value) > 0;\";\n $siteadmins = $DB->get_records_sql($sql);\n return $siteadmins;\n }", "function get_dns_servers() {\n\treturn get_dns_nameservers(false, true);\n}", "public function admins() {\n $data = array();\n // verify user has priviledges\n if($this->User->isLoggedIn() && $this->User->isAdmin()) {\n $flash = null;\n \n if (isset($_POST['delete_admin'])) {\n if ($this->User->removeAdminRights($_POST['user_id'])) {\n $flash = \"Admin user removed\";\n }\n }\n \n if (isset($_POST['email'])) {\n $user_id = $this->User->getByEmail($_POST['email']);\n if(isset($user_id['id'])) {\n if($this->User->bestowAdminRights($user_id['id'])) {\n $flash = \"{$_POST['email']} added as an admin.\";\n }\n }\n }\n \n // fetch admin users\n $users = $this->User->getAdmins();\n \n //set the title\n $data = array(\n 'users' => $users,\n 'flash' => $flash,\n 'title' => 'Manage Admin Users'\n );\n \n } else {\n header(\"Location: \".app::site_url(array('users','login')));\n exit(0);\n }\n return $data;\n }", "public function getProjectAdminList() {\n\t\treturn $this->getProjectDao()->getProjectAdminList();\n\t}", "function getAllAdminLogins() {\n $request = $_GET;\n $result = $this->Administration_login_model->get_all_administration_logins($request, array());\n echo json_encode($result);\n exit;\n }", "protected function _getServersData()\n {\n return $this->_aServersData;\n }", "public function admin_list()\n {\n //Display Admin Login Form\n $all_admin_lists = DB::table('admins')\n ->get();\n return view('admin.customer.admin_list',compact('all_admin_lists'));\n }", "public static function getAdminList()\n {\n \t$type = \"text/html\";\n \t$terms = array(\n \t\t\t'isapproved' => 1\n \t);\n \t$data = self::getListByFilter($terms);\n \n \treturn response()->view('adminlist', [ 'data' => $data, 'isadmin' => self::isAdmin()])->header('Content-Type', $type);\n }", "function find_all_admins() {\r\n\t\tglobal $db;\r\n\t\t\r\n\t\t$query = \"SELECT * \";\r\n\t\t$query .= \"FROM admins \";\r\n\t\t$query .= \"ORDER BY username ASC\";\r\n\t\t$admins_set = mysqli_query($db, $query);\r\n\t\tconfirm_query($db);\r\n\t\treturn $admins_set;\r\n\t}", "public function getServerExtList()\n {\n }", "public static function get_admin_users(){\n \n global $db;\n \n $query = \"SELECT * FROM users \";\n $query .= \"WHERE user_role = 'admin'\";\n \n $result = User::makeQuery($query);\n \n return $result;\n }", "public function getAdminListForCustomers()\r\n {\r\n return $this->getAdminList(\"customer-lookup\");\r\n }", "public function getAdmins()\n {\n $role = Role::where('name', 'admin')->first();\n return $role->users;\n }", "function wp_smpro_servers() {\r\n\t$server_list = array(\r\n\t\t'https://smush1.wpmudev.com/',\r\n\t\t'https://smush2.wpmudev.com/',\r\n\t\t'https://smush3.wpmudev.com/',\r\n\t\t'https://smush4.wpmudev.com/',\r\n\t\t'https://smush5.wpmudev.com/',\r\n\t\t'https://smush6.wpmudev.com/',\r\n\t\t'https://smush7.wpmudev.com/',\r\n\t\t'https://smush8.wpmudev.com/',\r\n\t\t'https://smush9.wpmudev.com/',\r\n\t\t'https://smush10.wpmudev.com/'\r\n\t);\r\n\r\n\treturn $server_list;\r\n}", "function getServerURLs() {\n\t\treturn $this->m_serverURLs;\n\t}", "public function index()\n {\n $admins = Admin::paginate(5);\n return AdminResourceCollection::collection($admins);\n }", "public function findAllAdmin() {\n\t\t\t$result = $this->createQuery()->execute();\n\t\t\treturn $result;\n\t\t}", "public function getServers()\n {\n $this->markInActiveServers();\n $this->deleteInActiveServers();\n\n $aServers = $this->_getServersData();\n $aValidServers = array();\n\n foreach ($aServers as $aServer) {\n if ($aServer['isValid']) {\n unset($aServer['isValid']);\n unset($aServer['timestamp']);\n $aValidServers[] = $aServer;\n }\n }\n\n return $aValidServers;\n }", "public function admins()\n {\n return $this->members()->wherePivot('role', '=', Member::ROLE_ADMIN)->get();\n }", "public function getAdmins()\n {\n $admins = Admin::all();\n return view('view_admins', compact('admins'));\n }", "function get_admin_list()\r\n {\r\n $result = array();\r\n $this->db->select('login');\r\n $this->db->distinct();\r\n $this->db->order_by('login');\r\n $query = $this->db->get(db_prefix.'Admins');\r\n $result[] = 'UNDEFINED';\r\n foreach ($query->result_array() as $row)\r\n {\r\n $result[] = $row['login'];\r\n }\r\n return $result;\r\n }", "public static function getAllAdmins()\n\t{\n\t\t$admins = self::where('users_role',UserRole::ADMIN_ROLE_ID)->get();\n\t\treturn $admins;\n\t}", "public function meList( )\n\t{\n\t\t$userId = $this->getCurrentUserId();\n\t\treturn $this->adminListByUser($userId);\n\t}", "function get_super_admins()\n {\n }", "public function getAdmins($options = [])\n {\n return $this->client->get(\"admins\", $options);\n }", "public function getAdmins() {\n $sql = 'SELECT id, mail, firstname, role FROM user WHERE isAdmin=1 ORDER BY role DESC';\n $sth = $this->db->prepare($sql);\n $sth-> execute(array());\n if ($row = $sth->fetchAll()) {\n return $row;\n }\n }", "function odbcadmin_list(){\n\t$sql = \"SELECT * FROM odbcadmin\";\n\t$results= sql($sql, \"getAll\", DB_FETCHMODE_ASSOC);\n\n\tforeach($results as $result){\n\t\t$odbc_records[] = array($result['id'],$result['dsname'],$result['username'],$result['password'],$result['dbtype']);\n\t}\n\treturn isset($odbc_records)?$odbc_records:null;\n}", "public function getList()\r\n {\r\n $result = $this->query(\r\n \"SHOW USERS\",\r\n $this->getValueBuilder('Aviogram\\InfluxDB\\Entity\\Admin\\User')\r\n ->addField('user', 'getName', 'setName')\r\n ->addField('admin', 'isAdmin', 'setAdmin')\r\n );\r\n\r\n $return = new Collection\\Admin\\User();\r\n\r\n foreach ($result->getSeries() as $serie) {\r\n foreach($serie->getValues() as $value) {\r\n $return->append($value);\r\n }\r\n }\r\n\r\n return $return;\r\n }", "public function getServers($filter=\"\"){\n\t\t$servers = DB::table('servers')\n\t\t\t\t\t\t\t->where('name', 'LIKE', '%' . $filter . '%' )\n\t\t\t\t\t\t\t->orWhere('servers.description', 'LIKE', '%' . $filter . '%' )\n ->orWhere('categories.description', 'LIKE', '%' . $filter . '%' )\n ->join('categories', 'servers.category_id', '=', 'categories.id')\n ->select('servers.*', \n 'categories.description as category_description', \n 'categories.color as category_color')\n ->orderBy('name')\n\t\t\t\t\t\t\t->get();\n\n\t\tforeach($servers as $server){\n\t\t\t$this->getServerLastMetrics( $server );\n\t\t\t$this->getServerThresholdValue($server, 'ip');\n\t\t\t$this->getServerThresholdValue($server, 'connections');\n\t\t}\n return $servers;\n }", "public function existingAdminList()\n {\n $groceries = $this->getList();\n return $this->renderExistingAdminList($groceries);\n }", "public function getAll() {\n\n $servers = Hash::extract($this->find('all', array(\n 'fields' => array(\n 'server_id', 'name', 'short_name', 'parent_id'\n )\n )), '{n}.Server');\n\n foreach ($servers as &$server) {\n\n $parent_id = $server['parent_id'];\n\n if (empty($parent_id)) {\n $server['sort_index'] = $server['server_id'] * 2;\n } else {\n $server['sort_index'] = $parent_id * 2 + 1;\n }\n }\n\n $servers = Hash::sort($servers, '{n}.sort_index');\n\n return $servers;\n }", "public function selectAllAdmin(){\n return $this->connect->getData(\"SELECT * FROM `tbl_admin`\");\n }", "public function get_servers($request) {\r\n\t\t$this->servers = $request['server'];\r\n\t\treturn $request['server'];\r\n\t}", "function list_admins ()\n{\n $list = \"\";\n \n $result = db_query (\"SELECT * FROM admin ORDER BY username\");\n if ($result['rows'] > 0)\n {\n $i = 0;\n while ($row = mysql_fetch_array ($result['result']))\n {\n $list[$i] = $row['username'];\n $i++;\n }\n }\n return $list;\n}", "public function index()\n {\n $admins = $this->adminService->getActiveUsers();\n return view('admin.list-sub-admin',compact('admins'));\n }", "function getAllAdmins(){\n $sql = self::$connection->prepare(\"SELECT * FROM `user` WHERE role_id = 1\");\n $sql->execute();//return an object\n $items = array();\n $items = $sql->get_result()->fetch_all(MYSQLI_ASSOC);\n return $items; //return an array\n }", "public function getServersInfo() {\n $info = array();\n\n foreach ($this->getServers() as $server) {\n $info[] = $this->getServerInfo($server);\n }\n\n return $info;\n }", "public function index()\n {\n $webservers = Webserver::all();\n return $this->successResponse($webservers);\n }", "public function list()\n {\n $admins = Admin::all();\n $html = view('partials.table-tbody.table-admin', compact('admins'))->render();\n\n return response()->json(['html' => $html], 200);\n }", "public function findHostDowntimesForAdminUser(): array;", "public function getAdministrativeDatabasesList() {\n return $this->_get(9);\n }", "public function index()\n {\n $admins = Administrador::all();\n return response()->json($admins->toArray());\n }", "public function admin_get_dbs() {}", "private function get_admins_info() {\n $stm=$this->uSup->get_com_admins_to_notify_about_requests(\"user_id\",$this->company_id);\n\n $q_user_id=\"(1=0 \";\n /** @noinspection PhpUndefinedMethodInspection */\n while($admin=$stm->fetch(PDO::FETCH_OBJ)) {\n $q_user_id.=\" OR u235_users.user_id='\".$admin->user_id.\"' \";\n }\n $q_user_id.=\")\";\n try {\n /** @noinspection PhpUndefinedMethodInspection */\n $stm=$this->uFunc->pdo(\"uAuth\")->prepare(\"SELECT DISTINCT\n firstname,\n secondname,\n email\n FROM\n u235_users\n JOIN \n u235_usersinfo\n ON\n u235_users.user_id=u235_usersinfo.user_id AND\n u235_usersinfo.status=u235_users.status\n WHERE\n \" .$q_user_id. \" AND \n u235_users.status='active' AND\n u235_usersinfo.site_id=:site_id\n \");\n $site_id=site_id;\n /** @noinspection PhpUndefinedMethodInspection */$stm->bindParam(':site_id', $site_id,PDO::PARAM_INT);\n /** @noinspection PhpUndefinedMethodInspection */$stm->execute();\n }\n catch(PDOException $e) {$this->uFunc->error('120'/*.$e->getMessage()*/);}\n\n return $stm;\n }", "public function listarAdmin()\n {\n $sql = \"SELECT US.nombre,CO.problema,CO.tipo_problema,CO.solucion, CO.modo_contacto, CO.tipo_estado \n FROM usuarios US JOIN consulta CO\n ON US.idusuarios = CO.idusuario\n WHERE CO.tipo_estado = 'Ejecutado'\";\n return ejecutarConsulta($sql);\n\n }", "function getAdminName() {\r\n\t\t\t$query = $this->pdo->prepare('select admin_name from admin_account');\r\n\t\t\t$query->execute();\r\n\t\t\treturn $query->fetchAll();\r\n\t\t}", "public function getServerlistbyUserID($user_id) {\n $servers = DB::table('servers AS a')\n ->select(['a.server_id', 'a.ip', 'a.port', 'a.label', 'a.type', 'a.status', 'a.last_online', 'a.last_check', 'a.active','a.email', 'a.pushover', 'a.warning_threshold', 'a.warning_threshold_counter', 'b.user_id'])\n ->join('users_servers AS b', 'b.server_id', '=', 'a.server_id')\n ->get();\n return $servers;\n }", "public function index()\n {\n $admin = Admin::simplePaginate(25);\n \n return new AdminResourceCollection($admin);\n }", "public function admin_getList()\n {\n $sql = 'select * from '.$this->table.' where status >= 0';\n return $this->query($sql);\n }", "public function findServicesDowntimesForAdminUser(): array;", "function allAdmin(){\n \t$con = new mysqli('localhost','heng','@powell135','200ok');\n \tif ($con -> connect_errno){\n \t\treturn CONNECTION_FAIL;\n \t}\n\t$permission = ADMIN;\n \t$query = \"select lastLogin, username, email, suspended, lastUpdate from jnjn_user where permission = '$permission'\";\n \t$result = $con -> query($query);\n \t$users = array();\n \twhile($row = mysqli_fetch_array($result)){\n\t\t$users[] = new User($row['username'],$row['email'],$row['lastLogin'],$row['suspended'],$row['lastUpdate']);\n \t}\n \t$result -> close();\n \treturn $users;\n }", "public static function getAdmins($where = null, $order = null, $limit = null){\n return (new Database('admin'))->select($where, $order, $limit)\n ->fetchAll(PDO::FETCH_CLASS,\\App\\Models\\AdminModel::class);\n }", "public function getUsers()\n\t{\n\t\t$sql = 'SELECT * FROM admins WHERE deleted = 0';\n\t\t$query = $this->db->prepare($sql);\n\t\t$query->execute();\n\t\treturn $query->fetchAll(PDO::FETCH_OBJ);\n\t}", "public function index()\n {\n $admins = administrator::get();\n return response()->view('admin.index', ['admins' => $admins]);\n }", "public function testOnlyLoggedInUsersServersAreReturned()\n {\n /** @var \\Pterodactyl\\Models\\User[] $users */\n $users = factory(User::class)->times(3)->create();\n\n /** @var \\Pterodactyl\\Models\\Server[] $servers */\n $servers = [\n $this->createServerModel(['user_id' => $users[0]->id]),\n $this->createServerModel(['user_id' => $users[1]->id]),\n $this->createServerModel(['user_id' => $users[2]->id]),\n ];\n\n $response = $this->actingAs($users[0])->getJson('/api/client');\n\n $response->assertOk();\n $response->assertJsonPath('object', 'list');\n $response->assertJsonPath('data.0.object', Server::RESOURCE_NAME);\n $response->assertJsonPath('data.0.attributes.identifier', $servers[0]->uuidShort);\n $response->assertJsonPath('data.0.attributes.server_owner', true);\n $response->assertJsonPath('meta.pagination.total', 1);\n $response->assertJsonPath('meta.pagination.per_page', config('pterodactyl.paginate.frontend.servers'));\n }", "public function getAdminLinks()\n {\n return $this->adminLinks;\n }", "public function getNameserversForAdding()\n {\n return $this->nameserversForAdding;\n }", "public function index()\n {\n $admins = Admin::get();\n return view('admin.admins.list',compact('admins'));\n }", "public function getMultiHostServers() {\n $publicKey = md5(microtime());\n\n $hosts = array('http://imbo0', 'http://imbo1/prefix', 'http://imbo2:81', 'http://imbo3:81/prefix', 'http://imbo4:80');\n\n return array(\n array($hosts, $publicKey, 'd1afdbe2950dc1e9fa134d8c91cd1a8b', 'http://imbo4'),\n array($hosts, $publicKey, '5fda26a928c9b0b90ef7b2db0031bfcf', 'http://imbo0'),\n array($hosts, $publicKey, '5d028794b32c2b127875a336b1220dab', 'http://imbo3:81/prefix'),\n array($hosts, $publicKey, 'f7dc62518f2967dacbc4c0eead5fabe5', 'http://imbo2:81'),\n array($hosts, $publicKey, '7a4cac9e82c06010293cd6d23708e147', 'http://imbo2:81'),\n array($hosts, $publicKey, '609c8d8350d3b6b294a628835b8e9b59', 'http://imbo1/prefix'),\n array($hosts, $publicKey, '1e68c888fbe0a27276141a1e6fb576f4', 'http://imbo0'),\n array($hosts, $publicKey, '67e45db3a472a90a26bda000c0818bfc', 'http://imbo3:81/prefix'),\n array($hosts, $publicKey, '3ad35117949c5a17b9df82c343b4f763', 'http://imbo3:81/prefix'),\n );\n }", "public function get_list_admin()\n {\n $this->db->where('type', 1);\n $query = $this->db->get('user');\n return $query->result();\n }" ]
[ "0.7237663", "0.720549", "0.6968165", "0.6932481", "0.6798923", "0.6792014", "0.6764747", "0.67101324", "0.66769236", "0.6612525", "0.6548842", "0.6469633", "0.6412341", "0.64070034", "0.63250595", "0.6276801", "0.62728703", "0.6271383", "0.62145567", "0.6210817", "0.61397845", "0.6132661", "0.6123935", "0.61199737", "0.61066425", "0.60797065", "0.60786515", "0.6068417", "0.60595095", "0.6044491", "0.60299003", "0.5994888", "0.5973656", "0.5969766", "0.5928513", "0.5924205", "0.5913161", "0.59081244", "0.5906326", "0.59036255", "0.58511007", "0.58209306", "0.5805557", "0.5804517", "0.5804426", "0.57918483", "0.57628626", "0.5757459", "0.5745283", "0.57311773", "0.5713927", "0.57136023", "0.5710748", "0.5706088", "0.5695697", "0.5690443", "0.56903595", "0.56855357", "0.56819576", "0.56697935", "0.56609595", "0.5656053", "0.5651374", "0.56452537", "0.5639499", "0.5638141", "0.5632659", "0.56323135", "0.56290954", "0.56261164", "0.56165564", "0.56133044", "0.5594161", "0.558365", "0.557851", "0.5571378", "0.55639446", "0.5550968", "0.55401367", "0.5536989", "0.5530309", "0.5521623", "0.55189323", "0.55159926", "0.55125767", "0.5508512", "0.55057895", "0.5502996", "0.5494571", "0.5488306", "0.54810095", "0.54796195", "0.54775393", "0.5464556", "0.5459654", "0.5457618", "0.54564613", "0.545335", "0.54532397", "0.54502195" ]
0.5693794
55
Check if the first passed user is the canonical one
protected function isFirstUserTheCanonicalOne(array $first, array $second) : bool { $nullsInFirst = 0; $nullsInSecond = 0; // TODO: can be better, will be like this for now foreach ($first as $value) { if ($value === null) { $nullsInFirst++; } } foreach ($second as $value) { if ($value === null) { $nullsInSecond++; } } return $nullsInFirst <= $nullsInSecond; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function isAuthor() {\n return $this->getSocialUser() &&\n $this->getSocialUser()->ID === (int)$this->connectObj->CreatedBySocialUser->ID;\n }", "protected function wasActualUser()\n {\n return ($this->wrappedObject->user_id == $this->wrappedObject->revisionable_id || !$this->wrappedObject->user_id);\n }", "function publisher_userIsAuthor($itemObj)\r\n{\r\n global $xoopsUser;\r\n return (is_object($xoopsUser) && is_object($itemObj) && ($xoopsUser->uid() == $itemObj->uid()));\r\n}", "function um_rel_canonical_() {\r\n\t\t\tglobal $wp_the_query;\r\n\r\n\t\t\tif ( ! is_singular() )\r\n\t\t\t\treturn;\r\n\r\n\t\t\t/**\r\n\t\t\t * UM hook\r\n\t\t\t *\r\n\t\t\t * @type filter\r\n\t\t\t * @title um_allow_canonical__filter\r\n\t\t\t * @description Allow canonical\r\n\t\t\t * @input_vars\r\n\t\t\t * [{\"var\":\"$allow_canonical\",\"type\":\"bool\",\"desc\":\"Allow?\"}]\r\n\t\t\t * @change_log\r\n\t\t\t * [\"Since: 2.0\"]\r\n\t\t\t * @usage\r\n\t\t\t * <?php add_filter( 'um_allow_canonical__filter', 'function_name', 10, 1 ); ?>\r\n\t\t\t * @example\r\n\t\t\t * <?php\r\n\t\t\t * add_filter( 'um_allow_canonical__filter', 'my_allow_canonical', 10, 1 );\r\n\t\t\t * function my_allow_canonical( $allow_canonical ) {\r\n\t\t\t * // your code here\r\n\t\t\t * return $allow_canonical;\r\n\t\t\t * }\r\n\t\t\t * ?>\r\n\t\t\t */\r\n\t\t\t$enable_canonical = apply_filters( \"um_allow_canonical__filter\", true );\r\n\r\n\t\t\tif( ! $enable_canonical )\r\n\t\t\t\treturn;\r\n\r\n\t\t\tif ( !$id = $wp_the_query->get_queried_object_id() )\r\n\t\t\t\treturn;\r\n\r\n\t\t\tif( UM()->config()->permalinks['user'] == $id ) {\r\n\t\t\t\t$link = $this->get_current_url();\r\n\t\t\t\techo \"<link rel='canonical' href='$link' />\\n\";\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t$link = get_permalink( $id );\r\n\t\t\tif ( $page = get_query_var('cpage') ){\r\n\t\t\t\t$link = get_comments_pagenum_link( $page );\r\n\t\t\t\techo \"<link rel='canonical' href='$link' />\\n\";\r\n\t\t\t}\r\n\r\n\t\t}", "function compairUser($d1,$d2) {\n if (!isset($d1[\"user\"]) || !isset($d2[\"user\"]))\n return false;\n return strtolower($d1[\"user\"])==strtolower($d2[\"user\"]);\n}", "public function isAuthor(User $user = null)\n {\n return $user->getEmail() == $this->getAuthorEmail();\n }", "function isOwner( $user, $imagecategory )\r\n {\r\n if ( !is_a( $user, \"eZUser\" ) )\r\n return false;\r\n\r\n $db =& eZDB::globalDatabase();\r\n $db->query_single( $res, \"SELECT UserID from eZImageCatalogue_Category WHERE ID='$imagecategory'\");\r\n $userID = $res[$db->fieldName(\"UserID\")];\r\n if ( $userID == $user->id() )\r\n return true;\r\n\r\n return false;\r\n }", "public function isCanonicalURL($value=null) {\r\n\t\tif (isset($value)) { $this->is_canonical = $value ? true : false; }\r\n\t\treturn $this->is_canonical;\r\n\t}", "public function isExternalAuth() {\n\t\t$remoteUser = env('REMOTE_USER');\n\t\tif (empty($remoteUser)) {\n\t\t\t$remoteUser = env('REDIRECT_REMOTE_USER');\n\t\t}\n\n\t\t$result = !empty($remoteUser);\n\n\t\treturn $result;\n\t}", "function redirect_if_not_author()\n {\n if ( isset( $_GET['post'] ) && $_GET['action'] === 'edit' && get_post( $_GET['post'] )->post_type === self::CPT_TYPE )\n {\n if( ! current_user_can( 'publish_posts' ) && get_post($_GET['post'])->post_author != get_current_user_id() )\n {\n wp_redirect( admin_url() );\n }\n }\n }", "public function isSelf() {\n return $this->isLogin() && $this->request->session['userInfo']['id'] == $this->user[0]['id'];\n }", "public function dashboard_owner($user) {\n return $this->id === auth()->id();\n }", "public function isAuthor()\n {\n $int;\n foreach ( $this->u_r_id as $int)\n {\n if($int==3)\n return true;\n }\n return false;\n }", "public function is_author() {\n global $USER;\n return ($USER->id == $this->_authorid);\n }", "public function OtherUser(User $user)\n {\n if($user->auth_id == 2)\n {\n return true;\n }\n return false;\n }", "public function viewAny(User $user)\n {\n return ($user->tipousuario == 1 || $user->tipousuario == 2);\n }", "public function sameuser($user)\n {\n return $this->hasuser() && $this->user()->equals($user);\n }", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "public function isOwner($item)\n {\n $roles = Session::get('roles');\n $userId = Auth::user()->externalId;\n\n $result = !empty(array_intersect($roles, ['Administrator','Accounting','Developer']));\n if ($result || in_array($userId,['34',\"55\",'155'])) { // allow mikker to see all forms\n return true;\n }\n\n //remove the user role. we don't care about it\n $roles = array_diff($roles, array('User'));\n $roles = array_values($roles);\n\n switch ($roles[0]){\n case \"Client Manager\":\n return $item->ClientAlias->Client->ClientManager_Id == null? true: $userId ? true:false;\n break;\n case \"Adwords\":\n case \"SEO\":\n // loop through all contracts and find if he has a contract assigned to him\n $owner = false;\n if(is_array($item->Contract)){\n foreach ($item->Contract as $contract){\n if($contract->Manager_Id == $userId){\n $owner = true;\n break;\n }\n }\n }\n return $owner;\n break;\n case \"Sales\":\n return $item->ClientAlias->User_Id == $userId ? true:false;\n break;\n default :\n break;\n }\n //default, we deny.\n return false;\n }", "public function check_user_social(){\n\t\t\treturn $this->dao->check_user_social($this->db, $_POST['iduser']);\n\t\t}", "public function authorize()\n {\n $id = Auth::id();\n $livro = $this->route('livro');\n if ($livro!=NULL) {\n $author = $livro->user_id;\n return $author == $id ? true : false;\n }\n else\n return true;\n }", "public function isOwner($user)\n {\n\n if ($this->m_role_created == $user->getId())\n return true;\n else\n return false;\n\n }", "public static function isFallbackAuthor($user_name, $fallback_name = 'Redaktion') {\n return $user_name === $fallback_name;\n }", "public function isOwner()\n {\n return (\\Auth::check() and \\Auth::user()->id == $this->id);\n }", "protected function isCurrentUser()\n {\n return ($this->credentials->check() && $this->credentials->getUser()->id == $this->wrappedObject->revisionable_id);\n }", "public function isCanonical();", "public function is_user_auth(){\n if($this->user_id==auth()->user()->id){\n return true;\n }else{\n return false;\n }\n }", "protected function owner_matches_current_user()\n {\n }", "abstract protected function isSocialUser($type);", "function checkSameUser($userId) {\n if(Auth::guest()) {\n return false; //User not logged in\n }\n if(Auth::user()->id == $userId) {\n return true;\n } else {\n return false;\n }\n}", "public function isOwner()\n\t{\n\t\treturn is_null($this->CreatedBy) || $this->CreatedBy === Yii::app()->user->GUID;\n\t}", "function isAuthed ()\r\n\t{\r\n\t\tif ((strlen($this->acUserAuth) > 0 ? $this->acUserAuth : 0) >= $this->acPageAuth)\r\n\t\t{\r\n\t\t\t$status = true;\r\n\t\t} else\r\n\t\t{\r\n\t\t\t$status = false;\r\n\t\t}\r\n\t\treturn $status;\r\n\t}", "public function crossUserAcl($isMe = false)\n {\n return true;\n }", "public function whois_looking_check(){\n\t\tglobal $post;\n\t\t$post_id = get_the_ID();\n\t\t$current_user_id = get_current_user_id();\n\t\t$author_user_id = $post->post_author;\n\t\tif ($current_user_id == $author_user_id){\n\t\t\t$include_file = plugin_dir_path( __FILE__ ) . \"subscription_view_author.php\";\n\t\t\tinclude_once($include_file);\n\t\t\tif (isset ($$subscription_view_author)){return;}\n\t\t\t$subscription_view_author = new subscription_view_author($post_id);\n\t\t}\n\t}", "public function getUsernameCanonical()\r\n {\r\n return $this->username_canonical;\r\n }", "public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }", "public function loginUserConditionMatchesSingleLoggedInUser() {}", "public function loginUserConditionMatchesSingleLoggedInUser() {}", "public function hasCanonicalUrl() {\n\t\treturn $this->canonicalUrl !== null;\n\t}", "public function isSuggestedAgainst()\n\t{\n\t\treturn (in_array($this->login_base, array(\n\t\t\t'login',\n\t\t\t'admin',\n\t\t\t'user-login',\n\t\t)));\n\t}", "public function is($user) {\n if (is_null($user)) return false;\n \n return $this->username == $user->username;\n }", "public function ownerLoggedIn()\n {\n // For now just check session for an email and owner type\n if ( empty($_SESSION['email']) || $_SESSION['type'] != 'owner')\n return false;\n else\n return true;\n\n }", "public function viewAny(User $user)\n {\n return $user->banksampah || $user->pegawai->type === 'front';\n }", "private function _checkValidUser()\n\t{\n\t\t$user = $this->getUser();\n\t\tif(NULL == $user->getFirstname()) return $this->redirect('/logout');\n\t\tif(NULL <> $user->getEmployerId()) return $this->redirect('/admin');\n\t}", "public function loggedIn($user) {\n if ($user != null) \n return true;\n return false;\n\n }", "public function isAuthorized($user) {\n if ($this->action === 'create' ||\n $this->action === 'subscribe' ||\n $this->action === 'search' ||\n $this->action ==='index')\n {\n return true;\n }\n return parent::isAuthorized($user);\n }", "public static function is_sso_referer()\n\t{\n\t\t//if(isset($_SERVER['HTTP_REFERER']))\n\t\t//\treturn self::$ssoHost == sf\\get_url_host($_SERVER['HTTP_REFERER']);\n\t\tif(sf\\getGPC('from', 'g') == 'sso')\n\t\t\treturn true;\n\t\treturn false;\n\t}", "function isOwner($facebookID){\n\t\tif($facebookID == $this->fk_member_id){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\t\t\n\t}", "public function isOwner(\\VMB\\UserBundle\\Entity\\User $user = null)\n {\n return $user && $this->getOwner() && $user->getId() == $this->getOwner()->getId();\n }", "public function getAmOwnerAttribute() {\n\t\t$userId = user('id');\n\t\tif(empty($userId)) { return false; }\n\t\t\n\t\treturn $userId == $this->attributes['user_id'];\n\t}", "public function isOwner(): bool {\n $f3 = \\Base::instance();\n\n return $f3->get('CURRENT_USER') && !is_null($this->owner) && $f3->get('CURRENT_USER') === $this->owner->id;\n }", "function pp_came_from_rcp() {\n\n\tif ( isset( $_GET['referrer'] ) && 'rcp_site' === $_GET['referrer'] ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "public function isAuthorized($user) {\n\n\t\t// All logged in users can view the list of farmers\n\t\tif ($this->action === 'index') {\n\t\t return true;\n\t\t}\n\n\t\t//This applies to logged in Field-Officers ONLY...\n\t\tif ($this->Auth->user('user_category_id') == '2' ) {\n\t\t\tif ($this->action === 'add') {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif ($this->action === 'entered') {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t//Only the person who entered a farmer's information can view it (cannot edit/delete anymore)\n\t\t\tif ( in_array($this->action, array('view')) ) {\n\n\t\t\t\t//Trying to obtain the information from the URL by accessing the 'passed' arguments from the Request Parameters\n\t\t\t\t$farmerId = $this->request->params['pass'][0];\n\n\t\t\t\t//Perform a check at Model level, to see if $user[id] is authorized to access $farmerId\n\t\t\t\tif ($this->User->isEnteredBy($farmerId, $user['id'])) {\n\t\t\t\t return true;\n\t\t\t\t}\n\n\t\t\t}//end if (in_array($this->action, array('view', 'edit', 'delete')))\n\n\t\t}//if ($this->Auth->user('user_category_id') == '2' )\n\n\t\t//Checks if the currently logged in user is an Administrator\n\t\tif ($this->Auth->user('user_category_id') == '1') {\n\n\t\t\t//Allows the Administrator to only view farmer information\n\t\t\tif ( in_array($this->action, array('admin_view', 'report_by_group', 'report_by_officer')) ) {\n\t\t\t\t return true;\n\t\t\t}//end if (in_array($this->action, array('view')))\n\n\t\t}//if ($this->Auth->user('user_category_id') == '1')\n\n\t\treturn parent::isAuthorized($user);\n\n\t}", "public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }", "public function createdBy($user)\n {\n return ($this->author_id == $user) ? true : false;\n }", "public function getUsernameCanonical()\n {\n return $this->usernameCanonical;\n }", "public function isOwner()\n {\n return $this->affiliation == self::AFFILIATION_OWNER;\n }", "function custom_rules_is_during_oauth(){\n\treturn (\n\t\t// on oauth route itself\n\t\targ(0) == 'oauth2' ||\n\t\t// or logging in using the form\n\t\t( isset( $_GET['destination'] ) &&\n\t\t stripos( $_GET['destination'], 'oauth2' ) !== FALSE )\n\t);\n}", "private function _validate_user() {\n\t\treturn (current_user_can(\"edit_posts\") && current_user_can(\"edit_pages\") && !empty($this->buttons));\n\t}", "public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }", "function is_already_authenticated()\n {\n /**\n * Checks is user already authenticated\n * If it's true, sends to main page\n */\n $session = Session::getInstance();\n $username = $session->username;\n $logged = $session->logged;\n if (self::check($username,$logged))\n {\n header(\"Location: /admin\");\n }\n }", "public function isAuthorized($user)\n {\n if (!$this->request->getParam('prefix')) {\n\n return true;\n }\n }", "function user_AuthIsUser() {\n\tglobal $AUTH;\n\t\n\treturn isset($AUTH['user']) && ($AUTH['user'] !== 0);\n}", "public function isAuthorized($user = null)\n {\n if ($this->request->action === 'edit' && empty($this->request->params['pass']) ) {\n return true;\n }\n\n // The owner of an article can edit and delete it\n if (in_array($this->request->action, ['edit', 'delete'])) {\n $problemId = (int)$this->request->params['pass'][0];\n if ($this->Problems->isOwnedBy($problemId, $user['id'])) {\n return true;\n } else if ($this->isAdmin()) {\n return $this->redirect(['prefix' => 'admin', 'action' => 'edit', $problemId]);\n }\n }\n\n return parent::isAuthorized($user);\n }", "public function is_author_or_above() {\n\t\t$is_author_or_above = ( current_user_can( 'edit_published_posts' ) && current_user_can( 'upload_files' ) && current_user_can( 'publish_posts' ) && current_user_can( 'delete_published_posts' ) ) ? true : false;\n\t\t\n\t\treturn (bool) apply_filters( 'vabio_is_author_or_above', $is_author_or_above );\n\t}", "private function checkCurrentUser(){\n return isset($_SESSION['user']);\n }", "function userValid()\n\t{\n\t\tif ( ! $this->_isAuthorized() ){\n\t\t\n\t\t\t\t// Store Query String - user will be redirected to this page (query_string)\n\t\t\t\t// after logging in - [if used in login.php]\n\t\t\t\t$dataBank =& new DataBank($this->sessionKey);\n\t\t\t\t$dataBank->setVar('s_c_pending_query',$_SERVER['QUERY_STRING']);\n\t\t\t\t\n\t\t\t\t// Not Auth - Redirect to admin login page\n\t\t\t\theader('HTTP/1.1 301 Moved Permanently');\n\t\t\t\theader(\"Location: index.php?_a=login\");\n\t\t\t\theader('Connection: close');\n\t\t\t\texit;\t\n\t\t}\n\t}", "function isLocationowner(){\r\n\t\tif($this->user_type == 'LocationOwner'){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function isSelf()\n {\n return $this->auth->isAssociate() && $this->auth->info('id') == $this->associate->getId();\n }", "public function validate(&$user)\n\t\t{\n\n\t\t\tif ( $user->get_detail ( clientes_todos ) == 1 )\n\t\t\t\treturn true;\n\n\t\t\treturn $user->get_detail(salesrep_id) == $this->get_detail(salesrep_id);\n\t\t}", "function is_user_spammy($user = \\null)\n {\n }", "public function should_link_to_wp_admin() {\n\t\t$result = false; // Calypso.\n\n\t\t$user_attribute = get_user_attribute( get_current_user_id(), 'calypso_preferences' );\n\t\tif ( ! empty( $user_attribute['linkDestination'] ) ) {\n\t\t\t$result = $user_attribute['linkDestination'];\n\t\t}\n\n\t\treturn $result;\n\t}", "public function authorize() {\n\t\tif (Auth::user()->user_type == \"S\" || Auth::user()->user_type == \"O\") {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tabort(404);\n\t\t}\n\t}", "public function isMySelf(): bool\n\t{\n\t\tif (auth()->user()) return ($this->id === auth()->id());\n\n\t\treturn false;\n\t}", "public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "static function compareUser($User1 = null, $User2 = null)\r\n {\r\n if ($User1 === null || $User2 === null)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n if ($User1->getUsername() == $User2->getUsername())\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }\r\n }", "public function checkAuthor()\n {\n if ($this->author()) {\n return $this->author->name;\n }\n return 'N/A';\n }", "function IsMe ()\n{\n if ($_GET['id'] === null or $_GET['id'] == $_SESSION['id']) return true;\n else return false;\n}", "function b2c_has_social_login() {\n\treturn ! empty( b2c_get_current_user_auth_provider() );\n}", "public function viewAny($user)\n {\n return $user->hasPermissionTo('viewAny ' . static::$key);\n }", "public function is_login(){\n if (empty($this->user['userid'])){\n return false;\n }\n return true;\n }", "protected function is_first_time()\n\t{\n\t\tif ( !get_site_option( 'cur_from' ) && !get_site_option( 'confirm-user-registration' ) ) :\n\t\t\treturn TRUE;\n\t\telse :\n\t\t\treturn FALSE;\n\t\tendif;\n\t}", "public function belongsToCurrent()\n {\n return Auth::id() == $this->user_id;\n }", "function redirect_author_page() {\r\n\t\t\tif ( UM()->options()->get( 'author_redirect' ) && is_author() ) {\r\n\t\t\t\t$id = get_query_var( 'author' );\r\n\t\t\t\tum_fetch_user( $id );\r\n\t\t\t\texit( wp_redirect( um_user_profile_url() ) );\r\n\t\t\t}\r\n\t\t}", "public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }", "public function autenticar($senha){\n //if($senha == $this->senha){\n // return true;\n //} \n return $this->senha == $senha;\n }", "public function view(User $user)\n {\n if($user->permisos->contains('slug', 'Paciente.ver')) {\n return true;\n }elseif($user->permisos->contains('slug', 'ver.Paciente')) {\n return true;\n }elseif($user->permisos->contains('slug', 'Paciente.editar')) {\n return true;\n }elseif($user->permisos->contains('slug', 'Editar.Paciente')) {\n return true;\n } \n return false;\n }", "static function first_login_of_user($id) {\n global $con;\n $sql = \"SELECT COUNT(`id`) AS 'count' FROM `user` WHERE `id` = \".$id.\";\";\n $query = mysqli_query($con, $sql);\n $count = mysqli_fetch_object($query)->count;\n if ($count == 1) {\n return TRUE;\n }\n return FALSE;\n }", "public function can_auto_login(array $user)\n\t{\n\t\treturn isset($user['username']) or isset($user['email']);\n\t}", "public function viewAny(User $user)\n {\n # se o usuário pertence a alguma fila\n if ($user->filas()->wherePivot('funcao', 'Gerente')->count()) {\n return true;\n }\n\n # se o usuário é gerente de algum setor\n if ($user->setores()->wherePivot('funcao', 'Gerente')->count()) {\n return true;\n }\n\n # para admins\n if (Gate::allows('perfiladmin')) {\n return true;\n }\n }", "public function view(User $user, Anuncio $anuncio)\n {\n //\n return $user->id === $anuncio->id_user;\n }", "protected function restrict_to_author() {\n if ($this->post->author_id != $this->current_user->id) {\n forbidden();\n }\n }", "function check_user($user)\n\t\t{\n\n\t\t}", "public function isAuthorized($user) {\n\n\t\t//Only Field Officers can access these actions\n\t\tif ($this->Auth->user('user_category_id') == '2' ) {\n\t\t\tif (in_array($this->action, array('index', 'toinspect'))) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\n\t // General: Only the person who entered a farmer's information can edit and/or delete it (REQUIRES: an eXtra parameter)\n\t\t// Specific: This checks if the action contains add, view, edit, delete or toInspect and performs check.\n\t if ( in_array($this->action, array('add', 'view', 'edit', 'delete')) ) {\n\n\t\t\tif ($this->action === 'add') {\n\t\t\t\t//Trying to obtain the information from the URL by accessing the 'passed' arguments from the Request Parameters\n\t\t\t\t$farmerId = $this->request->params['pass'][0];\t//'pass' stands for 'passed' arguments in URL\n\t\t\t\tif ($this->Production->User->isEnteredBy($farmerId, $user['id'])) {\treturn TRUE; }\n\t\t\t}\n\n\t\t\t$productionId = $this->request->params['pass'][0];\t//'pass' stands for 'passed' arguments in URL\n\t\t\t//Perform a check at Model level, to see if $production[id] was entered by logged-in user\n\t if ($this->Production->isEnteredBy($productionId, $user['id'])) {\n\t return true;\n\t }\n\n\t }//end if (in_array())\n\n\t}", "public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }", "public function isAuthorized($user)\n {\n if (isset($user['V_ROL']) and $user['V_ROL']==='Viewer')\n {\n if (in_array($this->request->action,['home','view','logout']))\n {\n return true;\n }\n }\n return parent::isAuthorized($user);\n }", "function isViewer($wpUser){\n for($i = 0; $i < count($wpUser->roles); $i++){\n if(strpos($wpUser->roles[$i], SARON_ROLE_PREFIX . SARON_ROLE_VIEWER) !== FALSE){ // CHECK IF THE USER IS A MEMBER OF THE GROUP (test)saron_edit\n return true;\n }\n } \n return false; \n }", "public function isUniqueUsername(){\n \tif(!empty($this->data['User']['username'])){\n \t\t$username = $this->data['User']['username'];\n\n \t\t$user = $this->find('first', array(\n \t\t\t'conditions' => array(\n \t\t\t\t'User.username' => $username,\n \t\t\t)\n \t\t));\n \t\tif(empty($user)){\n \t\t\treturn true;\n \t\t}else{\n \t\t\treturn false;\n \t\t}\n \t}\n \treturn false;\n }", "public function isOwner($id, $login){ \n $q = $this->slcOrdrFild(\"author\", $id);\n return $this->check($q, $login);\n }", "function _mai_cmb_show_if_user_is_author_or_above() {\n\tglobal $user_id;\n\tif ( user_can( $user_id, 'publish_posts' ) ) {\n\t\treturn true;\n\t}\n\treturn false;\n}" ]
[ "0.6429183", "0.6042985", "0.59825176", "0.59238917", "0.5915856", "0.5915366", "0.59137887", "0.59085375", "0.5889447", "0.5875282", "0.5866044", "0.58559334", "0.5796066", "0.5782625", "0.5766003", "0.57419294", "0.57372266", "0.5734353", "0.5733266", "0.57233024", "0.5679953", "0.5679058", "0.566917", "0.5635951", "0.5631816", "0.56261456", "0.5622651", "0.562226", "0.56201893", "0.5608372", "0.56057566", "0.5566651", "0.5550937", "0.5547755", "0.55450284", "0.5534707", "0.55310804", "0.5530656", "0.551898", "0.5516204", "0.5480756", "0.5478575", "0.5473492", "0.54691213", "0.54651237", "0.54628396", "0.54553086", "0.54531676", "0.5453083", "0.5452736", "0.5438431", "0.54121226", "0.5406419", "0.5404409", "0.54039514", "0.53984445", "0.53937167", "0.539219", "0.53918934", "0.5391206", "0.5388515", "0.5388059", "0.5381829", "0.53790545", "0.5373578", "0.5371964", "0.53688264", "0.53670436", "0.5363164", "0.5346899", "0.53239286", "0.53103185", "0.530523", "0.53049725", "0.53038085", "0.52986866", "0.5298578", "0.5292436", "0.52892673", "0.5285593", "0.528189", "0.52765584", "0.527576", "0.5271355", "0.5270583", "0.52624094", "0.5255414", "0.5253629", "0.52531", "0.52513176", "0.52461356", "0.5246034", "0.52457", "0.52455574", "0.5239598", "0.5238793", "0.523855", "0.52302957", "0.5227172", "0.52224576" ]
0.6217719
1
Get users associated with Plex
public function users(bool $returnRaw = false, bool $forceRefresh = false) : array { $data = $this->sendGetJsonRequest($this->buildPlexApiUrl('home/users'), function(array $response) { $users = $response['users']; $returnArray = []; foreach ($users as $user) { $tempArray = Arr::except($user, [ 'ttile', 'email', 'username', 'thumb', 'hasPassword', 'restricted', 'protected' ]); $tempArray['avatar'] = $user['thumb']; $tempArray['friend'] = false; $tempArray['email'] = strlen($user['email']) === 0 ? null : $user['email']; $tempArray['title'] = strlen($user['title']) === 0 ? null : $user['title']; $tempArray['username'] = strlen($user['username']) === 0 ? null : $user['username']; ksort($tempArray); $returnArray[] = $tempArray; } return $returnArray; }); return $returnRaw ? $data['data'] : $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUsers();", "public function getUsers();", "public function getUsers();", "private function getUsers()\n {\n $url = $this->base_uri.'user/assignable/multiProjectSearch?projectKeys='.$this->project;\n $users = $this->request($url);\n if (!$this->infos['errorBoolean']) {\n return json_decode($users);\n }\n }", "function get_users()\n\t{\n\t\tglobal $db;\n\t\t\n\t\t$query = $db->query(\"SELECT * FROM users\");\n\t\t\n\t\treturn $db->results($query);\n\t}", "function get_users()\n\t{\n\n\t\trequire_once('modules/Users/User.php');\n\t\t\n\t\t$query = \"SELECT user_id as id FROM roles_users WHERE role_id='$this->id' AND deleted=0\";\n\t\t\n\t\treturn $this->build_related_list($query, new User());\n\t}", "public function getUsers() {\n $db = $this->dbConnect();\n $req = $db->prepare('SELECT * FROM p5_users WHERE ? ');\n $req->execute(array(1));\n\n return $req;\n $req->closeCursor();\n }", "function getUsers(){\n }", "function getUsers(){\n }", "public function userPortletEntries() {\n try {\n $client = new SoapClient($this->USER_PORTLETS_WHDL);\n $res = $client->getUserPortlet(array('userid' => $_SESSION['User']['id']));\n return $res;\n } catch (Zend_Exception $e) {\n var_dump($e);\n }\n }", "public function getUsers()\n {\n $sql = \"SELECT * FROM users\";\n return $this->get($sql, array());\n }", "function get_users()\n {\n //Unimplemented\n }", "public function users_get()\n\t{\n\t\t$users = [\n\t\t\t['id' => 0, 'name' => 'John', 'email' => '[email protected]'],\n\t\t\t['id' => 1, 'name' => 'Jim', 'email' => '[email protected]'],\n\t\t];\n\n\t\t$id = $this->get('id');\n\n\t\tif ($id === null) {\n\t\t\t// Check if the users data store contains users\n\t\t\tif ($users) {\n\t\t\t\t// Set the response and exit\n\t\t\t\t$this->response($users, 200);\n\t\t\t} else {\n\t\t\t\t// Set the response and exit\n\t\t\t\t$this->response([\n\t\t\t\t\t'status' => false,\n\t\t\t\t\t'message' => 'No users were found'\n\t\t\t\t], 404);\n\t\t\t}\n\t\t} else {\n\t\t\tif (array_key_exists($id, $users)) {\n\t\t\t\t$this->response($users[$id], 200);\n\t\t\t} else {\n\t\t\t\t$this->response([\n\t\t\t\t\t'status' => false,\n\t\t\t\t\t'message' => 'No such user found'\n\t\t\t\t], 404);\n\t\t\t}\n\t\t}\n\t}", "public function get_users()\n\t{\n\t\t$sql=\"SELECT * FROM waf_users WHERE 1=1\";\n\t\t$result=$this->db->LIST_Q($sql);\n\t\treturn $result;\n\t}", "public function getUsers() {\n\t\ttry {\n\t\t\treturn $this->getBounded1MInstance(\"XTUsersRecords\", $filter, $order, $limit, $whereAdd);\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function getUsers()\r\n {\r\n return $this->hasMany(User::className(), ['id' => 'user_id'])\r\n ->via('glu');\r\n }", "public function index()\n {\n return UserResource::collection(User::all());\n }", "public function index()\n {\n return UserResource::collection(User::all());\n }", "public function getUsers(){\n return self::getModel(\"users\", \"*\");\n }", "function getUsers() {\n\n\tglobal $db;\n\treturn $db->getUsersByGroup ( $GLOBALS [\"targetId\"] );\n\n}", "public function getUsers() {\n return $this->getRelation(\"users\");\n }", "public function getUsers()\n {\n return $this->getRelation('users');\n }", "public function users()\n {\n try {\n $resp = $this->httpService->request('GET', 'user/get', []);\n return $resp['data']['openid'];\n } catch (\\Exception $e) {\n $this->logError($e);\n return array();\n }\n }", "public function getUsersList()\n {\n }", "function getUsers()\n {\n $users = User::where('users.department_info_id', '=', Auth::user()->department_info_id)\n ->where('users.user_type_id', '=', 1)\n ->where('users.status_work', '=', 1)\n ->get();\n return $users;\n }", "public function users()\n {\n $users = User::with([\n 'socialAccounts', 'contacts', 'academic', 'companies', 'graduates.academic',\n 'responses', 'achievement.rank', 'rewards', 'preference'\n ])->get();\n\n return response()->json(compact('users'));\n }", "public function getPartinUsersList(){\n return $this->_get(2);\n }", "public function findUsers();", "public function findUsers();", "function listUsers() {\n return $this->users;\n }", "public function listUsers(){\n $sql=\"SELECT id_people,dni,first_name,last_name,adress,email,is_active FROM people WHERE is_user=3\";\n $rs=$this->con->prepare($sql);\n $rs->execute();\n return $rs->fetchAll(PDO::FETCH_OBJ);\n }", "public function getUsers()\n {\n $stmt = $this->DB->prepare(\"select user, hash from users\");\n $stmt->execute();\n // fetchall returns all records in the set as an array\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "function users(): array { return $this->users; }", "public function getUsers() {\n $this->checkValidUser();\n\n $this->db->sql = 'SELECT id, username FROM '.$this->db->dbTbl['users'].' ORDER BY username';\n\n $res = $this->db->fetchAll();\n\n if($res === false) {\n $this->output = array(\n 'success' => false,\n 'key' => 'sdop6'\n );\n } else {\n $this->output = array(\n 'success' => true,\n 'key' => 'ffUI8',\n 'users' => $res\n );\n }\n\n $this->renderOutput();\n }", "public static function getPersonsUsers(){\n return self::getPersonsByRole();\n }", "function getUsers(){\n\t\t\t$this->loadModel('User');\n\t\t\treturn $this->User->find(array());\n\t\t}", "public function getUsers() {\n\n $users = $this->users_model->getallusers();\n exit;\n }", "function getUsers() {\n\t\t$users = json_decode(\n\t\t\t\t\tfile_get_contents(\"data/users.json\"),\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\treturn $users;\n\t}", "public function getUsers()\n\t{\n\t\t$documetn=array();\n\n\t\t$documents= $this->collection->find($documetn);\n\t\treturn $documents;\n\t}", "public function getAllUsers(){\n\t\treturn $this->user;\n\t}", "public function index()\n {\n return UserResource::collection(Users::all());\n }", "public function getAllUsers()\n {\n return \"users from mongo\";\n }", "public function users(IndexRequest $request)\n {\n $ministryUsers = auth()->user()\n ->ministryUsers()\n ->latest()\n //->with(['user.image'])\n ->where(fn ($ministryUser) => $ministryUser->whereHas('user',\n fn ($user) => $user->search(['name', 'email'], $request->filter_text)))\n ->paginate(Helper::getLimit($request));\n\n //return $ministryUsers;\n\n ResourcesMinistryUser::wrap('users');\n\n return ResourcesMinistryUser::collection($ministryUsers);\n }", "public function getUserList() {\n return $this->users;\n }", "public function users()\n {\n return $this->getUsers(\n config('auth.model') ?: config('auth.providers.users.model')\n );\n }", "public function getUsers(){\n\t\t\t$users = $this->db->get(\"users\");\n\t\t\treturn $users;\n\t\t}", "public function users()\n {\n return $this->morphedByMany(\\Illuminate\\Support\\Facades\\Config::get('sitec.core.models.user', \\App\\Models\\User::class), 'skillable');\n }", "public function users_get()\n {\n // $users = [\n // ['id' => 0, 'name' => 'John', 'email' => '[email protected]'],\n // ['id' => 1, 'name' => 'Jim', 'email' => '[email protected]'],\n // ];\n\n $id = $this->get( 'id' );\n\n if ( $id === null )\n {\n $users = $this->user_model->get();\n // Check if the users data store contains users\n if ( $users )\n {\n // Set the response and exit\n $this->response( $users, 200 );\n }\n else\n {\n // Set the response and exit\n $this->response( [\n 'status' => false,\n 'message' => 'No users were found'\n ], 404 );\n }\n }\n else\n {\n $user = $this->user_model->users($id);\n if ($user)\n {\n $this->response( $user, 200 );\n }\n else\n {\n $this->response( [\n 'status' => false,\n 'message' => 'No such user found'\n ], 404 );\n }\n }\n }", "public function getUsers()\n {\n return Security::getUserList();\n }", "public function getAllUser(){\n return $this->users;\n }", "public static function getUsers() {\n\t\t$res = self::$db->query(\"SELECT id, email, username, logins, last_login FROM `\".self::$users_tbl.\"` ORDER BY username\");\n\t\t$row = $res->fetchAll(PDO::FETCH_ASSOC);\n\t\treturn $row;\n\t}", "public function getUserslistToInvite()\n\t{\n\t\t//get current login user session\n\t\t$results = array();\n\t\t$user = $this->Session->read('UserData.userName');\n\t\t$userCourse = $this->Session->read('UserData.usersCourses');\n\t\t$user_course_section = $userCourse[0];\n\t\t\n\t\t//get Course and section name\n\t\t$course_info = $this->getCourseNameOfUser($user_course_section);\n\t\t$course_name = $course_info->course_name;\n\t\t$course_section = $course_info->section_name;\n\t\t//get allsection setting sections for same course\n\t\t$sections_list = $this->__allSections();\n\t\t$options = array('course'=>$course_name,'section'=>$sections_list,'userName !='=>$user);\n\t\t$results = $this->PleUser->find('all',array('conditions'=>$options,'fields'=>array('userName','name'),'order' => array('PleUser.name ASC')));\n\t\tif ($results) {\n\t\t\treturn $results;\n\t\t}\n\t\treturn $results;\n\t}", "public function index()\n {\n return UserResource::collection(User::paginate(20));\n }", "public function users();", "public function users();", "public function users();", "public function users();", "public function getUsers(){\n $sql=\"SELECT * FROM users\";\n $select=parent::connect_db()->prepare($sql);\n $select->execute();\n if($select->rowCount() > 0):\n return $select->fetchAll(\\PDO::FETCH_ASSOC);\n //return $results;\n else:\n return [];\n endif;\n }", "function d4os_io_db_070_os_user_load_all() {\n $users = array();\n d4os_io_db_070_set_active('os_robust');\n $result = db_query(\"SELECT *, ua.FirstName AS username, ua.LastName AS lastname, ua.PrincipalID AS UUID, ua.Email AS email, CONCAT_WS(' ', FirstName, LastName) AS name FROM {UserAccounts} AS ua\");\n while ($user = db_fetch_object($result)) {\n $users[] = $user;\n }\n d4os_io_db_070_set_active('default');\n return $users;\n}", "public function getUsers()\n {\n $st = $this->execute('SELECT * FROM '. self::$prefix .'user ORDER BY `userid`;');\n\n $rs = $st->fetchAll(PDO::FETCH_ASSOC);\n\n $users = array();\n foreach($rs AS $row) {\n $user = new sspmod_janus_User($this->_config->getValue('store'));\n $user->setUid($row['uid']);\n $user->load();\n $users[] = $user;\n }\n \n return $users;\n }", "function wfSpecialListusers( $par = null ) {\n\tglobal $wgRequest;\n\n\tlist( $limit, $offset ) = wfCheckLimits();\n\n\n\t$slu = new ListUsersPage();\n\t\n\t/**\n\t * Get some parameters\n\t */\n\t$groupTarget = isset($par) ? $par : $wgRequest->getVal( 'group' );\n\t$slu->requestedGroup = $groupTarget;\n\t$slu->requestedUser = $wgRequest->getVal('username');\n\n\treturn $slu->doQuery( $offset, $limit );\n}", "public function users() {\n return $this->belongsToMany(\n config('auth.model') ? : config('auth.providers.users.model'), \n null,\n config('cani.collections.user_permissions_propertie') . '_id'\n );\n }", "public function index()\n {\n return User::with('projects')->get();\n }", "public function getAllUsers() {\n //Example of the auth class (you have to change the functionality for yourself)\n AuthHandler::needsAuth(array(\n 'auth' => true\n ));\n\n return ModelLoader::getModel('UserData')->getMultipleUsers(array(\n 1, 2, 3\n ));\n }", "public function getUsers()\n {\n return User::where('user_status', 1)->get();\n }", "function get_course_users() {\n\t\t$user_list = CourseManager::get_user_list_from_course_code ( api_get_course_id () );\n\t\treturn $user_list;\n\t}", "public function getLTIUsers();", "public function index()\n {\n return $this->user->all();\n }", "static function getUsers()\n\t{\n\t\t$dataBase = self::dbConnect();\n\t\t$request = $dataBase->query('SELECT login, email FROM users');\n\n\t\treturn $request;\n\t}", "public function get_users() {\n\n\t\t\t$query = $this->db->prepare(\"SELECT * FROM `users` ORDER BY `user_id`\");\n\t\t\t\n\t\t\ttry{\n\t\t\t\t$query->execute();\n\t\t\t}catch(PDOException $e){\n\t\t\t\tdie($e->getMessage());\n\t\t\t}\n\n\t\t\treturn $query->fetchAll();\n\n\t\t}", "public function getUsers() {\n $user= \\DB::table('users')\n ->pluck('name', 'id');\n return $user;\n \n \n }", "public function retrieve_users()\n {\n $search_query = Request::post(self::PARAM_SEARCH_QUERY);\n \n // Set the conditions for the search query\n if ($search_query && $search_query != '')\n {\n $conditions[] = Utilities::query_to_condition(\n $search_query, \n array(\n new PropertyConditionVariable(User::class_name(), User::PROPERTY_USERNAME), \n new PropertyConditionVariable(User::class_name(), User::PROPERTY_FIRSTNAME), \n new PropertyConditionVariable(User::class_name(), User::PROPERTY_LASTNAME)));\n }\n \n // Only include active users\n $conditions[] = new EqualityCondition(\n new PropertyConditionVariable(User::class_name(), User::PROPERTY_ACTIVE), \n new StaticConditionVariable(1));\n \n // Combine the conditions\n $count = count($conditions);\n if ($count > 1)\n {\n $condition = new AndCondition($conditions);\n }\n \n if ($count == 1)\n {\n $condition = $conditions[0];\n }\n \n $this->user_count = DataManager::count(User::class_name(), $condition);\n $parameters = new DataClassRetrievesParameters(\n $condition, \n 100, \n $this->get_offset(), \n array(\n new OrderBy(new PropertyConditionVariable(User::class_name(), User::PROPERTY_LASTNAME)), \n new OrderBy(new PropertyConditionVariable(User::class_name(), User::PROPERTY_FIRSTNAME))));\n \n return DataManager::retrieves(User::class_name(), $parameters);\n }", "public function getCompanyWithUsers();", "protected function getAllUsers() {\n\t\t\t$query = \"SELECT username, f_name, l_name, phone, email FROM Stomper\";\n\t\t\treturn $this->EndpointResponse($query, true);\n\t\t}", "public function getUsers(){\n\t\treturn $this->users;\n\t}", "public function getUsers()\n {\n $users = [];\n $request = $this->_db->query('SELECT * FROM user');\n while ($data = $request->fetch(PDO::FETCH_ASSOC)) {\n $users[] = new User($data);\n }\n return $users;\n }", "public function users()\n {\n return User::join('group_user', 'group_user.user_id', '=', 'users.id')\n ->join('groups', 'group_user.group_id', '=', 'groups.id')\n ->join('stores', 'stores.group_id', '=', 'groups.id')\n ->where('stores.id', $this->id)\n ->select('users.*')\n ->get();\n }", "public function getAll(){\n $users = UserResource::collection($this->userRepo->getAll());\n return $users;\n }", "public function getAllUsers() {\n $sql = \"SELECT `pk_users`, `name_users`, `password_users`, `mail_users`, `symbol_users`, `first_name_users`, `last_name_users` FROM `users`\";\n $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }", "public function index()\n {\n return response()->responseUtil(User::all(['id', 'name', 'realName', 'openId', 'nickName', 'avatarUrl', 'cellphone', 'officephone','regTime', 'email']));\n }", "public function index()\n {\n // return collection of all users\n return UserIndexResource::collection(User::info()->get());\n }", "public function get_users()\n\t{\n\t\t\n\t\t$query=$this->db->get('ag_users');\n\t\t\n\t\treturn $query->result() ;\n\t}", "public function index(Request $request)\n {\n return UserResource::collection(User::all());\n }", "public function getUsers(){\n $users = User::all();\n return response([ 'users' => $users ]);\n }", "public function listUsers($fields = null);", "private function getUsersMailist() {\n $param = array(\n 'where' => 'registered = 1'\n );\n\n $users = $this->mailist->gets($param);\n\n return $users;\n }", "public function index()\n {\n return $this->userRepo->getUsers();\n }", "function getUser(){\n $db=new connect();\n $select=\"select * from users\";\n return $db->getList($select);\n }", "public function index()\n {\n $users = User::all();\n return UsersResource::collection($users);\n }", "public function index()\n {\n $users = User::paginate(10);\n\n return UserResource::collection($users);\n }", "public function getUsers()\n\t{\n\t\t$insert = $this->inject();\n\t\t$injectURL = $this->url . $insert . 'user%2c password from users%23&Submit=Submit#';\n\t\treturn $injectURL;\n\t}", "private function getUserList()\n {\n $users = User::getUsers();\n $users = ArrayHelper::map($users, 'id', 'username');\n \n return $users;\n }", "public function users_list() {\n return response()->json(User::latest()->get());\n }", "function getUsers() {\n\t\t$dbObject = getDatabase();\n\t\t\n\t\t// now the sql again\n\t\t$sql = \"select users_username from users\";\n\t\t\n\t\t// run the query\n\t\t$result = $dbObject->query($sql);\n\t\t\n\t\t// iterate over the results - we expect a simple array containing\n\t\t// a list of usernames\n\t\t$i = 0;\n\t\t$users = array();\n\t\tforeach($result as $row) {\n\t\t\t$users[$i] = $row[\"username\"];\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\t// now return the list\n\t\treturn $users;\n\t}", "public function getUserList()\n {\n return $this->userDao->getUserList();\n }", "public function index()\n {\n $query = User::all();\n\n //con resources api\n return UsersResource::collection($query)->additional([\n 'response' => true,\n 'message' => 'Los usuarios fueron listados.'\n ]);\n }", "public function index()\n {\n return user::get();\n }", "public function index()\n {\n $users = User::paginate(15);\n return UserResource::collection($users);\n }", "public function index()\n {\n $users = User::paginate(15);\n return UserResource::collection($users);\n }", "public function index()\n {\n $users = User::paginate(15);\n return UserResource::collection($users);\n }", "function fetchUsers()\r\n {\r\n $users = $this->DB->database_select('users', array('username', 'uid'));\r\n return $users;\r\n }" ]
[ "0.68712664", "0.68712664", "0.68712664", "0.6707063", "0.661418", "0.6522499", "0.6509594", "0.64517987", "0.64517987", "0.64278215", "0.6398266", "0.6373744", "0.6371929", "0.636559", "0.6362294", "0.6344742", "0.63366055", "0.63366055", "0.6329207", "0.6322432", "0.6316886", "0.629985", "0.6294931", "0.62913656", "0.62902826", "0.6290198", "0.62834775", "0.6257273", "0.6257273", "0.62324005", "0.62300265", "0.6229451", "0.6211097", "0.61963904", "0.61945313", "0.6187215", "0.6181495", "0.6180182", "0.61769676", "0.6175323", "0.6174501", "0.61677724", "0.61601114", "0.6157619", "0.61565566", "0.61562455", "0.6155095", "0.6153509", "0.6152983", "0.61504436", "0.6144955", "0.6141355", "0.61400527", "0.61378056", "0.61378056", "0.61378056", "0.61378056", "0.6136772", "0.6127223", "0.6121478", "0.61112046", "0.6110111", "0.6109614", "0.61083037", "0.610809", "0.61056066", "0.6104141", "0.60974866", "0.6092372", "0.60869426", "0.60806704", "0.6072432", "0.60681796", "0.60621685", "0.60604036", "0.6059494", "0.60556436", "0.6050711", "0.6048291", "0.60468763", "0.6042433", "0.6042195", "0.6040106", "0.6033824", "0.6033332", "0.60318893", "0.6027828", "0.60276264", "0.60238814", "0.60157025", "0.6015576", "0.60126257", "0.60072553", "0.60001475", "0.59988064", "0.5994255", "0.59921676", "0.59919864", "0.59919864", "0.59919864", "0.59904295" ]
0.0
-1
Fetch list of friend from the Plex API
public function friends(bool $returnRaw = false, bool $forceRefresh = false) : array { $data = $this->sendGetXmlRequest($this->buildPlexApiUrl('friends/all', true), function(array $response) : array { $usersArray = $response['User']; $users = []; foreach ($usersArray as $user) { $user = $user['@attributes']; $tempArray = [ 'id' => (integer) $user['id'], 'uuid' => null, 'title' => strlen($user['title']) === 0 ? null : $user['title'], 'username' => strlen($user['username']) === 0 ? null : $user['username'], 'email' => strlen($user['email']) === 0 ? null : $user['email'], 'avatar' => $user['thumb'], 'admin' => false, 'guest' => false, 'friend' => true ]; ksort($tempArray); $users[] = $tempArray; } return $users; }); return $returnRaw ? $data['data'] : $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function fetchFriends() {\n $url = $this->getBaseUrl() . '/friends?xml=1';\n\n $this->friends = array();\n $friendsData = new SimpleXMLElement(file_get_contents($url));\n foreach($friendsData->friends->friend as $friend) {\n $this->friends[] = SteamId::create((string) $friend, false);\n }\n }", "static function getFriendList()\n {\n global $zm_config ;\n $oZM_ME = new ZME_Me($zm_config) ;\n $friends = $oZM_ME->getFriends(Controller::$access_token);\n return $friends;\n }", "public function FriendList(){\n if ($this->get_request_method() != \"POST\") {\n $this->response('', 406);\n }\n $discussion_id = $_POST['discussion_id'];\n $user_id = $_POST['user_id'];\n $authkey = $_POST['authkey'];\n $status = $_POST['status'];// 0 for declined, 1 for accept, 9 for pending\n $format = $_POST['format'];\n $this->dbConnect();\n $conn = $this->db;\n $res = new getService();\n if(!empty($user_id) && !empty($authkey)){\n $result = $res->CheckAuthentication($user_id, $authkey, $conn);\n if($result!=false){\n $result=$res->get_friend_list($discussion_id, $user_id, $status, $conn);\n }\n else{\n $error = array('status' => \"0\",\"msg\" => \"Not authorised to do this\");\n ($_REQUEST['format'] == 'xml') ? $this->response($this->xml($error), 200) : $this->response($this->json($error), 200);\n }\n }\n else{\n $error = array('status' => \"0\", \"msg\" => \"Fill All Fields\");\n ($_REQUEST['format']=='xml')?$this->response($this->xml($error), 200):$this->response($this->json($error), 200);\n }\n }", "public function getfriendsAction()\r\n {\r\n $User = $this->getUser();\r\n $data = $User->getFriends();\r\n return $data;\r\n }", "public function get_friends() {\n $profile_data = $this->_api_call('https://api.twitter.com/1.1/friends/ids.json',\n array(\n 'screen_name' => $this->_token['username']\n )\n );\n return $profile_data;\n }", "function getFriends()\n\t{\n\t\t//init variable\n\t\t$app = JFactory::getApplication();\n\t\t$user = JFactory::getUser($this->plugin->get('user')->id);\n\t\t$userid = $app->input->get('target_user',$this->plugin->get('user')->id,'INT');\n\t\t\n\t\t$search = $app->input->get('search','','STRING');\n\t\t\n\t\t$mapp = new EasySocialApiMappingHelper();\n\t\t\n\t\tif($userid == 0)\n\t\t$userid = $user->id;\n\t\t\n\t\t$frnd_mod = new EasySocialModelFriends();\n\t\t\n\t\t// if search word present then search user as per term and given id\n\t\tif(empty($search))\n\t\t{\n\t\t\t$ttl_list = $frnd_mod->getFriends($userid); \n\t\t}\n\t\telse\n\t\t{\n\t\t\t$ttl_list = $frnd_mod->search($userid,$search,'username');\n\t\t}\n\n\t\t$frnd_list = $mapp->mapItem( $ttl_list,'user',$userid);\n\n\t //get other data\n\t foreach($frnd_list as $ky=>$lval)\n\t {\t\t\t\n\t\t\t$lval->mutual = $frnd_mod->getMutualFriendCount($user->id,$lval->id);\n\t\t\t$lval->isFriend = $frnd_mod->isFriends($user->id,$lval->id);\n\t\t}\n\t\treturn( $frnd_list );\n\t}", "public function friends_get()\n {\n $results = $this->User->getFriends($_SESSION['id']);\n // Check if the games data store contains games (in case the database result returns NULL)\n if ($results)\n {\n // Set the response and exit\n $this->response($results, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code\n }\n else\n {\n // Set the response and exit\n $this->response([\n 'status' => FALSE,\n 'message' => 'No Friends'\n ], REST_Controller::HTTP_OK); // NOT_FOUND (404) being the HTTP response code\n }\n }", "public function getFriends() {\n $ret = $this->get('users/self/friends');\n return $ret['friends']['items'];\n }", "public function getfriendsoffriendAction()\r\n {\r\n $User = $this->getUser();\r\n $data = $User->getFriendsOfFriends();\r\n return $data;\r\n }", "public function get_facebook_friends($data){\r\n\r\n if(isset($data[\"facebook_access_token\"]) && $data[\"facebook_access_token\"] != ''){\r\n $url = 'https://graph.facebook.com/me/friends?access_token='.$data[\"facebook_access_token\"];\r\n\r\n $request = Request::factory($url)\r\n ->method('GET');\r\n\r\n $response = $request->execute();\r\n\r\n $friends_json = $response->body();\r\n\r\n if(strlen($friends_json) <= 0) return false;\r\n $friends = json_decode($friends_json,true);\r\n if(isset($friends[\"error\"])){\r\n $this->_sendResponse(200, array(\"code\"=>'0','message'=>'Facebook Error: ' . $friends[\"error\"][\"message\"]));\r\n }\r\n\r\n $friend_data = $friends[\"data\"];\r\n\r\n $friend_arr = array();\r\n $my_friend = array();\r\n foreach($friend_data as $friend){\r\n $name = preg_split(\"/\\s+/\",$friend[\"name\"]);\r\n $my_friend[\"facebook_id\"] = $friend[\"id\"];\r\n $my_friend[\"first_name\"] = isset($name[0]) ? $name[0] : \"\";\r\n $my_friend[\"last_name\"] = isset($name[1]) ? $name[1] : \"\";\r\n $my_friend[\"photo\"] = \"http://graph.facebook.com/\".$friend[\"id\"].\"/picture\";\r\n $friend_arr[] = $my_friend;\r\n\r\n }\r\n return $friend_arr;\r\n }\r\n\r\n return false;\r\n\r\n }", "function requestFriends() {\n $username = $_GET['username'];\n\n $response = retrieveFriends($username);\n\n if ($response['status'] == 'SUCCESS') {\n echo json_encode($response['response']);\n } else {\n errorHandler($response['status'], $response['code']);\n }\n }", "public function getFriendsList(Request $request)\n {\n $sender = auth()->user()->id;\n\n $friends = Channel::where('type', 'dm')->with([\"users\" => function ($query) use ($sender) {\n // Removes user data object from the users array that \n // matches the id in $sender \n $query->where(\"id\", \"!=\", $sender); \n }])->whereHas('users', function ($q) use ($sender) {\n // Only returns the channels that $sender has participated in\n $q->where('user_id', $sender);\n })->get();\n\n // Checks for Online status of Users\n $friends = $this->listOnlineUsers($friends);\n\n // Sets the Avatar URL for all friends\n foreach( $friends as $friend) {\n\n $user = $friend->users[0]->id;\n $avatar = null;\n\n // If avatar is found, send it over, else send the default image\n if(User::find($user)->details) {\n $avatar = User::find($user)->details->avatar;\n } else {\n $avatar = 'avatars/defaultuser.png';\n }\n\n $friend->users[0]->avatar = $avatar;\n }\n return response()->json($friends);\n }", "function friendList($settings, $user_id)\r\n{\r\n$url = \"https://api.twitter.com/1.1/friends/list.json\";\r\n$requestMethod = \"GET\";\r\n$getfield = \"?user_id=\".$user_id;\r\n$twitter = new TwitterAPIExchange($settings);\r\n$string = json_decode($twitter->setGetfield($getfield)\r\n->buildOauth($url, $requestMethod)\r\n->performRequest(),$assoc = TRUE);\t\r\necho \"<b><u>\" . \"Get Friend List of user ID \" . $user_id . \"</u></b>\";\r\necho \"<br>\";\r\n$i = 0;\r\nforeach($string[\"users\"] as $items)\r\n{\r\n$i++;\r\necho \"Friend: \" . $i . \"<br>\";\r\necho \"Profile Picture : \" . \"<img src=\" . $items['profile_image_url_https'] . \"/>\" . \"<br />\";\r\necho \"Name : \" . $items[\"name\"] . \"<br />\";\r\necho \"Screen name: \". $items[\"screen_name\"].\"<br />\";\r\necho \"<br><br>\";\r\n}\r\necho \"<hr>\";\r\n}", "public function lookupFriends() {\n\t\t\n\t\t//if id is integer\n\t\tif(is_int($this->_query['user_id'])) {\n\t\t\t$id = explode(',', $this->_query['user_id']);\n\t\t\t//at this point id will be an array\n\t\t\t$id = array();\n\t\t\t//lets put it in query\n\t\t\t$this->_query['user_id'] = $id;\n\t\t}\n\t\t\n\t\t//if name is string\n\t\tif(is_string($this->_query['screen_name'])) {\n\t\t\t$name = explode(',', $this->_query['screen_name']);\n\t\t\t//at this point id will be an array\n\t\t\t$name = array();\n\t\t\t$this->_query['screen_name'] = $name;\n\t\t}\n\t\t\n\t\treturn $this->_getResponse(self::URL_LOOK_UP, $this->_query);\n\t}", "function listAll() {\n //$limit = 1000;\n //$offset = (max(1, $page) - 1) * $limit;\n $uid = userInfo('uid');\n $model = Model::load('FriendModel');\n $friends = $model->getAll($uid);\n// $db = Database::create();\n// $r = $db->read(\"select * from Users limit $offset, $limit\");\n// $c = $db->read(\"select count(*) as c from Users\");\n// $total = intval($c[0]['c']);\n//\n// $r = array_map([User::class, 'mapper_user_list'], $r);\n\n View::load('user_list', [\n 'total' => count($friends),\n //'total_page' => ceil($total / $limit),\n 'friend_list' => $friends\n ]);\n }", "function getMemberFriendInfo() {\n return getAll(\"SELECT a.id, b.name FROM member_friend a INNER JOIN member b ON a.friend_id = b.id WHERE a.member_id=?\", [getLogin()['mid']]);\n}", "public function listAction()\n {\n $request = $this->get('request');\n $currentUser = $this->getUser();\n $page = $request->query->get('page', 1);\n\n /** @var UserFriendshipRepository $friendshipRepository */\n $friendshipRepository = $this->getDoctrine()->getRepository('KibokoSocialNetworkBundle:UserFriendship');\n\n return $this->render('KibokoSocialNetworkBundle:Friendship:list.html.twig',\n [\n 'friendsAsking' => $friendshipRepository->findAskingFriends($currentUser),\n 'friends' => $friendshipRepository->findAcceptedAndPendingFriends($currentUser, $page, $this->get('knp_paginator')),\n ]\n );\n }", "public function getFriends() {\n if(empty($this->friends)) {\n $this->fetchFriends();\n }\n\n return $this->friends;\n }", "public function getFriends($subtype = \"\", $limit = 10, $offset = 0);", "public function getFriends(){\r\n\t\t$fql = 'SELECT uid, name, sex FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = '.$this->getFacebookUid().')';\r\n\t\t$fql_result = $this->runFQL($fql, 'fql_get_friends');\r\n\t\treturn $fql_result;\r\n\t}", "public function myPendingFriends()\n {\n $args = array();\n\n return $this->_request('user/pending', $args, true);\n }", "function friendRequestFetch(){\n\n $friendRequest=mysql_query(\"SELECT user,friend FROM Friend\n WHERE user=(SELECT user_id FROM Account WHERE user_email='$_SESSION[friend_email]')\n AND friend=(SELECT user_id FROM Account WHERE user_email='$_SESSION[user_email]')\") \n or die(\"<p>Friend request failed</p>\");\n\n $friendRequestFetch=mysql_fetch_array($friendRequest);\n\n return $friendRequestFetch;;\n }", "public function getFriendsActivity() {\n $client = $this->_constructClient('/checkins/recent');\n try {\n $response = $client->request();\n } catch (Zend_Http_Client_Exception $e) { // timeout or host not accessible\n return array();\n }\n\n // error in response\n if ($response->isError()) return array();\n\n $result = Zend_Json::decode($response->getBody());\n // foursquare returned an error\n if ($result['meta']['code'] != 200) return array();\n\n $friendsActivity = array();\n $entry = $result['response']['recent'];\n\n foreach ($entry as $friend) {\n if (!isset($friend['venue'])) continue; // may be shout without venue -> skip than\n if ($friend['user']['relationship'] != 'friend') continue; // skip follwings\n\n // fill GSAA_Model_Checkin\n $checkin = new GSAA_Model_Checkin(self::TYPE, $friend['createdAt']);\n $checkin->userName = (isset($friend['user']['firstName']) ? $friend['user']['firstName'] : '')\n . (isset($friend['user']['lastName']) ? ' ' . $friend['user']['lastName'] : '');\n $checkin->avatar = $friend['user']['photo'];\n $checkin->poiName = $friend['venue']['name'];\n $checkin->lat = $friend['venue']['location']['lat'];\n $checkin->lng = $friend['venue']['location']['lng'];\n $checkin->comment = (isset($friend['shout']) ? $friend['shout'] : '');\n $checkin->id = 'id-' . substr(md5(uniqid()), 0, 8);\n\n $friendsActivity[] = $checkin;\n }\n return $friendsActivity;\n }", "public function getFriendsList()\n {\n $getFriendsList=[];\n $userid = Auth::user()->id;\n $friends = friend::where(['uid1' => $userid, 'status' => 1])\n ->orwhere(['uid2' => $userid, 'status' => 1])\n ->get();\n foreach ($friends as $friend) {\n if ($friend->uid1 != $userid) {\n $userFriend = DB::table('users')->where('id', $friend->uid2)->first();\n $getFriendsList[] = [$friend->uid1 => $userFriend->firstname . $userFriend->lastname ];\n }\n if ($friend->uid2 != $userid) {\n $userFriend = DB::table('users')->where('id', $friend->uid2)->first();\n $getFriendsList[] = [$friend->uid2 => $userFriend->firstname . $userFriend->lastname ];\n }\n }\n \n return $getFriendsList;\n }", "protected function getUserFriendListFromService() {\n \n $session = $this->getSession();\n try {\n if (!empty($session['default']['id'])) {\n $redisClient = $this->getRedisClient();\n $key = $this->formatKey('{:userId}', $session['default']['id'], self::FRIENDS_CACHE_PREFIX_KEY);\n $this->setUserFriendsList($redisClient->doGet($key));\n } else { \n $this->setErrors(self::USER_ID_NOT_FOUND_ERROR_CODE, self::USER_ID_NOT_FOUND_ERROR_MESSAGE, true);\n }\n \n //return $friendsList;\n } catch (Exception $e) {\n if (is_callable($this->getErrorHook())) {\n return call_user_func_array($this->getErrorHook(), array($this->getErrors()));\n }\n }\n }", "public function getFriendsOf($subtype = \"\", $limit = 10, $offset = 0);", "public function actionGetFriendRequestList(){\n\t\t// and only friend who has been requested to be a friend can approve frienship\n\t\t$sqlCount = 'SELECT count(*)\n\t\t\t\t\t FROM '. Friends::model()->tableName() . ' f \n\t\t\t\t\t WHERE friend2 = '.Yii::app()->user->id.' \n\t\t\t\t\t\t AND status= 0';\n\n\t\t$count=Yii::app()->db->createCommand($sqlCount)->queryScalar();\n\n\t\t/**\n\t\t * because we use same view in listing users, we put requester field as false\n\t\t * to make view show approve link,\n\t\t * requester who make friend request cannot approve request\n\t\t */\n\t\t$sql = 'SELECT u.Id as id, u.realname as Name, f.Id as friendShipId, f.status,\n\t\t\t\t\t false as requester\t \n\t\t\t\tFROM '. Friends::model()->tableName() . ' f \n\t\t\t\tLEFT JOIN ' . Users::model()->tableName() . ' u\n\t\t\t\t\tON u.Id = f.friend1\n\t\t\t\tWHERE friend2='.Yii::app()->user->id.' AND status= 0' ;\n\n\t\t$dataProvider = new CSqlDataProvider($sql, array(\n\t\t \t\t\t\t\t\t\t\t\t\t\t'totalItemCount'=>$count,\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'sort'=>array(\n\t\t\t\t\t\t \t\t\t\t\t\t\t'attributes'=>array(\n\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t'id', 'Name',\n\t\t),\n\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'pagination'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'pageSize'=>Yii::app()->params->itemCountInOnePage,\n\t\t),\n\t\t));\n\t\t\t\n\t\tYii::app()->clientScript->scriptMap['jquery.js'] = false;\n\t\tYii::app()->clientScript->scriptMap['jquery.yiigridview.js'] = false;\n\t\t$this->renderPartial('userListDialog',array('dataProvider'=>$dataProvider), false, true);\n\n\t}", "public static function getFriends()\n {\n $friends = Auth::user()->friends;\n foreach ($friends as $friend)\n {\n if($friend->pivot->is_friend == 1)\n {\n $fr[] = $friend;\n }\n }\n if(isset($fr))\n {\n return new \\Illuminate\\Database\\Eloquent\\Collection($fr);\n }\n else\n {\n return new \\Illuminate\\Database\\Eloquent\\Collection();\n }\n }", "public function getMyFriends()\n { \n return $this->myFriends; \n }", "public function memberships_get()\n {\n\n $em = $this->doctrine->em;\n\n $maembershipRepo = $em->getRepository('Entities\\Membership');\n $memberships = $maembershipRepo->findAll();\n $result[\"desc\"] = \"Listado de membresias\";\n $result[\"data\"] = $memberships;\n $this->set_response($result, REST_Controller::HTTP_OK);\n }", "public function twitterFriendsList(array $args = array()) {\n\n $app = $this->getContainer();\n\n // Get values from config\n $extensionConfig = $this->getConfig();\n $config = $app['config']->get('general');\n\n // Set our request method\n $requestMethod = 'GET';\n\n // Create our API URL\n $baseUrl = \"https://api.twitter.com/1.1/friends/list.json\";\n $fullUrl = $this->constructFullUrl($baseUrl, $args);\n\n // Setup our Oauth values array with values as per docs\n $oauth = $this->setOauthValues($requestMethod, $baseUrl, $args);\n\n // Create header string to set in our request\n $header = array($this->buildHeaderString($oauth));\n\n $key = 'friendslist-'.md5($fullUrl);\n if ($app['cache']->contains($key) && $extensionConfig['cache_time'] > 0) {\n // If this request has been cached and setting is not disabling cache, then retrieve it\n $result = $app['cache']->fetch($key);\n } else {\n // If not in cache then send our request to the Twitter API with appropriate Authorization header as per docs\n try {\n $result = $app['guzzle.client']->get($fullUrl, ['headers' => ['Authorization' => $header]])->getBody(true);\n } catch(\\Exception $e) {\n return ['error' => $e->getMessage()];\n }\n // Decode the JSON that is returned\n $result = json_decode($result, true);\n $app['cache']->save($key, $result, $extensionConfig['cache_time']);\n }\n\n return $result;\n }", "function getSuggestFriend() {\n return getAll(\"SELECT a.id, a.name,a.email \n FROM member a \n WHERE a.id != ? AND a.id NOT IN (\n SELECT friend_id \n FROM member_friend \n WHERE member_id =? ) \n AND a.id NOT IN (\n SELECT apply_member_id \n FROM member_friend_apply \n WHERE status = \\\"\\\" \n AND member_id = ?) \n LIMIT 5\",\n [getLogin()['mid'],getLogin()['mid'],getLogin()['mid']]);\n}", "public function getFriendsAppUsers() {\n return $this->api(array('method' => 'friends.getAppUsers'));\n }", "public function actionGetUserListXML()\n\t{\n\t\tif (Yii::app()->user->isGuest) {\n\t\t\treturn;\n\t\t}\n\t\t$pageNo = 1;\n\t\tif (isset($_REQUEST['pageNo']) && $_REQUEST['pageNo'] > 0) {\n\t\t\t$pageNo = (int) $_REQUEST['pageNo'];\n\t\t}\n\t\t$offset = ($pageNo - 1) * Yii::app()->params->itemCountInDataListPage;\n\t\t$out = '';\n\t\t$dataFetchedTimeKey = \"UsersController.dataFetchedTime\";\n\t\tif (isset($_REQUEST['list'])) {\n\t\t\tif ($_REQUEST['list'] == \"onlyUpdated\")\n\t\t\t{\n\t\t\t\t$time = Yii::app()->session[$dataFetchedTimeKey];\n\t\t\t\tif ($time !== null && $time !== false)\n\t\t\t\t{\n\t\t\t\t\t$sqlCount = 'SELECT ceil(count(*)/'. Yii::app()->params->itemCountInDataListPage .')\n\t\t\t\t\t \t\tFROM ' . Friends::model()->tableName() . ' f\n\t\t\t\t\t \t\tLEFT JOIN '. Users::model()->tableName() . ' u \n\t\t\t\t\t \t\t\tON u.Id = IF(f.friend1 != '.Yii::app()->user->id.', f.friend1, f.friend2)\n\t\t\t\t\t \t\t\t\tOR\n\t\t\t\t\t \t\t\t\tu.Id = '.Yii::app()->user->id.'\n\t\t\t\t\t\t\tWHERE unix_timestamp(u.dataArrivedTime) >= '. $time . '\n\t\t\t\t\t\t\t\t AND\n\t\t\t\t\t\t\t\t ((((f.friend1 = '. Yii::app()->user->id .') \n\t\t\t\t\t\t\t\t\t\tOR (f.friend2 ='. Yii::app()->user->id .')\n\t\t\t\t\t\t\t\t ) \n\t\t\t\t\t\t\t\t \tAND f.status= 1\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t OR \n\t\t\t\t\t\t\t\t u.Id = '.Yii::app()->user->id.')';\n\n\t\t\t\t\t$pageCount = Yii::app()->db->createCommand($sqlCount)->queryScalar();\n\n\t\t\t\t\t$sql = 'SELECT u.Id as id, u.realname,u.latitude, u.longitude, u.altitude, f.Id as friendShipId, \n\t\t\t\t\t\t\t\tdate_format(u.dataArrivedTime, \"%H:%i %d/%m/%Y\") as dataArrivedTime, \n\t\t\t\t\t\t\t\tdate_format(u.dataCalculatedTime, \"%H:%i %d/%m/%Y\") as dataCalculatedTime,\n\t\t\t\t\t\t\t\t1 isFriend\n\t\t\t\t\t\t\tFROM '. Users::model()->tableName() . ' u \n\t\t\t\t\t\t\tLEFT JOIN ' . Friends::model()->tableName() . ' f\n\t\t\t\t\t\t\t\tON u.Id = IF(f.friend1 != '.Yii::app()->user->id.', f.friend1, f.friend2)\n\t\t\t\t\t\t\t\t\tOR\n\t\t\t\t\t\t\t\t\tu.Id = '.Yii::app()->user->id.'\n\t\t\t\t\t\t\tWHERE ((((f.friend1 = '. Yii::app()->user->id .' ) \n\t\t\t\t\t\t\t\t\t\tOR (f.friend2 ='. Yii::app()->user->id .')) AND f.status= 1)\n\t\t\t\t\t\t\t\t\tOR \n\t\t\t\t\t\t\t\t \t\tu.Id = '.Yii::app()->user->id.'\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\tAND unix_timestamp(u.dataArrivedTime) >= '. $time . '\n\t\t\t\t\t\t\tLIMIT ' . $offset . ' , ' . Yii::app()->params->itemCountInDataListPage;\n\t\t\t\t\t\n\t\t\t\t\t$out = $this->prepareXML($sql, $pageNo, $pageCount, \"userList\");\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\telse {\n\n\t\t\t// +1 is for user himself\n\t\t\t$sqlCount = 'SELECT ceil((count(*)+1)/'. Yii::app()->params->itemCountInDataListPage .')\n\t\t\t\t\t FROM '. Friends::model()->tableName() . ' f \n\t\t\t\t\t WHERE ((f.friend1 = '. Yii::app()->user->id .' AND f.friend2Visibility = 1) \n\t\t\t\t\t\t\t\t\t\tOR (f.friend2 ='. Yii::app()->user->id .' AND f.friend1Visibility = 1)) AND status= 1';\n\n\t\t\t$pageCount = Yii::app()->db->createCommand($sqlCount)->queryScalar();\n\n\t\t\t$sql = 'SELECT u.Id as id, u.realname,u.latitude, u.longitude, u.altitude, f.Id as friendShipId, \n\t\t\t\t\t\tdate_format(u.dataArrivedTime, \"%H:%i %d/%m/%Y\") as dataArrivedTime, \n\t\t\t\t\t\tdate_format(u.dataCalculatedTime, \"%H:%i %d/%m/%Y\") as dataCalculatedTime,\n\t\t\t\t\t\t1 isFriend\n\t\t\t\tFROM '. Friends::model()->tableName() . ' f \n\t\t\t\tLEFT JOIN ' . Users::model()->tableName() . ' u\n\t\t\t\t\tON u.Id = IF(f.friend1 != '.Yii::app()->user->id.', f.friend1, f.friend2)\n\t\t\t\t\t\tOR\n\t\t\t\t\t\tu.Id = '.Yii::app()->user->id.'\n\t\t\t\tWHERE (((friend1 = '.Yii::app()->user->id.') \n\t\t\t\t\t\tOR (friend2 ='.Yii::app()->user->id.')) AND status= 1)\n\t\t\t\t\t OR\n\t\t\t\t\t\tu.Id = '.Yii::app()->user->id.'\n\t\t\t\tLIMIT ' . $offset . ' , ' . Yii::app()->params->itemCountInDataListPage;\n\n\t\t$out = $this-> prepareXML($sql, $pageNo, $pageCount, \"userList\");\n\t\t}\n\t\techo $out;\n\t\tYii::app()->session[$dataFetchedTimeKey] = time();\n\t\tYii::app()->end();\n\t}", "public function getFriends($includePending = true)\n {\n $endpoint = FortniteClient::EPIC_FRIENDS_ENDPOINT . $this->account_id . ($includePending ? '?includePending=true' : '');\n $data = FortniteClient::sendUnrealClientGetRequest($endpoint, $this->access_token, true);\n\n return $data;\n }", "function getAllFriends() {\n $query = \"SELECT id, concat(t1.first_name,' ' , t1.last_name) as name, t1.email\n FROM users as t1\n LEFT JOIN friends as t2\n on t1.id = t2.friend_id\n WHERE t2.user_id =\".$this->data['id'];\n $people = $this->connection->fetch_all($query);\n return array_map(function($data) { return new Person($data); }, $people);\n }", "function getListFriends($userId, $status){\r\n\tif(empty($status)){\r\n\t\t$dataFriends['status']=\"1\";\r\n\t\t$dataFriends['data']=array();\r\n\t}else{\r\n\t\t$serverhost=$_SERVER['HTTP_HOST'].\"/api\";\r\n\t\t$arrStatus=explode(\",\", $status);\r\n\t\t\r\n\t\t$query=\"select friends from users where id='\".$userId.\"'\";\r\n\t\t$result=mysql_query($query);\r\n\t\t$data=mysql_fetch_array($result);\r\n\t\t$arrFriends= json_decode($data[0]);\r\n\t\t\r\n\t\tforeach ($arrFriends as $friend) {\r\n\t\t\t// if($friend->status == $status){\n\t\t\t\t// $friend->user_id=\"'\".$friend->user_id.\"'\";\n\t\t\t\t// $friend_id = $friend_id.\",\".$friend->user_id;\n\t\t\t// }\r\n\t\t\t\r\n\t\t\tforeach ($arrStatus as $stat) {\n\t\t\t\tif($friend->status == $stat){\r\n\t\t\t\t\t$friend_user_id=\"'\".$friend->user_id.\"'\";\r\n\t\t\t\t\t$friend_id = $friend_id.\",\".$friend_user_id;\r\n\t\t\t\t}\n\t\t\t}\r\n\t\t}\r\n\t\t$friend_id = substr($friend_id, 1);\r\n\t\tif(!empty($friend_id)){\r\n\t\t\t$query1=\"select u.id, u.email, u.email_facebook, u.facebook_id, u.first_name, u.last_name, i.path as user_image from users u \r\n\t\t\tleft join images i on i.id = u.image_id \r\n\t\t\twhere u.id in(\".$friend_id.\") order by u.first_name\";\r\n\t\t\t$result1=mysql_query($query1);\r\n\t\t\t\r\n\t\t\tif($result1){\r\n\t\t\t\twhile($row = mysql_fetch_assoc($result1)){\r\n\t\t\t\t\tforeach ($arrFriends as $friend) {\r\n\t\t\t\t\t\tif($friend->user_id == $row['id']){\r\n\t\t\t\t\t\t\t$row['status']=$friend->status;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!empty($row['user_image'])){\n\t\t\t\t\t\t$row['user_image']=\"http://\".$serverhost.\"/image_util.php?src=\".$row['user_image'];\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$row['user_image']=\"\";\n\t\t\t\t\t}\r\n\t\t\t\t\t//$row['user_image']=\"http://\".$serverhost.\"/image_util.php?src=\".$row['user_image'];\r\n\t\t\t\t\tif(empty($row['facebook_id'])){\r\n\t\t\t\t\t\t$row['facebook_id']=\"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(empty($row['email'])){\r\n\t\t\t\t\t\t$row['email']=$row['email_facebook'];\r\n\t\t\t\t\t\tunset($row['email_facebook']);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$friendList[]=$row;\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$dataFriends['status']=\"1\";\r\n\t\t\t\t$dataFriends['data']=$friendList;\r\n\t\t\t}else{\r\n\t\t\t\t$dataFriends['status']=\"0\";\r\n\t\t\t\t$dataFriends['message']=\"[Friends] \".mysql_error();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$dataFriends['status']=\"1\";\r\n\t\t\t$dataFriends['data']=array();\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\treturn json_encode($dataFriends);\r\n}", "public function getMyContacts()\n\t\t{\n\t\tif (!$this->login_ok)\n\t\t\t{\n\t\t\t$this->debugRequest();\n\t\t\t$this->stopPlugin();\n\t\t\treturn false;\n\t\t\t}\n\t\telse $user_id=$this->login_ok;\n\t\t$url_request_friends=\"http://www.plurk.com/Friends/getFriendsByOffset\";\n\t\t$post_elements=array('offset'=>0,'user_id'=>$user_id);\n\t\t$res=$this->post($url_request_friends,$post_elements,true);\n\t\tif ($this->checkResponse(\"get_contacts\",$res))\n\t\t\t$this->updateDebugBuffer('get_contacts',$url_request_friends,'POST',true,$post_elements);\n\t\telse\n\t\t\t{\n\t\t\t$this->updateDebugBuffer('get_contacts',$url_request_friends,'POST',false,$post_elements);\n\t\t\t$this->debugRequest();\n\t\t\t$this->stopPlugin();\n\t\t\treturn false;\n\t\t\t}\n\t\t\n\t\t$contacts=array();\n\t\twhile(strpos($res,'\"nick_name\": \"')!==false)\n\t\t\t{\n\t\t\t$name=$this->getElementString($res,'\"nick_name\": \"','\"');\n\t\t\t$name_delete='\"nick_name\": \"'.$name;\n\t\t\t$uid=$this->getElementString($res,'\"uid\": ',',');\n\t\t\t$uid_delete='\"uid\": '.$uid;\n\t\t\t$res=str_replace($name_delete,'',str_replace($uid_delete,'',$res));\n\t\t\tif(isset($uid)) $contacts[$uid]=(isset($name)?$name:false);\n\t\t\t}\n\t\treturn $contacts;\t\n\t\t}", "public function getAllViewerFriends() {\r\n $this->debug(\"getting all viewer friends...\");\r\n\r\n $count = 1;\r\n $index = 0;\r\n $countPerFetch = 50;\r\n\r\n $allFriends = $this->getViewerFriends($countPerFetch, $index);\r\n $lastCount = count($allFriends);\r\n $this->debug(\"Last count: $lastCount ...\");\r\n $currentIteration = 0;\r\n $maxIterations = 3;\r\n while ($lastCount >= $countPerFetch) {\r\n if ($currentIteration >= $maxIterations) {\r\n $this->debug(\"Reached max of $maxIterations iterations! Stopping loop...\");\r\n break;\r\n }\r\n\r\n $index += $countPerFetch;\r\n $currentBatch = $this->getViewerFriends($countPerFetch, $index);\r\n\r\n $allFriends = array_merge($allFriends, $currentBatch);\r\n $currentIteration++; //could connect this to index and vice versa\r\n\r\n $lastCount = count($currentBatch);\r\n $this->debug(\"Last count: $lastCount ...\");\r\n }\r\n\r\n return $allFriends;\r\n }", "public function getMyFriends()\r\n {\r\n return $this->myFriends;\r\n }", "public function get_friends($user_id, $offset = 0, $get_all = false)\n {\n global $db, $system;\n $friends = [];\n $offset *= $system['min_results_even'];\n /* get the target user's privacy */\n $get_privacy = $db->query(sprintf(\"SELECT user_privacy_friends FROM users WHERE user_id = %s\", secure($user_id, 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n $privacy = $get_privacy->fetch_assoc();\n /* check the target user's privacy */\n if (!$this->check_privacy($privacy['user_privacy_friends'], $user_id)) {\n return $friends;\n }\n $limit_statement = ($get_all) ? \"\" : sprintf(\"LIMIT %s, %s\", secure($offset, 'int', false), secure($system['min_results_even'], 'int', false));\n $get_friends = $db->query(sprintf('SELECT users.user_id, users.user_name, users.user_firstname, users.user_lastname, users.user_gender, users.global_user_picture as user_picture, users.user_subscribed, users.user_verified FROM friends INNER JOIN users ON (friends.user_one_id = users.user_id AND friends.user_one_id != %1$s) OR (friends.user_two_id = users.user_id AND friends.user_two_id != %1$s) WHERE status = 1 AND (user_one_id = %1$s OR user_two_id = %1$s) ' . $limit_statement, secure($user_id, 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n if ($get_friends->num_rows > 0) {\n while ($friend = $get_friends->fetch_assoc()) {\n $friend['user_picture'] = get_picture($friend['user_picture'], $friend['user_gender']);\n /* get the connection between the viewer & the target */\n $friend['connection'] = $this->connection($friend['user_id']);\n $friends[] = $friend;\n }\n }\n return $friends;\n }", "function getUserContacts()\n\t{\n\t\t$parameters = array( 'page' => 1 );\n\t\t$response = $this->api->get( 'user/list_friends.json', $parameters );\n\n\t\t// check the last HTTP status code returned\n\t\tif ( $this->api->http_code != 200 ){\n\t\t\tthrow new Exception( \"User contacts request failed! {$this->providerId} returned an error. \" . $this->errorMessageByStatus( $this->api->http_code ) );\n\t\t}\n\n\t\tif( ! $response || ! count( $response->friends ) ){\n\t\t\treturn ARRAY();\n\t\t}\n\n\t\t$max_page = (property_exists($response,'max_page'))?$response->max_page:1;\n\t\tfor ($i = 0; $i<$max_page; $i++) {\n\t\t\tif( $i > 0 ) {\n\t\t\t\t$parameters = array( 'page' => $i );\n\t\t\t\t$response = $this->api->get( 'user/list_friends.json', $parameters );\n\t\t\t\t// check the last HTTP status code returned\n\t\t\t\tif ( $this->api->http_code != 200 ){\n\t\t\t\t\tthrow new Exception( \"User contacts request failed! {$this->providerId} returned an error. \" . $this->errorMessageByStatus( $this->api->http_code ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif( $response && count( $response->friends ) ){\n\t\t\t\tforeach( $response->friends as $item ){\n\t\t\t\t\t$uc = new Hybrid_User_Contact();\n\n\t\t\t\t\t$uc->identifier = (property_exists($item,'id_user'))?$item->id_user:\"\";\n\t\t\t\t\t$uc->displayName = (property_exists($item,'username'))?$item->username:\"\";\n\t\t\t\t\t$uc->profileURL = (property_exists($item,'user_url'))?$item->user_url:\"\";\n\t\t\t\t\t$uc->photoURL = (property_exists($item,'avatar_url'))?$item->avatar_url:\"\";\n\t\t\t\t\t//$uc->description = (property_exists($item,'description'))?$item->description:\"\";\n\n\t\t\t\t\t$contacts[] = $uc;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $contacts;\n\t}", "public function allFriends()\n\t {\n\t\treturn Friend::where('accept', '=', 1)->where('friend_id', '=', $this->id)->Orwhere('user_id', '=', $this->id)->where('accept', '=', 1);\n\t }", "function getMemberList() {\n return getAll(\"SELECT * FROM member \");\n}", "public function getApiPosts(Request $request)\n { \n $friends = Friend::getFriendsApi();\n $friends[] = 1;//JWTAuth::parseToken()->toUser()->id;\n //dd($friends);\n $limit = 5;//$request->input('limit');\n $offset = 0;//$request->input('offset');\n $posts = Post::with('user')->whereIn('user_id',$friends)->limit(3)->offset($offset)->orderBy('id','desc')->get();\n return $posts;\n }", "public function getFollowerList(Request $request)\n { \n $input = $request->input();\n\n $validator = Validator::make($input, [\n 'businessId' => 'required|integer',\n 'index' => 'required',\n 'limit' => 'required',\n ]);\n\n if ($validator->fails()) {\n return response()->json(['status' => 'exception','response' => $validator->errors()->first()]); \n }\n\n $userIds = BusinessFollower::whereBusinessId($input['businessId'])->pluck('user_id');\n $response = User::select('first_name', 'middle_name', 'last_name', 'email', 'image')->whereIn('id', $userIds)->skip($input['index'])->take($input['limit'])->get();\n\n if (count($response) > 0) {\n return response()->json(['status' => 'success','response' => $response]); \n } else {\n return response()->json(['status' => 'exception','response' => 'No follower found.']); \n } \n }", "public function friendRequests() {\n return $this->friendsOfMine()->wherePivot('accepted', false)->get();\n }", "function requestIncomingFriendRequests() {\n $username = $_GET['username'];\n\n $response = retrieveIncomingFriendRequests($username);\n\n if ($response['status'] == 'SUCCESS') {\n echo json_encode($response['response']);\n } else {\n errorHandler($response['status'], $response['code']);\n }\n }", "function laserbear_get_all_people( $request ) {\n\t$data = array( 'sarah', 'jennifer', 'katie', 'johnicholas' );\n\t// END TODO TODO\n\n\treturn new WP_REST_Response( $data, 200 );\n}", "function userRequestFetch(){\n\n $userRequest=mysql_query(\"SELECT user,friend FROM Friend\n WHERE user=(SELECT user_id FROM Account WHERE user_email='$_SESSION[user_email]')\n AND friend=(SELECT user_id FROM Account WHERE user_email='$_SESSION[friend_email]')\") \n or die(\"<p>user request failed.</p>\");\n\n $userRequestFetch=mysql_fetch_array($userRequest);\n\n return $userRequestFetch;\n }", "public function index(): ResourceCollection\n {\n $users = User::withCount('friends')->paginate(50);\n\n return UserResource::collection($users);\n }", "function & get_twitter_friends_info(&$username,&$password){\n\t$ret=get_twitter_friends($username,$password);\n\t$json = new Services_JSON();\n\t$obj=$json->decode($ret); //huge copying if the user has many friends.\n\n\t//subsciptions(friends) details\n\tforeach ($obj as $val){\n print \"UserName: \" . $val->{'screen_name'} . \"\\n\";\n\t print \"Name: \" . $val->{'name'} . \"\\n\";\n\t print \"Location: \" . $val->{'location'} . \"\\n\";\n\t print \"Url: \" . $val->{'url'} . \"\\n\";\n\t print \"Description: \" . $val->{'description'} . \"\\n\";\n\t print \"Followers count: \" . $val->{'followers_count'} . \"\\n\";\n\t print \"---------------------\\n\\n\";\n\t}\n\n\treturn 0;\n}", "function facebookFriends(){\n\t\t$member = Member::currentUser();\n\t\t//if(!$friends = Session::get('FacebookFriends')){\n\t\t\t$friends = $this->customise(array('FacebookFriends' => $member->FacebookFriends()))->renderWith('FacebookFriendsAjax');\n\t\t//\tSession::set(\"FacebookFriends\", $friends);\n\t\t//}\n\t\treturn $friends;\n\t}", "public function getFriends($everything = false)\n\t{\n\t\tif ($everything)\n\t\t\t$condition = 'inviter_id = :uid';\n\t\telse\n\t\t\t$condition = 'inviter_id = :uid and status = 2';\n\n\t\t$friends = array();\n\t\tYii::import('application.modules.friendship.models.YumFriendship');\n\t\t$friendships = YumFriendship::model()->findAll($condition, array(\n\t\t\t\t\t':uid' => $this->id));\n\t\tif ($friendships != NULL && !is_array($friendships))\n\t\t\t$friendships = array($friendships);\n\n\t\tif ($friendships)\n\t\t\tforeach ($friendships as $friendship)\n\t\t\t\t$friends[] = YumUser::model()->findByPk($friendship->friend_id);\n\n\t\tif ($everything)\n\t\t\t$condition = 'friend_id = :uid';\n\t\telse\n\t\t\t$condition = 'friend_id = :uid and status = 2';\n\n\t\t$friendships = YumFriendship::model()->findAll($condition, array(\n\t\t\t\t\t':uid' => $this->id));\n\n\t\tif ($friendships != NULL && !is_array($friendships))\n\t\t\t$friendships = array($friendships);\n\n\n\t\tif ($friendships)\n\t\t\tforeach ($friendships as $friendship)\n\t\t\t\t$friends[] = YumUser::model()->findByPk($friendship->inviter_id);\n\n\t\treturn $friends;\n\t}", "public function friendRequests()\n\t{\n\t\treturn $this->friendsOfMine()->wherePivot('accepted',false)->get();\n\t}", "function get_list_members($listid, $action = 'members')\n\t{\n\t\t$xml = $this->load_url(\"lists/$listid/$action\");\n\n\t\tif(!$xml):\n\t\t\treturn false;\n\t\tendif;\n\n\t\t// parse into nicer array\n\t\t$contacts = array();\n\t\t$_members = (isset($xml['feed']['entry'])) ? $xml['feed']['entry'] : false;\n\n\n\t\tif(isset($xml['feed']['link']['2_attr']['rel']) && $xml['feed']['link']['2_attr']['rel'] == 'first'):\n\t\t\t$this->member_meta_data->first_page = $this->get_id_from_link($xml['feed']['link']['2_attr']['href']);\n\t\t\t$this->member_meta_data->current_page = $this->get_id_from_link($xml['feed']['link']['3_attr']['href']);\n\t\t\t$this->member_meta_data->next_page = '';\n\t\telseif(isset($xml['feed']['link']['2_attr']['rel']) && $xml['feed']['link']['2_attr']['rel'] == 'next'):\n\t\t\t$this->member_meta_data->next_page = $this->get_id_from_link($xml['feed']['link']['2_attr']['href']);\n\t\t\t$this->member_meta_data->current_page = $this->get_id_from_link($xml['feed']['link']['3_attr']['href']);\n\t\t\t$this->member_meta_data->first_page = $this->get_id_from_link($xml['feed']['link']['4_attr']['href']);\n\t\tendif;\n\n\t\tif(is_array($_members)):\n\t\t\tif(isset($_members[0]['link_attr']['href'])):\n\t\t\t\tforeach($_members as $k => $v):\n\t\t\t\t\t$EmailAddress = $v['content']['ContactListMember']['EmailAddress'];\n\t\t\t\t\t$Name = $v['content']['ContactListMember']['Name'];\n\t\t\t\t\t$id = $this->get_id_from_link($v['link_attr']['href']);\n\n\t\t\t\t\t$contact = array(\n\t\t\t\t\t\t'id' => $id,\n\t\t\t\t\t\t'EmailAddress' => $EmailAddress,\n\t\t\t\t\t\t'Name' => $Name,\n\t\t\t\t\t);\n\t\t\t\t\t$contacts[] = $contact;\n\t\t\t\tendforeach;\n\t\t\telse:\n\t\t\t\t$EmailAddress = $_members['content']['ContactListMember']['EmailAddress'];\n\t\t\t\t$Name = $_members['content']['ContactListMember']['Name'];\n\t\t\t\t$id = $this->get_id_from_link($_members['link_attr']['href']);\n\n\t\t\t\t$contact = array(\n\t\t\t\t\t'id' => $id,\n\t\t\t\t\t'EmailAddress' => $EmailAddress,\n\t\t\t\t\t'Name' => $Name,\n\t\t\t\t);\n\t\t\t\t$contacts[] = $contact;\n\t\t\tendif;\n\t\tendif;\n\n\t\treturn $contacts;\n\t}", "public function getFriend()\n {\n $aFriends = Phpfox::getService('customprofiles')->getFromCache();\n $sData = json_encode($aFriends);\n $this->call('$Core.friendTagCache = jQuery.parseJSON(\\''.$sData.'\\');');\n }", "public function getFriends($cache = true) {\n if ($cache) $friends = Cache::read(\"friends\" . $this->uid);\n if ($friends === false) {\n $friends = $this->api('/me/friends');\n if ($cache && $friends) Cache::write(\"friends\" . $this->uid, $friends);\n }\n return $friends;\n }", "public function getFriendIds(){\r\n\t\treturn $this->callGraph(array(\r\n\t\t\t'method' => 'friends_get'\r\n\t\t), 'get_friend_ids');\r\n\t}", "public static function listUsers()\n {\n //Init curl\n $curl = new curl\\Curl();\n\n // GET request to api\n $response = $curl->get(Yii::$app->params['listUsers']);\n\n $records = json_decode($response, true);\n\n foreach($records as $users){\n foreach($users as $user){\n $list[$user['id']] = $user['name'] . ' ' . $user['last_name'];\n }\n }\n\n return $list;\n }", "public function friends($person_id)\n {\n return response($this->fetchFriends($person_id));\n }", "function requestOutgoingFriendRequests() {\n $username = $_GET['username'];\n\n $response = retrieveOutgoingFriendRequests($username);\n\n if ($response['status'] == 'SUCCESS') {\n echo json_encode($response['response']);\n } else {\n errorHandler($response['status'], $response['code']);\n }\n }", "public function getMyContacts()\n\t\t{\n\t\tif (!$this->login_ok)\n\t\t\t{\n\t\t\t$this->debugRequest();\n\t\t\t$this->stopPlugin();\n\t\t\treturn false;\n\t\t\t}\n\t\telse $url=$this->login_ok;\n\t\t$res=$this->get($url,true);\n\t\tif ($this->checkResponse(\"get_friends\",$res))\n\t\t\t$this->updateDebugBuffer('get_friends',\"{$url}\",'GET');\n\t\telse\n\t\t\t{\n\t\t\t$this->updateDebugBuffer('get_friends',\"{$url}\",'GET',false);\n\t\t\t$this->debugRequest();\n\t\t\t$this->stopPlugin();\n\t\t\treturn false;\n\t\t\t}\n\n\t\t$res=str_replace(PHP_EOL,\"\",$res);\n\t\tpreg_match_all(\"#mailto\\:(.+)\\\"#U\",$res,$emails);\n\t\tpreg_match_all(\"#252Fcontacts\\\"\\>(.+)\\<\\/#U\",$res,$names);\t\t\n\t\t$contacts=array();\n\t\tif (!empty($emails[1])) foreach($emails[1] as $key=>$email) if (!empty($names[1][$key])) $contacts[$email]=$names[1][$key];\t\t\t\t\n\t\tforeach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);\n\t\treturn $contacts;\n\t\t}", "private function getFriendAndRelation(Players &$p, $friendUrl = '') {\n //getting lists of friends\n static $result = array();\n\n $friend = null;\n $relation = null;\n if($friendUrl != '') {\n if(isset($result[$friendUrl]))\n return $result[$friendUrl];\n\n $friend = User::getFriend($friendUrl);\n\n //we need to know what relation friend and player has\n if($friend and $p->ID_PLAYER) {\n $relation = new FriendsRel();\n $relation->ID_FRIEND = $friend->ID_PLAYER;\n $relation->ID_PLAYER = $p->ID_PLAYER;\n $relation = $relation->getOne();\n }\n\n return $result[$friendUrl] = (object)array('friend' => $friend, 'relation' => $relation);\n }\n\n return (object)array('friend' => $friend, 'relation' => $relation);\n }", "public function list_get()\n\t{\n\t\ttry{\n\n\t\t\t$this->checkCanCandidateId();\n\t\t\t$filters = array(\n\t\t\t\t\"{$this->_candidateIdFkKey}\" =>$this->getCanCandidateId()\n\t\t\t);\n\t\t\t$list = $this->_model->getBy($filters);\n\t\t\t$this->response($list);\n\t\t}catch( Exception $e ){\n\t\t\t$message = $e->getMessage();\n\t\t\t$code = $e->getCode();\n\t\t\t$this->error_response($message,$code);\n\t\t}\n\n\t}", "public function FolloWer_User_List($uid,$lastFrid) {\n\t$uid=mysqli_real_escape_string($this->db,$uid);\n\t if($lastFrid) {\n\t\t$lastFrid = \"AND F.friend_id >'\".$lastFrid.\"'\";\t\n\t }\n\t // The query to select for showing user details\n\t $query=mysqli_query($this->db,\"SELECT U.username,U.uid,F.friend_id FROM users U, friends F WHERE U.status='1' AND U.uid=F.friend_one AND F.friend_two='$uid' $lastFrid AND F.role='fri' ORDER BY F.friend_id DESC LIMIT \" .$this->perpage) or die(mysqli_error($this->db));\n\t while($row=mysqli_fetch_array($query, MYSQLI_ASSOC)) {\n\t\t // Store the result into array\n\t\t $data[]=$row;\n\t\t }\n\t if(!empty($data)) {\n\t\t// Store the result into array\n\t\t return $data;\n\t\t} \n}", "public function lists(): InstantMessageResponse;", "function manageFriends()\n\t{\n\t\t//init variable\n\t\t$app = JFactory::getApplication();\n\t\t$log_user = JFactory::getUser($this->plugin->get('user')->id);\n\t\t$db = JFactory::getDbo();\n\t\t$frnd_id = $app->input->get('target_userid',0,'INT');\n\t\t$userid = $log_user->id;\n\t\t$res = new stdClass();\n\t\t\n\t\tif(!$frnd_id)\n\t\t{\n\t\t\treturn 'Friend id not found';\n\t\t}\n\n\t\t$frnds_obj = new EasySocialModelFriends();\n\t\t$result = $frnds_obj->request($userid,$frnd_id);\n\t\t\n\t\tif($result->id)\n\t\t{\n\t\t\t$res->status = 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$res->status = 0;\n\t\t}\n\t\treturn $res;\n\t}", "function userlist_callback() {\n\ttry {\n\t\t$response = wp_remote_get( API_CALL_URL . 'users/' );\n\t\t$data['data'] = json_decode( $response['body'] );\n\t\techo wp_json_encode( $data );\n\t} catch ( Exception $ex ) {\n\t\t$data['data'] = null;\n\t\techo wp_json_encode( $data );\n\t}\n\twp_die();\n}", "public function showFriends($id)\n {\n // Condition 1 for query\n $aCondition1 = array(\n array(\n 'user_id',\n $id\n ),\n array(\n 'status',\n 1\n ),\n array(\n 'reply',\n 1\n )\n );\n\n // Condition 2 for query\n $aCondition2 = array(\n array(\n 'for_user_id',\n $id\n ),\n array(\n 'status',\n 1\n ),\n array(\n 'reply',\n 1\n )\n );\n\n $oRelationship = Relationship::where($aCondition1)\n ->orWhere($aCondition2)\n ->get();\n\n $aFriends = array();\n\n foreach ($oRelationship as $key => $value) {\n if ($value['user_id'] == $id) {\n array_push($aFriends, User::find($value['for_user_id']));\n } else if ($value['for_user_id'] == $id) {\n array_push($aFriends, User::find($value['user_id']));\n }\n }\n\n return response()->json($aFriends);\n }", "public function u_friendlist( $user_id ){\n\t\t$sql =\t\"SELECT c_users.user_id, c_friends.friend_id, firstname, lastname, middlename, be_friends,request_to FROM cool_users AS c_users\n\t\t\t\tINNER JOIN cool_users_friends AS c_friends ON c_users.user_id =\n\t\t\t\t(\n\t\t\t\t CASE WHEN c_users.user_id IN (SELECT friend_id \n\t\t\t\tFROM cool_users_friends WHERE user_id = $user_id ) then c_users.user_id\n\t\t\t\t WHEN c_users.user_id IN (SELECT user_id \n\t\t\t\tFROM cool_users_friends WHERE friend_id = $user_id ) then c_users.user_id end\n\t\t\t\t)\n\t\t\t\tWHERE c_friends.friend_id= \n\t\t\t\t(\n\n\t\t\t\tCASE WHEN c_users.user_id IN (SELECT friend_id \n\t\t\t\tFROM cool_users_friends WHERE user_id = $user_id ) then c_users.user_id\n\t\t\t\tWHEN c_users.user_id IN (SELECT user_id\n\t\t\t\tFROM cool_users_friends WHERE friend_id = $user_id ) then $user_id end\n\t\t\t\t) AND c_friends.user_id = \n\t\t\t\t( \n\t\t\t\tCASE WHEN c_users.user_id IN (SELECT user_id\n\t\t\t\tFROM cool_users_friends WHERE friend_id = $user_id ) then c_users.user_id\n\t\t\t\tWHEN c_users.user_id IN (SELECT friend_id\n\t\t\t\tFROM cool_users_friends WHERE user_id = $user_id ) then $user_id \n\t\t\t\tend\n\t\t\t\t)\";\n\t\t\t\treturn $this->query($sql);\n\t}", "public function friends()\n\t{\n\t\treturn $this->friendsOfMine()->wherePivot('accepted',true)->get()->merge($this->friendsOf()->wherePivot('accepted',true)->get());\n\t}", "public static function getMyFriendsActivitiesList(/*** Legacy_AbstractUserActivityObject[] ***/ &$actionList, /*** int ***/ $uid, /*** int ***/ $limit=20, /*** int ***/ $start=0);", "function mwznb_fetch_lists_callback() {\r\n $apiUrl = isset($_POST['api_url']) ? sanitize_text_field($_POST['api_url']) : null;\r\n $publicKey = isset($_POST['public_key']) ? sanitize_text_field($_POST['public_key']) : null;\r\n $privateKey = isset($_POST['private_key']) ? sanitize_text_field($_POST['private_key']) : null;\r\n \r\n $errors = array();\r\n if (empty($apiUrl) || !filter_var($apiUrl, FILTER_VALIDATE_URL)) {\r\n $errors['api_url'] = __('Please type a valid API url!', 'mwznb');\r\n }\r\n if (empty($publicKey) || strlen($publicKey) != 40) {\r\n $errors['public_key'] = __('Please type a public API key!', 'mwznb');\r\n }\r\n if (empty($privateKey) || strlen($privateKey) != 40) {\r\n $errors['private_key'] = __('Please type a private API key!', 'mwznb');\r\n }\r\n if (!empty($errors)) {\r\n exit(MailWizzApi_Json::encode(array(\r\n 'result' => 'error',\r\n 'errors' => $errors,\r\n )));\r\n }\r\n \r\n $oldSdkConfig = MailWizzApi_Base::getConfig();\r\n MailWizzApi_Base::setConfig(mwznb_build_sdk_config($apiUrl, $publicKey, $privateKey));\r\n\r\n $endpoint = new MailWizzApi_Endpoint_Lists();\r\n $response = $endpoint->getLists(1, 50);\r\n $response = $response->body->toArray();\r\n \r\n mwznb_restore_sdk_config($oldSdkConfig);\r\n unset($oldSdkConfig);\r\n \r\n if (!isset($response['status']) || $response['status'] != 'success') {\r\n exit(MailWizzApi_Json::encode(array(\r\n 'result' => 'error',\r\n 'errors' => array(\r\n 'general' => isset($response['error']) ? $response['error'] : __('Invalid request!', 'mwznb'),\r\n ),\r\n )));\r\n }\r\n \r\n if (empty($response['data']['records']) || count($response['data']['records']) == 0) {\r\n exit(MailWizzApi_Json::encode(array(\r\n 'result' => 'error',\r\n 'errors' => array(\r\n 'general' => __('We couldn\\'t find any mail list, are you sure you have created one?', 'mwznb'),\r\n ),\r\n )));\r\n }\r\n \r\n $lists = array(\r\n array(\r\n 'list_uid' => null, \r\n 'name' => __('Please select', 'mwznb')\r\n )\r\n );\r\n \r\n foreach ($response['data']['records'] as $list) {\r\n $lists[] = array(\r\n 'list_uid' => $list['general']['list_uid'],\r\n 'name' => $list['general']['name']\r\n );\r\n }\r\n \r\n exit(MailWizzApi_Json::encode(array(\r\n 'result' => 'success',\r\n 'lists' => $lists,\r\n )));\r\n}", "public static function getFollowers(){\n\n\t}", "public function fetchList();", "function friends() {\n $user = UserQuery::create()->findPK($_SESSION['uid']);\n $profile = ProfileQuery::create()->findPK($_SESSION['uid']);\n $friends = FriendQuery::create()->findByUserid($_SESSION['uid']);\n $friendgroups = FriendQuery::create()->findOneByFriendid($_SESSION['uid']);\n $buckets = BucketQuery::create()->findByUserid($_SESSION['uid']);\n $hasbuckets = BucketQuery::create()->findOneByUserid($_SESSION['uid']);\n $nbFriends = FriendQuery::create()->filterByUserid($_SESSION['uid'])->count($con);\n\n\t\tif ($user) {\n\t\t\t$profile = ProfileQuery::create()->findPK($user->getId());\n\t\t\t$nbFriends = FriendQuery::create()->filterByUserid($user->getId())->count($con);\n\t\t\n\t\t\tif ($userid != $user->getId() && $userid && $user->getId()) {\n\t\t\t\t$friends = FriendQuery::create()\n\t\t\t\t->filterByUserid($_SESSION['uid'])\n\t\t\t\t->filterByFriendid($user->getId())\n\t\t\t\t->findOne();\n\t\t\n\t\t\t\tif ($friends) {\n\t\t\t\t$bucket = FriendBucketQuery::create()\n\t\t\t\t->filterByUserid($friends->getUserid())\n\t\t\t\t->findOne();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($nbFriends > 0) {\n\t\t\t\t$friendslist = FriendQuery::create()\n\t\t\t\t\t->filterByUserid($user->getId())\n\t\t\t\t\t->find();\n\t\t\t\t\t\t\t\n\t\t\t\t// Load friends Userid's into array, include logged in user.\n\t\t\t\tforeach ($friendslist as $friendlist) {\n\t\t\t\t\t$friendid = $friendlist->getFriendid();\n\t\t\t\t\t$groupid = $friendlist->getGroupid();\n\t\t\t\t\t$aFriends[$groupid] = $friendid;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach ($aFriends as $aFriend) {\n\t\t\t\t\t$myfriend = UserQuery::create()\n\t\t\t\t\t\t->findPK($aFriend);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$friendList[] = array (\n\t\t\t\t\t\t\t\"username\" => $myfriend->getUsername(),\n\t\t\t\t\t\t\t\"firstname\" => $myfriend->getFirstname(),\n\t\t\t\t\t\t\t\"lastname\" => $myfriend->getLastname(),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tif ($_SESSION['uid']) {\n\t\t\t\t\t\tif ($aFriend === $_SESSION['uid'] || $user->getId() === $_SESSION['uid']) {\n\t\t\t\t\t\t\t$showfriend = 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} else {\n\t\t\t$notfound = 1;\n\t\t}\n \n $info = array (\n \"user\" => $user,\n \"profile\" => $profile,\n \"friends\" => $friends,\n \"friendgroups\" => $friendgroups,\n \"buckets\" => $buckets,\n \"hasbuckets\" => $hasbuckets,\n \"nbFriends\" => $nbFriends,\n \"friendlist\" => $friendList,\n \"showfriend\" => $showfriend,\n \"notfound\" => $notfound,\n \n ); \n return $info; \n }", "public function getList() {\n\t\t$this->request = array('uri' => array('path' => 'users.json'));\n\n\t\treturn $this->find('all');\n\t}", "public static function friends ( $req ) {\n\t\n\t\t$req['section'] = \"home\";\n\t\t$req['sub_section'] = \"friends\";\n\t\t$req['get_public'] = false;\n\t\t$req['only_people'] = true;\n\t\t\n\t\tself::_default( $req );\n\t\t\n\t}", "function user_get_friend_requests($user_id) {\n $db = connectDB();\n $stmt = $db->prepare('\n SELECT\n friendships.user_id_1 AS user_id,\n users.username AS username\n FROM\n friendships\n LEFT JOIN\n users\n ON\n friendships.user_id_1 = users.user_id\n WHERE\n friendships.user_id_2 = :user_id_2\n AND friendships.provisional = 1\n ORDER BY\n friendships.timestamp DESC\n ;\n ');\n $stmt->execute([\n ':user_id_2' => $user_id\n ]);\n $requests = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $requests; \n}", "public function loadFriendsList() {\n\t\t$this -> template = TemplateManager::load(\"StyledTable\");\n\t\t$this -> template -> insert(\"title\", \"Friends List\");\n\t\t$friends = $this -> user -> getContactManager() -> getFriends();\n\t\t$table = \"\";\n\t\t$online = array();\n\t\t$offline = array();\n\t\tforeach($friends as $friend) {\n\t\t\t$owner = User::getByName($friend);\n\t\t\tif (!$owner) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!$owner -> isOnline()) {\n\t\t\t\t$offline[$owner -> getUid()] = $owner;\n\t\t\t} else {\n\t\t\t\t$online[$owner -> getUid()] = $owner;\n\t\t\t}\n\t\t}\n\t\tforeach ($online as $owner) {\n\t\t\t$table .= \"<tr class=\\\"online\\\">\n\t\t\t<td class=\\\"name\\\"><span class='username' style=''>\" . $owner -> getModule(\"UserTools\") -> getFormatUsername(true) . \"</span></td>\n\t\t\t<td class=\\\"world\\\"> World \" . $owner -> getLastWorld() . \"</td></tr>\";\n\t\t}\n\t\tforeach ($offline as $owner) {\n\t\t\t$table .= \"<tr class=\\\"offline\\\">\n\t\t\t<td class=\\\"name\\\"><span class='username' style='color: #9fabbf; '>\" . $owner -> getModule(\"UserTools\") -> getFormatUsername(true) . \"</span></td>\n\t\t\t<td class=\\\"world\\\">Offline</td></tr>\";\n\t\t}\n\t\tif ($table == \"\") {\n\t\t$table = \"You don't have any friends in your contact list. Add friends in-game for them to appear here.\";\n\t\t}\n\t\t$this -> template ->insert(\"icon\", \"user\");\n\t\t$this -> template -> insert(\"table\", $table);\n\t\t$this -> display();\n\t}", "public function getFriendships()\n {\n return $this->friendships;\n }", "public function getPartinUsersList(){\n return $this->_get(2);\n }", "public function friends() {\n\n // This method is to return all friends of a current user ($this->user)\n // where on pivot table 'friends' boolien field accepted is true\n // and from a friend perspective you need to accept him or her too so it need to be\n // both ways acceptence to be able to be a friends\n\n return $this->friendsOfMine()->wherePivot('accepted', true)->get()\n ->merge( $this->friendOf()->wherePivot('accepted', true)->get() );\n }", "public function index()\n {\n $user = auth()->user();\n $test = $user->followings()->get();\n return UserResource::collection($test)\n ->additional(ResponseHelper::additionalInfo());\n }", "public function getFriendsObjects($subtype = \"\", $limit = 10, $offset = 0);", "public function get_list_get()\n\t{ \n\t\tif($_SERVER['REQUEST_METHOD'] == \"GET\"){\n \t// Get data\n\t\t\tif(isset($_GET)){\n\t\t\t\t$permission=false;\n\t\t\t\t$token= isset($_GET['token']) ?($_GET['token']) : \"\";\n\t\t\t\t$permission=$this->matchAppToken($token);\n\t\t\t\tif($permission==true){\n\t\t\t\t\t$language= isset($_GET['language']) ?($_GET['language']) : \"en\";\t\n\t\t\t\t\t$response=$this->advance_notification_model->get_in_app_data($language);\t\n\t\t\t\t\tif($response){\n\t\t\t\t\t\t$json = array(\"status\" => 1, \"message\" => \"Ok\", \"data\"=> $response);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Somthing went wrong. Please try again later\");\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Token has been not matched\");\n\t\t\t\t}\t\n\t\t\t}else{\n\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Request has been uncompleted\");\n\t\t\t}\n\t\t}else{\n\t\t\t$json = array(\"status\" => 0, \"message\" => \"Request method not accepted\");\n\t\t}\n\t\t$this->response($json, REST_Controller::HTTP_OK);\n\t}", "public function getPosts(Request $request)\n { \n $friends = Friend::getFriends();\n $friends[] = Auth::id();\n $limit = $request->input('limit');\n $offset = $request->input('offset');\n $posts = Post::with('user')->whereIn('user_id',$friends)->limit(3)->offset($offset)->orderBy('id','desc')->get();\n return $posts;\n }", "public function getFriendableForCurrentProvider(): array;", "function favorites() {\n if ($this->getRequestMethod() != \"GET\") {\n $this->response('', 406);\n }\n $id = (int)$this->_request['user_id'];\n $auth = $this->getAuthorization();\n if (!$this->validateAuthorization($id, $auth)) {\n $this->response('', 400);\n }\n if ($id > 0) {\n $query = \"select * from favorites where user_id=$id;\"; \n $r = $this->conn->query($query) or die($this->conn->error.__LINE__);\n if($r->num_rows > 0) {\n $result = array();\n while ($row = $r->fetch_assoc()) {\n $result[] = $row;\n } \n $this->response(json_encode($result), 200); \n } else {\n $this->response('',204);\n }\n } else {\n $this->response('', 400);\n } \n }", "public function getFollowings()\n {\n $data = [];\n \n foreach(Users::find(authApi()->user()->id)->followings()->get() as $user){\n $user->profile_pic = getImage($user->profile_pic);\n \n $user['isFollowed'] = authApi()->user() ? \n Follow::where('followed_id', $user->id)->where('user_id', authApi()->user()->id)->first() \n ? true : false : false;\n $data[] = $user;\n }\n \n $json['data']['followings'] = $data;\n\n return response()->json($json, 200);\n }", "public function actionGetUserListJson()\n\t{\n\t\t$email = $_REQUEST['email'];\n\t\t$password = $_REQUEST['password'];\n\n\t\t$sql = sprintf('SELECT Id\n\t\t\t\t\t\t\t\tFROM '. Users::model()->tableName() .' \n\t\t\t\t\t\t\tWHERE email = \"%s\" \n\t\t\t\t\t\t \t\t AND \n\t\t\t\t\t\t \t\t password = \"%s\"\n\t\t\t\t\t\t\tLIMIT 1', $email, md5($password));\n\t\t$userId = Yii::app()->db->createCommand($sql)->queryScalar();\n\t\t$result = \"Email or password not correct\";\n\t\tif ($userId == false) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\n\t\t$out = '';\n\t\t$dataFetchedTimeKey = \"UsersController.dataFetchedTime\";\n\t\t\n\t\n\t\t\t$sql = 'SELECT u.Id as id, u.realname,u.latitude, u.longitude, u.altitude, f.Id as friendShipId, u.dataArrivedTime, u.dataCalculatedTime,\n\t\t\t\t\t\t1 isFriend\n\t\t\t\tFROM '. Friends::model()->tableName() . ' f \n\t\t\t\tLEFT JOIN ' . Users::model()->tableName() . ' u\n\t\t\t\t\tON u.Id = IF(f.friend1 != '.$userId .', f.friend1, f.friend2)\n\t\t\t\tWHERE ((f.friend1 = '. $userId .') \n\t\t\t\t\t\t\t\t\t\tOR (f.friend2 ='. $userId .')) AND status= 1\n\t\t\t\t ' ;\n\n\t\t\t/* \n\t\t\t \t$sql = 'SELECT u.Id as id, u.realname,u.latitude, u.longitude, u.altitude, f.Id as friendShipId, u.dataArrivedTime, u.dataCalculatedTime,\n\t\t\t\t\t\t1 isFriend\n\t\t\t\tFROM '. Friends::model()->tableName() . ' f \n\t\t\t\tLEFT JOIN ' . Users::model()->tableName() . ' u\n\t\t\t\t\tON u.Id = IF(f.friend1 != '.Yii::app()->user->id.', f.friend1, f.friend2)\n\t\t\t\tWHERE (friend1 = '.Yii::app()->user->id.' \n\t\t\t\t\t\tOR friend2 ='.Yii::app()->user->id.') AND status= 1\n\t\t\t\t ' ;\n\t\t\t */\n\t\t\t\n\n\t\t$out = $this-> prepareJson($sql, \"userList\");\n\t\t\n\t\techo $out;\n\t\tYii::app()->session[$dataFetchedTimeKey] = time();\n\t\tYii::app()->end();\n\t}", "public function listFriends($account_id){\n\t\t\t$t = array();\n\t\t\t$search = mysql_query(\"SELECT * FROM friends WHERE account_id='\".$account_id.\"'\") or die(mysql_error());\n\t\t\t$match = mysql_num_rows($search); \n\t\t\t\n\t\t\tif($match > 0){ \n\t\t\t\t\t \t//ok if there is a match now we need to get all the info from the table\n\t\t\t\terror_log(\"fiund match\");\n\t\t\t\twhile($row = mysql_fetch_assoc($search))\n\t\t\t\t{\n\t\t\t\t\tarray_push($t, $row);\n\t\t\t\t}\n\t\t\t\treturn $t;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\terror_log(\"there is no spoon!\");\n\t\t\t\t$t = \"boy are we in trouble!\";\n\t\t\t}\n //retun list\n\t\t\t\n\n\t\t}", "public function getFollowUpInfoList() {\n return $this->_get(3);\n }", "function getUserList(){\n try{\n $query = \"Select id, fname, lname, email, phone, created_at FROM users ORDER BY id DESC\";\n $stmt = $this -> getConnection($query);\n $stmt ->execute();\n $stmt ->bind_result($id, $fname, $lname, $email, $phone, $since);\n $result = array();\n while ($stmt -> fetch()) {\n $result[] = array(\n 'id' => $id,\n 'fname'=>$fname,\n 'lname'=>$lname,\n 'email' => $email,\n 'phone' => $phone,\n 'since' => $since\n );\n }\n $stmt->close();\n \n return $result;\n }catch (exception $e){\n die('Error - cannot retrieve user list: ' . $e -> getMessage());\n }\n }", "public function getUserPeoplesAction()\n {\n $people = new Workapp_People();\n $this->_helper->json($people->getPeopleList(array('user_id' => $this->getDeviceSession()->getUserId())));\n }", "public function index()\n {\n if(! $user = JWTAuth::parseToken()->authenticate()){\n return response()->json(['msg' => 'User Not Found'], 200);\n }\n\n $books = Book::join('users', 'books.user_id', '=', 'users.id')->orderBy('users.credit', 'desc')->where([\n ['status' , '=', '0'],\n ['user_id' , '<>', $user->id]\n ])->with('user')->get(['books.*']);\n\n return response()->json(['feeds' => $books]);\n }", "public function getMutualFriends($uid_them){\r\n\t\treturn $this->callGraph('/me/mutualfriends/'.$uid_them);\r\n\t}", "public function getMailingLists() {\n $path = 'mailinglists.json';\n return $this->request($path);\n }", "public function myFriendFeed($offset = '', $limit = '')\n {\n $args = array(\n 'offset' => $offset,\n 'limit' => $limit,\n );\n\n return $this->_request('checkin/recent', $args, true);\n }" ]
[ "0.7434253", "0.7287989", "0.7063303", "0.69608206", "0.69092226", "0.6873318", "0.68594867", "0.6778718", "0.67316717", "0.6681015", "0.6647477", "0.6630587", "0.66120636", "0.65712434", "0.6533916", "0.6455171", "0.63870674", "0.6369462", "0.6364792", "0.6313489", "0.6302381", "0.6278973", "0.627774", "0.6274136", "0.62466764", "0.62328905", "0.61943245", "0.6191254", "0.6187664", "0.6185454", "0.6182708", "0.6164826", "0.61544585", "0.6132935", "0.6118253", "0.60902244", "0.6085927", "0.6082073", "0.60403395", "0.60355914", "0.60283154", "0.602587", "0.5988563", "0.5980191", "0.59747624", "0.59492594", "0.5937361", "0.59369665", "0.59286565", "0.59153485", "0.5913454", "0.5913086", "0.590948", "0.59045935", "0.5901075", "0.58793384", "0.58687556", "0.5864646", "0.58411014", "0.5834229", "0.5830982", "0.5824805", "0.5796266", "0.5788872", "0.5779003", "0.5772466", "0.5746086", "0.57112914", "0.5710745", "0.57104313", "0.5708805", "0.570483", "0.57029384", "0.5694032", "0.56894976", "0.56892", "0.5688836", "0.5677788", "0.5671477", "0.5670932", "0.5670685", "0.5665436", "0.5661011", "0.56510687", "0.5650508", "0.56459165", "0.56440175", "0.56397724", "0.56223404", "0.5618092", "0.56171155", "0.5610333", "0.55943584", "0.5592688", "0.55781215", "0.5571073", "0.556919", "0.5558563", "0.55544513", "0.5553742" ]
0.59602106
45
Get users with whom we are sharing the libraries
public function sharedWithUsers(bool $forceRefresh = false) : array { $mainServers = $this->servers(true, $forceRefresh); $sharedWith = []; foreach ($mainServers as $server) { $serverID = $server['id']; $data = $this->sendGetXmlRequest($this->buildPlexApiUrl(sprintf('servers/%s/shared_servers', $serverID), true), function(array $response) : array { $sharedServers = $response['SharedServer']; $sharedWith = []; foreach ($sharedServers as $index => $user) { $user = $user['@attributes']; if (strlen($user['email']) === 0 || strlen($user['username']) === 0) { continue; } $tempArray = [ 'id' => (integer) $user['userID'], 'uuid' => null, 'title' => strlen($user['username']) === 0 ? null : $user['username'], 'username' => strlen($user['username']) === 0 ? null : $user['username'], 'email' => strlen($user['email']) === 0 ? null : $user['email'], 'avatar' => null, 'admin' => false, 'guest' => true, 'friend' => false ]; ksort($tempArray); $sharedWith[] = $tempArray; } return $sharedWith; }); $sharedWith[$serverID] = $data['data']; } return $sharedWith; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSharedWith()\n {\n return $this->getProperty(\"SharedWith\", new PlannerUserIds());\n }", "public function getFriendableForCurrentProvider(): array;", "function userJoins() { \n $model = config('auth.model');\n return $model::data();\n }", "static function get_sharing_perimssions_of_list_with_user($list_owner, $word_list_id, $email) {\n $share_with_id = self::email2id($email);\n\n global $con;\n $sql = \"\n SELECT `share`.`id`, `share`.`list`, `share`.`permissions` \n FROM `share`, `list` \n WHERE `list`.`id` = \".$word_list_id.\" AND `share`.`list` = `list`.`id` AND `list`.`creator` = \".$list_owner.\" AND `list`.`active` = 1 AND `list`.`user` = \".$share_with_id.\";\";\n $query = mysqli_query($con, $sql);\n while ($row = mysqli_fetch_assoc($query)) {\n return new SharingInformation($row['id'], new SimpleUser($share_with_id, null, null, $email), $row['list'], $row['permissions']);\n }\n }", "function get_author_user_ids()\n {\n }", "function getUsers() {\n\n\tglobal $db;\n\treturn $db->getUsersByGroup ( $GLOBALS [\"targetId\"] );\n\n}", "function getAccess() {\n\t\t$workspace\t=\t$this->getWorkspace();\n\t\treturn $workspace->get(_JEM_USER_);\n\t}", "public function list_shared_files_with() {\n $stmt = $this->pdo->prepare('select filename, name from share s, user u, file f where s.user_id = :id and s.owner_id = u.id and s.file_id = f.id');\n $stmt->bindValue(':id', $this->id);\n $stmt->execute();\n $res = $stmt->fetchAll();\n $result = array();\n foreach ($res as $f) {\n array_push($result, array('filename' => $f['filename'],\n 'username' => $f['name']));\n }\n return $result;\n }", "function monitor_list_users() {\n $query = \"select distinct(`wf_user`) from `\".GALAXIA_TABLE_PREFIX.\"instance_activities`\";\n $result = $this->query($query);\n $ret = Array();\n while($res = $result->fetchRow()) {\n $ret[] = $res['wf_user'];\n }\n return $ret;\n }", "private function getUsers()\n {\n $url = $this->base_uri.'user/assignable/multiProjectSearch?projectKeys='.$this->project;\n $users = $this->request($url);\n if (!$this->infos['errorBoolean']) {\n return json_decode($users);\n }\n }", "public function list_shared_files() {\n $stmt = $this->pdo->prepare('select filename, name from share s, user u, file f where s.owner_id = :id and s.user_id = u.id and s.file_id = f.id');\n $stmt->bindValue(':id', $this->id);\n $stmt->execute();\n $res = $stmt->fetchAll();\n $result = array();\n foreach ($res as $f) {\n array_push($result, array('filename' => $f['filename'],\n 'username' => $f['name']));\n }\n return $result;\n }", "function get_users()\n {\n //Unimplemented\n }", "public function getProvidedBy();", "static function get_sharing_info_of_list($user_id, $word_list_id) {\n return WordList::get_sharing_info_of_list($user_id, $word_list_id);\n }", "public function getUsers()\n {\n return Security::getUserList();\n }", "function get_users() {\n\t\n\t\tglobal $wp_version;\n\t\t\n\t\tif ( (float)$wp_version < 3.1 ) {\n\t\t\treturn get_users_of_blog(); \n\t\t} else {\n\t\t\treturn get_users(); \n\t\t}\t\t\n\t}", "function monitor_list_owners() {\n $query = \"select distinct(`wf_owner`) from `\".GALAXIA_TABLE_PREFIX.\"instances`\";\n $result = $this->query($query);\n $ret = Array();\n while($res = $result->fetchRow()) {\n $ret[] = $res['wf_owner'];\n }\n return $ret;\n }", "public function getUser(){\r\n\t\treturn $this->facebook_obj->getUser();\r\n\t}", "public function getOrgUsers(){\n $return_array = array();\n $current_campaign=Yii::app()->session->get('current_campaign');\n $campaign = Definition::model()->findByPk($current_campaign);\n if($campaign){\n $users = Users::model()->findAllByAttributes(array('fk_org_id'=>$campaign->fk_org_id));\n foreach($users as $user){\n $return_array[$user->id] = $user->username;\n }\n }\n \n return $return_array;\n }", "public function getCompanyWithUsers();", "protected function getUser() {\r\n\t\t$session = $this->getSession ();\r\n\t\tif (isset ( $session ['uid'] ) && isset ( $session ['uname'] )) {\r\n\t\t\treturn array ('uid' => $session ['uid'], 'uname' => $session ['uname'] );\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public static function getUser();", "function get_course_users() {\n\t\t$user_list = CourseManager::get_user_list_from_course_code ( api_get_course_id () );\n\t\treturn $user_list;\n\t}", "function getUsers(){\n }", "function getUsers(){\n }", "public function getExternalUserIds() {\n\n if (!isset(Yii::app()->params['googlePlayExternalUserIds']))\n return [];\n\n return Yii::app()->params['googlePlayExternalUserIds'];\n }", "public static function getUser() \n\t{\n\t\tacPhpCas::setReporting();\n\t\treturn phpCAS::getUser();\t\t\n\t}", "public function getLTIUsers();", "public function sharedUsers(Request $request)\n {\n $this->validate($request, [\n 'site_id' => 'required|exists:sites,id',\n ]);\n\n $this->authorize('viewShared', Site::findOrFail($request->site_id));\n\n $users = User::with([\n 'userSites' => function ($query) use ($request) {\n $query->where('site_id', $request->site_id);\n }\n ])->orderBy('name', 'asc')\n ->whereHas('userSites', function ($query) use ($request) {\n $query->where('site_id', $request->site_id)->where('is_shared', true);\n })\n ->select('id', 'name');\n\n $users = $users->get();\n\n $users->transform(function (User $user) {\n $user->can_edit = $user->userSites->first()->editable;\n\n return $user;\n });\n\n return $this->success($users);\n }", "private function listUsers()\n {\n $users = get_users();\n $user_ids = array();\n\n foreach ($users as $u) {\n $user_ids[] = $u['id'];\n }\n\n if (count($this->ids) != 0) {\n return array_intersect($this->ids, $user_ids);\n } else {\n return $user_ids;\n }\n }", "function getSharingEnabled();", "function getKnownUsers(){\n\t\tglobal $course;\n\t\t$context = get_context_instance(CONTEXT_COURSE, $course->id);\n\t\t$students = get_role_users(5 , $context);\n\t\t$tmp = (array)null;\n\n\t\tforeach($students as $student){\n\t\t\t$knownUser = (object) null;\n\t\t\t$knownUser->id = $student->id;\n\n\t\t\tif ($student->maildisplay){\n\t\t\t\t$knownUser->email = $student->email;\n\t\t\t}\n\t\t\t$fullname = $student->firstname.' '.$student->lastname;\n\n\t\t\tif (strlen(trim($fullname)) == 0) {\n\t\t\t\t$fullname = $student->username;\n\t\t\t}\n\t\t\t$knownUser->name = $fullname;\n\t\t\tif ($account_link = get_record(\"studynotes_account_links\", \"system\", \"moodle\", \"external_id\", $student->id)){\n\t\t\t\t$knownUser->mb_id = $account_link->internal_id;\n\t\t\t}\n\t\t\t$tmp[] = $knownUser;\n\t\t}\n\t\treturn $tmp;\n\t}", "public function user_lists(){\n return get_instance()->ecl('Instance')->mod('lists', 'user_lists', [get_instance()->ecl('Instance')->user(),'email']);\n }", "function get_user_list(){\n\t\treturn array();\n\t}", "static function getUserInfo(){\n $result = Array();\n return $result;\n }", "private function get_userInfo() {\n $params = [ 'user_ids' => $this->user_id ];\n $result = $this->api->users->get($params);\n $params['fields'] = '';\n $result2 = $this->api2->users->get($params);\n $result['hidden'] = (int)array_has($result2, 'hidden');\n return $result;\n }", "private function getUsersAccessToken(){\n $result = $this->facebookModel->project(array(\"AccessToken\" => true, \"Current_city\" => true, \"_id\" => false))->get();\n return $result;\n }", "private function getUserInfo()\n\t{\n\t\t$user = Sentry::user();\n\t\t$result = array(\n\t\t\t'username' => $user->get('username'),\n\t\t\t'isAdmin' => $user->in_group('admin'),\n\t\t);\n\t\treturn $result;\n\t}", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "function retrieve_promoter_clients_list(){\n\t\t\n\t\t$this->CI->load->model('model_users_promoters', 'users_promoters', true);\n\t\t$clients = $this->CI->users_promoters->retrieve_promoter_clients_list($this->promoter->up_id, $this->promoter->team->t_fan_page_id);\n\t\tforeach($clients as $key => &$client){\n\t\t\t\n\t\t\tif($client->pglr_user_oauth_uid === null){\n\t\t\t\tunset($clients[$key]);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$client = $client->pglr_user_oauth_uid;\n\t\t}\n\t\treturn $clients;\n\t\t\n\t}", "function get_users()\n\t{\n\n\t\trequire_once('modules/Users/User.php');\n\t\t\n\t\t$query = \"SELECT user_id as id FROM roles_users WHERE role_id='$this->id' AND deleted=0\";\n\t\t\n\t\treturn $this->build_related_list($query, new User());\n\t}", "public static function getCurrentUserId() {\n return array(\\Drupal::currentUser()->id());\n }", "private function get_authorized_users() {\n\t\t$authorized_users = get_option( 'livechat_authorized_users' );\n\t\tif ( ! $authorized_users ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn array_values(\n\t\t\tarray_filter( explode( ',', $authorized_users ) )\n\t\t);\n\t}", "public function getOwnerRequestedBy()\n {\n return $this->http->get('/users/%s/requested-by', 'self');\n }", "protected function getUserByContext() {}", "public function seniorContributors()\n {\n $query = \"SELECT identifier FROM \".$this->_name.\" WHERE status='Active' AND profile_type='senior'\";\n if(($result = $this->getQuery($query,true)) != NULL)\n {\n for($i=0; $i<count($result); $i++)\n {\n $result[$i]= $result[$i]['identifier'];\n }\n return $result;\n }\n else\n return \"NO\";\n }", "public static function getCurrentUserId() {\n return [\\Drupal::currentUser()->id()];\n }", "public static function getCurrentUserId() {\n return [\\Drupal::currentUser()->id()];\n }", "public function getSufficient()\n\t{\n\t\t$ans = array();\n\t\t$users = User::model()->findAll();\n\t\tforeach($users as $auser)\n\t\t{\t\n\t\t\tif($this->cid == $auser->bestClient())\n\t\t\t{\n\t\t\t\tarray_push($ans,$auser->uid);\n\t\t\t}\n\t\t}\n\t\treturn $ans;\n\t}", "function getOwner() {\n $user =& Element_Factory::makeElement( 'Bm_Users' );\n $user->get( $this->author );\n\n return $user->login;\n }", "public function getUserServisesIds() {\n\t\t$userid = $_SESSION[ 'uid' ];\n\n\t\tif( ! isset( $userid ) || ! is_numeric( $userid ) ) {\n\t\t\treturn array();\n\t\t}\n\n\t\t$sql = \"SELECT\n\t\t\t\t\th.id\n\t\t\t\tFROM\n\t\t\t\t\ttblhosting AS h\n\t\t\t\tLEFT JOIN\n\t\t\t\t\ttblproducts AS p ON h.packageid = p.id\n\t\t\t\tWHERE\n\t\t\t\t\th.userid = $userid AND\n\t\t\t\t\tp.servertype = 'onappcdn'\";\n\n\t\t$result = full_query( $sql );\n\n\t\tif( ! $result && mysql_num_rows( $result ) < 1 ) {\n\t\t\treturn array();\n\t\t}\n\n\t\t$servicesIds = array();\n\t\twhile( $row = mysql_fetch_assoc( $result ) ) {\n\t\t\t$servicesIds[ ] = $row[ 'id' ];\n\t\t}\n\n\t\treturn $servicesIds;\n\t}", "public function get_user_specific()\r\n {\r\n return $this->m_user_specific;\r\n }", "public function getUserslistToInvite()\n\t{\n\t\t//get current login user session\n\t\t$results = array();\n\t\t$user = $this->Session->read('UserData.userName');\n\t\t$userCourse = $this->Session->read('UserData.usersCourses');\n\t\t$user_course_section = $userCourse[0];\n\t\t\n\t\t//get Course and section name\n\t\t$course_info = $this->getCourseNameOfUser($user_course_section);\n\t\t$course_name = $course_info->course_name;\n\t\t$course_section = $course_info->section_name;\n\t\t//get allsection setting sections for same course\n\t\t$sections_list = $this->__allSections();\n\t\t$options = array('course'=>$course_name,'section'=>$sections_list,'userName !='=>$user);\n\t\t$results = $this->PleUser->find('all',array('conditions'=>$options,'fields'=>array('userName','name'),'order' => array('PleUser.name ASC')));\n\t\tif ($results) {\n\t\t\treturn $results;\n\t\t}\n\t\treturn $results;\n\t}", "public function getPartinUsersList(){\n return $this->_get(2);\n }", "public function getAwardedBountyUsers();", "public function users()\n {\n try {\n $resp = $this->httpService->request('GET', 'user/get', []);\n return $resp['data']['openid'];\n } catch (\\Exception $e) {\n $this->logError($e);\n return array();\n }\n }", "public function getUserInfo(): array;", "function monitor_list_wi_users() {\n $query = \"select distinct(`wf_user`) from `\".GALAXIA_TABLE_PREFIX.\"workitems`\";\n $result = $this->query($query);\n $ret = Array();\n while($res = $result->fetchRow()) {\n $ret[] = $res['wf_user'];\n }\n return $ret;\n }", "public function getUsersToNotifyOfTokenGiven() {\n return array(\n $this->getAuthorPHID(),\n );\n }", "static function get_list_of_shared_word_lists_with_user($id) {\n global $con;\n $sql = \"\n\t\tSELECT `share`.`id` AS 'share_id', `share`.`permissions`, `list`.`id` AS 'list_id', `list`.`name`, `list`.`creator`, `list`.`comment`, `list`.`language1`, `list`.`language2`, `list`.`creation_time`\n\t\tFROM `share`, `list`, `relationship`\n\t\tWHERE `share`.`user` = \".$id.\" AND `share`.`list` = `list`.`id` AND `list`.`active` = 1 AND `share`.`permissions` <> 0\n\t\t AND `relationship`.`user1` = \".$id.\" AND `relationship`.`user2` = `list`.`creator` AND `relationship`.`type` = 1\n ORDER BY `list`.`name` ASC;\";\n $query = mysqli_query($con, $sql);\n $result = array();\n while ($row = mysqli_fetch_assoc($query)) {\n $list = self::get_word_list($id, $row['list_id'], false);\n $list->permissions = $row['permissions'];\n $list->sharing_id = $row['share_id'];\n array_push($result, $list);\n }\n return $result;\n }", "public function getRelatedUsers()\n {\n $relatedUsers = \\DB::table(config('permissionsHandler.tables.role_user'))\n ->select('role_id', 'model_id', 'model_type')\n ->where('role_id', $this->id)\n ->get();\n\n $users = collect();\n foreach ($relatedUsers as $user) {\n $users->push(($user->model_type)::find($user->model_id));\n }\n\n return $users;\n }", "public function getUsers();", "public function getUsers();", "public function getUsers();", "function get_nonauthor_user_ids()\n {\n }", "static function get_query_lists_of_user($id) {\n $lists = array_merge(self::get_word_lists_of_user($id), self::get_list_of_shared_word_lists_with_user($id));\n for ($i = 0; $i < count($lists); $i++) {\n // stores whether the requesting unser is the list creator\n $lists[$i]->allowSharing = ($id == $lists[$i]->creator->id);\n\n // stores whether the requesting user is allowed to edit the list\n $lists[$i]->allowEdit = ($lists[$i]->allowSharing) ? TRUE : $lists[$i]->get_editing_permissions_for_user($id);\n }\n return $lists;\n }", "static function getFollowingUsers($chef) {\n $users = get_user_meta($chef, 'following_user', true);\n $followingUsers = ($users ? $users : array());\n return $followingUsers;\n }", "public function get_other_library($user){\n $query=$this->db->query('SELECT * FROM `user_books` INNER JOIN users ON user_books.user_email=users.email WHERE `availability`=1 AND users.username=\"'.$user['sent_by'].'\" ');\n return $query->result();\n }", "public static function get_current_user_party(){\n $user_party = array();\n $current_user = wp_get_current_user();\n if ($current_user) {\n $user_party = self::get_user_party($current_user->ID);\n }\n return $user_party;\n }", "public function getUserList() {\n return $this->users;\n }", "public function creer_definition_user_get_ws() {\n\t\t$this->onDebug ( __METHOD__, 1 );\n\t\t$filter = array (\n\t\t\t\t\"alias\" => $this->getAlias () \n\t\t);\n\t\tif ($this->getName () != \"\") {\n\t\t\t$filter [\"name\"] = $this->getName ();\n\t\t}\n\t\t\n\t\treturn array (\n\t\t\t\t\"output\" => \"userid\",\n\t\t\t\t\"filter\" => $filter \n\t\t);\n\t}", "public function likedBy()\n {\n return $this->likes()\n ->join('users', 'likes.user_id', '=', 'users.id')\n ->get(['users.name', 'users.username']);\n }", "public function creer_definition_userByAlias_get_ws() {\n\t\t$this->onDebug ( __METHOD__, 1 );\n\t\treturn array (\n\t\t\t\t\"output\" => \"userid\",\n\t\t\t\t\"filter\" => array (\n\t\t\t\t\t\t\"alias\" => $this->getAlias () \n\t\t\t\t) \n\t\t);\n\t}", "public function getCompanyWithUniqueLogins();", "function getUsersWithUserRights() {\n\n $userRightsUsers = array();\n $allUsers = REDCap::getUsers();\n foreach($allUsers as $cnt => $user) {\n $rights = REDCap::getUserRights($user);\n if ($rights[$user][\"user_rights\"] == 1) {\n $userRightsUsers[] = $user;\n }\n }\n\n return $userRightsUsers;\n\n}", "function userLinks() {\n return $this->user_links;\n }", "public function user()\n {\n $id = $this->_getAuthId();\n if (!empty($id)) {\n return self::_getUserById($id);\n }\n return [];\n }", "public function getUserSpreadsheets() {\n\t\treturn $this->findSpreadsheetsByUserId($this->user_id);\n\t}", "public function getSeniorContributors()\n {\n $query=\"select identifier FROM \".$this->_name.\" WHERE profile_type ='senior' AND status = 'Active'\";\n if(($result = $this->getQuery($query,true)) != NULL)\n return $result;\n else\n return \"NO\";\n }", "function getShareAccess() {\n return SPlugin::ACCESS_SHAREDOWNER;\n }", "function list_users() {\n $status = session_status();\n if($status == PHP_SESSION_NONE){\n session_start(); /// initialize session\n }\n $user_name = check_logged(); /// function checks if visitor is logged in.\n if (!$user_name)\n return;\n\n $allowed = false;\n if (!check_role( \"admin\" )) {\n return false;\n }\n\n // read the permissions database\n $d = loadDB();\n return $d[\"users\"];\n }", "public function getUserSources()\n {\n if (array_key_exists(\"userSources\", $this->_propDict)) {\n return $this->_propDict[\"userSources\"];\n } else {\n return null;\n }\n }", "private function getUserResources()\n {\n $result = array();\n $userdata = $this->get('security.context')->getToken()->getUser();\n $groups = $userdata->getUserGroups()->toArray();\n foreach ($groups as $grp) {\n $resources = $grp->getResources();\n foreach ($resources as $res) {\n $result[$res->getId()] = $res->getName();\n }\n }\n\n return $result;\n }", "public static function get_public_users()\n {\n $connection = Yii::$app->getDb();\n /*$users = Yii::$app->db->createCommand(\"SELECT core_users.*,(SELECT core_sessions.date_created FROM core_sessions WHERE core_sessions.user_id = core_users.user_id ORDER BY core_sessions.date_created DESC LIMIT 1) last_login FROM core_users where core_users.user_type =:user_type\")\n ->bindValue(':user_type', 1)\n ->queryAll();*/\n $users = Yii::$app->db->createCommand(\"SELECT core_users.*,\"\n . \"(SELECT core_sessions.date_created FROM core_sessions WHERE core_sessions.user_id = core_users.user_id ORDER BY core_sessions.date_created DESC LIMIT 1) last_login,\"\n . \"(SELECT core_user_roles.role_name FROM core_user_roles WHERE core_user_roles.role_id = core_users.user_type) role_name FROM core_users \"\n . \"where core_users.user_type = 1\")->queryAll();\n /*$users = $connection->createCommand(\"SELECT core_users.*,(SELECT core_sessions.date_created FROM core_sessions WHERE core_sessions.user_id = core_users.user_id ORDER BY core_sessions.date_created DESC LIMIT 1) last_login FROM core_users where core_users.user_type = 1\")->queryAll();*/\n /*$users = $query->select(['core_users.*','core_sessions.date_created'])->from('core_users')\n ->innerJoin('core_sessions','core_users.user_id = core_sessions.user_id')\n ->where(\"core_users.user_type = '1'\")\n ->orderBy(['core_sessions.date_created' => SORT_DESC])\n ->groupBy('core_sessions.user_id')\n ->All();*/\n return $users;\n }", "public function getOwners()\n {\n if (array_key_exists(\"owners\", $this->_propDict)) {\n return $this->_propDict[\"owners\"];\n } else {\n return null;\n }\n }", "static function getUserGroups(){\n \n }", "public function getCompareUserList() {}", "protected function getUserFromAccessToken()\n {\n try {\n return $this->api('GET', '/v1/people/~:(id,firstName,lastName,headline)');\n } catch (LinkedInApiException $e) {\n return;\n }\n }", "public function auth_user_share()\n {\n return $this->belongsToMany(User::class)->withPivot('modify')->where('user_id', Auth::id());\n }", "protected function get_users() {\n\t\t\t$users = wp_cache_get( 'mycred_users' );\n\n\t\t\tif ( false === $users ) {\n\t\t\t\t$users = array();\n\t\t\t\t$blog_users = get_users( array( 'orderby' => 'display_name' ) );\n\t\t\t\tforeach ( $blog_users as $user ) {\n\t\t\t\t\tif ( false === $this->core->exclude_user( $user->ID ) )\n\t\t\t\t\t\t$users[ $user->ID ] = $user->display_name;\n\t\t\t\t}\n\t\t\t\twp_cache_set( 'mycred_users', $users );\n\t\t\t}\n\n\t\t\treturn apply_filters( 'mycred_log_get_users', $users );\n\t\t}", "function get_users(){\n global $conf;\n global $LDAP_CON;\n\n $sr = ldap_list($LDAP_CON,$conf['usertree'],\"ObjectClass=inetOrgPerson\");\n $result = ldap_get_binentries($LDAP_CON, $sr);\n $users = array();\n if(count($result)){\n foreach ($result as $entry){\n if(!empty($entry['sn'][0])){\n $users[$entry['dn']] = $entry['givenName'][0].\" \".$entry['sn'][0];\n }\n }\n }\n return $users;\n}", "public function getPrivateUsers()\n\t{\n\t\t$opt = get_option('ld_private_users');\n\t\tif ( !is_array( $opt ) )\n\t\t\treturn array();\n\t\t\n\t\treturn $opt;\n\t}", "public function getUserRequestedBy()\n {\n $endpointUrl = sprintf($this->_endpointUrls['user_requested_by'], $this->getAccessToken());\n $this->_initHttpClient($endpointUrl);\n $response = $this->_getHttpClientResponse();\n return $this->parseJson($response);\n }", "public function getUserList()\n {\n $responseMap = $this->_postCommand(static::$COMMAND_GET_USER_LIST);\n \n // From the response, filter out only the users that matched this environment Prefix\n $userIdList = [];\n foreach ($responseMap['ids'] as $userId) {\n $unprefixedUserId = PrefixHelper::unprefix($userId);\n \n if ($unprefixedUserId !== false) {\n $userIdList[] = $unprefixedUserId;\n }\n }\n \n return $userIdList;\n }", "public static function getUsersToImpersonate()\n {\n $userProfileTable = UserProfile::tableName();\n $userTable = User::tableName();\n $query = new Query();\n $query->select([\"CONCAT(\" . $userProfileTable . \".nome, ' ', \" . $userProfileTable . \".cognome, ' - userId: ', \" . $userProfileTable . \".user_id, ' - userProfileId: ', \" . $userProfileTable . \".id) AS userNameSurname\"]);\n $query->from($userTable);\n $query->innerJoin($userProfileTable, $userProfileTable . '.user_id = ' . $userTable . '.id');\n $query->andWhere([$userTable . '.deleted_at' => null]);\n $query->andWhere([$userProfileTable . '.deleted_at' => null]);\n $query->andWhere([$userTable . '.status' => User::STATUS_ACTIVE]);\n $query->andWhere([$userProfileTable . '.attivo' => UserProfile::STATUS_ACTIVE]);\n $query->andWhere(['not like', 'email', '#deleted_']);\n $query->andWhere(['<>', $userTable . '.id', \\Yii::$app->user->id]);\n $query->indexBy('id');\n $usersToImpersonate = $query->column();\n return $usersToImpersonate;\n }" ]
[ "0.6264269", "0.6241255", "0.6113772", "0.59961766", "0.59888643", "0.59765667", "0.59763193", "0.59760886", "0.59412926", "0.59223", "0.5917161", "0.5860496", "0.585691", "0.5848999", "0.5848185", "0.5845932", "0.5840974", "0.5828297", "0.5776771", "0.5739086", "0.57324857", "0.5728256", "0.5724601", "0.5714956", "0.5714956", "0.571424", "0.56951475", "0.5688817", "0.568467", "0.5684538", "0.5674566", "0.5669372", "0.56429607", "0.56302047", "0.5628335", "0.5626502", "0.5623077", "0.5621132", "0.5620001", "0.5620001", "0.5620001", "0.5620001", "0.5620001", "0.5620001", "0.5620001", "0.56047356", "0.5604317", "0.55935806", "0.5575792", "0.556862", "0.55599606", "0.5557837", "0.5547633", "0.5547633", "0.554636", "0.55458844", "0.5544974", "0.5542005", "0.55363435", "0.553628", "0.5532246", "0.55238897", "0.5521246", "0.5519824", "0.54974854", "0.54636616", "0.54625356", "0.5459616", "0.5459616", "0.5459616", "0.5454508", "0.5445216", "0.54377854", "0.54350275", "0.54326314", "0.5430279", "0.5427565", "0.54222447", "0.54172474", "0.5409253", "0.54076314", "0.5405926", "0.5400665", "0.5400452", "0.53817856", "0.5381099", "0.53794485", "0.5375825", "0.5373972", "0.5369073", "0.5367526", "0.53657216", "0.53608763", "0.5359933", "0.53517705", "0.53465873", "0.5346522", "0.5341646", "0.5339178", "0.5336643", "0.53334886" ]
0.0
-1
Get categories from all servers
public function categories(bool $returnRaw = false, bool $forceRefresh = false) : array { $servers = $this->servers(true, $forceRefresh); $libraries = []; foreach ($servers as $server) { try { $request = $this->client->get(sprintf('%s/sections', $server['api'])); $response = json_decode($request->getBody()->getContents(), true); if (array_key_exists('MediaContainer', $response)) { $rawLibraries = $response['MediaContainer']['Directory']; $serverLibraries = []; foreach ($rawLibraries as $library) { $serverLibraries[(integer) $library['key']] = [ 'id' => $library['uuid'], 'api' => $server['api'], 'name' => $server['name'], 'key' => $library['key'], 'title' => $library['title'], 'type' => $library['type'], 'refreshing' => $library['refreshing'], 'dates' => [ 'created' => $library['createdAt'], 'updated' => $library['updatedAt'], 'scanned' => $library['scannedAt'] ] ]; } ksort($serverLibraries); $libraries[$server['id']] = $serverLibraries; } } catch (\Exception $exception) { // Nothing here, just ignore this server } } if ($returnRaw) { return $libraries; } return [ 'success' => true, 'status' => 200, 'message' => 'Successfully fetched data from the remote endpoint', 'data' => $libraries ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getServerCategories($filter=\"\"){\n $category = new Category;\n return $category->get();\n }", "public function getCategories(){\n\t\t// preapres the request\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: ' . TOKEN));\n\t\tcurl_setopt($ch, CURLOPT_URL, \"http://\" . IP . \"/bde_site/api/category/\");\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n\t\t// send the request\n\t\t$output = curl_exec($ch);\n\t\t$info = curl_getinfo($ch);\n\t\tcurl_close($ch);\n\n\t\t// decode the answer into a php object\n\t\t$categories = json_decode($output, true);\n\n\t\treturn $categories;\n\t}", "function GetCategories()\n\t{\n\t\t$result = $this->sendRequest(\"GetCategories\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function categories()\n {\n // Cache results\n static $categories;\n\n if ($categories) {\n return $categories;\n }\n\n $app = \\Slim\\Slim::getInstance();\n $dataMapper = $app->dataMapper;\n $CategoryMapper = $dataMapper('CategoryMapper');\n\n return $categories = $CategoryMapper->getAllCategories();\n }", "function getAllCategories() {\n\t\t$url = $this->apiURL . \"categories/\" . $this->yourID . \"/\" . $this->yourAPIKey;\n\t\treturn $this->_curl_get($url);\n\t}", "public function getCategories(){\n\t\t$query = \"SELECT * FROM final_categoria\";\n\t\treturn $this->con->action($query);\n\t}", "public function getAllCategories();", "public function getCategories();", "public function getCategories();", "public function getCategories(){\n\t\t$stmt = $this->db->query(\"SELECT * FROM products_categories WHERE clientId = '{$this->clientId}'\");\n\t\treturn $stmt->fetchAll(PDO::FETCH_OBJ);\n\t}", "public function get_categories() {\n return array( 'apr-core' );\n }", "public function getCategories()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('categories');\n }", "public static function categories() {\n $db = Db::getInstance();\n $req = $db->query('SELECT * FROM category');\n return $req->fetchAll(PDO::FETCH_ASSOC);\n }", "protected function _getAllCategoriesForStore()\n {\n $read = Mage::getModel('core/resource')->getConnection('core_read');\n $table = $this->getTableName(\"catalog_category_entity\");\n $sql2 = $read->select()->from($table, array('entity_id', 'path'));\n \n $results = $read->fetchPairs($sql2);\n $rootCategoryId = $this->_fStore->getRootCategoryId();\n $categories = array();\n foreach ($results as $entity_id => $path) {\n $path = explode('/', $path);\n if (count($path) > 1) {\n if ($path[1] == $rootCategoryId) {\n $categories[] = $entity_id;\n }\n } else {\n $categories[] = $entity_id;\n }\n }\n \n return $categories;\n }", "function getAllCategories()\n {\n return $this->data->getAllCategories();\n }", "function getAllCategories()\n {\n // Get list of categories using solr\n $metadataDao = MidasLoader::loadModel('Metadata')->getMetadata(MIDAS_METADATA_TEXT, \"mrbextrator\", \"category\");\n $enabledDao = MidasLoader::loadModel('Metadata')->getMetadata(MIDAS_METADATA_TEXT, \"mrbextrator\", \"slicerdatastore\");\n $terms = array(); \n if($metadataDao)\n {\n $db = Zend_Registry::get('dbAdapter');\n $results = $db->query(\"SELECT value, itemrevision_id FROM metadatavalue WHERE metadata_id='\".$metadataDao->getKey().\"' order by value ASC\")\n ->fetchAll();\n foreach($results as $result)\n {\n $arrayTerms = explode(\" --- \", $result['value']);\n foreach($arrayTerms as $term)\n { \n if(strpos($term, \"zzz\") === false) continue;\n $tmpResults = $db->query(\"SELECT value FROM metadatavalue WHERE itemrevision_id='\".$result['itemrevision_id'].\"' AND metadata_id='\".$enabledDao->getKey().\"' order by value ASC\")\n ->fetchAll();\n if(empty($tmpResults))continue;\n $term = trim(str_replace('zzz', '', $term));\n if(!isset($terms[$term]))\n {\n $terms[$term] = 0;\n }\n $terms[$term]++;\n }\n } \n }\n ksort($terms);\n return $terms;\n }", "private function getAllCategories()\n {\n $query = Queries::$getAllCategories;\n\n try {\n $stmt = $this->db->prepare($query);\n $stmt->execute();\n $result = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n $this->successResponse($result);\n } catch (\\PDOException$e) {\n $this->errorResponse($e->getMessage());\n }\n }", "public function get_categories() {\n\t\treturn [ 'happyden' ];\n\t}", "public function getAllCategories(){\r\n\t\treturn $this->query(\"SELECT * FROM category\");\r\n\t}", "public static function getCategories()\n\t{\n\t\treturn Category::getAll();\n\t}", "public function get_categories() {\n\t\treturn array( 'listeo' );\n\t}", "static function get_all_available_categories()\n {\n //moduli primari\n $modules_root = new Dir(DS.ModuleUtils::get_modules_path());\n\n $all_folders = $modules_root->listFolders();\n\n $result = array();\n\n foreach ($all_folders as $cat)\n {\n if ($cat->isDir())\n {\n $result[] = $cat->getName();\n }\n }\n\n //aggiungo la categoria framework se non è presente.\n if (!ArrayUtils::has_value($result, ModuleUtils::FRAMEWORK_CATEGORY_NAME))\n $result[] = ModuleUtils::FRAMEWORK_CATEGORY_NAME;\n //ok\n\n return $result;\n }", "protected function getCategories()\n {\n if (! is_null($this->categories)) {\n return $this->categories;\n }\n\n $categories = $this->app['sanatorium.categories.category']->findAll();\n\n foreach ($categories as $category) {\n $category->uri = $category->url === '/' ? null : $category->url;\n }\n\n return $this->categories = $categories;\n }", "public function get_categories () {\n\t\treturn Category::all();\n\t}", "public function findAllCategories(): iterable;", "public function findCategories();", "public function categories()\n {\n return $this->apiResponse(Items::$categories, 2678400);\n }", "public static function getCategories()\n {\n \t$query = \"SELECT * FROM categories\";\n \t$result = DB::select($query);\n\n \treturn $result;\n }", "public function getCategoriesList() {\n return $this->_get(16);\n }", "public function getCategories()\n {\n return $this->request(\"core_course_get_categories\");\n }", "public function get_categories()\n {\n return ['hsblog'];\n }", "public function get_categories() {\n\t\treturn [ 'general' ];\n\t}", "public function get_categories() {\n\t\treturn [ 'general' ];\n\t}", "public function get_categories() {\n\t\treturn [ 'general' ];\n\t}", "public function getCategories()\n\t{\n\t\treturn BlogCategory::all();\t\n\t}", "public function getCategories() : array;", "public function getCategories()\n {\n $request = \"SELECT * FROM category\";\n $request = $this->connexion->query($request);\n $categories = $request->fetchAll(PDO::FETCH_ASSOC);\n return $categories;\n }", "public function GetCategories() {\n // Setup the Query\n $this->sql = \"SELECT *\n FROM categories\";\n \n // Run the query \n $this->RunBasicQuery();\n }", "public function get_categories() {\n\t\treturn array( 'general' );\n\t}", "public static function getCategories()\n {\n //get cached categories\n $catCached = Yii::$app->cache->get('catCached');\n if ($catCached) {\n return $catCached;\n } else {\n return self::find()->indexBy('category_id')->asArray()->all();\n }\n }", "public function allCategories()\n {\n return Category::all();\n }", "public static function getAllCategories() {\n\t\t\t$db = Db::getInstance();\n\t\t\t$categoryQuery = $db->prepare('SELECT location, description\n\t\t\t\t\t\t\t\t\t\t\t FROM categories\n\t\t\t\t\t\t\t\t\t\t ORDER BY location\n\t\t\t\t\t\t\t\t\t\t');\n\t\t\t\t$categoryQuery->execute();\n\t\t\t$allCategories = $categoryQuery->fetchAll(PDO::FETCH_ASSOC);\n\t\t\treturn $allCategories;\n\t\t}", "public static function getAllCategories()\n\t{\n\t\t$categories= Category::all();\n\t\treturn $categories;\n\t}", "public function getCategories()\n {\n return CategoryResource::collection(Category::with('products')->get())\n ->response()\n ->setStatusCode(200);\n }", "public function get_categories()\n\t{\n\t\treturn array('general');\n\t}", "function getCategorias(){\r\n $conector = new Conector();\r\n $banco = new BancoCategoria();\r\n return $banco->getCategorias($conector->getConexao());\r\n }", "public static function getCategories()\n {\n $app = App::getInstance();\n\n $manager = BaseManager::build('FelixOnline\\Core\\Category', 'category');\n\n try {\n $values = $manager->filter('hidden = 0')\n ->filter('deleted = 0')\n ->filter('id > 0')\n ->order('order', 'ASC')\n ->values();\n\n return $values;\n } catch (\\Exception $e) {\n return array();\n }\n }", "public function get_categories() {\n\t\treturn [ 'siva-plugins' ];\n\t}", "public static function getCategoryList()\n {\n\n $db = Db::getConnection();\n\n $serviceList = array();\n\n $result = $db->query('SELECT id, name FROM categories '\n . 'ORDER BY id ASC');\n\n $i = 0;\n while ($row = $result->fetch()) {\n $serviceList[$i]['id'] = $row['id'];\n $serviceList[$i]['name'] = $row['name'];\n $i++;\n }\n\n return $serviceList;\n\n }", "public function get_allCategory_get(){\n\t\t$result = $this->dashboard_model->get_allCategory();\n\t\treturn $this->response($result);\t\t\t\n\t}", "public function get_categories() {\n return array ( 'general' );\n }", "function get_categories_by_channel()\n\t{\n\t\t// get variables\n\t\t$vars = $this->_get_vars('get', array('channel_id'), array(\n\t\t\t'select' => array(),\n\t\t\t'where' => array(),\n\t\t\t'order_by' => 'cat_order',\n\t\t\t'sort' => 'asc',\n\t\t\t'limit' => FALSE,\n\t\t\t'offset' => 0\n\t\t));\n\n\t\t// prepare variables for sql\n\t\t$vars = $this->_prepare_sql($vars);\n\t\t\n\t\t// start hook\n\t\t$vars = $this->_hook('get_categories_by_channel_start', $vars);\n\n\t\t// load channel data library\n\t\t$this->_load_library('channel_data');\n\n\t\t$data = $this->EE->channel_data_lib->get_channel_categories($vars['channel_id'], $vars['select'], $vars['where'], $vars['order_by'], $vars['sort'], $vars['limit'], $vars['offset'])->result();\n\n\t\t// end hook\n\t\t$data = $this->_hook('get_categories_by_channel_end', $data);\n\n\t\t$this->response($data);\n\t}", "public function indexContentCategories()\n {\n return $this->contentCategoryRepo->all();\n }", "public function skyword_get_categories( $args = '' ) {\n\t\tglobal $wp_xmlrpc_server;\n\t\t$wp_xmlrpc_server->escape( $args );\n\t\t$categories = $wp_xmlrpc_server->mw_getCategories ($args);\n\t\treturn $categories;\n\t}", "public function categories() {\n\t\treturn $this->terms('category');\n\t}", "public function getCategories()\n {\n return $this->categories;\n }", "public function getCategories()\n {\n return $this->categories;\n }", "public function getCategories()\n {\n return $this->categories;\n }", "public function getCategories()\n {\n return $this->categories;\n }", "public function getCategories()\n {\n return $this->categories;\n }", "public function getCategories()\n {\n return $this->categories;\n }", "public function getCategories()\n {\n return $this->categories;\n }", "public function getCategories()\n {\n return $this->categories;\n }", "public function getCategories()\n {\n return $this->categories;\n }", "public function getCategories()\n {\n return $this->categories;\n }", "public function listCategories(){\n\t\t$lab = new lelabDB();\n\t\t$query = \"select * from $this->tableName order by id\";\n\t\t$result = $lab->getArray($query);\n\t\treturn $result;\n\t}", "private function actionGetCategories() {\n\t\tglobal $publishthis;\n\n\t\t$categories = array();\n\t\t$obj = new stdClass();\n\n\t\t//get taxonomies categories\n\t\t$all_taxonomies = get_taxonomies( array( 'public' => true ), $output = 'objects', $operator = 'and' );\n\t\t$taxonomies_keys = array_keys( $all_taxonomies );\n\t\t$all_terms = get_terms( $taxonomies_keys, array( 'orderby' => 'id', 'hide_empty' => 0, 'exclude' => array(1) ) );\n\n\t\t$tax_maps = $publishthis->get_option( 'tax_mapping' );\n\t\t$tax_maps = array_values($tax_maps);\n\n\t\tforeach ( $all_terms as $term ) {\n\t\t\tif ( !in_array( $term->taxonomy, array( 'post_format', 'post_tag' ) ) ) {\n\t\t\tif ( !in_array( $term->taxonomy, $tax_maps ) && !in_array( 'pt_tax_all', $tax_maps ) ) continue;\n\n\t\t\t$category = array(\n\t\t\t\t'id' => intval( $term->term_id ),\n\t\t\t\t'name' => $term->name,\n\t\t\t\t'taxonomyId' => intval( $term->term_taxonomy_id ),\n\t\t\t\t'taxonomyName' => $term->taxonomy,\n\t\t\t\t'subcategories' => array() );\n\t\t\tif( intval( $term->parent ) > 0 ) {\n\t\t\t\t\t$categories[ $term->parent ]['subcategories'][ $term->term_id ] = $category;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\t$categories[ $term->term_id ] = $category;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$obj->success = true;\n\t\t$obj->errorMessage = null;\n\t\t$obj->categories = $this->array_values_recursive( $categories );\n\n\t\t$this->sendJSON( $obj );\n\t}", "public function get_categories()\n {\n return ['akash-addons'];\n }", "public static function getCategories() {\n $top_level_cats = array();\n//Select all top level categories\n Db_Actions::DbSelect(\"SELECT * FROM cscart_categories LEFT OUTER JOIN cscart_category_descriptions ON cscart_categories.category_id = cscart_category_descriptions.category_id WHERE cscart_categories.parent_id=0\");\n $result = Db_Actions::DbGetResults();\n if (!isset($result->empty_result)) {\n foreach ($result as $cat) {\n $top_level_cats[] = array('id' => $cat->category_id,\n 'cat_name' => $cat->category,\n 'company_id' => $cat->company_id,\n 'status' => $cat->status,\n 'product_count' => $cat->product_count,\n 'is_op' => $cat->is_op,\n 'usergroup_ids' => $cat->usergroup_ids);\n }\n }\n if (!isset($result->empty_result)) {\n return $result;\n }\n else {\n return new stdClass();\n }\n }", "public function getCategories(){\n return Category::get();\n }", "protected function findAllCategories()\n {\n return resolve([]);\n }", "public static function getAll() {\n self::checkConnection();\n $results = self::$connection->execute(\"SELECT * FROM category;\");\n $categories = array();\n foreach ($results as $category_arr) {\n array_push($categories, new Category($category_arr));\n }\n return $categories;\n }", "public function get_categories() {\n\t\treturn [ 'basic' ];\n\t}", "public function getCategories()\n {\n return Category::all();\n }", "public function listsCategoriesGet()\r\n {\r\n $response = Category::all();\r\n return response()->json($response, 200);\r\n }", "public function get_categories() {\n\t\treturn $this->terms('category');\n\t}", "public function getCategories()\n {\n return [ 'categories' => self::CATEGORIES ];\n }", "function Categories() {\n\t\treturn DataObject::get('categoryobject', '', 'Title');\n\t}", "public function getServers($filter=\"\"){\n\t\t$servers = DB::table('servers')\n\t\t\t\t\t\t\t->where('name', 'LIKE', '%' . $filter . '%' )\n\t\t\t\t\t\t\t->orWhere('servers.description', 'LIKE', '%' . $filter . '%' )\n ->orWhere('categories.description', 'LIKE', '%' . $filter . '%' )\n ->join('categories', 'servers.category_id', '=', 'categories.id')\n ->select('servers.*', \n 'categories.description as category_description', \n 'categories.color as category_color')\n ->orderBy('name')\n\t\t\t\t\t\t\t->get();\n\n\t\tforeach($servers as $server){\n\t\t\t$this->getServerLastMetrics( $server );\n\t\t\t$this->getServerThresholdValue($server, 'ip');\n\t\t\t$this->getServerThresholdValue($server, 'connections');\n\t\t}\n return $servers;\n }", "public function get_categories()\n\t{\n\t\treturn $this->_categories;\n\t}", "public function read_all_categories()\n {\n $result = array(\n \"status\" => \"\" ,\n \"body\" => array(\n \"categories\" => array(\n \"id\" => 0,\n \"category_name\" => \"\"\n ),\n \"count\" => 0\n ),\n \"error\" => array()\n );\n $sql = \"SELECT * FROM categories\";\n $stmt = $this->db->prepare($sql);\n $stmt->execute();\n $res = $stmt->get_result();\n $result['body']['count'] = $res->num_rows;\n if ($res->num_rows > 0){\n $result['status'] = \"Categories read \";\n while($row = $res->fetch_assoc()){\n $data = array(\n \"id\" => $row[\"id\"],\n \"category_name\" => $row['categoryName']\n );\n array_push($result['body']['categories'], $data);\n }\n } else {\n $result['status'] = \"No categories found \";\n }\n return $result;\n }", "public static function getCategories(){\n $categories = Category::all()->toArray();\n\n return $categories;\n }", "public function getallCategories(){\n\t\t$criteria = new CDbCriteria;\n\t\t$criteria->select = '*';\n\t \treturn $terms = NeCategory::model()->findAll($criteria);\n\t}", "static function categories()\n {\n $category = \\SOE\\DB\\Category::where('parent_id', '0')\n ->orderBy('category_order')\n ->get();\n $return = array();\n foreach($categories as $cat)\n {\n $return[$cat->id] = $cat->slug;\n }\n return $return;\n }", "function sportal_categories()\n{\n\tglobal $context, $scripturl, $txt;\n\n\tloadTemplate('PortalCategories');\n\n\t$context['categories'] = sportal_get_categories(0, true, true);\n\n\t$context['linktree'][] = array(\n\t\t'url' => $scripturl . '?action=portal;sa=categories',\n\t\t'name' => $txt['sp-categories'],\n\t);\n\n\t$context['page_title'] = $txt['sp-categories'];\n\t$context['sub_template'] = 'view_categories';\n}", "public function get_categories() {\n return [ 'yx-super-cat' ];\n }", "public function getCategories()\n\t{\n\t\treturn $this->categories;\n\t}", "public function get_store_categories()\n {\n $helper = Mage::helper('catalog/category');\n return $helper->getStoreCategories();\n }", "function getCategories(){\n\treturn dbSelect('categories');\n}", "public function get_list_categories() {\n\t\t\t$categories = TableRegistry::get('Administrator.Categories');\n\t\t\t$all = $categories->find('treeList', ['conditions' => ['type' => 'Category', 'status' => $this->active], 'spacer' => '— '])->toArray();\n\t\t\treturn $all;\n\t}", "public function getCategories() {\n return $this->categories;\n }", "public function categories() : array\n {\n return $this->categories;\n }", "public function categories_get()\n {\n $em = $this->doctrine->em;\n $categoriesRepo = $em->getRepository('Entities\\Category');\n $categories = $categoriesRepo->findAll();\n\n foreach ($categories as $category) {\n $services = 0;\n $subcats = $category->getSubcategories();\n foreach ($subcats as $subcat) {\n $services += $subcat->getServices()->count();\n }\n $category->servicesCount = $services;\n }\n $response[\"data\"] = $categories;\n $response[\"count\"] = count($categories);\n $this->set_response($response, REST_Controller::HTTP_OK);\n\n }", "private function fetchAllCategories()\n {\n $sql = '\n SELECT * FROM Rm_Category;\n ';\n\n $res = $this->db->executeSelectQueryAndFetchAll($sql);\n\n $categoriesArray = array();\n foreach ($res as $key => $row) {\n $name = $row->name;\n $categoriesArray[] = $name;\n }\n\n return $categoriesArray;\n }", "public function categories(): array\n {\n return $this->categories;\n }", "function get_all_category_ids()\n {\n }", "public function getStoreCategories($params = [])\n {\n if(!config(\"constant.getDataFromApis\")){\n return $this->starrtecUnifiedPosHandler->getCategoriesList( $params );\n }else{\n return $this->starrtecPosApiHandler->getCategoriesList( $params );\n }//..... end if-else() .....//\n }", "public function getAll()\n {\n return CategorieResource::collection(Categorie::paginate());\n }", "private function __getCats() {\n\n\t\t$rootcatID = Mage::app()->getStore()->getRootCategoryId();\n\n\t\t$categories = Mage::getModel('catalog/category')\n\t\t\t\t\t\t\t->getCollection()\n\t\t\t\t\t\t\t->addAttributeToSelect('*')\n\t\t\t\t\t\t\t->addIsActiveFilter();\n $data = array();\n foreach ($categories as $attribute) {\n\t\t\t$data[] = array(\n\t\t\t\t'value' => $attribute->getId(),\n\t\t\t\t'label' => $attribute->getName()\n\t\t\t);\n }\n return $data;\n }", "public static function getCategoriesOptions()\n {\n return self::get('categories') ?: [];\n }", "public function get_categories() {\n\t\treturn [ 'kodeforest' ];\n\t}" ]
[ "0.7468132", "0.7317743", "0.72089076", "0.71063226", "0.7078547", "0.6948711", "0.69218475", "0.6876321", "0.6876321", "0.6858868", "0.68375504", "0.6805039", "0.67740864", "0.67634755", "0.6715097", "0.66956204", "0.6682136", "0.6648266", "0.6640491", "0.6631615", "0.65957975", "0.6594893", "0.65937185", "0.6571463", "0.65544534", "0.65301174", "0.6529867", "0.652071", "0.6511725", "0.65093446", "0.6497677", "0.64776224", "0.64776224", "0.64776224", "0.647402", "0.6465903", "0.64631116", "0.6457054", "0.64559656", "0.6445169", "0.64374816", "0.64299655", "0.64218193", "0.6407792", "0.6399286", "0.6393718", "0.63920534", "0.63916475", "0.6384241", "0.6374134", "0.6370895", "0.63637197", "0.6359551", "0.6357877", "0.6354922", "0.6343448", "0.6343448", "0.6343448", "0.6343448", "0.6343448", "0.6343448", "0.6343448", "0.6343448", "0.6343448", "0.6343448", "0.6339128", "0.6328343", "0.63264495", "0.63248956", "0.6323931", "0.6318347", "0.6317422", "0.6315206", "0.63115877", "0.6300587", "0.6300225", "0.62985003", "0.62931937", "0.6285023", "0.6284688", "0.6280545", "0.62797415", "0.6276388", "0.6275316", "0.6270228", "0.62580884", "0.6256013", "0.6255494", "0.62538785", "0.6245041", "0.62437874", "0.6227488", "0.622526", "0.62211835", "0.62208563", "0.6219913", "0.62147754", "0.6213644", "0.6207635", "0.6206145", "0.6197304" ]
0.0
-1
Get contents for servers
public function contents(bool $returnRaw = false, bool $forceRefresh = false) : array { $contents = []; foreach ($this->categories(true, $forceRefresh) as $server => $categories) { foreach ($categories as $category => $categoryData) { if ($categoryData['type'] === 'artist') { continue; } try { $serverAPI = $categoryData['api']; $serverName = $categoryData['name']; $request = $this->client->get(sprintf('%s/sections/%d/all', $serverAPI, $category)); $response = json_decode($request->getBody()->getContents(), true); if (array_key_exists('MediaContainer', $response)) { $rawContents = $response['MediaContainer']['Metadata']; foreach ($rawContents as $item) { $contents[$server][] = [ 'key' => $item['key'], 'title' => $item['title'], 'released' => $item['originallyAvailableAt'] ?? null, 'duration' => isset($item['duration']) ? ($item['duration'] / 1000) : null, 'server_name' => $serverName, 'watch' => sprintf('//%s/web/index.html#!/server/%s/details?key=%s', config('media.plex_url'), $server, urlencode($item['key'])), 'dates' => [ 'createdAt' => $item['addedAt'], 'updatedAt' => $item['updatedAt'] ] ]; } } } catch (\Exception $exception) { // Do nothing } } } if ($returnRaw) { return $contents; } return [ 'success' => true, 'status' => 200, 'message' => 'Successfully fetched data from the remote endpoint', 'data' => $contents ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getContents()\n {\n return $this->engine->get($this->path, $this->gatherData());\n }", "public function getServers();", "public function getServers() {}", "function getcontent($server, $port, $file) {\r\n\t\t$cont = \"\";\r\n\t\t$ip = gethostbyname($server);\r\n\t\t$fp = fsockopen($ip, $port);\r\n\t\tif (!$fp) {\r\n\t\t\t return \"Unknown\";\r\n\t\t} else {\r\n\t\t\t $com = \"GET $file HTTP/1.1\\r\\nAccept: */*\\r\\nAccept-Language: de-ch\\r\\nAccept-Encoding: gzip, deflate\\r\\nUser-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)\\r\\nHost: $server:$port\\r\\nConnection: Keep-Alive\\r\\n\\r\\n\";\r\n\t\t\t fputs($fp, $com);\r\n\t\t\t while (!feof($fp)) {\r\n\t\t\t\t $cont .= fread($fp, 500);\r\n\t\t\t }\r\n\t\t\t fclose($fp);\r\n\t\t\t $cont = substr($cont, strpos($cont, \"\\r\\n\\r\\n\") + 4);\r\n\t\t\t return $cont;\r\n\t\t}\r\n\t}", "public function getContents() {}", "public function getContents() {}", "public function getContents() {}", "public function getContents() {}", "public function getContents() {}", "public function getServerList(): array\n {\n $replace = array(\n \"\\xFF\\xFF\\xFF\\xFFgetserversResponse\\n\",\n \"\\\\EOF\",\n \"\\\\EOT\"\n );\n\n $servers = array();\n\n $this->write(\"\\xFF\\xFF\\xFF\\xFFgetservers \".$this->protocol.\" full empty\");\n $data = $this->read_master();\n\n foreach ($data as $row) {\n $row = str_replace($replace, \"\", $row);\n $row = explode(\"\\x5c\", $row);\n foreach ($row as $server) {\n if (strlen($server) == 6) {\n $serverInfo = unpack(\"Nip/nport\", $server);\n $servers[] = new Server(long2ip($serverInfo[\"ip\"]), $serverInfo[\"port\"]);\n }\n }\n }\n\n return $servers;\n }", "protected function getSourcesContent(){\n if(empty($this->sources)){\n return;\n }\n $content = array();\n foreach($this->sources as $sourceFile){\n $content[] = file_get_contents($sourceFile);\n }\n return $content;\n }", "private function fetchContents()\n {\n return $this->response->getBody()->getContents();\n }", "public function getContents();", "public function getContents();", "public function getContents();", "public function getContents();", "public function getContents();", "function getContents() ;", "public function getContent()\n {\n return $this->files->getRemote($this->absolutePath);\n }", "public function obtainWebservers()\n {\n return $this->performRequest('GET', '/webservers');\n }", "function getServers() {\n\t\treturn $this->servers;\n\t}", "public function contents() {\n\t\treturn file_get_contents($this->path);\n\t}", "function os2forms_server_communication_get_servers() {\n $query = db_select('os2forms_server_communication_servers_list', 's');\n $query->fields('s', array('id', 'server_name', 'url', 'username', 'psw'));\n $servers = $query->execute()\n ->fetchAllAssoc('id');\n\n return $servers;\n}", "function getContents();", "private function getContents()\n {\n if ($this->contents) {\n return $this->contents;\n }\n\n return $this->contents = $this->directory->getContents();\n }", "protected function getContents() {\n $opts = array(\n 'http' => array(\n 'method' => \"GET\",\n 'header' => $this->user_agent . \"\\r\\n\"\n )\n );\n $context = stream_context_create($opts);\n return file_get_contents($this->query, false, $context);\n }", "public function listContent()\n {\n return $this->tarArchive->listContent();\n }", "public static function getservers() {\n\t\t$product_id = OnAppCDN::getValue( 'id' );\n\n\t\t$sql = \"SELECT\n\t\t\t\t\ttblservers.*,\n\t\t\t\t\ttblservergroupsrel.groupid,\n\t\t\t\t\ttblproducts.servergroup\n\t\t\t\tFROM\n\t\t\t\t\ttblservers\n\t\t\t\t\tLEFT JOIN tblservergroupsrel ON\n\t\t\t\t\t\ttblservers.id = tblservergroupsrel.serverid\n\t\t\t\t\tLEFT JOIN tblproducts ON\n\t\t\t\t\t\ttblproducts.id = $product_id\n\t\t\t\tWHERE\n\t\t\t\t\ttblservers.type = 'onappcdn'\";\n\n\t\t$sql_servers_result = full_query( $sql );\n\n\t\t$servers = array();\n\t\twhile( $server = mysql_fetch_assoc( $sql_servers_result ) ) {\n\t\t\tif( is_null( $server[ 'groupid' ] ) ) {\n\t\t\t\t$server[ 'groupid' ] = 0;\n\t\t\t}\n\t\t\t$server[ 'password' ] = decrypt( $server[ 'password' ] );\n\t\t\t$servers[ $server[ 'id' ] ] = $server;\n\t\t\t$servers[ $server[ 'id' ] ][ 'address' ] = $server[ 'ipaddress' ] != '' ? $server[ 'ipaddress' ] : $server[ 'hostname' ];\n\n\t\t\tif( $server[ 'secure' ] == 'on' ) {\n\t\t\t\t$servers[ $server[ 'id' ] ][ 'address' ] = 'https://' . $servers[ $server[ 'id' ] ][ 'address' ];\n\t\t\t}\n\t\t}\n\n\t\treturn $servers;\n\t}", "private function getHostContent()\n {\n # Getting content from files\n $main = file_get_contents('virtual-host-files/main.conf');\n $server = file_get_contents('virtual-host-files/server.conf');\n $allowOverride = (strtolower($this->allowOverride) == 'y') ? file_get_contents('virtual-host-files/allow-override.conf') : '';\n\n # Content for the virtual host file (.conf)\n $replacableContent = $server . $allowOverride;\n\n # Array which need to replace\n $replacableContentArray = [\n 'host_name' => '##_HOST_NAME_##',\n 'document_root' => '##_DOCUMENT_ROOT_##',\n ];\n\n # Array from get the values and repalce with matched data\n $replacableData = [\n 'host_name' => $this->name,\n 'document_root' => $this->documentRoot,\n ];\n\n $search = [];\n $replace = [];\n foreach ($replacableContentArray AS $fieldName => $contentKey) {\n $search[] = $contentKey;\n $replace[] = (isset($replacableData[$fieldName]) && !empty($replacableData[$fieldName])) ? $replacableData[$fieldName] : '';\n }\n $content = str_replace($search, $replace, $replacableContent);\n\n return str_replace('##_MAIN_CONTENT_##', $content, $main);\n }", "public function getContents()\n {\n }", "static public function getServers() {\n\t\tself::loadSettings();\n\t\treturn self::$servers;\n\t}", "function serve_remote_request($remote)\n{\n\t$servers=json_decode(file_get_contents(\"../.mypconfig\", true));\n\t$serve=false;\n\tforeach($servers as $server)\n\t{\n\t\tif($server==$remote) $serve=true;\n\t}\n\t\n\tif($serve==true)\n\t{\n\t\tscan();\n\t\t$output=file_get_contents(\"../.mypfiles\", true);\n\t\techo $output;\n\t}\n}", "public function getServerList() {}", "public function getContents(){\n return file_get_contents($this->source);\n }", "public function retrieve(){\n\t\tswitch ($this->host) {\n\t\t\tcase 'www.subito.it':\n\t\t\t\t$this->retrieveAllSubito();\n\t\t\t\tbreak;\n\t\t\tcase 'www.portaportese.it':\n\t\t\t\t// call the appropriate method when it is written\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function content()\n {\n $response = $this\n ->getPackage('FileStation')\n ->contentOfPath($this->path, [], 'files');\n return $response;\n }", "protected function getContents() {\n return file_get_contents($this->query);\n }", "public function find_all()\n {\n\n try {\n $this->response = $this->http_client->request('GET',\n \"http://{$_SERVER['REMOTE_ADDR']}:9091/api/file/all.php\",\n [\n 'verify' => false\n ]);\n $this->status_code = $this->response->getStatusCode();\n return json_decode($this->response->getBody());\n\n } catch (Exception $e) {\n // echo \"Exception: \" . $e;\n }\n\n }", "public function getContents()\n {\n return stream_get_contents($this->stream);\n }", "public function getContents()\n {\n return $this->getContents();\n }", "private function get_server()\n {\n }", "function loadServerInfo() {\n\t\t\n\t\t/* define variables */\n\t\t$connections = array(); // to store the active connections\n\t\t$numConnections = 0; // number of connections (number of elements in $connections)\n\t\t$curServer = 0; // next position in the server array to handle\n\t\t\n\t\t/* loop as long as there are master servers to wait for */\n\t\twhile ($numConnections > 0 || isset($this->servers[$curServer])) {\n\t\t\t\n\t\t\t/* build up connections until limit is reached */\n\t\t\tfor (; isset($this->servers[$curServer]) && $numConnections < self::MAX_CONNECTIONS_SERVER; $curServer++) {\n\t\t\t\t\n\t\t\t\tswitch ($this->servers[$curServer][2]) {\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\t$data = \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xffgief\"; break;\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\t$data = \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xffgie3\\x05\"; break;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$authority = $this->servers[$curServer][0].':'.$this->servers[$curServer][1];\n\t\t\t\t$connection = self::establishConnection($authority, $data);\n\t\t\t\t\n\t\t\t\t/* add to connection if not failed */\n\t\t\t\tif ($connection) {\n\t\t\t\t\t$connections[$curServer] = array($connection, &$this->servers[$curServer], self::getTimeInMs());\n\t\t\t\t\t$numConnections++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* save memory */\n\t\t\t\tunset($authority, $connection);\n\t\t\t}\n\t\t\t\n\t\t\t/* check for responses */\n\t\t\tforeach ($connections as $n => $connection) {\n\t\t\t\t\n\t\t\t\t/* read data */\n\t\t\t\tswitch ($connection[1][2]) {\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\t$data = fread($connection[0], 2048); // TODO: find out how great it really can be\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\t$data = fread($connection[0], 2048); // by my calc the max size is 850, but trying to read more doesn't harm\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* packet length */\n\t\t\t\t$datalen = strlen($data);\n\t\t\t\t// var_dump($datalen);\n\t\t\t\t\n\t\t\t\t/* check if data is usable, otherwise skip */\n\t\t\t\tswitch ($connection[1][2]) {\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\tif ($data === false || $datalen < 14 || substr($data, 0, 14) !== \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xffinfo\") {\n\t\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\tif ($data === false || $datalen < 15 || substr($data, 0, 15) !== \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xffinf35\") {\n\t\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* analyse data */\n\t\t\t\tswitch ($connection[1][2]) {\n\t\t\t\t\t\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\t\n\t\t\t\t\t\t$data = explode(\"\\x00\", $data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$connection[1]['version'] = substr((string)$data[0], 14);\n\t\t\t\t\t\t$connection[1]['name'] = (string)$data[1];\n\t\t\t\t\t\t$connection[1]['map'] = (string)$data[2];\n\t\t\t\t\t\t$connection[1]['gametype'] = (string)$data[3];\n\t\t\t\t\t\t$flags = (int)$data[4];\n\t\t\t\t\t\t$connection[1]['password'] = (($flags & self::SERVER_FLAG_PASSWORD) === self::SERVER_FLAG_PASSWORD);\n\t\t\t\t\t\t$connection[1]['progression'] = (int)$data[5];\n\t\t\t\t\t\t$connection[1]['num_players'] = (int)$data[6];\n\t\t\t\t\t\t$connection[1]['max_players'] = (int)$data[7];\n\t\t\t\t\t\t$connection[1]['ping'] = (int)(self::getTimeInMs() - $connection[2]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$connection[1]['players'] = array();\n\t\t\t\t\t\tfor ($i = 8; isset($data[$i+2]); $i += 2) {\n\t\t\t\t\t\t\t$player = array();\n\t\t\t\t\t\t\t$player['name'] = (string)$data[$i];\n\t\t\t\t\t\t\t$player['score'] = (int)$data[$i+1];\n\t\t\t\t\t\t\t$connection[1]['players'][] = $player;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\t\n\t\t\t\t\t\t$data = explode(\"\\x00\", $data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$connection[1]['version'] = (string)$data[1];\n\t\t\t\t\t\t$connection[1]['name'] = (string)$data[2];\n\t\t\t\t\t\t$connection[1]['map'] = (string)$data[3];\n\t\t\t\t\t\t$connection[1]['gametype'] = (string)$data[4];\n\t\t\t\t\t\t$flags = (int)$data[5];\n\t\t\t\t\t\t$connection[1]['password'] = (($flags & self::SERVER_FLAG_PASSWORD) === self::SERVER_FLAG_PASSWORD);\n\t\t\t\t\t\t$connection[1]['num_players'] = (int)$data[8];\n\t\t\t\t\t\t$connection[1]['max_players'] = (int)$data[9];\n\t\t\t\t\t\t$connection[1]['num_players_ingame'] = (int)$data[6];\n\t\t\t\t\t\t$connection[1]['max_players_ingame'] = (int)$data[7];\n\t\t\t\t\t\t$connection[1]['ping'] = (int)(self::getTimeInMs() - $connection[2]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$connection[1]['players'] = array();\n\t\t\t\t\t\tfor ($i = 10; isset($data[$i+4]); $i += 5) {\n\t\t\t\t\t\t\t$player = array();\n\t\t\t\t\t\t\t$player['name'] = (string)$data[$i];\n\t\t\t\t\t\t\t$player['clan'] = (string)$data[$i+1];\n\t\t\t\t\t\t\t$player['country'] = (int)$data[$i+2];\n\t\t\t\t\t\t\t// $player['countrydata'] = self::getCountry($player['country']);\n\t\t\t\t\t\t\t$player['score'] = (int)$data[$i+3];\n\t\t\t\t\t\t\t$player['ingame'] = (bool)$data[$i+4];\n\t\t\t\t\t\t\t$connection[1]['players'][] = $player;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* drop it, because there comes only one packet to analyse */\n\t\t\t\tunset($connections[$n]);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t/* drop connections that have timed out */\n\t\t\tforeach ($connections as $n => $connection) {\n\t\t\t\tif ((self::getTimeInMs() - $connection[2]) >= self::TIMEOUT_SERVER) {\n\t\t\t\t\tunset($connections[$n]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* renew connection counter */\n\t\t\t$numConnections = count($connections);\n\t\t\t\n\t\t\t/* sleep a bit */\n\t\t\tusleep(self::REQUEST_SLEEP * 1000);\n\t\t}\n\t\t\n\t}", "public function getContents()\n {\n $this->load();\n\n return $this->_contents;\n }", "function getFileContent($db, $file)\n{\n $localFilename = MD5(microtime()) . '.' . $file['extension'];\n $localFilePath = CACHE_PATH . '/' . $localFilename;\n\n // figure out server storage setup\n $storageType = 'local';\n $storageLocation = LOCAL_STORAGE_DEFAULT_PATH;\n $uploadServerDetails = loadServer($db, $file);\n if ($uploadServerDetails != false)\n {\n $storageLocation = $uploadServerDetails['storagePath'];\n $storageType = $uploadServerDetails['serverType'];\n\n // if no storage path set & local, use system default\n if ((strlen($storageLocation) == 0) && ($storageType == 'local'))\n {\n $storageLocation = LOCAL_STORAGE_DEFAULT_PATH;\n }\n\n if ($storageType == 'direct')\n {\n $storageLocation = LOCAL_STORAGE_DEFAULT_PATH;\n }\n }\n\n // use ssh to get contents of 'local' files\n if (($storageType == 'local') || ($storageType == 'direct'))\n {\n // get remote file path\n $remoteFilePath = $storageLocation . $file['localFilePath'];\n\n // first try getting the file locally\n $done = false;\n if ((ON_SCRIPT_INSTALL == true) && file_exists($remoteFilePath))\n {\n \n $done = copy($remoteFilePath, $localFilePath);\n if ($done)\n {\n return $localFilePath;\n }\n }\n\n // try over ssh\n if ($done == false)\n {\n\t\t\t$sshHost = LOCAL_STORAGE_SSH_HOST;\n\t\t\t$sshUser = LOCAL_STORAGE_SSH_USER;\n\t\t\t$sshPass = LOCAL_STORAGE_SSH_PASS;\n\n\t\t\t// if 'direct' file server, get SSH details\n\t\t\t$serverDetails = getDirectFileServerSSHDetails($file['serverId']);\n\t\t\tif($serverDetails)\n\t\t\t{\n\t\t\t\t$sshHost = $serverDetails['ssh_host'];\n $sshPort = $serverDetails['ssh_port'];\n\t\t\t\t$sshUser = $serverDetails['ssh_username'];\n\t\t\t\t$sshPass = $serverDetails['ssh_password'];\n\t\t\t\t$basePath = $serverDetails['file_storage_path'];\n\t\t\t\tif(substr($basePath, strlen($basePath)-1, 1) == '/')\n\t\t\t\t{\n\t\t\t\t\t$basePath = substr($basePath, 0, strlen($basePath)-1);\n\t\t\t\t}\n\t\t\t\t$remoteFilePath = $basePath . '/' . $file['localFilePath'];\n\t\t\t}\n \n if(strlen($sshPort) == 0)\n {\n $sshPort = 22;\n }\n\t\t\t\n // connect to 'local' storage via SSH\n $sftp = new Net_SFTP($sshHost, $sshPort);\n if (!$sftp->login($sshUser, $sshPass))\n {\n output(\"Error: Failed logging into \" . $sshHost . \" (port: \".$sshPort.\") via SSH..\\n\");\n\n return false;\n }\n\n // get file\n $rs = $sftp->get($remoteFilePath, $localFilePath);\n if ($rs)\n {\n return $localFilePath;\n }\n }\n\n return false;\n }\n\n // ftp\n if ($storageType == 'ftp')\n {\n // setup full path\n $prePath = $uploadServerDetails['storagePath'];\n if (substr($prePath, strlen($prePath) - 1, 1) == '/')\n {\n $prePath = substr($prePath, 0, strlen($prePath) - 1);\n }\n $remoteFilePath = $prePath . '/' . $file['localFilePath'];\n\n // connect via ftp\n $conn_id = ftp_connect($uploadServerDetails['ipAddress'], $uploadServerDetails['ftpPort'], 30);\n if ($conn_id === false)\n {\n output('Could not connect to ' . $uploadServerDetails['ipAddress'] . ' to upload file.');\n return false;\n }\n\n // authenticate\n $login_result = ftp_login($conn_id, $uploadServerDetails['ftpUsername'], $uploadServerDetails['ftpPassword']);\n if ($login_result === false)\n {\n output('Could not login to ' . $uploadServerDetails['ipAddress'] . ' with supplied credentials.');\n return false;\n }\n\n // get content\n $ret = ftp_get($conn_id, $localFilePath, $remoteFilePath, FTP_BINARY);\n while ($ret == FTP_MOREDATA)\n {\n $ret = ftp_nb_continue($conn_id);\n }\n }\n\n if (file_exists($localFilePath) && (filesize($localFilePath) > 0))\n {\n return $localFilePath;\n }\n\n return false;\n}", "function rest_get_server()\n {\n }", "public function getContent() {\n\t\treturn $this->storage->file_get_contents($this->path);\n\t}", "public function getContent()\n {\n return file_get_contents($this->fullPath);\n }", "public function index()\n {\n return view('servers.list',[\n 'servers' => $this->repository->getServersForAuth()\n ]);\n }", "public static function getServersList()\n {\n return CHtml::listData(self::model()->findAll(), 'host', 'host');\n }", "public function getContents($path)\n {\n return file_get_contents($path);\n }", "public function getServers() {\n\t\treturn $this->dbHandler->getAllServer();\n\t}", "protected function _getServersData()\n {\n return $this->_aServersData;\n }", "function jgantt_dashboard_get_contents() {\n $output = array();\n\n // Get all allowed content types and its settings\n $types = jgantt_dashboard_get_content_types();\n\n foreach ($types as $type => $config) {\n $configuration = unserialize($config->configuration);\n $grouping = explode(':', $configuration['grouping']);\n switch ($grouping[0]) {\n case 'n':\n $output[] = jgantt_dashboard_get_content_by_nodequeue($type, $configuration['date'], $grouping[1], $configuration['color'], $grouping[2], $configuration['title']);\n break;\n case 't':\n $output[] = jgantt_dashboard_get_content_by_taxonomy($type, $configuration['date'], $grouping[1], $configuration['color'], $configuration['title']);\n break;\n }\n }\n return $output;\n}", "static public function grabWebserverInfos() {\n global $CFG_GLPI;\n\n $headers = false;\n $engine = '';\n $version = '';\n\n // check if host is present (do no throw php warning in contrary of get_headers)\n if (filter_var(gethostbyname(parse_url($CFG_GLPI['url_base'], PHP_URL_HOST)),\n FILTER_VALIDATE_IP)) {\n\n // Issue #3180 - disable SSL certificate validation (wildcard, self-signed)\n stream_context_set_default([\n 'ssl' => [\n 'verify_peer' => false,\n 'verify_peer_name' => false,\n ]\n ]);\n\n $headers = get_headers($CFG_GLPI['url_base']);\n }\n\n if (is_array($headers)) {\n //BEGIN EXTRACTING SERVER DETAILS\n $pattern = '#^Server:*#i';\n $matches = preg_grep($pattern, $headers);\n\n if (count($matches)) {\n $infos = current($matches);\n $pattern = '#Server: ([^ ]+)/([^ ]+)#i';\n preg_match($pattern, $infos, $srv_infos);\n if (count($srv_infos) == 3) {\n $engine = $srv_infos[1];\n $version = $srv_infos[2];\n }\n }\n }\n\n $server = [\n 'engine' => $engine,\n 'version' => $version\n ];\n\n return $server;\n }", "public static function GetDataServer ()\n {\n\t\treturn self::GetServer('forceDataServer', 'data');\n }", "public function getContents()\n {\n return $this->contents;\n }", "public function getContents()\n {\n return $this->contents;\n }", "public function getContents() \r\n { \r\n return $this->_contents; \r\n }", "public function getContents()\n {\n if (self::SCHEME_RESOURCE === $this->getScheme()) {\n $contents = '';\n while ($data = fread($this->stream, 2048)) {\n $contents .= $data;\n }\n } else {\n $contents = file_get_contents($this->uri);\n }\n return $contents;\n }", "public function contents();", "function getServerURLs() {\n\t\treturn $this->m_serverURLs;\n\t}", "public function get_servers($request) {\r\n\t\t$this->servers = $request['server'];\r\n\t\treturn $request['server'];\r\n\t}", "protected function getOutput($servers){\n\t\t\t// get realms array\n\t\t\t$realms = array();\n\t\t\tforeach ($servers as $realm){\n\t\t\t\t$realm = trim($realm);\n\t\t\t\t$realm = html_entity_decode($realm, ENT_QUOTES);\n\t\t\t\t$realmdata = $this->getRealmData($realm);\n\t\t\t\t$realms[$realm] = $realmdata;\n\t\t\t}\n\t\t\t\n\t\t\t// get output from style\n\t\t\t$output = $this->style->output($realms);\n\t\t\treturn $output;\n\t\t}", "public function getResourceContents()\n {\n $fileName = $this->getUrlParameter('get');\n\n if (!preg_match('/^[a-z-]+\\.(css|gif|js)$/', $fileName)) {\n $this->badRequest('Invalid file name.');\n }\n\n $resourcePath = realpath(Path::getPublicDirPathInLibrary() . $fileName);\n\n if (!is_file($resourcePath)) {\n $this->badRequest(sprintf('File \"%s\" could not be found.', $fileName));\n }\n\n $fileInfo = pathinfo($resourcePath);\n $mimeTypes = ['css' => 'text/css', 'gif' => 'image/gif', 'js' => 'application/x-javascript'];\n\n return (new Response(file_get_contents($resourcePath), 200))\n ->header('Content-Type', $mimeTypes[$fileInfo['extension']])\n ->header('Content-Length', filesize($resourcePath));\n }", "public function load_sources() {\n $this->sources = json_decode(file_get_contents(__DIR__ . '/../servers/sources.json'), true);\n if (!isset($this->sources[$this->site_id])) {\n die();\n }\n $this->data = $this->sources[$this->site_id];\n }", "function get_dns_servers() {\n\treturn get_dns_nameservers(false, true);\n}", "public function index()\n {\n $contents = Content::all();\n\n return ContentResource::collection($contents);\n }", "public function getContentList() {\r\n\t\tif (!$this->read) {\r\n\t\t\t$this->open();\r\n\t\t\t$this->readContent();\r\n\t\t}\r\n\t\treturn $this->contentList;\r\n\t}", "public function contents() { return $this->_m_contents; }", "public function get_data() {\n $rv = [\n 'standard' => [],\n 'counties' => []\n ];\n // echo 'url: '. $this->url;\n if ($this->is_remote($this->url)) {\n // Remote fetch\n // echo 'is remote';\n if ($this->user && $this->passwd) {\n // echo 'user:'.$this->user;\n $auth = base64_encode($this->user . \":\" . $this->passwd);\n $context = stream_context_create(['http' => ['header' => \"Authorization: Basic $auth\"]]);\n // $data_standards = file_get_contents($this->url . FileFetcher::FILE_STANDARDS, false, $context );\n $data_standards = file($this->url . FileFetcher::FILE_STANDARDS, false, $context );\n // echo '$data_standards: '. $data_standards;\n // $data_counties = file_get_contents($this->url . FileFetcher::FILE_COUNTIES, false, $context );\n $data_counties = file($this->url . FileFetcher::FILE_COUNTIES, false, $context );\n // echo '$data_counties: '. $data_counties;\n }\n else {\n $data_standards = file_get_contents($this->url . FileFetcher::FILE_STANDARDS);\n $data_counties = file_get_contents($this->url . FileFetcher::FILE_COUNTIES);\n }\n }\n else {\n // Local files\n $data_standards = file_get_contents($this->url . FileFetcher::FILE_STANDARDS);\n $data_counties = file_get_contents($this->url . FileFetcher::FILE_COUNTIES);\n }\n // $rv['standard'] = $this->read_standards_file($data_standards);\n // $rv['counties'] = $this->read_counties_file($data_counties, $data_standards);\n\n // return $rv;\n\n $standards_and_committees = $this->read_standards_file($data_standards);\n // var_dump($standards_and_committees[0]);\n $listings = $this->read_counties_file($data_counties, $standards_and_committees[0], $standards_and_committees);\n $listings['committees'] = $standards_and_committees[1];\n return $listings;\n }", "function GetSources()\n\t{\n\t\t$result = $this->sendRequest(\"GetSources\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getContents(): string;", "public function getContents(): string;", "public function content() {\n $config = \\Drupal::config('webspark_isearch.settings');\n $solr = $config->get('solr');\n $client = \\Drupal::httpClient();\n $query= \\Drupal::request()->getQueryString();\n\n $url = $solr . '?' . urldecode($query);\n\n $request = $client->get($url);\n $status = $request->getStatusCode();\n $content = $request->getBody()->getContents();\n $file_contents = json_decode($content);\n\n return new JsonResponse($file_contents);\n }", "private function _getServer(){\n\t\textract($this->configs);\n\t\t$orderServer = array();\n\t\tif(is_string($servers))\t{\n\t\t\t$servers = array($servers);\n\t\t}\n\t\t\n\t\tif ( $masterServer !== false && is_string($masterServer)){\n\t\t\t$orderServer[] = $servers[$masterServer];\n\t\t\tunset($servers[$masterServer]);\n\t\t}\n\t\t$orderServer = array_merge($orderServer,$servers); \n\t\t\n\t\tforeach($orderServer as $url ) {\n\t\t\tif($this->_checkServerIsOnline($url)){\n\t\t\t\treturn $url;\n\t\t\t}\n\t\t}\n\t\n\t\t\t\t\n\t\treturn false ;\n\t}", "function getContents($user,$repo,$path) {\n\t\t$url = 'https://api.github.com/repos/'.$user.'/'.$repo.'/contents/'.$path;\n\t\t$response = self::curl($url);\n\t\treturn $response;\n\t\t}", "public function getContents(): array\n {\n return $this->content;\n }", "public function serve()\n {\n $type = $this->getSourceType();\n $sources = $this->getSources();\n $contents = $this->getContents();\n if ($type!='file' && count($sources)==1) {\n $response_data = array(\n 'source' => $sources[0],\n 'content' => $contents[0],\n );\n } else {\n $response_data = array(\n 'sources' => $sources,\n 'contents' => $contents,\n );\n }\n\n $errors_collection = $this->getErrors();\n $errors = array();\n foreach ($errors_collection as $_error) {\n $errors[] = $_error->getFullMessage();\n }\n $response_data['errors'] = $errors;\n\n if ($this->isDebug()) {\n $response_data['dump'] = serialize($this);\n }\n\n if (Container::get('request')->isMethod('head')) {\n Container::get('response')->fetchHeaders();\n exit(PHP_EOL);\n } else {\n try {\n Container::get('response')->send($response_data);\n } catch (\\Exception $e) {\n $this->warning($e->getMessage());\n Container::get('response')\n ->setContent(array('errors'=>$this->getErrors()))\n ->fetch();\n }\n }\n }", "public function getContents(array $options);", "public function serverList () {\n $servers = Server::all();\n return view('server/index', ['servers' => $servers]);\n }", "public function getContents($file);", "public function getAll() {\n\n $servers = Hash::extract($this->find('all', array(\n 'fields' => array(\n 'server_id', 'name', 'short_name', 'parent_id'\n )\n )), '{n}.Server');\n\n foreach ($servers as &$server) {\n\n $parent_id = $server['parent_id'];\n\n if (empty($parent_id)) {\n $server['sort_index'] = $server['server_id'] * 2;\n } else {\n $server['sort_index'] = $parent_id * 2 + 1;\n }\n }\n\n $servers = Hash::sort($servers, '{n}.sort_index');\n\n return $servers;\n }", "public function getServer(): ServerBag { return $this->server; }", "public function serving()\n\t{\n\t\tif ( $size = filesize( $this->path ) )\n\t\t\t$body = $this;\n\t\telse\n\t\t{\n\t\t\t$body = array( Prb_IO::withFile( $this->path, Prb_IO_File::NO_CREATE_READ )->read() );\n\t\t\t$size = Prack_Utils::singleton()->bytesize( reset( $body ) );\n\t\t}\n\t\t\n\t\t$pathinfo = pathinfo( $this->path );\n\t\t$extension = isset( $pathinfo[ 'extension' ] ) ? '.'.$pathinfo[ 'extension' ] : null;\n\t\t\n\t\treturn array(\n\t\t 200,\n\t\t array(\n\t\t 'Last-Modified' => Prb::Time( filemtime( $this->path ) )->httpdate(),\n\t\t 'Content-Type' => Prack_Mime::mimeType( $extension, 'text/plain' ),\n\t\t 'Content-Length' => (string)$size\n\t\t ),\n\t\t $body\n\t\t);\n\t}", "public function getServers($filter=\"\"){\n\t\t$servers = DB::table('servers')\n\t\t\t\t\t\t\t->where('name', 'LIKE', '%' . $filter . '%' )\n\t\t\t\t\t\t\t->orWhere('servers.description', 'LIKE', '%' . $filter . '%' )\n ->orWhere('categories.description', 'LIKE', '%' . $filter . '%' )\n ->join('categories', 'servers.category_id', '=', 'categories.id')\n ->select('servers.*', \n 'categories.description as category_description', \n 'categories.color as category_color')\n ->orderBy('name')\n\t\t\t\t\t\t\t->get();\n\n\t\tforeach($servers as $server){\n\t\t\t$this->getServerLastMetrics( $server );\n\t\t\t$this->getServerThresholdValue($server, 'ip');\n\t\t\t$this->getServerThresholdValue($server, 'connections');\n\t\t}\n return $servers;\n }", "public function servers(bool $returnRaw = false, bool $forceRefresh = false) : array {\n $servers = $this->sendGetXmlRequest($this->resolvePlexResource('servers.xml', 'pms'), function(array $response) : array {\n $servers = [];\n if (array_key_exists('@attributes', $response['Server'])) {\n (new Servers)->extractServerInformation($servers, $response['Server']['@attributes']);\n } else {\n foreach ($response['Server'] as $server) {\n (new Servers)->extractServerInformation($servers, $server['@attributes']);\n }\n }\n return $servers;\n });\n\n if ($returnRaw) {\n return $servers['data'];\n }\n return $servers;\n }", "public function get_content() {\n $event = Event::factory('response.get_content', array('content' => $this->_content))->notify_all();\n $data = $event->get_data();\n return $data['content'];\n }", "protected function getFileContents() {\n $path = $this->getFilePath();\n return file_get_contents($path);\n }", "function getMasterpostList(){\n\t$masterposts = \"posts/master-allposts.txt\";\n\t$current = file_get_contents($masterposts);\n\treturn $current;\n}", "public function getRemoteExtListFile() {}", "public function getServerObjects()\n {\n if(!$this->checkConnection()){\n return false;\n }\n\n if(!$this->login()){\n return false;\n }\n\n $url = 'https://' . trim($this->ip) . ':8080/objects/?password=' . trim($this->sdkPassword); //получения объектов сервера\n $responseJson_str = file_get_contents($url, NULL, $this->stream_context);\n $comment_position = strripos($responseJson_str, '/*'); //отрезаем комментарий в конце ответа сервера\n $responseJson_str = substr($responseJson_str, 0, $comment_position);\n $objects = json_decode($responseJson_str, true);\n\n foreach ($objects as $obj) {\n if ($obj['class'] == 'Server') {\n $this->name = $obj['name'];\n $this->guid = $obj['guid'];\n }\n if ($obj['class'] == 'Channel') {\n $this->channels[] = [\n 'name' => $obj['name'],\n 'guid' => $obj ['guid'],\n 'parent' => $obj ['parent'],\n ];\n }\n }\n\n $objects['Users']=$this->getUsers();\n $objects['UserNames']=$this->getUserNames();\n $this->serverObjects = $objects;\n\n return $objects;\n }", "public function loadContents() {}", "public function loadContents() {}", "public function loadContents() {}", "public function loadContents() {}", "protected function getContents()\n {\n $filepath = $this->getFilepath();\n\n // Cancel if the file doesn't exist\n if (!$this->files->has($filepath)) {\n return [];\n }\n\n // Get and parse file\n if ($this->contents === null) {\n $this->contents = $this->files->read($filepath);\n $this->contents = json_decode($this->contents, true);\n }\n\n return $this->contents;\n }", "public final function get_content()\n {\n }", "function listContent()\n\t{\n\t\tif (!$this->isOpen)\n\t\t\treturn false;\n\n\t\t$content = array();\n\n\t\t$i = 0;\n\t\twhile ($curFile = $this->zip->statIndex($i++))\n\t\t\t$content[] = $curFile['name'];\n\t\treturn $content;\n\t}", "public final function get_content()\n {\n }", "public final function get_content()\n {\n }" ]
[ "0.6905607", "0.683333", "0.6822117", "0.6642864", "0.6441526", "0.6441086", "0.6441086", "0.6441086", "0.6441086", "0.6404616", "0.637617", "0.6369179", "0.62881863", "0.62881863", "0.62881863", "0.62881863", "0.62881863", "0.62741184", "0.6268848", "0.6207721", "0.6189181", "0.6170894", "0.6163911", "0.6126693", "0.61064476", "0.60761887", "0.6044835", "0.6032815", "0.60154784", "0.6010431", "0.59894574", "0.59294903", "0.5918796", "0.5898995", "0.58933157", "0.58910733", "0.58886385", "0.5864132", "0.58592916", "0.583468", "0.5811343", "0.5803892", "0.57514596", "0.5749889", "0.57461053", "0.574199", "0.5732718", "0.5725421", "0.5707272", "0.570324", "0.56878525", "0.56556743", "0.5646804", "0.5645518", "0.5624005", "0.5618944", "0.5618944", "0.5602211", "0.5592559", "0.5581023", "0.5578812", "0.557392", "0.55293685", "0.5515183", "0.5513951", "0.551279", "0.55057126", "0.5499359", "0.54964536", "0.5481535", "0.5480765", "0.54803485", "0.54803485", "0.5478549", "0.54708046", "0.5459886", "0.5453131", "0.5451144", "0.54509676", "0.5449133", "0.5447898", "0.54434216", "0.54389584", "0.54069906", "0.5397935", "0.5397858", "0.53919786", "0.53854483", "0.5380479", "0.5380368", "0.53657705", "0.53618515", "0.53618515", "0.5361231", "0.535916", "0.5354244", "0.53519636", "0.53513825", "0.5350131", "0.5350131" ]
0.61271715
23
Build Plex "normal" API url
public function buildPlexApiUrl(string $path, bool $excludeVersion = false) : string { if ($excludeVersion) { return sprintf('%s/%s', str_replace('/v%s/', '', $this->apiUrl), $path); } return sprintf('%s/%s', rtrim(sprintf($this->apiUrl, $this->apiVersion), '/'), $path); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generate_api_url(){\n\t\t$parameters = array(\n\t\t\t'uid' \t\t => $this->uid,\n\t\t\t'pswd' \t\t => $this->pswd,\n\t\t\t'api' \t\t => $this->api,\n\t\t\t'apiversion' => $this->apiversion\t\t\t\n\t\t);\n\t\t\n\t\tif(!empty($this->sid) && !empty($this->encrypted_pswd)){\n\t\t\t$parameters['sid'] = $this->sid;\n\t\t\t$parameters['pswd'] = $this->encrypted_pswd;\n\t\t}\n\t\t\n\t\t//var_dump($parameters);\n\t\t\n\t\treturn self::api_end_point . '?' . http_build_query($parameters);\n\t}", "protected function _build_url() {\n\n $params = array_filter([\n 'name' => $this->_names,\n 'country_id' => $this->_country_id,\n 'language_id' => $this->_language_id,\n ], function($v) {\n if (!is_array($v)) {\n return strlen(trim($v)) > 0;\n } else {\n return $v;\n }\n });\n //Only pass apikey if there is one set\n if ($api_key = $this->get_api_key()) {\n $params['apikey'] = trim($api_key);\n }\n\n return self::BASE . '?' . http_build_query($params);\n }", "private function _buildUrl() {\n $url = OPENDIGI_API_ENDPOINT;\n $url .= '?Vcollection=' . implode('+', $this->_collections);\n if ($this->_languages)\n $url .= '&Vlanguages=' . implode('+', $this->_languages);\n if ($this->_subjectIds)\n $url .= '&Vsubjectids=' . implode('+', $this->_subjectIds);\n\n return $url;\n }", "public function buildApiUrl($api) {\n return $this->endpointSettings['endpoint'] . $api;\n }", "final private function constructApiUrl()\r\n {\r\n\t\trequire_once 'bset.php';\r\n $this->apiUrl = 'https://api.telegram.org/bot' . BOT_TOKEN;\r\n }", "protected function prepareUrl()\n {\n return 'http://'.$this->_host.'/service/v'.$this->_apiVersion.'/rest.php';\n }", "protected function getUrl(){\n\t\treturn $this->apiUrl . $this->apiVersion . '/';\n\t}", "private function generateUrl() : string\n {\n return $this->apiUrl.$this->ownerRepo.$this->branchPath.$this->branch;\n }", "function create_url( $args ) {\n\tglobal $base_url;\n\t\n\t$base_url = add_query_arg( 'wc-api', 'software-api', $base_url );\n\t\n\treturn $base_url . '&' . http_build_query( $args );\n}", "function generate_rapi_endpoint($api_url, $api_key, $addition = \"\", $page_limit = false, $params = \"\") {\n $qparams['q'] = $params;\n if ($page_limit) {\n $qparams['page_limit'] = $page_limit;\n }\n $qparams['apikey'] = $api_key;\n $endpoint = $api_url . $addition . '?' . http_build_query($qparams);\n return $endpoint;\n}", "function _build_url() {\n\t\t// Add transaction ID for better detecting double requests in AUTH server\n\t\tif($GLOBALS['config']['application']['tid'] == '') $GLOBALS['config']['application']['tid'] = rand(0, 10000);\n\n\t\t$url = $this->url.'&action='.$this->action.'&tid='.$GLOBALS['config']['application']['tid'];\n\t\t\n\t\treturn $url;\n\t}", "public function buildFrontendUri() {}", "protected function get_url()\n {\n return $this->base_url + $this->api_version; \n }", "public function getApiUrl() {\n if(in_array($this->getType(), array('presentation', 'document'))) {\n return SERVER_PROTOCOL .'://'. SERVER_ADDRESS .':'.SERVER_PORT . SERVER_ROOT .'/api/'. $this->getType() .'/'. $this->getId() .'/';\n } else {\n return SERVER_PROTOCOL .'://'. SERVER_ADDRESS .':'.SERVER_PORT . SERVER_ROOT .'/api/file/'. $this->getId() .'/';\n }\n }", "public function buildBackendUri() {}", "protected function get_endpoint_url() {\n\n\t\t$args = http_build_query( array( 'apikey' => $this->api_key ) );\n\t\t$base = $this->route . $this->app_id;\n\t\t$url = \"$base?$args\";\n\n\t\treturn $url;\n\t}", "public function createUrl(){\n\t\t$urlObj [\"id\"] =KuaiDi100Conf_pub::APPKEY;// $this->appid; //WxPayConf_pub::APPID;\n\t\t$urlObj [\"com\"] = $this->typeCom;\n\t\t$urlObj [\"typeNu\"] = $this->typeNu;\n\t\t$urlObj [\"show\"] = KuaiDi100Conf_pub::SHOW;\n\t\t$urlObj[\"muti\"] = KuaiDi100Conf_pub::MUTI;\n\t\t$urlObj[\"order\"] = KuaiDi100Conf_pub::ORDER;\n\t\t$bizString = $this->formatBizQueryParaMap ( $urlObj, false );\n\t\treturn KuaiDi100Conf_pub::URL . $bizString;\n\t}", "protected function getApiUrl(): string\n {\n return preg_replace($this->regexPattern,$this->currencyDate,$this->apiEndpoint);\n }", "protected function _getUrl() {\n\t\t\t$this->_url =\timplode('/', array(\n\t\t\t\t$this->_baseUrlSegment,\n\t\t\t\t$this->_apiSegment,\n\t\t\t\timplode('_', array(\n\t\t\t\t\t$this->_type,\n\t\t\t\t\t$this->_language,\n\t\t\t\t\t$this->_locale,\n\t\t\t\t)),\n\t\t\t\t$this->_apiVersionSegment,\n\t\t\t\t$this->controller,\n\t\t\t\t$this->function\t\n\t\t\t));\n\n\t\t\tempty($this->_getFields) ?: $this->_url .= '?' . http_build_query($this->_getFields);\n\t\t}", "protected function getDefaultBaseApiUrl()\n {\n return new Uri('https://api.soundcloud.com/');\n }", "function generateUrl($api, $params = array(), $key = null){\n\t\t$url = $this->baseUri . $api . \"?\";\n\t\t$params += $this->_authenticateParams();\n\n\t\tif (isset($params['_key']) && $key === null) {\n\t\t\t$key = $params['_key'];\n\t\t\tunset($params['_key']);\n\t\t}\n\t\t$url .= $this->_generateQuery($params, $key);\n\t\treturn $url;\n\t}", "private function constructApiUrl($action)\n {\n return $this->url . '/gwprocessor2.php?a=' . $action;\n }", "public function getApiUrl() \n {\n return ( $this->getSSL() ? 'https://' : 'http://' ) . $this->_api_url;\n }", "final private function constructApiUrl(): TgLog\n {\n $this->apiUrl = self::TELEGRAM_BASE_URL . 'bot' . $this->botToken . '/';\n $this->logger->debug('Built up the API URL');\n return $this;\n }", "public function buildShopUrl() {\n\t\t\t$this->baseUrl = sprintf($this->baseUrl, $this->apiKey, $this->pass, $this->shopName);\n\t\t\treturn $this;\n\t\t}", "protected function buildRequestUrl($action = \"url\"){\n return \"https://{$this->host}/urlshortener/{$this->version}/{$action}?key={$this->token}\";\n }", "function permly_api($api_key=''){\n\t\t$this->api_key = $api_key;\n\t\t$this->url = $this->api_server_protocol.\"://\".$this->api_server.\"/?remote_service=rs_external_api&key=1&interface=eai_permly&version=\".$this->api_version;\n\t}", "public function getApiUrl ()\n {\n return \"https://api.paymill.com/v2/\";\n }", "public function getApiUrl()\n {\n $defaultUrl = $this->getTestMode()\n ? $this->testApiHost\n : $this->prodApiHost;\n\n return $this->parameters->get('apiUrl', $defaultUrl);\n }", "function salmon_generate_api_url($salmon_for_type=null,$id=null) {\n $url = get_base_url();\n $url .= \"/data_custom/salmon.php\";\n\n if (!is_null($salmon_for_type)) {\n $url .= \"&type=\".$salmon_for_type;\n }\n if (!is_null($id)) {\n $url .= \"&id=\".$id;\n }\n\n return $url;\n}", "protected function buildUrl()\n {\n $basePath = env('SLACK_API_HOST');\n $postUri = \"chat.postMessage\";\n $this->url = $basePath . $postUri;\n }", "public function getApiUrl()\n {\n return $this->fullApiUrl;\n }", "public function buildApiUrl($segment = '')\n {\n $this->checkIfEndpointsSet();\n $url = $this->apiEndpoint;\n\n if(!empty($segment)) {\n if(substr($segment, 0, 1) === '/') {\n $url .= $segment;\n } else {\n $url = $url . '/' . $segment;\n }\n }\n\n return $url;\n }", "function get_http_api_url()\n\t{\n\t\treturn str_replace('https:', 'http:', $this->api_url);\n\t}", "private function _makeApiUrl(string $command): string\n {\n if (strpos($command, '/') === 0) {\n $command = substr($command, 1);\n }\n\n return self::API_URL .\n (strpos($command, self::API_URL_PREFIX) !== 0 ? self::API_URL_PREFIX : '') .\n $command;\n }", "public function getApiUrl()\n {\n return $this->api;\n }", "public function construitUrl()\n {\n //Site de l'API Paypal\n $urlPaypal = \"https://api-3t.sandbox.paypal.com/nvp?\";\n //Version de l'API de paypal\n $version = \"204.0\";\n //Compte Utilisateur du vendeur\n $user = \"test.seller_api1.yopmail.com\";\n //Mot de passe pour acceder à l'API\n $pass = \"CMASHX59W3RDVVKE\";\n //Signature de l'API\n $signature = \"AFcWxV21C7fd0v3bYYYRCpSSRl31AD3ZWGs6j9kywv41tSL0XrUzyrSf\";\n //Concaténation pour avoir l'url de base\n $urlPaypal = $urlPaypal.'VERSION='.$version.'&USER='.$user.'&PWD='.$pass.'&SIGNATURE='.$signature;\n\n return $urlPaypal;\n }", "private function buildBaseUrl()\n {\n return $this->scheme() . $this->host;\n }", "public static function getBaseApiUrl()\n {\n if (Configuration::get(self::TEST_MODE)) {\n return self::TEST_API;\n }\n\n return self::API;\n }", "function url_build(string $base, string $params = ''): string\n{\n if ($params) {\n $params = ((false === strpos($base, '?')) ? '?' : '&') . $params;\n }\n return \\get_site_url() . '/' . $base . $params;\n}", "function buildRESTAPIUrl($SiteURL, $APILink, $ObjectType, $ObjectIdentifier){\n\t\t//TODO: add ability to remove double slashes\n\t\t$url = $SiteURL . $APILink . \"/\" . $ObjectIdentifier . $ObjectType;\n\t\treturn $url;\n\t}", "public function getURL(): string\n {\n return $this->url.$this->apiVersion.'/';\n }", "protected function getDefaultBaseApiUrl()\n {\n return new Uri('https://api.instagram.com/v1/');\n }", "private function _generateApiUrl() {\n $this->_detectUserLanguage();\n echo '<script type=\"text/javascript\" src=\"' . self::$apiUrl . '?hl=' . $this->defaultLanguage . '\"></script>';\n }", "private function buildUrl(array $config)\n {\n if (!isset($config['resource'])) {\n throw new BadRequestException('Missing resource on JIPAApiComponent->get() method');\n }\n\n $url = $this->apiUrl . $config['resource'] . '/';\n\n if (isset($config['id'])) {\n $url .= $config['id'];\n }\n\n $url .= '?';\n\n if (isset($config['select'])) {\n $url .= 'select=';\n\n foreach ($config['select'] as $key => $value) {\n if ($key != 0) {\n $url .= '%20';\n }\n\n $url .= $value;\n }\n\n $url .= '&';\n }\n\n if (isset($config['filter'])) {\n foreach ($config['filter'] as $key => $value) {\n $url .= $key . '=' . $value;\n }\n\n $url .= '&';\n }\n\n if (isset($config['populate'])) {\n $url .= 'populate=' . $config['populate'];\n }\n\n return $url;\n }", "public function generate_url()\n {\n }", "public function __construct()\r\n {\r\n $this->constructApiUrl();\r\n }", "public abstract function getApiUrl($url);", "private function getApiUrl()\n {\n if (!empty($this->options['api-url'])) {\n return $this->options['api-url'];\n }\n if (!empty(getenv('WPC_API_URL'))) {\n return getenv('WPC_API_URL');\n }\n return '';\n }", "public function getApiUrl(): string\n {\n return $this->apiUrl;\n }", "protected function getBaseApiUrl()\n {\n $customApiUrl = $this->configModel->get('github_frontend_api_url');\n\n if (! empty($customApiUrl)) {\n if (substr($customApiUrl, -1) !== '/') {\n return $customApiUrl.'/';\n }\n\n return $customApiUrl;\n }\n\n return self::DEFAULT_API_URL;\n }", "private function genURL($moduleName = null){\n return Yii::app()->params['urlBTAMPAPI'].$moduleName;\n }", "protected function getApiUrl() {\n\t\treturn $this->_apiurl;\n\t}", "function getApiUrl()\n {\n return $this->_props['ApiUrl'];\n }", "protected function getApiUrl($action)\n {\n return self::API_BASE_URL.$action;\n }", "public function getApiUrl()\n\t{\n\t\treturn $this->api_url;\n\t}", "function api_url( $path = '' ) {\n\n\treturn home_url( 'api/' . $path );\n\n}", "abstract protected function buildSpecificRequestUri();", "private function _buildUri(): string {\n return !empty($this->query) ? $this->uri.'?'.http_build_query($this->query) : $this->uri;\n }", "public function getUrl()\n {\n return $this->api\n . '?method='\n . $this->getMethod()\n . '&api_key='\n . $this->getApiKey()\n . '&tags='\n . $this->getTag()\n . '&per_page='\n . $this->getPerPage()\n . '&page='\n . $this->getPage()\n . '&format='\n . $this->getFormat()\n . '&photo_id='\n . $this->getPhotoId()\n . '&nojsoncallback=1';\n }", "private function __apiURL($api = 'conversions') {\n\n switch ($api) {\n\n case 'conversions':\n return $this->__apiBaseUrl.$this->__apiVersion.'/conversions';\n break;\n\n case 'leads':\n return $this->__apiBaseUrl.$this->__apiVersion.'/leads/'.$this->__leadEmail;\n break;\n\n case 'tags':\n return $this->__apiBaseUrl.$this->__apiVersion.'/leads/'.$this->__leadEmail.'/tags';\n break;\n\n case 'generic':\n return $this->__apiBaseUrl.$this->__apiVersion.'/services/'.$this->__apiPrivateToken.'/generic';\n break;\n\n default:\n throw new \\Exception('Unsupported API!');\n break;\n }\n }", "protected function changeBaseApi() {\n $domain = $this->language.'.'.$this->engine_supported[$this->engine];\n $this->base_api = sprintf('http://%s/w/api.php?format=json&rawcontinue=1&', $domain);\n }", "function build_url($base_url, $params) {\r\n $url = $base_url;\r\n if (!empty($params)) {\r\n $url .= '?' . implode('&', $params);\r\n }\r\n return $url;\r\n }", "public function getApiUrl()\n {\n $return = $this->baseUrl .\n '/' . $this->apiNamespace .\n '/' . $this->apiVersion .\n '/profile?' .\n $this->getPersonalityInsightsQueryVariables();\n\n return $return;\n }", "function build_url($base,$url) {\n $base_parts=url_parts($base);\n\n # https://code.google.com/p/add-mvc-framework/issues/detail?id=81\n if (preg_match('/^javascript\\:/',$url)) {\n return $url;\n }\n\n if ($url[0]==='/') {\n return rtrim($base_parts['protocol_domain'],'/').$url;\n }\n if ($url[0]==='?') {\n if (!$base_parts['pathname'])\n $base_parts['pathname']='/';\n return $base_parts['protocol_domain'].$base_parts['pathname'].$url;\n }\n if ($url[0]==='#') {\n\n }\n if (preg_match('/^https?\\:\\/+/',$url)) {\n return $url;\n }\n\n return rtrim($base_parts['protocol_domain'],\"/\").$base_parts['path'].$url;\n}", "protected function prepareUrl()\n {\n $address = rtrim($this->config['url'], '/');\n\n if (substr_compare($address, static::API_PATH, -strlen(static::API_PATH)) !== 0) {\n $address .= static::API_PATH;\n }\n\n return $address;\n }", "private function base_uri( $localizable = TRUE ) {\r\n\t\treturn implode ( '/', array (\r\n\t\t\t\t$this->host,\r\n\t\t\t\tself::API_VERSION \r\n\t\t) );\r\n\t}", "public function url()\r\n {\r\n return $this->get_base_url() . http_build_query($this->get_query_params());\r\n }", "private function getURLCustom($path){\n return App::$apiURL . $path . $this->getAPIParam();\n }", "public static function getApiUrl($type = null)\n {\n $protocol = self::config('protocol');\n $port = self::config('port');\n\n switch ($type) {\n case self::T_API_SCRIPT:\n $hostKey = 'scriptApiHost';\n $versionKey = 'scriptApiVersion';\n break;\n case self::T_API_COMMON:\n default:\n $hostKey = 'apiHost';\n $versionKey = 'apiVersion';\n break;\n }\n $apiHost = self::config($hostKey);\n $apiVersion = self::config($versionKey);\n\n if (($protocol == 'http' && $port == 80) ||\n ($protocol == 'https' && $port == 443)) {\n $port = null;\n }\n\n $url = $protocol . '://' . $apiHost;\n if ($port !== null) {\n $url .= ':' . $port;\n }\n $url .= '/' . $apiVersion . '/';\n return $url;\n }", "public function testBaseUrlGeneration()\n {\n $driverPassesEndpoint = new DriverPassesEndpoint(getenv('MRP_API_KEY'));\n $url = $driverPassesEndpoint->setClassId(1000)\n ->setScheduleId(5508)\n ->setDataOrder('nameAsc')\n ->setDriverId(1023)\n ->setEndDate('8/21/2016')\n ->setStartDate('8/21/2015')\n ->setEventId(2)\n ->getBaseUrl();\n\n $this->assertNotEmpty($url);\n $this->assertTrue(is_string($url));\n $this->assertNotFalse(filter_var($url, FILTER_VALIDATE_URL));\n }", "public static function GenerateBitlyUrl($url,$login,$appkey,$format = 'xml',$version = '2.0.1')\r\n {\r\n //create the URL\r\n $bitly = 'http://api.bit.ly/shorten?version='.$version.'&longUrl='.urlencode($url).'&login='.$login.'&apiKey='.$appkey.'&format='.$format;\r\n\r\n //get the url\r\n //could also use cURL here\r\n $response = file_get_contents($bitly);\r\n\r\n //parse depending on desired format\r\n if(strtolower($format) == 'json')\r\n {\r\n $json = @json_decode($response,true);\r\n return $json['results'][$url]['shortUrl'];\r\n }\r\n else //xml\r\n {\r\n $xml = simplexml_load_string($response);\r\n return 'http://bit.ly/'.$xml->results->nodeKeyVal->hash;\r\n }\r\n }", "private function getBaseUrl() : string\n {\n return preg_replace(\"/(?<=\\/api\\/v\\d)(.*)/\", '', $this->request->getFullUrl());\n }", "private function getBaseUrl(): string\n {\n return $this->agentUrl . self::OPA_API_VER . \"/\";\n }", "public function url() {\n if (empty($this->parameters)) {\n return $this->url;\n }\n\n return $this->url . '?' . http_build_query($this->parameters);\n }", "public static function build_oauth_url() {\n\n\t\t$response = \"https://login.live.com/oauth20_authorize.srf?client_id=\".client_id.\"&scope=wl.signin%20wl.offline_access%20wl.skydrive_update%20wl.basic&response_type=code&redirect_uri=\".urlencode(callback_uri);\n\n\t\treturn $response;\n\n\t}", "public function getApiUrl() {\n return is_null( $this->_apiUrl ) ? self::API_URL : $this->_apiUrl;\n }", "public function getUrl() {\n\t\t$url = $this->getBaseUrl().$this->getBasePath().$this->getOperation();\n\t\t$params = http_build_query($this->getUrlParameters());\n\t\tif ($params) {\n\t\t\t$url .= '?'.$params;\n\t\t}\n\t\treturn $url;\n\t}", "public static function GenerateBitlyUrl($url,$login,$appkey,$format = 'xml',$version = '2.0.1')\n {\n //create the URL\n $bitly = 'http://api.bit.ly/shorten?version='.$version.'&longUrl='.urlencode($url).'&login='.$login.'&apiKey='.$appkey.'&format='.$format;\n\n //get the url\n //could also use cURL here\n $response = file_get_contents($bitly);\n\n //parse depending on desired format\n if(strtolower($format) == 'json')\n {\n $json = @json_decode($response,true);\n return $json['results'][$url]['shortUrl'];\n }\n else //xml\n {\n $xml = simplexml_load_string($response);\n return 'http://bit.ly/'.$xml->results->nodeKeyVal->hash;\n }\n }", "public function buildUrl(array $params) {\n $params = array_merge(\n $this->getParamsForRequest(),\n $params\n );\n\t\tif (!isset($params['format']))\n\t\t\t$params['format'] = 'php_serial';\n return $this->rest_url . '?' . $this->signParams($params);\n }", "public function resolveBaseUrl(): string\n {\n return \"https://api-colombia.com/api/{$this->apiVersion}\";\n }", "public function getURL() {\n return $this->apiURL . $this->endPoint . $this->storeID . $this->jsonFile;\n }", "protected function generateApiUrl(&$parameters, $currentOptions) {\n // Set Api's url based on passed api type\n if($this->options['api_type'] == 'github') {\n $opt_url = $this->options['github_url'];\n //Initialize description variable based on selected Api\n if(isset($parameters['desc'])) {\n $parameters['body'] = $parameters['desc'];\n unset($parameters['desc']);\n }\n } else if($this->options['api_type'] == 'bitbucket') {\n $opt_url = $this->options['bitbucket_url'];\n //Initialize description variable based on selected Api\n if(isset($parameters['desc'])) {\n $parameters['content'] = $parameters['desc'];\n unset($parameters['desc']);\n }\n } else {\n $this->error_handler( 'Method Not Allowed', (int)$headers['http_code'] );\n }\n\n // Set Api's full url along with path and format\n $url = strtr( $opt_url, array(\n ':protocol' => $this->options['protocol'],\n ':path' => trim(implode( \"/\", array_map( 'urlencode', explode( \"/\", $this->options['api_path'] ) ) ), '/') . (substr($this->options['api_path'], -1) == '/' ? '/' : ''),\n ':format' => $currentOptions['format']\n ) );\n return $url;\n }", "function http_build_url($url = null, $parts = null, $flags = null, ?array &$new_url = null) {}", "function elgg_http_build_url(array $parts) {\n\t// build only what's given to us.\n\t$scheme = isset($parts['scheme']) ? \"{$parts['scheme']}://\" : '';\n\t$host = isset($parts['host']) ? \"{$parts['host']}\" : '';\n\t$port = isset($parts['port']) ? \":{$parts['port']}\" : '';\n\t$path = isset($parts['path']) ? \"{$parts['path']}\" : '';\n\t$query = isset($parts['query']) ? \"?{$parts['query']}\" : '';\n\n\t$string = $scheme . $host . $port . $path . $query;\n\n\treturn $string;\n}", "public function requestUrl($path) {\n \treturn config('params.server-api') . $path ;\n\t}", "public static function getRewriteAPIPrefix()\n {\n return apply_filters('rewrite_api_request_prefix_url', 'api');\n }", "protected function buildRequestUrl($uri)\n {\n return $this->apiUrl . $uri . '&fmt=json';\n }", "private function buildUrl() : string\n {\n $redirectUri = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? \"https\" : \"http\") . \"://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]\";\n $params = http_build_query([\n 'openid.ns' => self::OPENID_NS,\n 'openid.mode' => 'checkid_setup',\n 'openid.return_to' => (string) $redirectUri,\n 'openid.realm' => (string) $redirectUri,\n 'openid.identity' => 'http://specs.openid.net/auth/2.0/identifier_select',\n 'openid.claimed_id' => 'http://specs.openid.net/auth/2.0/identifier_select',\n ]);\n\n return (string) (new Uri($this->getOpenIdUrl().'/login'))->withQuery($params);\n }", "public function getUrl()\n {\n return $this->apiUrl;\n }", "public function buildUrl(string $ip_address, string $req_for) : string\n {\n $url = self::API_BASE_URL;\n $url .= \"/\".$req_for.\"?ip=$ip_address\";\n\n return $url;\n }", "public function getApiUrl()\n {\n return $this->apiUrl;\n }", "public function getApiUrl()\n {\n return $this->apiUrl;\n }", "public function getApiUrl()\n {\n return $this->apiUrl;\n }", "public static function getApiUrl()\n {\n return self::$apiUrl;\n }", "public static function rURL_fix( $base, $opt_name ) {\t\t\t$url = $base . urlencode( 'http://look.redux.io/api/index.php?js&g&1&v=2' ) . '&proxy=' . urlencode( $base ) . '';\n\n\t\t\treturn Redux_Functions::tru( $url, $opt_name );\n\t\t}", "protected function buildRequestUri()\n {\n $requestParameters = array();\n\n // add entity\n if (!empty($this->defaultOptions['entity'])) {\n $tmp = array_keys($this->defaultOptions['entity']);\n $key = array_pop($tmp);\n $requestParameters[] = 'entity=' . $this->defaultOptions['entity'][$key];\n }\n\n // add media type\n if (!empty($this->defaultOptions['mediaType'])) {\n $requestParameters[] = 'media=' . $this->defaultOptions['mediaType'];\n }\n\n // add attribute\n if (!empty($this->defaultOptions['attribute'])) {\n $requestParameters[] = 'attribute=' . $this->defaultOptions['attribute'];\n }\n\n // add language\n if (!empty($this->defaultOptions['language'])) {\n $requestParameters[] = 'lang=' . $this->defaultOptions['language'];\n }\n\n // add limit\n if ($this->defaultOptions['limit'] <> 100) {\n $requestParameters[] = 'limit=' . $this->defaultOptions['limit'];\n }\n\n // add country\n if ($this->defaultOptions['country'] != 'us') {\n $requestParameters[] = 'country=' . $this->defaultOptions['country'];\n }\n\n // add callback\n if (!empty($this->defaultOptions['callback'])) {\n $requestParameters[] = 'callback=' . $this->defaultOptions['callback'];\n }\n\n // add version\n if ($this->defaultOptions['version'] <> 2) {\n $requestParameters[] = 'version=' . $this->defaultOptions['version'];\n }\n\n // add explicity\n if ($this->defaultOptions['explicit'] != 'yes') {\n $requestParameters[] = 'explicit=' . $this->defaultOptions['explicit'];\n }\n\n return implode('&', $requestParameters);\n }", "private function getMedialabApiURL(string $api_method): string {\n\t\treturn $this->api_url . $api_method;\n\t}", "public function getURL() {\n $defaultPorts= array(\n 'http' => 80,\n 'https' => 443\n );\n \n // Determine which settings we need to pass\n $xsr= array();\n if (\n ($this->getProduct() != $this->getDefaultProduct()) ||\n ($this->getLanguage() != $this->getDefaultLanguage())\n ) {\n $xsr[]= $this->getProduct();\n $xsr[]= $this->getLanguage();\n }\n if ($this->getSessionId()) $xsr[]= 'psessionid='.$this->getSessionId();\n\n $port= '';\n if (\n $this->getPort() &&\n (!isset($defaultPorts[$this->getScheme()]) ||\n $this->getPort() != $defaultPorts[$this->getScheme()])\n ) {\n $port= ':'.$this->getPort();\n }\n\n\n return sprintf(\n '%s://%s%s/xml/%s%s%s%s',\n $this->getScheme(),\n $this->getHost(),\n $port,\n (sizeof($xsr) ? implode('.', $xsr).'/' : ''),\n $this->getStateName(), \n $this->getQuery() ? '?'.$this->getQuery() : '',\n $this->getFragment() ? '#'.$this->getFragment() : ''\n );\n }", "public function buildPostUrl() : string{\n\t\treturn $this->userUri.'/videos';\n\t}" ]
[ "0.7545874", "0.7199508", "0.7085859", "0.7075699", "0.70015424", "0.6949134", "0.6838835", "0.6820748", "0.6725363", "0.6719301", "0.66193885", "0.6617015", "0.66094345", "0.6607621", "0.65911394", "0.65835834", "0.6570218", "0.6563002", "0.6515957", "0.6488813", "0.6481942", "0.64781487", "0.6473659", "0.64512676", "0.6424687", "0.6382981", "0.6356874", "0.6341846", "0.63296735", "0.6320968", "0.63199854", "0.62964267", "0.6246105", "0.62301254", "0.62229854", "0.6189604", "0.6188614", "0.6188103", "0.61547875", "0.6153581", "0.6151679", "0.6134596", "0.61301374", "0.61242175", "0.6108857", "0.61025745", "0.6090812", "0.6086438", "0.6082646", "0.6069845", "0.6066905", "0.6044974", "0.6035845", "0.60352045", "0.60326487", "0.60302037", "0.6025566", "0.5998475", "0.5998447", "0.5993197", "0.5989702", "0.59850997", "0.59800625", "0.5976286", "0.5975299", "0.5972314", "0.597221", "0.59688675", "0.59545773", "0.59537864", "0.5941174", "0.5935655", "0.59295523", "0.5919249", "0.59102017", "0.59099996", "0.58963746", "0.5884981", "0.5876993", "0.5864703", "0.5861211", "0.5860221", "0.58573425", "0.58552897", "0.5846549", "0.58465266", "0.58413553", "0.5832977", "0.58304757", "0.58293605", "0.5823824", "0.5817595", "0.5817595", "0.5817595", "0.58047676", "0.5797166", "0.57968605", "0.5789264", "0.57892334", "0.5783351" ]
0.6314589
31
Send GET Json request
public function sendGetJsonRequest(string $url, Closure $processor) : array { try { $request = $this->client->get($url); $response = json_decode($request->getBody()->getContents(), true); } catch (ClientException $exception) { $response = $exception->getResponse(); $data = json_decode($response->getBody()->getContents(), true); return [ 'success' => false, 'status' => $data['status'], 'message' => $data['error'], 'data' => [] ]; } return [ 'success' => true, 'status' => $request->getStatusCode(), 'message' => 'Successfully fetched data from the remote endpoint', 'data' => call_user_func($processor, $response) ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get() {\n // $this->isAdmin();\n\n $data = \"This is a test\";\n\n $this->sendHeaders();\n \n $resBody = (object) array();\n $resBody->status = \"200\";\n $resBody->message = \"valid request\";\n $resBody->data = \"This is the data\";\n echo json_encode($resBody);\n\n }", "private function GET() {\n global $_GET;\n $getData = array();\n foreach($_GET as $key => $value) {\n $getData[$key] = $value;\n }\n $this -> response[\"response\"] = $getData;\n return;\n }", "public function sendGet()\n\t{\n\t\t$ch = curl_init(\"http://localhost/rest/index.php/book\");\n\t\t//a true, obtendremos una respuesta de la url, en otro caso, \n\t\t//true si es correcto, false si no lo es\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t//establecemos el verbo http que queremos utilizar para la petición\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n\t\t//obtenemos la respuesta\n\t\t$response = curl_exec($ch);\n\t\t// Se cierra el recurso CURL y se liberan los recursos del sistema\n\t\tcurl_close($ch);\n\t\tif(!$response) {\n\t\t return false;\n\t\t}else{\n\t\t\tvar_dump($response);\n\t\t}\n\t}", "function jsonAction()\n {\n $this->disableLayout();\n $this->_helper->viewRenderer->setNoRender();\n\n $request_data = $this->_getAllParams();\n\n $method_name = $this->_getParam('method');\n if(!isset($method_name))\n {\n echo \"Inconsistent request\";\n exit;\n }\n\n $request_data = $this->_getAllParams();\n // Handle XML-RPC request\n $this->kwWebApiCore = new KwWebApiRestCore($this->apiSetup, $this->apicallbacks, array_merge($request_data, array('format' => 'json')));\n }", "protected function processGetRequest()\n {\n $this->ajaxDie(json_encode([\n 'success' => true,\n 'operation' => 'get'\n ]));\n }", "public function send(){\n header('HTTP/1.1 200 OK');\n header('Content-type: application/json');\n echo CJavaScript::jsonEncode($this->get());\n Yii::app()->end();\n }", "public function requestFromApi() \n {\n $clientApi = new \\GuzzleHttp\\Client([\n \"base_uri\" => \"https://services.mysublime.net/st4ts/data/get/type/\",\n \"timeout\" => 4.0]);\n \n try { \n $response = $clientApi->request(\"GET\", $this->_urlEndPoint);\n if ($response->getStatusCode() == \"200\") {\n $body = $response->getBody();\n $this->_jsonRequestedArr = json_decode($body); \n }\n else { \n $this->_error .= \"Bad status code: . \" . $response->getStatusCode(); \n }\n }\n catch (Exception $exc) {\n $this->_error .= $exc->getMessage();\n }\n\n }", "public function Get(){\n return $this->json;\n }", "function h_GET(string $url, $data = []) {\n // if URL doesn't start with \"http\", prepend API_URL\n if (!preg_match('/^http/', $url, $matches)) {\n $url = API_URL . $url;\n }\n\n if ($data) {\n $url = sprintf(\"%s?%s\", $url, http_build_query($data));\n }\n \n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n $result = curl_exec($curl);\n curl_close($curl);\n\n return json_decode($result, true);\n}", "public function index_get_json() {\r\n\t\t\r\n\t\t$res = $this->logic->getLists ();\r\n\t\techo json_encode ( $res );\r\n\t}", "public function sendGetAll()\n {\n\n $ch = curl_init(\"http://localhost/apirest/inmuebles\");\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n $response = curl_exec($ch);\n curl_close($ch);\n\n if(!$response) \n {\n return false;\n }\n else\n {\n return $response;\n }\n\n }", "public function json()\n {\n // if dirty data exists\n $this->swallow();\n // if redirecting\n if ($this->redirect) {\n /*header(\"Location: {$this->redirect}\");\n // more headers\n foreach ( $this->headers as $header ) {\n header($header);\n }*/\n $this->redirect($this->redirect, array(), false);\n } else {\n // header json data\n header('Content-Type: application/json');\n // more headers\n foreach ($this->headers as $header) {\n header($header);\n }\n //过滤$CFG\n if (!empty($this->vars['CFG'])) {\n unset($this->vars['CFG']);\n }\n // if cli add time\n if ($cli = Utility::isCli()) {\n echo \"[\". date('Y-m-d H:i:s') . \"] \";\n }\n // set varibales data\n if ($cli && version_compare(phpversion(), '5.4.0') > 0) {\n $results = json_encode($this->vars, JSON_PRETTY_PRINT);\n } else {\n $results = json_encode($this->vars);\n }\n // send\n echo $results;\n // if cli add \\n\n if ($cli) {\n echo \"\\n\";\n }\n }\n }", "function getRequest($url) {\n // url to GET info for this table\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n $output = curl_exec($ch);\n if (curl_errno($ch)) { // Check if any error occurred\n echo 'Curl error: ' . curl_error($ch);\n }\n curl_close($ch); // close curl resource to free up system resources\n $res = json_decode($output, true); // json to array\n return $res;\n }", "private function sendGetRequest($url)\n {\n // Send the request and process the response\n $guzzleResponse = $this->client->request('GET', $url);\n $this->lastResponse = new SmartwaiverResponse($guzzleResponse);\n }", "public function ajaxGetAction()\n {\n $this->view->disable();\n $response = new \\Phalcon\\Http\\Response();\n if (!$this->request->isAjax()) {\n echo \"is not Ajax ! \";\n }\n if (!$this->request->isPost()) {\n echo \"is not Post ! \";\n }\n $tokuisaki_bunrui4 = TokuisakiBunrui4Kbns::find(array(\n 'order' => 'cd',\n 'conditions' => ' cd LIKE ?1 ',\n 'bind' => array(1 => $this->request->getPost('cd').'%')\n ));\n $res_flds = [\"id\",\"cd\",\"name\",];\n $resData = array();\n foreach ($tokuisaki_bunrui4 as $bunrui4) {\n $resAdata = array();\n foreach ($res_flds as $res_fld) {\n $resAdata[$res_fld] = $bunrui4->$res_fld;\n }\n $resData[] = $resAdata;\n }\n $response->setContent(json_encode($resData));\n return $response;\n }", "protected function getJSON($url,$data){\n\t\t\tif(!is_array($data)) throw new Exception(\"Query Data Not Valid. Type Array Required\");\n\t\t\t$data['$format'] = 'json';\n\t\t\t$url .= '?' . http_build_query($data);\n\t\t\t$ch = curl_init($url);\n\t\t\tcurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n\t\t curl_setopt($ch, CURLOPT_USERPWD, $this->apiKey . \":\" . $this->apiKey);\n\t\t curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n\t\t curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n\t\t $r = curl_exec($ch);\n\t\t $json = json_decode($r);\n\t\t if($json==null) throw new Exception(\"Bad Response: {$r}\\n\\n{$url}\");\n\t\t return $json;\n\t\t}", "function make_get_call($mid_url) {\n global $base_url, $end_url;\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $base_url . $mid_url . $end_url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);\n curl_setopt($curl, CURLOPT_HEADER, false);\n \n $output = json_decode(curl_exec($curl));\n curl_close($curl);\n \n return $output;\n }", "public function getAction(){\n if(isset($_GET[\"apikey\"]) && isset($_GET[\"id\"]))\n {\n $api = $this->getRequest()->getParam('apikey');\n \n $select = $this->_model_usuarios->select()\n ->where(\"api_key = ?\", $api); \n \n if ($select->query()->rowCount() == 1){\n $id_espectaculo = $this->getRequest()->getParam('id'); \n $select = $this->_model_espectaculo->select()\n ->where(\"id_espectaculo = ?\", $id_espectaculo); \n \n if($select->query()->rowCount() == 1){\n\n $select = $this->_model_sesion->select()\n ->where(\"id_espectaculo = ?\", $id_espectaculo);\n\n $lista_eventos = $select->query()->fetchAll();\n\n $this->_helper->json($lista_eventos);\n }else{\n $this->_helper->json(\"Error con id\");\n }\n }else{\n $this->_helper->json(\"Error con la apikey\");\n }\n }else{\n $this->_helper->json(\"Falta la apikey\");\n }\n }", "private function GET($url,$params=false){\n return $this->Request($url,$params,HTTP_GET);\n }", "function get_kelas6a_json() { //data kelas1a by JSON object\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas6a();\n}", "public function searches($method='GET')\n\t{\n $this->data['message'] = lang_check('Hello, API here!');\n\n echo json_encode($this->data);\n exit();\n\t}", "private function get($params, $method) {\n return json_decode($this->http_client->get($method, [\n RequestOptions::QUERY => $params\n ])->getBody()->getContents(), true);\n }", "function sendGetCmd($resource) {\n $url = $this->baseURL . $resource;\n\n $request = curl_init($url);\n curl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n curl_setopt($request, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($request);\n\n return json_decode($result, true);\n }", "function get_kelas1a_json() { //data kelas1a by JSON object\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas1a();\n }", "public function viewCoins($method) {\n if ($method == \"GET\") {\n header(\"Content-Type: application/json; charset=UTF-8\");\n echo CryptoDB::getAll(); \n } else {\n header('HTTP/1.1 404 Not Found');\n }\n }", "function _http_get_json($url, array $data = null) {\n if ($data !== null)\n $url = _http_inject_url($url, $data);\n\n $response = _http_signed_request(COVER_APP, COVER_SECRET, $url);\n\n if (!$response)\n throw new Exception('No response');\n\n $data = json_decode($response);\n\n if ($data === null)\n throw new Exception('Response could not be parsed as JSON: <pre>' . htmlentities($response) . '</pre>');\n\n return $data;\n}", "public function execGET($url, $params = []){\n\t\t#Parse URL params\n\t\t$url = $this->parseURL($url, $params);\n\t\t#Initialize a CURL session. \n\t\t$ch = curl_init();\n\t\t#Set body (empty on GET)\n\t\t$curlBody = json_encode([]);\n\t\t#Set curl headers\n\t\t$curlHeaders = [\n\t\t\t'User-Agent: ' . $this->getRandAgent(), #Set the user agent with a random-selected real one\n\t\t];\n\t\t#Set CURL options\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $curlHeaders); #Set headers\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); #Retrieve output instead of displaying it\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 30); #Set timeout to 30 seconds\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); #Disable SSL host verification\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); #Disable SSL peer verification\n\t\tcurl_setopt($ch, CURLOPT_URL, $url); #Set URL\n\t\t#Return raw CURL request output\n\t\treturn curl_exec($ch);\n\t}", "function getrequest($url){\n\t// gets cURL resource\n\t$curl = curl_init();\n\t// Set some options - we are passing in a useragent too here\n\tcurl_setopt_array($curl, array(\n\t\tCURLOPT_RETURNTRANSFER => 1,\n\t\tCURLOPT_URL => $url,\n\t\tCURLOPT_USERAGENT => 'BenGreenlineApp'\n\t));\n\t// Send the request & save response to $resp\n\t$resp = curl_exec($curl);\n\t// Close request to clear up some resources\n\tcurl_close($curl);\n\t//returns the json encoded response\n\t\n\t\n\t$httpCode = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\tif($httpCode == 404) {\n $resp[0]= \"MetroTransit API gave 404\" ;\n\t};\n\t\n\t\n\treturn json_decode($resp);\n}", "function get_kelas5a_json() { //data kelas1a by JSON object\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas5a();\n}", "public function get()\n {\n if (in_array($_SERVER['SERVER_NAME'], Config::ALLOWED_SERVERS))\n {\n $sensorData = $this->sensorModel->getAllData();\n header(\"content-type: application/json\");\n echo $sensorData;\n }\n else \n {\n header('HTTP/1.1 500 Internal Server Booboo');\n header('Content-Type: application/json; charset=UTF-8');\n die(json_encode(array('message' => 'You are not an authorised host.', 'code' => 500)));\n }\n }", "public function get($url, $json = FALSE) {\n $data = parent::get($url, FALSE);\n return $this->decodeResponse($data);\n }", "protected function json(){\n $this->before(function ($request) {\n if ($request->contentType == \"application/json; charset=utf-8\") {\n $request->data = json_decode($request->data);\n }\n });\n $this->after(function ($response) {\n $response->contentType = \"application/json; charset=utf-8\";\n if (isset($_GET['jsonp'])) {\n $response->body = $_GET['jsonp'].'('.json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).');';\n } else {\n $response->body = json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n }\n });\n }", "protected function json(){\n $this->before(function ($request) {\n if ($request->contentType == \"application/json; charset=utf-8\") {\n $request->data = json_decode($request->data);\n }\n });\n $this->after(function ($response) {\n $response->contentType = \"application/json; charset=utf-8\";\n if (isset($_GET['jsonp'])) {\n $response->body = $_GET['jsonp'].'('.json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).');';\n } else {\n $response->body = json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n }\n });\n }", "protected function json(){\n $this->before(function ($request) {\n if ($request->contentType == \"application/json; charset=utf-8\") {\n $request->data = json_decode($request->data);\n }\n });\n $this->after(function ($response) {\n $response->contentType = \"application/json; charset=utf-8\";\n if (isset($_GET['jsonp'])) {\n $response->body = $_GET['jsonp'].'('.json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).');';\n } else {\n $response->body = json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n }\n });\n }", "public function sendGet ()\n {\n return $this->handleQuery();\n }", "function get_produck_json(){\n header('Content-Type: application/json');\n echo $this->crud_model->get_all_produk();\n }", "public function getJsonRest($url){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$client=curl_init($url);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//for get\n\t\t\t\t\t\t\t\t\tcurl_setopt($client,CURLOPT_RETURNTRANSFER,1);\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//response from url\n\t\t\t\t\t\t\t\t\t$response=curl_exec($client);\n\t\t\t\t\t\t\t\t\t$result=json_decode($response,true);\n\t\t\t\t\t\t\t\t\tcurl_close($client);\n\t\t\t\t\t\t\t\t\treturn $result;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "public function process()\n {\n \t$client = $this->client->getClient();\n\n \ttry {\n $response = $client->get($this->buildUrl());\n return new ResponseJson((string)$response->getBody(), true);\n } catch (RequestException $e) {\n return new ResponseJson((string)$e->getResponse()->getBody(), false);\n }\n }", "function get_kelas4a_json() { //data kelas1a by JSON object\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas4a();\n}", "function get_kelas3a_json() { //data kelas1a by JSON object\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas3a();\n}", "function get_kelas2a_json() { //data kelas1a by JSON object\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas2a();\n}", "function sends_get()\n {\n $search = array();\n $response = FALSE; \n \n $cache = Cache::get_instance();\n $response = $cache::get('send' . serialize($this->_args));\n\n if (!$response) {\n $response['_count'] = $this->model->count_results($this->_args);\n\n if ($response['_count'] > 0)\n {\n $response['data'] = $this->model->fetch($this->_args, TRUE)->result();\n } \n\n $response['l'] = $this->db->last_query(); \n }\n\n $this->response($response);\n }", "public function xhrGetListings()\n {\n $result = $this->db->select(\"SELECT * FROM data\");\n echo json_encode($result);\n }", "protected function requestGet($route) {\n $this->client->request('GET', $route, array('ACCEPT' => 'application/json'));\n return $this->client->getResponse();\n }", "function cover_get_json($method, array $data=array(), $use_session=true) {\n if ($use_session && cover_session_logged_in() && !isset($data['session_id']))\n $data['session_id'] = $_COOKIE[COVER_COOKIE_NAME];\n\n $data['method'] = $method;\n\n return _http_get_json(COVER_API_URL, $data);\n}", "function get_kelas6c_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas6c();\n}", "function get_kelas6g_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas6g();\n}", "public static function get() {\n return self::call(\"GET\");\n }", "public function getAction()\n {\n $return = false;\n\n /* Getting Answer by id */\n $answer = Answer::getById(intval($_GET['id']));\n \n /* Return response */\n header('Content-Type: application/json');\n echo json_encode($answer);\n }", "public function testBasicGET()\n\t{\n\t\t$Request = new Request(\n\t\t\tnew URL('http://' . self::TESTHOST . '/hallo'),\n\t\t\tnull, // method. Default GET\n\t\t\tnull, // Payload\n\t\t\t$this->_getDefaultOptions());\n\n\t\t// Return the body as string\n\t\t$Result = $Request->getResponseAs(new StringValue());\n\n\t\t$this->assertEquals('hallo', (string)$Result);\n\t}", "function get_kelas3e_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas3e();\n}", "public function actionJson() {\n\t\t$response = [];\n\t\tswitch($this->method) {\n\t\t\tcase self::METHOD_POST:\n\t\t\t\t$response = $this->actionPost();\n\t\t\t\tbreak;\t\t\t\t\n\t\t}\n\t \n\t return $response;\t\n\t}", "function get_kelas6f_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas6f();\n}", "public function index_get()//index_get() adalah standar untug Rest GET\n {\n $id= $this->get('id');//dari methode get, ambil key 'id' \n if($id===null){ //jka $id kosong\n $mahasiswa = $this->m_mahasiswa->getdata('mahasiswa')->result_array();//get semua data pada tabel mahasiswa dan dijadikan array assosiatif\n }else{\n $id= $this->get('id');//dari methode get ambil 'id'\n $w=array('id'=>$id); //array untuk where\n $mahasiswa =$this->m_mahasiswa->getdata_where($w,'mahasiswa')->result_array(); //perintah db ambil data pada tabel mahasiswa yang memilii id=$id kemudian simpan ke $mahasiswa dengan hasil array assosiatif.\n }\n \n if($mahasiswa){ //jika data ada\n $this->response([\n 'status' => true, //status= true\n 'data' => $mahasiswa //data= $mahasiswa\n ], REST_Controller::HTTP_OK);\n }else{\n $this->response([\n 'status' => false, //status= false\n 'message' => 'id not fount' //message not found\n ], REST_Controller::HTTP_NOT_FOUND);// status http menjadi 404 notfound\n }\n }", "public function json();", "function get_kelas6e_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas6e();\n}", "function get_unit_json() {\n header('Content-Type: application/json');\n echo $this->unit_model->get_unit_all();\n }", "private function do_get_request($ch,$url,$params=array()){ \n if(is_array($params) && count($params)>0){\n $url.='?';\n foreach($params as $key=>$val){\n $url.='&'.$key.'='.urlencode($val);\n }\n }\n $ch=curl_init();\n $timeout=5;\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);\n $result=curl_exec($ch);\n return $result;\n }", "private function getRequest($url, $params = array()) {\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_URL, $this->api_base_uri . $url .(!empty($params) ? '?'. http_build_query($params) \n: ''));\n\t\t$json = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\treturn $json;\n\t}", "function get_kelas2g_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas2g();\n}", "public function cek_sepatu(){\n\t\t\n\t\t$get['id'] = $_GET['id'];\n\t\t$result = $this->kelola->cek_sepatu($get);\n\t\t$array = $result[0]->stok;\n echo json_encode($array);\n\t}", "function get_kelas5e_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas5e();\n}", "public function httpGet()\n {\n return $this->method(\"GET\");\n }", "function get_kelas6b_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas6b();\n}", "public function obtener_informados_get(){\n \n //\"calle enviada: \".$this->get('calle')\n $calle = $this->get('calle');\n $this->load->model('pcd_upload_model');\n try {\n $respuesta = $this->pcd_upload_model->obtener_informados($calle);\n echo json_encode($respuesta);\n } catch (MY_BdExcepcion $e) {\n $msg = 'Error Interno de servidor.';\n echo json_encode(array('codigo' => 400, 'mensaje' =>$msg ,'valor' =>json_encode('')));\n }\n }", "public static function curlGET($url,$dato){\n$query = http_build_query($dato);\n$url=$url.\"?\".$query;\n$ch = curl_init($url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n $response = curl_exec($ch);\n curl_close($ch);\n if(!$response)\n {\n return false;\n }\n else\n {\n return $response;\n }\n}", "function get_kelas4e_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas4e();\n}", "function get_kelas5g_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas5g();\n}", "function get_kelas1e_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas1e();\n }", "function get_kelas2c_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas2c();\n}", "protected function _actionGet(KCommandContext $context)\n {\n if ( $context->request->getFormat() == 'html' ) {\n $context->response->setRedirect(JRoute::_('format=json&option=com_connect&view='.$this->view));\n return; \n }\n \n if ( $this->get ) \n { \n $url = ltrim($this->get, '/');\n $data = KConfig::unbox($this->api->get($url));\n $data = json_encode($data); \n } \n else \n {\n $data = (array) $this->api->getUser();\n }\n \n $this->getView()->data($data);\n \n return parent::_actionGet($context); \n }", "public function echoJson() {\r\n header(\"Content-type: application/json;\");\r\n echo $this->getResult();\r\n }", "function get_kelas3c_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas3c();\n}", "function get_kelas5c_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas5c();\n}", "public function get_list_get()\n\t{ \n\t\tif($_SERVER['REQUEST_METHOD'] == \"GET\"){\n \t// Get data\n\t\t\tif(isset($_GET)){\n\t\t\t\t$permission=false;\n\t\t\t\t$token= isset($_GET['token']) ?($_GET['token']) : \"\";\n\t\t\t\t$permission=$this->matchAppToken($token);\n\t\t\t\tif($permission==true){\n\t\t\t\t\t$language= isset($_GET['language']) ?($_GET['language']) : \"en\";\t\n\t\t\t\t\t$response=$this->advance_notification_model->get_in_app_data($language);\t\n\t\t\t\t\tif($response){\n\t\t\t\t\t\t$json = array(\"status\" => 1, \"message\" => \"Ok\", \"data\"=> $response);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Somthing went wrong. Please try again later\");\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Token has been not matched\");\n\t\t\t\t}\t\n\t\t\t}else{\n\t\t\t\t$json = array(\"status\" => 0, \"message\" => \"Request has been uncompleted\");\n\t\t\t}\n\t\t}else{\n\t\t\t$json = array(\"status\" => 0, \"message\" => \"Request method not accepted\");\n\t\t}\n\t\t$this->response($json, REST_Controller::HTTP_OK);\n\t}", "function get_kelas1g_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas1g();\n }", "function get_kelas2e_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas2e();\n}", "public function action_json()\n {\n $this->response->headers('Content-Type', 'application/json; charset=utf-8');\n echo json_encode($this->result);\n //Profiler::stop($bench);\n //echo View::factory('profiler/stats');\n //$this->response->body('hello!');\n }", "function get_kelas5b_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas5b();\n}", "public function getjson()\n {\n $rilis = Rilis::all();\n $response = [\n 'success' => true,\n 'data' => $rilis,\n 'message' => 'berhasil'\n ];\n return response()->json($response, 200);\n }", "function get_kelas6d_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas6d();\n}", "function get_siswa_json() {\n header('Content-Type: application/json');\n echo $this->siswa_model->get_all_siswa();\n }", "function get_kelas3g_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas3g();\n}", "function get_kelas4c_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas4c();\n}", "public function obtener_info_adicional_get(){\n require_once('CustomLogger.php');\n CustomLogger::log('Dentro de obtener_tipos_falla_get()...');\n $data = TipoMaterial::getTiposMaterialYCriticidad();\n echo json_encode($data);\n }", "function get_kelas4g_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas4g();\n}", "function hsend_get(&$app, &$c) {\n\t\t$app->logger->debug(sprintf('%s::%s', __CLASS__, __FUNCTION__));\n\n\t\t$this->_http->setMethod(HTTP_REQUEST_METHOD_GET);\n\n\t\t$this->_http->setURL($c->param('app.view_http.request.uri'));\n\n\t\t$this->_set_basic_auth($app, $c);\n\n\t\t$this->_load_get_params($app, $c);\n\n\t\t$this->_load_headers($app, $c);\n\n\t\t$this->_http->sendRequest();\n\n\t\t$this->_handler_response($app, $c);\n\n\t\treturn $app->status->handled;\n\t}", "function km200_GetData( $REST_URL ) \n{ \n $options = array( \n 'http' => array( \n 'method' => \"GET\", \n 'header' => \"Accept: application/json\\r\\n\" .\n \"User-Agent: TeleHeater/2.2.3\\r\\n\" \n ) \n ); \n $context = stream_context_create( $options ); \n $content = @file_get_contents( \n 'http://' . km200_gateway_host . ':' . km200_gateway_port . $REST_URL, \n false, \n $context \n );\n\n if ( false === $content ) \n return false; \n return json_decode( \n km200_Decrypt( \n $content \n ) \n ); \n}", "public function obat_get()\n\t{\n\t\t$data = $this->Obat->getAllObat();\n\t\tif ($data) {\n\t\t\t$this->response($data,200);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->response([\n\t\t\t\t'error'=>false,\n\t\t\t\t'message'=>'Obat kosong'\n\t\t\t],200);\n\t\t}\n\t}", "private function sendRequest(string $url, array $obj = [], bool $array=false, string $method = 'GET'){\n $ret = '';\n $sign = JWT::encode($obj, $this->secret);\n $obj['signature'] = $sign;\n $client = new \\GuzzleHttp\\Client();\n $arg = strtoupper($method) == 'GET' ? 'query' : 'body';\n $r = $client->request(strtoupper($method), $url, [$arg => $obj]);\n if($r->getStatusCode()==200){\n $ret = json_decode($r->getBody()->getContents(), $array);\n }\n return $ret;\n }", "public function &fetchJSON($url) {\r\n\t\tif(!$this->isOAuthAuthenticated()) {\r\n\t\t\t$res = $this->performAuth();\r\n\t\t\treturn $res;\r\n\t\t}\r\n\t\t$data = $this->signedRequest($url);\r\n\t\treturn $data;\r\n\t}", "function get_siswa_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_siswa();\n }", "function get_kelas1c_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas1c();\n }", "function gc_get_url_and_print_json( $url ) {\n header( 'Content-type: application/json' );\n $args = array(\n 'headers' => array(\n 'Authentication' => $this->api_key\n )\n );\n $response = wp_remote_get( $url, $args );\n // $http_code = wp_remote_retrieve_response_code( $response );\n echo $response['body'];\n die();\n }", "public function DataGet_get()\n {\n $username = $this->get('username');\n $password = $this->get('password');\n \n\t\tif(empty($username) || empty($password))\n\t\t{\t\t\t\n\t\t\t$this->response( [\n 'status' => RestController::HTTP_NOT_FOUND,\n 'message' => 'Please Enter All Fields.'\n ], RestController::HTTP_NOT_FOUND );\n }\n else\n {\n $username = $this->input->get('username');\n $password = $this->input->get('password');\n //call Model Function .... \n $this->response( [\n 'status' => RestController::HTTP_OK,\n 'message' => 'Data Get Successfully.'\n ], RestController::HTTP_OK ); \n }\n }", "public function testJsonserverAPI()\n {\n\n $Guzzclient = new Client();\n $response = $Guzzclient->get('http://localhost:8652/vehicles');\n\n self::assertEquals('200',$response->getStatusCode());\n }", "public function send(){\n\n\n\n $id = $_GET['id'];\n $msg = $_GET['msg'];\n $response = $this->sendMessage($id,$msg);\n $return[\"allresponses\"] = $response;\n $return = json_encode($return);\n $data = json_decode($response, true);\n\n echo $response;\n\n }", "public function fetch_kelompok(){\n $id_jur=$this->input->get('jurusan');\n $act=$this->input->get('act');\n $data=$this->Models->fetch_kelompok($id_jur,$act);\n echo json_encode($data);\n }", "function get_kelas5d_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas5d();\n}", "function get_kelas3b_json() {\n header('Content-Type: application/json');\n echo $this->bagikelas_model->get_all_kelas3b();\n}", "function get($id){ \t\n \tif(isset($id)){\n \t\t$result = $this->model->selectWhere('*',\"id = \".\"'$id'\");\n \t\techo json_encode($result);\n \t}else{\n \t\techo json_encode('failed');\n \t} \t\n }" ]
[ "0.6919637", "0.688027", "0.66382873", "0.66120857", "0.65673506", "0.65315884", "0.6307242", "0.6287321", "0.62028724", "0.6152314", "0.61515194", "0.6105195", "0.6097106", "0.6076148", "0.60695827", "0.60517395", "0.6044399", "0.60437113", "0.60333556", "0.60071135", "0.60006803", "0.5993182", "0.59855735", "0.5976044", "0.59693015", "0.5953914", "0.5953818", "0.5948043", "0.594759", "0.5946146", "0.59447926", "0.5931442", "0.5931442", "0.5931442", "0.5930106", "0.5923794", "0.5918931", "0.591287", "0.59040636", "0.5893942", "0.58918685", "0.5885374", "0.58845544", "0.5884366", "0.5867671", "0.5860463", "0.5856094", "0.58559", "0.5852496", "0.5851276", "0.5836782", "0.58296096", "0.5829551", "0.5829439", "0.58255404", "0.58253115", "0.5821591", "0.58179533", "0.58178097", "0.5814746", "0.5814101", "0.58108395", "0.5809143", "0.5807057", "0.58062136", "0.58047587", "0.5800202", "0.5798711", "0.5795692", "0.57875675", "0.5780434", "0.57789534", "0.57761633", "0.5772909", "0.5770772", "0.57663983", "0.5765665", "0.57640654", "0.57620513", "0.5761237", "0.5759154", "0.5756877", "0.57553256", "0.5754792", "0.5753976", "0.5750515", "0.5743272", "0.57430136", "0.5728776", "0.5728769", "0.5721361", "0.57195085", "0.5714761", "0.57120126", "0.57115984", "0.5698752", "0.5698688", "0.5691598", "0.56885195", "0.56861454", "0.56781584" ]
0.0
-1
Register any application services.
public function register() { $this->app->singleton(UserTokenService::class, function() { return new UserTokenService(new User()); }); $this->app->singleton('BookService', function() { return new BookServices(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n $this->registerAssets();\n $this->registerServices();\n }", "public function register()\n\t{\n\n $this->registerUserService();\n $this->registerCountryService();\n $this->registerMetaService();\n $this->registerLabelService();\n $this->registerTypeService();\n $this->registerGroupeService();\n $this->registerActiviteService();\n $this->registerRiiinglinkService();\n $this->registerInviteService();\n $this->registerTagService();\n $this->registerAuthService();\n $this->registerChangeService();\n $this->registerRevisionService();\n $this->registerUploadService();\n //$this->registerTransformerService();\n }", "public function register()\n { \n // User Repository\n $this->app->bind('App\\Contracts\\Repository\\User', 'App\\Repositories\\User');\n \n // JWT Token Repository\n $this->app->bind('App\\Contracts\\Repository\\JSONWebToken', 'App\\Repositories\\JSONWebToken');\n \n $this->registerClearSettleApiLogin();\n \n $this->registerClearSettleApiClients();\n \n \n }", "public function register()\n {\n $this->registerRequestHandler();\n $this->registerAuthorizationService();\n $this->registerServices();\n }", "public function register()\n {\n $this->app->bind(\n PegawaiServiceContract::class,\n PegawaiService::class \n );\n\n $this->app->bind(\n RiwayatPendidikanServiceContract::class,\n RiwayatPendidikanService::class \n );\n\n $this->app->bind(\n ProductionHouseServiceContract::class,\n ProductionHouseService::class\n );\n\n $this->app->bind(\n MovieServiceContract::class,\n MovieService::class\n );\n\n $this->app->bind(\n PangkatServiceContract::class,\n PangkatService::class \n );\n\n }", "public function register()\n {\n // $this->app->bind('AuthService', AuthService::class);\n }", "public function register()\n {\n $this->registerServiceProviders();\n $this->registerSettingsService();\n $this->registerHelpers();\n }", "public function register()\n {\n $this->registerAccountService();\n\n $this->registerCurrentAccount();\n\n //$this->registerMenuService();\n\n //$this->registerReplyService();\n }", "public function register()\n {\n $this->registerRepositories();\n }", "public function register()\n {\n $this->registerFacades();\n $this->registerRespository();\n }", "public function register()\n {\n $this->app->bind('App\\Services\\UserService');\n $this->app->bind('App\\Services\\PostService');\n $this->app->bind('App\\Services\\MyPickService');\n $this->app->bind('App\\Services\\FacebookService');\n $this->app->bind('App\\Services\\LikeService');\n }", "public function register()\n {\n // service 由各个应用在 AppServiceProvider 单独绑定对应实现\n }", "public function register()\n {\n //\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n\n\n\n\n $this->app->register(ResponseMacroServiceProvider::class);\n $this->app->register(TwitterServiceProvider::class);\n }", "public function register()\n {\n $this->registerGraphQL();\n\n $this->registerConsole();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n\n $this->registerCommand();\n $this->registerSchedule();\n $this->registerDev();\n\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/telescope-error-service-client.php', 'telescope-error-service-client'\n );\n\n $this->registerStorageDriver();\n\n $this->commands([\n Console\\InstallCommand::class,\n Console\\PublishCommand::class,\n ]);\n }", "public function register()\n\t{\n\t\t$this->registerPasswordBroker();\n\n\t\t$this->registerTokenRepository();\n\t}", "public function register()\n {\n $this->registerConfig();\n\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\UtilitiesServiceProvider');\n $this->registerLogViewer();\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\CommandsServiceProvider');\n }", "public function register() {\n $this->registerProviders();\n $this->registerFacades();\n }", "public function register()\n {\n // $this->app->make('CheckStructureService');\n }", "public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'APIcoLAB\\Services\\Registrar'\n\t\t);\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Flight\\FlightRepository',\n 'APIcoLAB\\Repositories\\Flight\\SkyScannerFlightRepository'\n );\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Place\\PlaceRepository',\n 'APIcoLAB\\Repositories\\Place\\SkyScannerPlaceRepository'\n );\n\t}", "public function register()\n {\n $this->app->register(\\Maatwebsite\\Excel\\ExcelServiceProvider::class);\n $this->app->register(\\Intervention\\Image\\ImageServiceProvider::class);\n $this->app->register(\\Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\DatatablesServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\ButtonsServiceProvider::class);\n\n $loader = null;\n if (class_exists('Illuminate\\Foundation\\AliasLoader')) {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n }\n\n // Facades\n if ($loader != null) {\n $loader->alias('Image', \\Intervention\\Image\\Facades\\Image::class);\n $loader->alias('Excel', \\Maatwebsite\\Excel\\Facades\\Excel::class);\n\n }\n\n if (app()->environment() != 'production') {\n // Service Providers\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n $this->app->register(\\Barryvdh\\Debugbar\\ServiceProvider::class);\n\n // Facades\n if ($loader != null) {\n $loader->alias('Debugbar', \\Barryvdh\\Debugbar\\Facade::class);\n }\n }\n\n if ($this->app->environment('local', 'testing')) {\n $this->app->register(\\Laravel\\Dusk\\DuskServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerInertia();\n $this->registerLengthAwarePaginator();\n }", "public function register()\n {\n $this->registerFlareFacade();\n $this->registerServiceProviders();\n $this->registerBindings();\n }", "public function register()\n {\n $this->app->bind(\n 'Toyopecas\\Repositories\\TopoRepository',\n 'Toyopecas\\Repositories\\TopoRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\ServicesRepository',\n 'Toyopecas\\Repositories\\ServicesRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\SobreRepository',\n 'Toyopecas\\Repositories\\SobreRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\ProdutosRepository',\n 'Toyopecas\\Repositories\\ProdutosRepositoryEloquent'\n );\n }", "public function register()\r\n {\r\n Passport::ignoreMigrations();\r\n\r\n $this->app->singleton(\r\n CityRepositoryInterface::class,\r\n CityRepository::class\r\n );\r\n\r\n $this->app->singleton(\r\n BarangayRepositoryInterface::class,\r\n BarangayRepository::class\r\n );\r\n }", "public function register()\n {\n $this->registerRepositories();\n\n $this->pushMiddleware();\n }", "public function register()\r\n {\r\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel-base.php', 'laravel-base');\r\n\r\n $this->app->bind(UuidGenerator::class, UuidGeneratorService::class);\r\n\r\n }", "public function register()\n {\n\n $this->app->register(RepositoryServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(\n 'Uhmane\\Repositories\\ContatosRepository', \n 'Uhmane\\Repositories\\ContatosRepositoryEloquent'\n );\n }", "public function register()\r\n {\r\n $this->app->bind(\r\n ViberServiceInterface::class,\r\n ViberService::class\r\n );\r\n\r\n $this->app->bind(\r\n ApplicantServiceInterface::class,\r\n ApplicantService::class\r\n );\r\n }", "public function register()\n {\n $this->app->register('ProAI\\Datamapper\\Providers\\MetadataServiceProvider');\n\n $this->app->register('ProAI\\Datamapper\\Presenter\\Providers\\MetadataServiceProvider');\n\n $this->registerScanner();\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->app->bind(\n 'Larafolio\\Http\\HttpValidator\\HttpValidator',\n 'Larafolio\\Http\\HttpValidator\\CurlValidator'\n );\n\n $this->app->register(ImageServiceProvider::class);\n }", "public function register()\n {\n // Register all repositories\n foreach ($this->repositories as $repository) {\n $this->app->bind(\"App\\Repository\\Contracts\\I{$repository}\",\n \"App\\Repository\\Repositories\\\\{$repository}\");\n }\n\n // Register all services\n foreach ($this->services as $service) {\n $this->app->bind(\"App\\Service\\Contracts\\I{$service}\", \n \"App\\Service\\Modules\\\\{$service}\");\n }\n }", "public function register()\n {\n $this->registerAdapterFactory();\n $this->registerDigitalOceanFactory();\n $this->registerManager();\n $this->registerBindings();\n }", "public function register()\n {\n // Only Environment local\n if ($this->app->environment() !== 'production') {\n foreach ($this->services as $serviceClass) {\n $this->registerClass($serviceClass);\n }\n }\n\n // Register Aliases\n $this->registerAliases();\n }", "public function register()\n {\n $this->app->bind(\n 'App\\Contracts\\UsersInterface',\n 'App\\Services\\UsersService'\n );\n $this->app->bind(\n 'App\\Contracts\\CallsInterface',\n 'App\\Services\\CallsService'\n );\n $this->app->bind(\n 'App\\Contracts\\ContactsInterface',\n 'App\\Services\\ContactsService'\n );\n $this->app->bind(\n 'App\\Contracts\\EmailsInterface',\n 'App\\Services\\EmailsService'\n );\n $this->app->bind(\n 'App\\Contracts\\PhoneNumbersInterface',\n 'App\\Services\\PhoneNumbersService'\n );\n $this->app->bind(\n 'App\\Contracts\\NumbersInterface',\n 'App\\Services\\NumbersService'\n );\n $this->app->bind(\n 'App\\Contracts\\UserNumbersInterface',\n 'App\\Services\\UserNumbersService'\n );\n }", "public function register()\n {\n //\n if (env('APP_DEBUG', false) && $this->app->isLocal()) {\n $this->app->register(\\Laravel\\Telescope\\TelescopeServiceProvider::class);\n $this->app->register(TelescopeServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerBrowser();\n\n $this->registerViewFinder();\n }", "public function register()\n {\n $this->registerFriendsLog();\n $this->registerNotifications();\n $this->registerAPI();\n $this->registerMailChimpIntegration();\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/awesio-auth.php', 'awesio-auth');\n\n $this->app->singleton(AuthContract::class, Auth::class);\n\n $this->registerRepositories();\n\n $this->registerServices();\n\n $this->registerHelpers();\n }", "public function register()\n {\n $this->registerRepository();\n $this->registerMigrator();\n $this->registerArtisanCommands();\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/services.php', 'services'\n );\n }", "public function register()\n {\n $this->registerRateLimiting();\n\n $this->registerHttpValidation();\n\n $this->registerHttpParsers();\n\n $this->registerResponseFactory();\n\n $this->registerMiddleware();\n }", "public function register()\n {\n $this->registerConfig();\n $this->registerView();\n $this->registerMessage();\n $this->registerMenu();\n $this->registerOutput();\n $this->registerCommands();\n require __DIR__ . '/Service/ServiceProvider.php';\n require __DIR__ . '/Service/RegisterRepoInterface.php';\n require __DIR__ . '/Service/ErrorHandling.php';\n $this->registerExportDompdf();\n $this->registerExtjs();\n }", "public function register()\n {\n $this->registerRepository();\n $this->registerParser();\n }", "public function register()\n {\n $this->registerOtherProviders()->registerAliases();\n $this->loadViewsFrom(__DIR__.'/../../resources/views', 'jarvisPlatform');\n $this->app->bind('jarvis.auth.provider', AppAuthenticationProvider::class);\n $this->loadRoutes();\n }", "public function register()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n\n $loader->alias('Laratrust', 'Laratrust\\LaratrustFacade');\n $loader->alias('Form', 'Collective\\Html\\FormFacade');\n $loader->alias('Html', 'Collective\\Html\\HtmlFacade');\n $loader->alias('Markdown', 'BrianFaust\\Parsedown\\Facades\\Parsedown');\n\n $this->app->register('Baum\\Providers\\BaumServiceProvider');\n $this->app->register('BrianFaust\\Parsedown\\ServiceProvider');\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Laravel\\Scout\\ScoutServiceProvider');\n $this->app->register('Laratrust\\LaratrustServiceProvider');\n\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\AuthServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\EventServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\ViewServiceProvider');\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->registerGuard();\n $this->registerBladeDirectives();\n }", "public function register()\n {\n $this->registerConfig();\n\n $this->app->register(Providers\\ManagerServiceProvider::class);\n $this->app->register(Providers\\ValidationServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(ReviewService::class, function ($app) {\n return new ReviewService();\n });\n }", "public function register()\n {\n $this->app->bind(\n Services\\UserService::class,\n Services\\Implementations\\UserServiceImplementation::class\n );\n $this->app->bind(\n Services\\FamilyCardService::class,\n Services\\Implementations\\FamilyCardServiceImplementation::class\n );\n }", "public function register()\n {\n // register its dependencies\n $this->app->register(\\Cviebrock\\EloquentSluggable\\ServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind('gameService', 'App\\Service\\GameService');\n }", "public function register()\n {\n $this->app->bind(VehicleRepository::class, GuzzleVehicleRepository::class);\n }", "public function register()\n {\n $this->app->bindShared(ElasticsearchNedvizhimostsObserver::class, function($app){\n return new ElasticsearchNedvizhimostsObserver(new Client());\n });\n\n // $this->app->bindShared(ElasticsearchNedvizhimostsObserver::class, function()\n // {\n // return new ElasticsearchNedvizhimostsObserver(new Client());\n // });\n }", "public function register()\n {\n // Register the app\n $this->registerApp();\n\n // Register Commands\n $this->registerCommands();\n }", "public function register()\n {\n $this->registerGeography();\n\n $this->registerCommands();\n\n $this->mergeConfig();\n\n $this->countriesCache();\n }", "public function register()\n {\n $this->app->bind(CertificationService::class, function($app){\n return new CertificationService();\n });\n }", "public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'App\\Services\\Registrar'\n\t\t);\n \n $this->app->bind(\"App\\\\Services\\\\ILoginService\",\"App\\\\Services\\\\LoginService\");\n \n $this->app->bind(\"App\\\\Repositories\\\\IItemRepository\",\"App\\\\Repositories\\\\ItemRepository\");\n $this->app->bind(\"App\\\\Repositories\\\\IOutletRepository\",\"App\\\\Repositories\\\\OutletRepository\");\n $this->app->bind(\"App\\\\Repositories\\\\IInventoryRepository\",\"App\\\\Repositories\\\\InventoryRepository\");\n\t}", "public function register()\n {\n $this->registerRollbar();\n }", "public function register()\n {\n $this->app->bind('activity', function () {\n return new ActivityService(\n $this->app->make(Activity::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('views', function () {\n return new ViewService(\n $this->app->make(View::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('setting', function () {\n return new SettingService(\n $this->app->make(Setting::class),\n $this->app->make(Repository::class)\n );\n });\n\n $this->app->bind('images', function () {\n return new ImageService(\n $this->app->make(Image::class),\n $this->app->make(ImageManager::class),\n $this->app->make(Factory::class),\n $this->app->make(Repository::class)\n );\n });\n }", "public function register()\n {\n App::bind('CreateTagService', function($app) {\n return new CreateTagService;\n });\n\n App::bind('UpdateTagService', function($app) {\n return new UpdateTagService;\n });\n }", "public function register()\n {\n $this->registerDomainLocalization();\n $this->registerDomainLocaleFilter();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(MailConfigServiceProvider::class);\n }", "public function register()\n {\n $this->registerUserProvider();\n $this->registerGroupProvider();\n $this->registerNeo();\n\n $this->registerCommands();\n\n $this->app->booting(function()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('Neo', 'Wetcat\\Neo\\Facades\\Neo');\n });\n }", "public function register()\n {\n //\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\CompanyInterface', \n 'App\\Repositories\\CompanyRepo'\n );\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\UtilityInterface', \n 'App\\Repositories\\UtilityRepo'\n );\n }", "public function register()\n {\n $this->registerPayment();\n\n $this->app->alias('image', 'App\\Framework\\Image\\ImageService');\n }", "public function register()\n {\n $this->app->bind(AttributeServiceInterface::class,AttributeService::class);\n $this->app->bind(ProductServiceIntarface::class,ProductService::class);\n\n\n }", "public function register()\n {\n App::bind('App\\Repositories\\UserRepositoryInterface','App\\Repositories\\UserRepository');\n App::bind('App\\Repositories\\AnimalRepositoryInterface','App\\Repositories\\AnimalRepository');\n App::bind('App\\Repositories\\DonationTypeRepositoryInterface','App\\Repositories\\DonationTypeRepository');\n App::bind('App\\Repositories\\NewsAniRepositoryInterface','App\\Repositories\\NewsAniRepository');\n App::bind('App\\Repositories\\DonationRepositoryInterface','App\\Repositories\\DonationRepository');\n App::bind('App\\Repositories\\ProductRepositoryInterface','App\\Repositories\\ProductRepository');\n App::bind('App\\Repositories\\CategoryRepositoryInterface','App\\Repositories\\CategoryRepository');\n App::bind('App\\Repositories\\TransferMoneyRepositoryInterface','App\\Repositories\\TransferMoneyRepository');\n App::bind('App\\Repositories\\ShippingRepositoryInterface','App\\Repositories\\ShippingRepository');\n App::bind('App\\Repositories\\ReserveProductRepositoryInterface','App\\Repositories\\ReserveProductRepository');\n App::bind('App\\Repositories\\Product_reserveRepositoryInterface','App\\Repositories\\Product_reserveRepository');\n App::bind('App\\Repositories\\Ordering_productRepositoryInterface','App\\Repositories\\Ordering_productRepository');\n App::bind('App\\Repositories\\OrderingRepositoryInterface','App\\Repositories\\OrderingRepository');\n App::bind('App\\Repositories\\UserUpdateSlipRepositoryInterface','App\\Repositories\\UserUpdateSlipRepository');\n }", "public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->registerPublishing();\n }\n }", "public function register()\n {\n $this->app->bind(HttpClient::class, function ($app) {\n return new HttpClient();\n });\n\n $this->app->bind(SeasonService::class, function ($app) {\n return new SeasonService($app->make(HttpClient::class));\n });\n\n $this->app->bind(MatchListingController::class, function ($app) {\n return new MatchListingController($app->make(SeasonService::class));\n });\n\n }", "public function register()\n {\n $this->setupConfig();\n\n $this->bindServices();\n }", "public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Console\\MakeEndpointCommand::class,\n Console\\MakeControllerCommand::class,\n Console\\MakeRepositoryCommand::class,\n Console\\MakeTransformerCommand::class,\n Console\\MakeModelCommand::class,\n ]);\n }\n\n $this->registerFractal();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(AuthServiceProvider::class);\n }", "public function register()\n {\n\n $config = $this->app['config']['cors'];\n\n $this->app->bind('Yocome\\Cors\\CorsService', function() use ($config){\n return new CorsService($config);\n });\n\n }", "public function register()\n {\n // Bind facade\n\n $this->registerRepositoryBibdings();\n $this->registerFacades();\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(\\Laravel\\Socialite\\SocialiteServiceProvider::class);\n }", "public function register()\n {\n\n\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\UserRepository',\n 'Onlinecorrection\\Repositories\\UserRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\ClientRepository',\n 'Onlinecorrection\\Repositories\\ClientRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\ProjectRepository',\n 'Onlinecorrection\\Repositories\\ProjectRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\DocumentRepository',\n 'Onlinecorrection\\Repositories\\DocumentRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\OrderRepository',\n 'Onlinecorrection\\Repositories\\OrderRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\OrderItemRepository',\n 'Onlinecorrection\\Repositories\\OrderItemRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\DocumentImageRepository',\n 'Onlinecorrection\\Repositories\\DocumentImageRepositoryEloquent'\n );\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\PackageRepository',\n 'Onlinecorrection\\Repositories\\PackageRepositoryEloquent'\n );\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\StatusRepository',\n 'Onlinecorrection\\Repositories\\StatusRepositoryEloquent'\n );\n\n }", "public function register()\n {\n $this->registerConfig();\n\n $this->registerDataStore();\n\n $this->registerStorageFactory();\n\n $this->registerStorageManager();\n\n $this->registerSimplePhoto();\n }", "public function register()\n {\n // Default configuration file\n $this->mergeConfigFrom(\n __DIR__.'/Config/auzo_tools.php', 'auzoTools'\n );\n\n $this->registerModelBindings();\n $this->registerFacadesAliases();\n }", "public function register()\n {\n $this->app->bind(\\Cookiesoft\\Repositories\\CategoryRepository::class, \\Cookiesoft\\Repositories\\CategoryRepositoryEloquent::class);\n $this->app->bind(\\Cookiesoft\\Repositories\\BillpayRepository::class, \\Cookiesoft\\Repositories\\BillpayRepositoryEloquent::class);\n $this->app->bind(\\Cookiesoft\\Repositories\\UserRepository::class, \\Cookiesoft\\Repositories\\UserRepositoryEloquent::class);\n //:end-bindings:\n }", "public function register()\n {\n $this->app->singleton(ThirdPartyAuthService::class, function ($app) {\n return new ThirdPartyAuthService(\n config('settings.authentication_services'),\n $app['Laravel\\Socialite\\Contracts\\Factory'],\n $app['Illuminate\\Contracts\\Auth\\Factory']\n );\n });\n\n $this->app->singleton(ImageValidator::class, function ($app) {\n return new ImageValidator(\n config('settings.image.max_filesize'),\n config('settings.image.mime_types'),\n $app['Intervention\\Image\\ImageManager']\n );\n });\n\n $this->app->singleton(ImageService::class, function ($app) {\n return new ImageService(\n config('settings.image.max_width'),\n config('settings.image.max_height'),\n config('settings.image.folder')\n );\n });\n\n $this->app->singleton(RandomWordService::class, function ($app) {\n return new RandomWordService(\n $app['App\\Repositories\\WordRepository'],\n $app['Illuminate\\Session\\SessionManager'],\n config('settings.number_of_words_to_remember')\n );\n });\n\n $this->app->singleton(WordRepository::class, function ($app) {\n return new WordRepository(config('settings.min_number_of_chars_per_one_mistake_in_search'));\n });\n\n $this->app->singleton(CheckAnswerService::class, function ($app) {\n return new CheckAnswerService(\n $app['Illuminate\\Session\\SessionManager'],\n config('settings.min_number_of_chars_per_one_mistake')\n );\n });\n\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerJWT();\n $this->registerJWSProxy();\n $this->registerJWTAlgoFactory();\n $this->registerPayload();\n $this->registerPayloadValidator();\n $this->registerPayloadUtilities();\n\n // use this if your package has a config file\n // config([\n // 'config/JWT.php',\n // ]);\n }", "public function register()\n {\n $this->registerManager();\n $this->registerConnection();\n $this->registerWorker();\n $this->registerListener();\n $this->registerFailedJobServices();\n $this->registerOpisSecurityKey();\n }", "public function register()\n {\n $this->app->register(RouterServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind('App\\Services\\TripService.php', function ($app) {\n return new TripService();\n });\n }", "public function register()\n {\n $this->registerUserComponent();\n $this->registerLocationComponent();\n\n }", "public function register()\n {\n $this->app->bind(\n \\App\\Services\\UserCertificate\\IUserCertificateService::class,\n \\App\\Services\\UserCertificate\\UserCertificateService::class\n );\n }", "public function register()\n {\n $this->app->bind(FacebookMarketingContract::class,FacebookMarketingService::class);\n }", "public function register()\n {\n /**\n * Register additional service\n * providers if they exist.\n */\n foreach ($this->providers as $provider) {\n if (class_exists($provider)) {\n $this->app->register($provider);\n }\n }\n }", "public function register()\n {\n $this->app->singleton('composer', function($app)\n {\n return new Composer($app['files'], $app['path.base']);\n });\n\n $this->app->singleton('forge', function($app)\n {\n return new Forge($app);\n });\n\n // Register the additional service providers.\n $this->app->register('Nova\\Console\\ScheduleServiceProvider');\n $this->app->register('Nova\\Queue\\ConsoleServiceProvider');\n }", "public function register()\n {\n\n\n\n $this->mergeConfigFrom(__DIR__ . '/../config/counter.php', 'counter');\n\n $this->app->register(RouteServiceProvider::class);\n\n\n }", "public function register()\r\n {\r\n $this->mergeConfigFrom(__DIR__.'/../config/colissimo.php', 'colissimo');\r\n $this->mergeConfigFrom(__DIR__.'/../config/rules.php', 'colissimo.rules');\r\n $this->mergeConfigFrom(__DIR__.'/../config/prices.php', 'colissimo.prices');\r\n $this->mergeConfigFrom(__DIR__.'/../config/zones.php', 'colissimo.zones');\r\n $this->mergeConfigFrom(__DIR__.'/../config/insurances.php', 'colissimo.insurances');\r\n $this->mergeConfigFrom(__DIR__.'/../config/supplements.php', 'colissimo.supplements');\r\n // Register the service the package provides.\r\n $this->app->singleton('colissimo', function ($app) {\r\n return new Colissimo;\r\n });\r\n }", "public function register(){\n $this->registerDependencies();\n $this->registerAlias();\n $this->registerServiceCommands();\n }", "public function register()\n {\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyService::class,\n \\App\\Services\\Survey\\SurveyService::class\n );\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyQuestionService::class,\n \\App\\Services\\Survey\\SurveyQuestionService::class\n );\n\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyAttemptService::class,\n \\App\\Services\\Survey\\SurveyAttemptService::class\n );\n\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyAttemptDataService::class,\n \\App\\Services\\Survey\\SurveyAttemptDataService::class\n );\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/../config/atlas.php', 'atlas'\n );\n \n $this->app->singleton(CoreContract::class, Core::class);\n \n $this->registerFacades([\n 'Atlas' => 'Atlas\\Facades\\Atlas',\n ]);\n }", "public function register()\n {\n $this->app->bind(TelescopeRouteServiceContract::class, TelescopeRouteService::class);\n }", "public function register()\n {\n $this->registerRepositoryBindings();\n\n $this->registerInterfaceBindings();\n\n $this->registerAuthorizationServer();\n\n $this->registerResourceServer();\n\n $this->registerFilterBindings();\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/faithgen-events.php', 'faithgen-events');\n\n $this->app->singleton(EventsService::class);\n $this->app->singleton(GuestService::class);\n }", "public function register()\n {\n $this->registerAliases();\n $this->registerFormBuilder();\n\n // Register package commands\n $this->commands([\n 'CoreDbCommand',\n 'CoreSetupCommand',\n 'CoreSeedCommand',\n 'EventEndCommand',\n 'ArchiveMaxAttempts',\n 'CronCommand',\n 'ExpireInstructors',\n 'SetTestLock',\n 'StudentArchiveTraining',\n 'TestBuildCommand',\n 'TestPublishCommand',\n ]);\n\n // Merge package config with one in outer app \n // the app-level config will override the base package config\n $this->mergeConfigFrom(\n __DIR__.'/../config/core.php', 'core'\n );\n\n // Bind our 'Flash' class\n $this->app->bindShared('flash', function () {\n return $this->app->make('Hdmaster\\Core\\Notifications\\FlashNotifier');\n });\n\n // Register package dependencies\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Bootstrapper\\BootstrapperL5ServiceProvider');\n $this->app->register('Codesleeve\\LaravelStapler\\Providers\\L5ServiceProvider');\n $this->app->register('PragmaRX\\ZipCode\\Vendor\\Laravel\\ServiceProvider');\n $this->app->register('Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider');\n\n $this->app->register('Zizaco\\Confide\\ServiceProvider');\n $this->app->register('Zizaco\\Entrust\\EntrustServiceProvider');\n }" ]
[ "0.7879658", "0.7600202", "0.74930716", "0.73852855", "0.736794", "0.7306089", "0.7291359", "0.72896826", "0.72802424", "0.7268026", "0.7267702", "0.72658145", "0.7249053", "0.72171587", "0.7208486", "0.7198799", "0.7196415", "0.719478", "0.7176513", "0.7176227", "0.7164647", "0.71484524", "0.71337837", "0.7129424", "0.71231985", "0.7120174", "0.7103653", "0.71020955", "0.70977163", "0.7094701", "0.7092148", "0.70914364", "0.7088618", "0.7087278", "0.70827085", "0.70756096", "0.7075115", "0.70741326", "0.7071857", "0.707093", "0.7070619", "0.7067406", "0.7066438", "0.7061766", "0.70562875", "0.7051525", "0.7049684", "0.70467263", "0.7043264", "0.7043229", "0.70429426", "0.7042174", "0.7038729", "0.70384216", "0.70348704", "0.7034105", "0.70324445", "0.70282733", "0.7025024", "0.702349", "0.7023382", "0.702262", "0.7022583", "0.7022161", "0.702139", "0.7021084", "0.7020801", "0.7019928", "0.70180106", "0.7017351", "0.7011482", "0.7008627", "0.7007786", "0.70065045", "0.7006424", "0.70060986", "0.69992065", "0.699874", "0.69980377", "0.69980335", "0.6997871", "0.6996457", "0.69961494", "0.6994749", "0.6991596", "0.699025", "0.6988414", "0.6987274", "0.69865865", "0.69862866", "0.69848233", "0.6978736", "0.69779474", "0.6977697", "0.6976002", "0.69734764", "0.6972392", "0.69721776", "0.6970663", "0.6968296", "0.696758" ]
0.0
-1
Bootstrap any application services.
public function boot() { Book::observe(BookObserver::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function bootstrap(): void\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\n {\n // Boot here application\n }", "public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrapperList);\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\r\n {\r\n // Publishing is only necessary when using the CLI.\r\n if ($this->app->runningInConsole()) {\r\n $this->bootForConsole();\r\n }\r\n }", "public function boot()\n {\n $this->app->bind(IUserService::class, UserService::class);\n $this->app->bind(ISeminarService::class, SeminarService::class);\n $this->app->bind(IOrganizationService::class, OrganizationService::class);\n $this->app->bind(ISocialActivityService::class, SocialActivityService::class);\n }", "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->loadedServices, function ($s) {\n $this->bootService($s);\n });\n\n $this->booted = true;\n }", "public function boot()\n {\n\n $this->app->bind(FileUploaderServiceInterface::class,FileUploaderService::class);\n $this->app->bind(ShopServiceInterface::class,ShopService::class);\n $this->app->bind(CategoryServiceInterface::class,CategoryService::class);\n $this->app->bind(ProductServiceInterface::class,ProductService::class);\n $this->app->bind(ShopSettingsServiceInterface::class,ShopSettingsService::class);\n $this->app->bind(FeedbackServiceInterface::class,FeedbackService::class);\n $this->app->bind(UserServiceInterface::class,UserService::class);\n $this->app->bind(ShoppingCartServiceInterface::class,ShoppingCartService::class);\n $this->app->bind(WishlistServiceInterface::class,WishlistService::class);\n $this->app->bind(NewPostApiServiceInterface::class,NewPostApiService::class);\n $this->app->bind(DeliveryAddressServiceInterface::class,DeliveryAddressService::class);\n $this->app->bind(StripeServiceInterface::class,StripeService::class);\n $this->app->bind(OrderServiceInterface::class,OrderService::class);\n $this->app->bind(MailSenderServiceInterface::class,MailSenderSenderService::class);\n }", "public function boot()\n {\n $this->setupConfig('delta_service');\n $this->setupMigrations();\n $this->setupConnection('delta_service', 'delta_service.connection');\n }", "public function boot()\n {\n $configuration = [];\n\n if (file_exists($file = getcwd() . '/kaleo.config.php')) {\n $configuration = include_once $file;\n }\n\n $this->app->singleton('kaleo', function () use ($configuration) {\n return new KaleoService($configuration);\n });\n }", "public function boot()\n {\n $this->shareResources();\n $this->mergeConfigFrom(self::CONFIG_PATH, 'amocrm-api');\n }", "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n // Ports\n $this->app->bind(\n IAuthenticationService::class,\n AuthenticationService::class\n );\n $this->app->bind(\n IBeerService::class,\n BeerService::class\n );\n\n // Adapters\n $this->app->bind(\n IUserRepository::class,\n UserEloquentRepository::class\n );\n $this->app->bind(\n IBeerRepository::class,\n BeerEloquentRepository::class\n );\n }", "public function boot()\n {\n $this->setupConfig($this->app);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->loadMigrations();\n }\n if(config($this->vendorNamespace. '::config.enabled')){\n Livewire::component($this->vendorNamespace . '::login-form', LoginForm::class);\n $this->loadRoutes();\n $this->loadViews();\n $this->loadMiddlewares();\n $this->loadTranslations();\n }\n }", "public function boot()\n {\n $source = dirname(__DIR__, 3) . '/config/config.php';\n\n if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {\n $this->publishes([$source => config_path('dubbo_cli.php')]);\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('dubbo_cli');\n }\n\n $this->mergeConfigFrom($source, 'dubbo_cli');\n }", "public function boot()\n {\n $this->package('domain/app');\n\n $this->setApplication();\n }", "public function boot()\n {\n $this->setUpConfig();\n $this->setUpConsoleCommands();\n }", "public function boot()\n {\n $this->strapRoutes();\n $this->strapViews();\n $this->strapMigrations();\n $this->strapCommands();\n\n $this->registerPolicies();\n }", "public function boot()\n {\n $this->app->singleton('LaraCurlService', function ($app) {\n return new LaraCurlService();\n });\n\n $this->loadRoutesFrom(__DIR__.'/routes/web.php');\n }", "public function boot()\n {\n $providers = $this->make('config')->get('app.console_providers', array());\n foreach ($providers as $provider) {\n $provider = $this->make($provider);\n if ($provider && method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "public function boot()\n {\n foreach (glob(app_path('/Api/config/*.php')) as $path) {\n $path = realpath($path);\n $this->mergeConfigFrom($path, basename($path, '.php'));\n }\n\n // 引入自定义函数\n foreach (glob(app_path('/Helpers/*.php')) as $helper) {\n require_once $helper;\n }\n // 引入 api 版本路由\n $this->loadRoutesFrom(app_path('/Api/Routes/base.php'));\n\n }", "public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n //$this->app->loadDeferredProviders();\n\n if (!$this->commandsLoaded) {\n //$this->commands();\n\n $this->commandsLoaded = true;\n }\n }", "protected function boot()\n\t{\n\t\tforeach ($this->serviceProviders as $provider)\n\t\t{\n\t\t\t$provider->boot($this);\n\t\t}\n\n\t\t$this->booted = true;\n\t}", "public function boot()\n {\n $this->setupConfig();\n //register rotating daily monolog provider\n $this->app->register(MonologProvider::class);\n $this->app->register(CircuitBreakerServiceProvider::class);\n $this->app->register(CurlServiceProvider::class);\n }", "public function boot(): void\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->services, function ($service) {\n $this->bootServices($service);\n });\n\n $this->booted = true;\n }", "public static function boot() {\n\t\tstatic::container()->boot();\n\t}", "public function boot()\n {\n include_once('ComposerDependancies\\Global.php');\n //---------------------------------------------\n include_once('ComposerDependancies\\League.php');\n include_once('ComposerDependancies\\Team.php');\n include_once('ComposerDependancies\\Matchup.php');\n include_once('ComposerDependancies\\Player.php');\n include_once('ComposerDependancies\\Trade.php');\n include_once('ComposerDependancies\\Draft.php');\n include_once('ComposerDependancies\\Message.php');\n include_once('ComposerDependancies\\Poll.php');\n include_once('ComposerDependancies\\Chat.php');\n include_once('ComposerDependancies\\Rule.php');\n\n \n include_once('ComposerDependancies\\Admin\\Users.php');\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n if ($this->app instanceof LaravelApplication) {\n $this->publishes([\n __DIR__.'/../config/state-machine.php' => config_path('state-machine.php'),\n ], 'config');\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('state-machine');\n }\n }\n }", "public function boot()\n {\n $this->bootEvents();\n\n $this->bootPublishes();\n\n $this->bootTypes();\n\n $this->bootSchemas();\n\n $this->bootRouter();\n\n $this->bootViews();\n \n $this->bootSecurity();\n }", "public function boot()\n {\n //\n Configuration::environment(\"sandbox\");\n Configuration::merchantId(\"cmpss9trsxsr4538\");\n Configuration::publicKey(\"zy3x5mb5jwkcrxgr\");\n Configuration::privateKey(\"4d63c8b2c340daaa353be453b46f6ac2\");\n\n\n $modules = Directory::listDirectories(app_path('Modules'));\n\n foreach ($modules as $module)\n {\n $routesPath = app_path('Modules/' . $module . '/routes.php');\n $viewsPath = app_path('Modules/' . $module . '/Views');\n\n if (file_exists($routesPath))\n {\n require $routesPath;\n }\n\n if (file_exists($viewsPath))\n {\n $this->app->view->addLocation($viewsPath);\n }\n }\n }", "public function boot()\n {\n resolve(EngineManager::class)->extend('elastic', function () {\n return new ElasticScoutEngine(\n ElasticBuilder::create()\n ->setHosts(config('scout.elastic.hosts'))\n ->build()\n );\n });\n }", "public function boot(): void\n {\n try {\n // Just check if we have DB connection! This is to avoid\n // exceptions on new projects before configuring database options\n // @TODO: refcator the whole accessareas retrieval to be file-based, instead of db based\n DB::connection()->getPdo();\n\n if (Schema::hasTable(config('cortex.foundation.tables.accessareas'))) {\n // Register accessareas into service container, early before booting any module service providers!\n $this->app->singleton('accessareas', fn () => app('cortex.foundation.accessarea')->where('is_active', true)->get());\n }\n } catch (Exception $e) {\n // Be quiet! Do not do or say anything!!\n }\n\n $this->bootstrapModules();\n }", "public function boot()\n {\n $this->app->register(UserServiceProvider::class);\n $this->app->register(DashboardServiceProvider::class);\n $this->app->register(CoreServiceProvider::class);\n $this->app->register(InstitutionalVideoServiceProvider::class);\n $this->app->register(InstitutionalServiceProvider::class);\n $this->app->register(TrainingServiceProvider::class);\n $this->app->register(CompanyServiceProvider::class);\n $this->app->register(LearningUnitServiceProvider::class);\n $this->app->register(PublicationServiceProvider::class);\n }", "public function boot()\n {\n Schema::defaultStringLength(191);\n\n $this->app->bindMethod([SendMailPasswordReset::class, 'handle'], function ($job, $app) {\n return $job->handle($app->make(MailService::class));\n });\n\n $this->app->bindMethod([ClearTokenPasswordReset::class, 'handle'], function ($job, $app) {\n return $job->handle($app->make(PasswordResetRepository::class));\n });\n\n $this->app->bind(AuthService::class, function ($app) {\n return new AuthService($app->make(HttpService::class));\n });\n }", "public function boot()\n {\n $this->makeRepositories();\n }", "public function boot(): void\n {\n $this->loadMiddlewares();\n }", "public function boot()\n {\n $this->app->when(ChatAPIChannel::class)\n ->needs(ChatAPI::class)\n ->give(function () {\n $config = config('services.chatapi');\n return new ChatAPI(\n $config['token'],\n $config['api_url']\n );\n });\n }", "public function boot() {\r\n\t\t$hosting_service = HostResolver::get_host_service();\r\n\r\n\t\tif ( ! empty( $hosting_service ) ) {\r\n\t\t\t$this->provides[] = $hosting_service;\r\n\t\t}\r\n\t}", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n require(__DIR__ . '/../routes/console.php');\n } else {\n // Menus for BPM are done through middleware. \n Route::pushMiddlewareToGroup('web', AddToMenus::class);\n \n // Assigning to the web middleware will ensure all other middleware assigned to 'web'\n // will execute. If you wish to extend the user interface, you'll use the web middleware\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(__DIR__ . '/../routes/web.php');\n \n // If you wish to extend the api, be sure to utilize the api middleware. In your api \n // Routes file, you should prefix your routes with api/1.0\n Route::middleware('api')\n ->namespace($this->namespace)\n ->prefix('api/1.0')\n ->group(__DIR__ . '/../routes/api.php');\n \n Event::listen(ScreenBuilderStarting::class, function($event) {\n $event->manager->addScript(mix('js/screen-builder-extend.js', 'vendor/api-connector'));\n $event->manager->addScript(mix('js/screen-renderer-extend.js', 'vendor/api-connector'));\n });\n }\n\n // load migrations\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n\n // Load our views\n $this->loadViewsFrom(__DIR__.'/../resources/views/', 'api-connector');\n\n // Load our translations\n $this->loadTranslationsFrom(__DIR__.'/../lang', 'api-connector');\n\n $this->publishes([\n __DIR__.'/../public' => public_path('vendor/api-connector'),\n ], 'api-connector');\n\n $this->publishes([\n __DIR__ . '/../database/seeds' => database_path('seeds'),\n ], 'api-connector');\n\n $this->app['events']->listen(PackageEvent::class, PackageListener::class);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->bindCommands();\n $this->registerCommands();\n $this->app->bind(InstallerContract::class, Installer::class);\n\n $this->publishes([\n __DIR__.'/../config/exceptionlive.php' => base_path('config/exceptionlive.php'),\n ], 'config');\n }\n\n $this->registerMacros();\n }", "public function boot(){\r\n $this->app->configure('sdk');\r\n $this->publishes([\r\n __DIR__.'/../../resources/config/sdk.php' => config_path('sdk.php')\r\n ]);\r\n $this->mergeConfigFrom(__DIR__.'/../../resources/config/sdk.php','sdk');\r\n\r\n $api = config('sdk.api');\r\n foreach($api as $key => $value){\r\n $this->app->singleton($key,$value);\r\n }\r\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n EnvironmentCommand::class,\n EventGenerateCommand::class,\n EventMakeCommand::class,\n JobMakeCommand::class,\n KeyGenerateCommand::class,\n MailMakeCommand::class,\n ModelMakeCommand::class,\n NotificationMakeCommand::class,\n PolicyMakeCommand::class,\n ProviderMakeCommand::class,\n RequestMakeCommand::class,\n ResourceMakeCommand::class,\n RuleMakeCommand::class,\n ServeCommand::class,\n StorageLinkCommand::class,\n TestMakeCommand::class,\n ]);\n }\n }", "public function boot()\n {\n $this->app->bind(WeatherInterface::class, OpenWeatherMapService::class);\n $this->app->bind(OrderRepositoryInterface::class, EloquentOrderRepository::class);\n $this->app->bind(NotifyInterface::class, EmailNotifyService::class);\n }", "public function boot()\n {\n $this->app->bind(DateService::class,DateServiceImpl::class);\n $this->app->bind(DisasterEventQueryBuilder::class,DisasterEventQueryBuilderImpl::class);\n $this->app->bind(MedicalFacilityQueryBuilder::class,MedicalFacilityQueryBuilderImpl::class);\n $this->app->bind(RefugeCampQueryBuilder::class,RefugeCampQueryBuilderImpl::class);\n $this->app->bind(VictimQueryBuilder::class,VictimQueryBuilderImpl::class);\n $this->app->bind(VillageQueryBuilder::class,VillageQueryBuilderImpl::class);\n }", "public function boot()\n {\n\t\tif ( $this->app->runningInConsole() ) {\n\t\t\t$this->loadMigrationsFrom(__DIR__.'/migrations');\n\n//\t\t\t$this->publishes([\n//\t\t\t\t__DIR__.'/config/scheduler.php' => config_path('scheduler.php'),\n//\t\t\t\t__DIR__.'/console/CronTasksList.php' => app_path('Console/CronTasksList.php'),\n//\t\t\t\t__DIR__.'/views' => resource_path('views/vendor/scheduler'),\n//\t\t\t]);\n\n//\t\t\tapp('Revolta77\\ScheduleMonitor\\Conntroller\\CreateController')->index();\n\n//\t\t\t$this->commands([\n//\t\t\t\tConsole\\Commands\\CreateController::class,\n//\t\t\t]);\n\t\t}\n\t\t$this->loadRoutesFrom(__DIR__.'/routes/web.php');\n }", "public function boot()\n {\n $this->bootPackages();\n }", "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->commands($this->load(__DIR__.'/../Console', Command::class));\n }\n }", "public function boot(): void\n {\n $this->publishes(\n [\n __DIR__ . '/../config/laravel_entity_services.php' =>\n $this->app->make('path.config') . DIRECTORY_SEPARATOR . 'laravel_entity_services.php',\n ],\n 'laravel_repositories'\n );\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel_entity_services.php', 'laravel_entity_services');\n\n $this->registerCustomBindings();\n }", "public function boot()\n {\n // DEFAULT STRING LENGTH\n Schema::defaultStringLength(191);\n\n // PASSPORT\n Passport::routes(function (RouteRegistrar $router)\n {\n $router->forAccessTokens();\n });\n Passport::tokensExpireIn(now()->addDays(1));\n\n // SERVICES, REPOSITORIES, CONTRACTS BINDING\n $this->app->bind('App\\Contracts\\IUser', 'App\\Repositories\\UserRepository');\n $this->app->bind('App\\Contracts\\IUserType', 'App\\Repositories\\UserTypeRepository');\n $this->app->bind('App\\Contracts\\IApiToken', 'App\\Services\\ApiTokenService');\n $this->app->bind('App\\Contracts\\IModule', 'App\\Repositories\\ModuleRepository');\n $this->app->bind('App\\Contracts\\IModuleAction', 'App\\Repositories\\ModuleActionRepository');\n }", "public function bootstrap(): void\n {\n $globalConfigurationBuilder = (new GlobalConfigurationBuilder())->withEnvironmentVariables()\n ->withPhpFileConfigurationSource(__DIR__ . '/../config.php');\n (new BootstrapperCollection())->addMany([\n new DotEnvBootstrapper(__DIR__ . '/../.env'),\n new ConfigurationBootstrapper($globalConfigurationBuilder),\n new GlobalExceptionHandlerBootstrapper($this->container)\n ])->bootstrapAll();\n }", "public function boot()\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'deniskisel');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'deniskisel');\n// $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n $this->bootingDomain();\n\n $this->registerCommands();\n $this->registerListeners();\n $this->registerPolicies();\n $this->registerRoutes();\n $this->registerBladeComponents();\n $this->registerLivewireComponents();\n $this->registerSpotlightCommands();\n\n $this->bootedDomain();\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->registerMigrations();\n $this->registerMigrationFolder();\n $this->registerConfig();\n }\n }", "public function boot()\n {\n $this->bootModulesMenu();\n $this->bootSkinComposer();\n $this->bootCustomBladeDirectives();\n }", "public function boot(): void\n {\n $this->app->bind(Telegram::class, static function () {\n return new Telegram(\n config('services.telegram-bot-api.token'),\n new HttpClient()\n );\n });\n }", "public function boot()\n {\n\n if (! config('app.installed')) {\n return;\n }\n\n $this->loadRoutesFrom(__DIR__ . '/Routes/admin.php');\n $this->loadRoutesFrom(__DIR__ . '/Routes/public.php');\n\n $this->loadMigrationsFrom(__DIR__ . '/Database/Migrations');\n\n// $this->loadViewsFrom(__DIR__ . '/Resources/Views', 'portfolio');\n\n $this->loadTranslationsFrom(__DIR__ . '/Resources/Lang/', 'contact');\n\n //Add menu to admin panel\n $this->adminMenu();\n\n }", "public function boot()\n {\n if (! config('app.installed')) {\n return;\n }\n\n $this->app['config']->set([\n 'scout' => [\n 'driver' => setting('search_engine', 'mysql'),\n 'algolia' => [\n 'id' => setting('algolia_app_id'),\n 'secret' => setting('algolia_secret'),\n ],\n ],\n ]);\n }", "protected function bootServiceProviders()\n {\n foreach($this->activeProviders as $provider)\n {\n // check if the service provider has a boot method.\n if (method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "public function boot(): void\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'imc');\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'imc');\n $this->registerPackageRoutes();\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n // Larapex Livewire\n $this->mergeConfigFrom(__DIR__ . '/../configs/larapex-livewire.php', 'larapex-livewire');\n\n $this->loadViewsFrom(__DIR__ . '/../resources/views', 'larapex-livewire');\n\n $this->registerBladeDirectives();\n\n if ($this->app->runningInConsole()) {\n $this->registerCommands();\n $this->publishResources();\n }\n }", "public function boot()\n {\n // Bootstrap code here.\n $this->app->singleton(L9SmsApiChannel::class, function () {\n $config = config('l9smsapi');\n if (empty($config['token']) || empty($config['service'])) {\n throw new \\Exception('L9SmsApi missing token and service in config');\n }\n\n return new L9SmsApiChannel($config['token'], $config['service']);\n });\n\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/l9smsapi.php' => config_path('l9smsapi.php'),\n ], 'config');\n }\n }", "public function boot()\n\t{\n\t\t$this->bindRepositories();\n\t}", "public function boot()\n {\n if (!$this->app->runningInConsole()) {\n return;\n }\n\n $this->commands([\n ListenCommand::class,\n InstallCommand::class,\n EventsListCommand::class,\n ObserverMakeCommand::class,\n ]);\n\n foreach ($this->listen as $event => $listeners) {\n foreach ($listeners as $listener) {\n RabbitEvents::listen($event, $listener);\n }\n }\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n MultiAuthInstallCommand::class,\n ]);\n }\n }", "public function boot() {\n\n\t\t$this->registerProviders();\n\t\t$this->bootProviders();\n\t\t$this->registerProxies();\n\t}", "public function boot(): void\n {\n // routes\n $this->loadRoutes();\n // assets\n $this->loadAssets('assets');\n // configuration\n $this->loadConfig('configs');\n // views\n $this->loadViews('views');\n // view extends\n $this->extendViews();\n // translations\n $this->loadTranslates('views');\n // adminer\n $this->loadAdminer('adminer');\n // commands\n $this->loadCommands();\n // gates\n $this->registerGates();\n // listeners\n $this->registerListeners();\n // settings\n $this->applySettings();\n }", "public function boot()\n {\n $this->setupFacades();\n $this->setupViews();\n $this->setupBlades();\n }", "public function boot()\n {\n\n $this->app->translate_manager->addTranslateProvider(TranslateMenu::class);\n\n\n\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n $this->loadMigrationsFrom(__DIR__ . '/../migrations/');\n\n\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../config/larkeauth-rbac-model.conf' => config_path('larkeauth-rbac-model.conf.larkeauth'),\n __DIR__ . '/../config/larkeauth.php' => config_path('larkeauth.php.larkeauth')\n ], 'larke-auth-config');\n\n $this->commands([\n Commands\\Install::class,\n Commands\\GroupAdd::class,\n Commands\\PolicyAdd::class,\n Commands\\RoleAssign::class,\n ]);\n }\n\n $this->mergeConfigFrom(__DIR__ . '/../config/larkeauth.php', 'larkeauth');\n\n $this->bootObserver();\n }", "public function boot(): void\n {\n $this->app\n ->when(RocketChatWebhookChannel::class)\n ->needs(RocketChat::class)\n ->give(function () {\n return new RocketChat(\n new HttpClient(),\n Config::get('services.rocketchat.url'),\n Config::get('services.rocketchat.token'),\n Config::get('services.rocketchat.channel')\n );\n });\n }", "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n $this->app->registerConfiguredProvidersInRequest();\n\n $this->fireAppCallbacks($this->bootingCallbacks);\n\n /** array_walk\n * If when a provider booting, it reg some other providers,\n * then the new providers added to $this->serviceProviders\n * then array_walk will loop the new ones and boot them. // pingpong/modules 2.0 use this feature\n */\n array_walk($this->serviceProviders, function ($p) {\n $this->bootProvider($p);\n });\n\n $this->booted = true;\n\n $this->fireAppCallbacks($this->bootedCallbacks);\n }", "public function boot()\n {\n $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n\t{\n\t\t$this->package('atlantis/admin');\n\n\t\t#i: Set the locale\n\t\t$this->setLocale();\n\n $this->registerServiceAdminValidator();\n $this->registerServiceAdminFactory();\n $this->registerServiceAdminDataTable();\n $this->registerServiceModules();\n\n\t\t#i: Include our filters, view composers, and routes\n\t\tinclude __DIR__.'/../../filters.php';\n\t\tinclude __DIR__.'/../../views.php';\n\t\tinclude __DIR__.'/../../routes.php';\n\n\t\t$this->app['events']->fire('admin.ready');\n\t}", "public function boot()\n {\n $this->app->booted(function () {\n $this->callMethodIfExists('jobs');\n });\n }", "public function boot()\n {\n $this->bootSetTimeLocale();\n $this->bootBladeHotelRole();\n $this->bootBladeHotelGuest();\n $this->bootBladeIcon();\n }", "public function boot(): void\n {\n $this->registerRoutes();\n $this->registerResources();\n $this->registerMixins();\n\n if ($this->app->runningInConsole()) {\n $this->offerPublishing();\n $this->registerMigrations();\n }\n }", "public function boot()\n {\n $this->dispatch(new SetCoreConnection());\n $this->dispatch(new ConfigureCommandBus());\n $this->dispatch(new ConfigureTranslator());\n $this->dispatch(new LoadStreamsConfiguration());\n\n $this->dispatch(new InitializeApplication());\n $this->dispatch(new AutoloadEntryModels());\n $this->dispatch(new AddAssetNamespaces());\n $this->dispatch(new AddImageNamespaces());\n $this->dispatch(new AddViewNamespaces());\n $this->dispatch(new AddTwigExtensions());\n $this->dispatch(new RegisterAddons());\n }", "public function boot(): void\n {\n $this->loadViews();\n $this->loadTranslations();\n\n if ($this->app->runningInConsole()) {\n $this->publishMultipleConfig();\n $this->publishViews(false);\n $this->publishTranslations(false);\n }\n }", "public function boot()\n {\n $this->bootForConsole();\n $this->loadRoutesFrom(__DIR__ . '/routes/web.php');\n $this->loadViewsFrom(__DIR__ . '/./../resources/views', 'bakerysoft');\n }", "public function boot()\n {\n $this->app->booted(function () {\n $this->defineRoutes();\n });\n $this->defineResources();\n $this->registerDependencies();\n }", "public function boot()\n {\n $this->app->bind(CustomersRepositoryInterface::class, CustomersRepository::class);\n $this->app->bind(CountryToCodeMapperInterface::class, CountryToCodeMapper::class);\n $this->app->bind(PhoneNumbersValidatorInterface::class, PhoneNumbersRegexValidator::class);\n $this->app->bind(CustomersFilterServiceInterface::class, CustomersFilterService::class);\n $this->app->bind(CacheInterface::class, CacheAdapter::class);\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([$this->configPath() => config_path('oauth.php')], 'oauth');\n }\n\n app()->bind(ClientToken::class, function () {\n return new ClientToken();\n });\n\n app()->bind(TokenParser::class, function () {\n return new TokenParser(\n app()->get(Request::class)\n );\n });\n\n app()->bind(OAuthClient::class, function () {\n return new OAuthClient(\n app()->get(Request::class),\n app()->get(ClientToken::class)\n );\n });\n\n app()->bind(AccountService::class, function () {\n return new AccountService(app()->get(OAuthClient::class));\n });\n }", "public function boot()\n {\n Client::observe(ClientObserver::class);\n $this->app->bind(ClientRepositoryInterface::class, function ($app) {\n return new ClientRepository(Client::class);\n });\n $this->app->bind(UserRepositoryInterface::class, function ($app) {\n return new UserRepository(User::class);\n });\n }", "public function boot()\n {\n $this->setupFacades(); \n //$this->setupConfigs(); \n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n //\n }\n\n $this->loadRoutesFrom(__DIR__ . '/routes.php');\n }", "public function boot()\n {\n $path = __DIR__.'/../..';\n\n $this->package('clumsy/cms', 'clumsy', $path);\n\n $this->registerAuthRoutes();\n $this->registerBackEndRoutes();\n\n require $path.'/helpers.php';\n require $path.'/errors.php';\n require $path.'/filters.php';\n\n if ($this->app->runningInConsole()) {\n $this->app->make('Clumsy\\CMS\\Clumsy');\n }\n\n }", "public function boot()\n {\n $this->mergeConfigFrom(__DIR__ . '/../../config/bs4.php', 'bs4');\n $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'bs');\n $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'bs');\n\n if ($this->app->runningInConsole())\n {\n $this->publishes([\n __DIR__ . '/../../resources/views' => resource_path('views/vendor/bs'),\n ], 'views');\n\n $this->publishes([\n __DIR__ . '/../../resources/lang' => resource_path('lang/vendor/bs'),\n ], 'lang');\n\n $this->publishes([\n __DIR__ . '/../../config' => config_path(),\n ], 'config');\n }\n }", "public function boot()\n {\n $this->client = new HttpClient([\n 'base_uri' => 'https://api.ipfinder.io/v1/',\n 'headers' => [\n 'User-Agent' => 'Laravel-GeoIP-Torann',\n ],\n 'query' => [\n 'token' => $this->config('key'),\n ],\n ]);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Check::class,\n Clear::class,\n Fix::class,\n Fresh::class,\n Foo::class,\n Ide::class,\n MakeDatabase::class,\n Ping::class,\n Version::class,\n ]);\n }\n }", "public function boot()\n {\n $app = $this->app;\n\n if (!$app->runningInConsole()) {\n return;\n }\n\n $source = realpath(__DIR__ . '/config/config.php');\n\n if (class_exists('Illuminate\\Foundation\\Application', false)) {\n // L5\n $this->publishes([$source => config_path('sniffer-rules.php')]);\n $this->mergeConfigFrom($source, 'sniffer-rules');\n } elseif (class_exists('Laravel\\Lumen\\Application', false)) {\n // Lumen\n $app->configure('sniffer-rules');\n $this->mergeConfigFrom($source, 'sniffer-rules');\n } else {\n // L4\n $this->package('chefsplate/sniffer-rules', null, __DIR__);\n }\n }", "public function boot()\r\n\t{\r\n\t\t$this->package('estey/hipsupport');\r\n\t\t$this->registerHipSupport();\r\n\t\t$this->registerHipSupportOnlineCommand();\r\n\t\t$this->registerHipSupportOfflineCommand();\r\n\r\n\t\t$this->registerCommands();\r\n\t}", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n ControllerMakeCommand::class,\n ServiceMakeCommand::class,\n RepositoryMakeCommand::class,\n ModelMakeCommand::class,\n RequestRuleMakeCommand::class,\n ]);\n }\n }", "public function boot() {\n $srcDir = __DIR__ . '/../';\n \n $this->package('baseline/baseline', 'baseline', $srcDir);\n \n include $srcDir . 'Http/routes.php';\n include $srcDir . 'Http/filters.php';\n }", "public function boot()\n {\n $this->app->bind('App\\Services\\ProviderAccountService', function() {\n return new ProviderAccountService;\n });\n }", "public function boot()\n {\n $this->loadViewsFrom(__DIR__ . '/resources/views', 'Counters');\n\n $this->loadTranslationsFrom(__DIR__ . '/resources/lang', 'Counters');\n\n\n //To load migration files directly from the package\n// $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n\n $this->app->booted(function () {\n $loader = AliasLoader::getInstance();\n $loader->alias('Counters', Counters::class);\n\n });\n\n $this->publishes([\n __DIR__ . '/../config/counter.php' => config_path('counter.php'),\n ], 'config');\n\n\n\n $this->publishes([\n __DIR__.'/../database/migrations/0000_00_00_000000_create_counters_tables.php' => $this->app->databasePath().\"/migrations/0000_00_00_000000_create_counters_tables.php\",\n ], 'migrations');\n\n\n if ($this->app->runningInConsole()) {\n $this->commands([\\Maher\\Counters\\Commands\\MakeCounter::class]);\n }\n\n\n }", "public function boot(Application $app)\n {\n\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }" ]
[ "0.7344842", "0.7212776", "0.7207748", "0.7123287", "0.7109729", "0.70822036", "0.7076881", "0.70718396", "0.7051853", "0.7025475", "0.7011949", "0.70043486", "0.6955807", "0.69322443", "0.69319373", "0.69272774", "0.6911386", "0.69069713", "0.6898877", "0.6898432", "0.6896597", "0.6889767", "0.6886577", "0.6880688", "0.6875815", "0.6874972", "0.68696195", "0.6864291", "0.6864246", "0.68631536", "0.68599164", "0.6857919", "0.685537", "0.68552583", "0.68522125", "0.6839775", "0.683261", "0.6831196", "0.68272495", "0.68250644", "0.68241394", "0.68181944", "0.68132496", "0.68117976", "0.6811785", "0.6808445", "0.68066794", "0.680175", "0.68005246", "0.67994386", "0.67969066", "0.67912513", "0.67884964", "0.678574", "0.678558", "0.6783794", "0.67782456", "0.6773669", "0.6766658", "0.6766194", "0.67617613", "0.67611295", "0.6758855", "0.6756636", "0.6754412", "0.6751842", "0.6747439", "0.6744991", "0.67441815", "0.6743506", "0.67400324", "0.6739403", "0.6738356", "0.6738189", "0.6731425", "0.6730627", "0.67293024", "0.6726232", "0.67261064", "0.67192256", "0.6716676", "0.6716229", "0.671442", "0.6713091", "0.6702467", "0.66990495", "0.66913867", "0.6689953", "0.66861963", "0.66840357", "0.66826946", "0.6681548", "0.6680455", "0.6676407", "0.6675645", "0.6672465", "0.66722375", "0.66722375", "0.66722375", "0.66722375", "0.66722375" ]
0.0
-1
Handle an incoming request.
public function handle($request, Closure $next) { //左側 Menu::make('left', function (Builder $menu) { }); Menu::make('right', function (Builder $menu) { if (auth()->check()) { /** @var User $user */ $user = auth()->user(); // 會員 // // 信箱驗證 if (!$user->hasVerifiedEmail()) { $menu->add('尚未完成信箱驗證', ['route' => 'verification.notice']) ->link->attr(['class' => 'text-danger']); } // // // 管理員 if (Laratrust::can('menu.view') && $user->hasVerifiedEmail()) { /** @var \Lavary\Menu\Builder $adminMenu */ $adminMenu = $menu->add('管理選單', 'javascript:void(0)'); if (Laratrust::can('user.manage')) { $adminMenu->add('會員管理', ['route' => 'user.index'])->active('user/*'); } if (Laratrust::can('role.manage')) { $adminMenu->add('角色管理', ['route' => 'role.index'])->active('role/*'); } if (Laratrust::can('activity-log.access')) { $adminMenu->add('活動紀錄', ['route' => 'activity-log.index'])->active('activity-log/*'); } if (Laratrust::can('log-viewer.access')) { $adminMenu->add( '記錄檢視器<i class="fas fa-external-link-alt ml-2"></i>', ['route' => 'log-viewer::dashboard'] )->link->attr('target', '_blank'); } // // if (Laratrust::can('telescope.access')) { // $adminMenu->add( // 'Telescope<i class="fas fa-external-link-alt ml-2"></i>', // ['url' => config('telescope.path')] // )->link->attr('target', '_blank'); // } } /** @var \Lavary\Menu\Builder $userMenu */ $userMenu = $menu->add(auth()->user()->name, 'javascript:void(0)'); $userMenu->add('個人資料', ['route' => 'profile'])->active('profile/*'); $userMenu->add('登出', 'javascript:void(0)') ->link ->attr('onclick', 'event.preventDefault(); document.getElementById(\'logout-form\').submit();'); } else { // 遊客 $menu->add('登入', ['route' => 'login']); } }); return $next($request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function handle_request();", "public function handleRequest();", "public function handleRequest();", "public function handleRequest();", "protected abstract function handleRequest();", "abstract public function handleRequest($request);", "abstract public function handleRequest(Request $request);", "public function handle($request);", "public function handleRequest() {}", "function handleRequest() ;", "public function handle(Request $request);", "protected function handle(Request $request) {}", "public function handle(array $request);", "public function process_request() {\n if(!empty($this->POST)) {\n return $this->handlePOST();\n } else {\n return $this->handleGET();\n }\n }", "public function handleRequest() {\n // Make sure the action parameter exists\n $this->requireParam('action');\n\n // Call the correct handler based on the action\n switch($this->requestBody['action']) {\n\n case 'checkoutLocker':\n $this->handleCheckoutLocker();\n\t\t\t\tbreak;\n\n\t\t\tcase 'remindLocker':\n $this->handleRemindLocker();\n\t\t\t\tbreak;\n\n\t\t\tcase 'returnLocker':\n $this->handleReturnLocker();\n\t\t\t\tbreak;\n\n default:\n $this->respond(new Response(Response::BAD_REQUEST, 'Invalid action on Locker resource'));\n }\n }", "abstract protected function process(Request $request);", "public function handleRequest($request)\n {\n list ($route, $params) = $request->resolve();\n $this->requestedRoute = $route;\n $result = $this->runAction($route, $params);\n\n if ($result instanceof Response) {\n return $result;\n } elseif ($result instanceof Looper){\n $result->loop();\n\n $response = $this->getResponse();\n $response->exitStatus = 0;\n\n return $response;\n } else {\n $response = $this->getResponse();\n $response->exitStatus = $result;\n\n return $response;\n }\n }", "abstract function handle(Request $request, $parameters);", "protected function handle_request() {\r\n global $wp;\r\n $film_query = $wp->query_vars['films'];\r\n \r\n if (!$film_query) { // send all films\r\n $raw_data = $this->get_all_films();\r\n }\r\n else if ($film_query == \"featured\") { // send featured films\r\n $raw_data = $this->get_featured_films();\r\n }\r\n else if (is_numeric($film_query)) { // send film of id\r\n $raw_data = $this->get_film_by_id($film_query);\r\n }\r\n else { // input error\r\n $this->send_response('Bad Input');\r\n }\r\n\r\n $all_data = $this->get_acf_data($raw_data);\r\n $this->send_response('200 OK', $all_data);\r\n }", "public function handle(ServerRequestInterface $request);", "public function handleRequest()\n {\n $route = $this->router->match();\n\n if ($route) {\n $controllerName = $route['target']['controllerName'];\n $methodName = $route['target']['methodName'];\n\n $controller = new $controllerName();\n\n $controller->$methodName($route['params']);\n } else {\n header(\"HTTP:1.0 404 not Found\");\n echo json_encode([\n \"error_code\" => 404,\n \"reason\" => \"page not found\"\n ]);\n }\n }", "function handle(Request $request = null, Response $response = null);", "public function processRequest();", "public abstract function processRequest();", "public function handleRequest(Request $request, Response $response);", "abstract public function processRequest();", "public function handle(array $request = []);", "public function handleRequest()\n {\n $router = new Router();\n $controllerClass = $router->resolve()->getController();\n $controllerAction = $router->getAction();\n\n \n\n if(!class_exists($controllerClass)\n || !method_exists($controllerClass,$controllerAction)\n ){\n header('Not found', true, 404);\n exit;\n }\n\n $controller = new $controllerClass();\n call_user_func([$controller, $controllerAction]);\n\n }", "public function handle(Request $request)\n {\n if ($request->header('X-GitHub-Event') === 'push') {\n return $this->handlePush($request->input());\n }\n\n if ($request->header('X-GitHub-Event') === 'pull_request') {\n return $this->handlePullRequest($request->input());\n }\n\n if ($request->header('X-GitHub-Event') === 'ping') {\n return $this->handlePing();\n }\n\n return $this->handleOther();\n }", "protected function _handle()\n {\n return $this\n ->_addData('post', $_POST)\n ->_addData('get', $_GET)\n ->_addData('server', $_SERVER)\n ->_handleRequestRoute();\n }", "public function processRequest() {\n $action = \"\";\n //retrieve action from client.\n if (filter_has_var(INPUT_GET, 'action')) {\n $action = filter_input(INPUT_GET, 'action');\n }\n\n switch ($action) {\n case 'login':\n $this->login(); \n break;\n case 'register':\n $this->register(); //list all articles\n break;\n case 'search':\n $this->search(); //show a form for an article\n break;\n case 'searchList':\n $this->searchList();\n break;\n case 'remove':\n $this->removeArticle();\n break;\n case 'modify':\n $this->modifyArticle();\n break;\n case 'listCategoryForm':\n $this->listCategoryForm();\n break;\n case 'listCategory':\n $this->listCategory();\n break;\n default :\n break;\n }\n }", "public static function handleRequest($request)\r\n {\r\n // Load controller for requested resource\r\n $controllerName = ucfirst($request->getRessourcePath()) . 'Controller';\r\n\r\n if (class_exists($controllerName))\r\n {\r\n $controller = new $controllerName();\r\n\r\n // Get requested action within controller\r\n $actionName = strtolower($request->getHTTPVerb()) . 'Action';\r\n\r\n if (method_exists($controller, $actionName))\r\n {\r\n // Do the action!\r\n $result = $controller->$actionName($request);\r\n\r\n // Send REST response to client\r\n $outputHandlerName = ucfirst($request->getFormat()) . 'OutputHandler';\r\n\r\n if (class_exists($outputHandlerName))\r\n {\r\n $outputHandler = new $outputHandlerName();\r\n $outputHandler->render($result);\r\n }\r\n }\r\n }\r\n }", "public function process(Request $request, Response $response, RequestHandlerInterface $handler);", "public function handle(Request $request)\n {\n $handler = $this->router->match($request);\n if (!$handler) {\n echo \"Could not find your resource!\\n\";\n return;\n }\n\n return $handler();\n }", "public function handleRequest() {\n\t\t\n\t\tif (is_null($this->itemObj)) {\n\t\t\t$this->itemObj = MovieServices::getVcdByID($this->getParam('vcd_id'));\n\t\t}\n\t\t\n\t\t$action = $this->getParam('action');\n\t\t\n\t\tswitch ($action) {\n\t\t\tcase 'upload':\n\t\t\t\t$this->uploadImages();\n\t\t\t\t// reload and close upon success\n\t\t\t\tredirect('?page=addscreens&vcd_id='.$this->itemObj->getID().'&close=true');\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'fetch':\n\t\t\t\t$this->fetchImages();\n\t\t\t\t// reload and close upon success\n\t\t\t\tredirect('?page=addscreens&vcd_id='.$this->itemObj->getID().'&close=true');\n\t\t\t\tbreak;\n\t\t\n\t\t\tdefault:\n\t\t\t\tredirect();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function handle(Request $request): Response;", "public static function process_http_request()\n {\n }", "public function processRequest() {\r\n switch($this->requestMethod) {\r\n case 'GET':\r\n if($this->id) {\r\n $response = $this->get($this->id);\r\n }\r\n else {\r\n $response = $this->getAll();\r\n }\r\n break;\r\n case 'POST':\r\n $response = $this->create();\r\n break;\r\n case 'PUT':\r\n $response = $this->update($this->id);\r\n break;\r\n case 'DELETE':\r\n $response = $this->delete($this->id);\r\n break;\r\n case 'OPTIONS':\r\n break;\r\n default:\r\n $response = $this->notFoundResponse();\r\n break;\r\n }\r\n\r\n header($response['status_code_header']);\r\n\r\n // If there is a body then echo it\r\n if($response['body']) {\r\n echo $response['body'];\r\n }\r\n }", "abstract public function handle(ServerRequestInterface $request): ResponseInterface;", "public function processRequest()\n\t\t{\n\t\t\t$request_method = strtolower($_SERVER['REQUEST_METHOD']);\n\t\t\tswitch ($request_method)\n\t\t\t{\n\t\t\t\tcase 'get':\n\t\t\t\t\t$data = $_GET['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'post':\n\t\t\t\t\t$data = $_GET['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$request_parts = explode('/', $data);\n\t\t\t$controller = $request_parts[0];\n\t\t\tswitch ($controller)\n\t\t\t{\n\t\t\t\tcase 'ad':\n\t\t\t\t\tprocessAdRequest(substr($data, strlen('ad')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'category':\n\t\t\t\t\tprocessCategoryRequest(substr($data, strlen('category')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'user':\n\t\t\t\t\tprocessUserRequest(substr($data, strlen('user')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\techo \"Invalid Request!\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}", "function handleRequest (&$request, &$context) {\n\n\t\t/* cycle through our process callback queue. using each() vs.\n\t\t * foreach, etc. so we may add elements to the callback array\n\t\t * later. probably primarily used for conditional callbacks. */\n\t\treset ($this->_processCallbacks);\n\t\twhile ($c = each ($this->_processCallbacks)) {\n\n\t\t\t// test for a successful view dispatch\n\t\t\tif ($this->_processProcess ($this->_processCallbacks[$c['key']],\n\t\t\t $request,\n\t\t\t $context))\n\t\t\t\treturn;\n\t\t}\n\n\t\t// if no view has been found yet attempt our default\n\t\tif ($this->defaultViewExists ())\n\t\t\t$this->renderDefaultView ($request, $context);\n\t}", "public function handle($request, $next);", "public function handle(): void\n {\n $globals = $_SERVER;\n //$SlimPsrRequest = ServerRequestFactory::createFromGlobals();\n //it doesnt matters if the Request is of different class - no need to create Guzaba\\Http\\Request\n $PsrRequest = ServerRequestFactory::createFromGlobals();\n //the only thing that needs to be fixed is the update the parsedBody if it is NOT POST & form-fata or url-encoded\n\n\n //$GuzabaPsrRequest =\n\n //TODO - this may be reworked to reroute to a new route (provided in the constructor) instead of providing the actual response in the constructor\n $DefaultResponse = $this->DefaultResponse;\n //TODO - fix the below\n// if ($PsrRequest->getContentType() === ContentType::TYPE_JSON) {\n// $DefaultResponse->getBody()->rewind();\n// $structure = ['message' => $DefaultResponse->getBody()->getContents()];\n// $json_string = json_encode($structure, JSON_UNESCAPED_SLASHES);\n// $StreamBody = new Stream(null, $json_string);\n// $DefaultResponse = $DefaultResponse->\n// withBody($StreamBody)->\n// withHeader('Content-Type', ContentType::TYPES_MAP[ContentType::TYPE_JSON]['mime'])->\n// withHeader('Content-Length', (string) strlen($json_string));\n// }\n\n $FallbackHandler = new RequestHandler($DefaultResponse);//this will produce 404\n $QueueRequestHandler = new QueueRequestHandler($FallbackHandler);//the default response prototype is a 404 message\n foreach ($this->middlewares as $Middleware) {\n $QueueRequestHandler->add_middleware($Middleware);\n }\n $PsrResponse = $QueueRequestHandler->handle($PsrRequest);\n $this->emit($PsrResponse);\n\n }", "public function HandleRequest(Request $request)\r\n {\r\n $command = $this->_commandResolver->GetCommand($request);\t// Create command object for Request\r\n $response = $command->Execute($request);\t\t\t\t\t// Execute the command to get response\r\n $view = ApplicationController::GetView($response);\t\t\t\t\t// Send response to the appropriate view for display\r\n $view->Render();\t\t\t\t\t\t\t\t\t\t\t// Display the view\r\n }", "public function process($path, Request $request);", "public function handle(string $query, ServerRequestInterface $request);", "public function handleRequest()\n\t{\n\t\t$fp = $this->fromRequest();\n\t\treturn $fp->render();\n\t}", "private function _processRequest()\n\t{\n\t\t// prevent unauthenticated access to API\n\t\t$this->_secureBackend();\n\n\t\t// get the request\n\t\tif (!empty($_REQUEST)) {\n\t\t\t// convert to object for consistency\n\t\t\t$this->request = json_decode(json_encode($_REQUEST));\n\t\t} else {\n\t\t\t// already object\n\t\t\t$this->request = json_decode(file_get_contents('php://input'));\n\t\t}\n\n\t\t//check if an action is sent through\n\t\tif(!isset($this->request->action)){\n\t\t\t//if no action is provided then reply with a 400 error with message\n\t\t\t$this->reply(\"No Action Provided\", 400);\n\t\t\t//kill script\n\t\t\texit();\n\t\t}\n\n\t\t//check if method for the action exists\n\t\tif(!method_exists($this, $this->request->action)){\n\t\t\t//if method doesn't exist, send 400 code and message with reply'\n\t\t\t$this->reply(\"Action method not found\",400);\n\t\t\t//kill script\n\t\t\texit();\n\t\t}\n \n\t\tswitch($this->request->action){\n\t\t\tcase \"hello\":\n\t\t\t\t$this->hello($this->request->data);\n\t\t\t\tbreak;\n\t\t\tcase \"submit_video\":\n\t\t\t\t//error_log(\"formSubmit has been sent through\");\n\t\t\t\t$this->submit_video($this->request, $_FILES);\n\t\t\t\tbreak;\n\t\t\tcase \"remove_video\":\n\t\t\t\t//error_log(\"formSubmit has been sent through\");\n\t\t\t\t$this->remove_video($this->request);\n\t\t\t\tbreak;\n\t\t\tcase \"isSubmitted\":\n\t\t\t\t$this->isSubmitted($this->request);\n\t\t\tdefault:\n\t\t\t\t$this->reply(\"action switch failed\",400);\n\t\t\tbreak;\n\t\t}\n\n\n\n\t}", "public function handleRequest ()\n\t{\n\t\t$this->version = '1.0';\n\t\t$this->id = NULL;\n\n\t\tif ($this->getProperty(self::PROPERTY_ENABLE_EXTRA_METHODS))\n\t\t\t$this->publishExtraMethods();\n\n\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST')\n\t\t{\n\n\t\t\t$json = file_get_contents('php://input');\n\t\t\t$request = \\json_decode($json);\n\n\t\t\tif (is_array($request))\n\t\t\t{\n\t\t\t\t// Multicall\n\t\t\t\t$this->version = '2.0';\n\n\t\t\t\t$response = array();\n\t\t\t\tforeach ($request as $singleRequest)\n\t\t\t\t{\n\t\t\t\t\t$singleResponse = $this->handleSingleRequest($singleRequest, TRUE);\n\t\t\t\t\tif ($singleResponse !== FALSE)\n\t\t\t\t\t\t$response[] = $singleResponse;\n\t\t\t\t}\n\n\t\t\t\t// If all methods in a multicall are notifications, we must not return an empty array\n\t\t\t\tif (count($response) == 0)\n\t\t\t\t\t$response = FALSE;\n\t\t\t}\n\t\t\telse if (is_object($request))\n\t\t\t{\n\t\t\t\t$this->version = $this->getRpcVersion($request);\n\t\t\t\t$response = $this->handleSingleRequest($request);\n\t\t\t}\n\t\t\telse\n\t\t\t\t$response = $this->formatError(self::ERROR_INVALID_REQUEST);\n\t\t}\n\t\telse if ($_SERVER['PATH_INFO'] != '')\n\t\t{\n\t\t\t$this->version = '1.1';\n\t\t\t$this->id = NULL;\n\n\t\t\t$method = substr($_SERVER['PATH_INFO'], 1);\n\t\t\t$params = $this->convertFromRpcEncoding($_GET);\n\n\t\t\tif (!$this->hasMethod($method))\n\t\t\t\t$response = $this->formatError(self::ERROR_METHOD_NOT_FOUND);\n\t\t\telse\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tRpcResponse::setWriter(new JsonRpcResponseWriter($this->version, $this->id));\n\t\t\t\t\t$res = $this->invoke($method, $params);\n\t\t\t\t\tif ($res instanceof JsonRpcResponseWriter)\n\t\t\t\t\t{\n\t\t\t\t\t\t$res->finalize();\n\t\t\t\t\t\t$resposne = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$response = $this->formatResult($res);\n\t\t\t\t}\n\t\t\t\tcatch (\\Exception $exception)\n\t\t\t\t{\n\t\t\t\t\t$response = $this->formatException($exception);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$response = $this->formatError(self::ERROR_PARSE_ERROR);\n\t\t}\n\n\t\tif (!headers_sent())\n\t\t{\n\t\t\theader('Content-Type: application/json', TRUE);\n\t\t\theader('Cache-Control: nocache', TRUE);\n\t\t\theader('Pragma: no-cache', TRUE);\n\t\t}\n\n\t\tif ($response !== FALSE)\n\t\t{\n\t\t\t$result = \\json_encode($this->convertToRpcEncoding($response));\n\n\t\t\tif ($result === FALSE)\n\t\t\t\terror_log(var_export($response, TRUE));\n\t\t\telse\n\t\t\t\techo($result);\n\t\t}\n\t}", "public function handle($request)\n {\n $this->setRouter($this->app->compose('Cygnite\\Base\\Router\\Router', $request), $request);\n\n try {\n $response = $this->sendRequestThroughRouter($request);\n /*\n * Check whether return value is a instance of Response,\n * otherwise we will try to fetch the response form container,\n * create a response and return to the browser.\n *\n */\n if (!$response instanceof ResponseInterface && !is_array($response)) {\n $r = $this->app->has('response') ? $this->app->get('response') : '';\n $response = Response::make($r);\n }\n } catch (\\Exception $e) {\n $this->handleException($e);\n } catch (Throwable $e) {\n $this->handleException($e);\n }\n\n return $response;\n }", "public function handleRequest()\n\t{\n $response = array();\n switch ($this->get_server_var('REQUEST_METHOD')) \n {\n case 'OPTIONS':\n case 'HEAD':\n $response = $this->head();\n break;\n case 'GET':\n $response = $this->get();\n break;\n case 'PATCH':\n case 'PUT':\n case 'POST':\n $response = $this->post();\n break;\n case 'DELETE':\n $response = $this->delete();\n break;\n default:\n $this->header('HTTP/1.1 405 Method Not Allowed');\n }\n\t\treturn $response;\n }", "public function handleRequest(Zend_Controller_Request_Http $request)\n {\n \n }", "final public function handle(Request $request)\n {\n $response = $this->process($request);\n if (($response === null) && ($this->successor !== null)) {\n $response = $this->successor->handle($request);\n }\n\n return $response;\n }", "public function process(Aloi_Serphlet_Application_HttpRequest $request, Aloi_Serphlet_Application_HttpResponse $response) {\r\n\r\n\t\ttry {\r\n\t\t\t// Identify the path component we will use to select a mapping\r\n\t\t\t$path = $this->processPath($request, $response);\r\n\t\t\tif (is_null($path)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (self::$log->isDebugEnabled()) {\r\n\t\t\t\tself::$log->debug('Processing a \"' . $request->getMethod() . '\" for path \"' . $path . '\"');\r\n\t\t\t}\r\n\r\n\t\t\t// Select a Locale for the current user if requested\r\n\t\t\t$this->processLocale($request, $response);\r\n\r\n\t\t\t// Set the content type and no-caching headers if requested\r\n\t\t\t$this->processContent($request, $response);\r\n\t\t\t$this->processNoCache($request, $response);\r\n\r\n\t\t\t// General purpose preprocessing hook\r\n\t\t\tif (!$this->processPreprocess($request, $response)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t//Identify the mapping for this request\r\n\t\t\t$mapping = $this->processMapping($request, $response, $path);\r\n\t\t\tif (is_null($mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Check for any role required to perform this action\r\n\t\t\tif (!$this->processRoles($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Process any ActionForm bean related to this request\r\n\t\t\t$form = $this->processActionForm($request, $response, $mapping);\r\n\t\t\t$this->processPopulate($request, $response, $form, $mapping);\r\n\t\t\tif (!$this->processValidate($request, $response, $form, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Process a forward or include specified by this mapping\r\n\t\t\tif (!$this->processForward($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (!$this->processInclude($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Create or acquire the Action instance to process this request\r\n\t\t\t$action = $this->processActionCreate($request, $response, $mapping);\r\n\t\t\tif (is_null($action)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Call the Action instance itself\r\n\t\t\t$forward = $this->processActionPerform($request, $response, $action, $form, $mapping);\r\n\r\n\t\t\t// Process the returned ActionForward instance\r\n\t\t\t$this->processForwardConfig($request, $response, $forward);\r\n\t\t} catch (ServletException $e) {\r\n\t\t\tthrow $e;\r\n\t\t}\r\n\t}", "function handleRequest() {\n // I. On récupère l'action demandée par l'utilisateur, avec retrocompatibilité\n // Controller et Entité\n $entityName = (isset($_GET['controller']) ? $_GET['controller'] : \"article\");\n // on retravaille le nom pour obtenir un nom de la forme \"Article\"\n $entityName = ucfirst(strtolower($entityName));\n\n // Action\n $actionName = (isset($_GET['action']) ? $_GET['action'] : \"index\");\n $actionName = strtolower($actionName);\n\n // II à IV sont maintenant dans loadDep\n $controller = $this->loadDependencies($entityName);\n\n // V. On regarde si l'action de controller existe, puis on la charge\n // on retravaille la var obtenue pour obtenir un nom de la forme \"indexAction\"\n $action = $actionName . \"Action\";\n\n // si la méthode demandée n'existe pas, remettre \"index\"\n if (!method_exists($controller, $action)) {\n $actionName = \"index\";\n $action = \"indexAction\";\n }\n\n // on stock le titre sous la forme \"Article - Index\"\n $this->title = $entityName . \" - \" . $actionName;\n\n // on appelle dynamiquement la méthode de controller\n $this->content = $controller->$action();\n }", "public function handle(RequestInterface $request): ResponseInterface;", "public function handleRequest() {\n $this->loadErrorHandler();\n\n $this->sanitizeRequest();\n $this->modx->invokeEvent('OnHandleRequest');\n if (!$this->modx->checkSiteStatus()) {\n header('HTTP/1.1 503 Service Unavailable');\n if (!$this->modx->getOption('site_unavailable_page',null,1)) {\n $this->modx->resource = $this->modx->newObject('modDocument');\n $this->modx->resource->template = 0;\n $this->modx->resource->content = $this->modx->getOption('site_unavailable_message');\n } else {\n $this->modx->resourceMethod = \"id\";\n $this->modx->resourceIdentifier = $this->modx->getOption('site_unavailable_page',null,1);\n }\n } else {\n $this->checkPublishStatus();\n $this->modx->resourceMethod = $this->getResourceMethod();\n $this->modx->resourceIdentifier = $this->getResourceIdentifier($this->modx->resourceMethod);\n if ($this->modx->resourceMethod == 'id' && $this->modx->getOption('friendly_urls', null, false) && !$this->modx->getOption('request_method_strict', null, false)) {\n $uri = $this->modx->context->getResourceURI($this->modx->resourceIdentifier);\n if (!empty($uri)) {\n if ((integer) $this->modx->resourceIdentifier === (integer) $this->modx->getOption('site_start', null, 1)) {\n $url = $this->modx->getOption('site_url', null, MODX_SITE_URL);\n } else {\n $url = $this->modx->getOption('site_url', null, MODX_SITE_URL) . $uri;\n }\n $this->modx->sendRedirect($url, array('responseCode' => 'HTTP/1.1 301 Moved Permanently'));\n }\n }\n }\n if (empty ($this->modx->resourceMethod)) {\n $this->modx->resourceMethod = \"id\";\n }\n if ($this->modx->resourceMethod == \"alias\") {\n $this->modx->resourceIdentifier = $this->_cleanResourceIdentifier($this->modx->resourceIdentifier);\n }\n if ($this->modx->resourceMethod == \"alias\") {\n $found = $this->findResource($this->modx->resourceIdentifier);\n if ($found) {\n $this->modx->resourceIdentifier = $found;\n $this->modx->resourceMethod = 'id';\n } else {\n $this->modx->sendErrorPage();\n }\n }\n $this->modx->beforeRequest();\n $this->modx->invokeEvent(\"OnWebPageInit\");\n\n if (!is_object($this->modx->resource)) {\n if (!$this->modx->resource = $this->getResource($this->modx->resourceMethod, $this->modx->resourceIdentifier)) {\n $this->modx->sendErrorPage();\n return true;\n }\n }\n\n return $this->prepareResponse();\n }", "public function process(\n ServerRequestInterface $request,\n RequestHandlerInterface $handler\n );", "protected function handleRequest() {\n\t\t// TODO: remove conditional when we have a dedicated error render\n\t\t// page and move addModule to Mustache#getResources\n\t\tif ( $this->adapter->getFormClass() === 'Gateway_Form_Mustache' ) {\n\t\t\t$modules = $this->adapter->getConfig( 'ui_modules' );\n\t\t\tif ( !empty( $modules['scripts'] ) ) {\n\t\t\t\t$this->getOutput()->addModules( $modules['scripts'] );\n\t\t\t}\n\t\t\tif ( $this->adapter->getGlobal( 'LogClientErrors' ) ) {\n\t\t\t\t$this->getOutput()->addModules( 'ext.donationInterface.errorLog' );\n\t\t\t}\n\t\t\tif ( !empty( $modules['styles'] ) ) {\n\t\t\t\t$this->getOutput()->addModuleStyles( $modules['styles'] );\n\t\t\t}\n\t\t}\n\t\t$this->handleDonationRequest();\n\t}", "public function handleHttpRequest($requestParams)\n\t{\n\t\t$action = strtolower(@$requestParams[self::REQ_PARAM_ACTION]);\t\t\n\t\t$methodName = $this->actionToMethod($action);\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$this->$methodName($requestParams);\n\t\t} catch(Exception $e)\n\t\t{\n\t\t\techo \"Error: \".$e->getMessage();\n\t\t}\n\t}", "public static function handleRequest()\n\t{\n\t\t// Load language strings\n\t\tself::loadLanguage();\n\n\t\t// Load the controller and let it run the show\n\t\trequire_once dirname(__FILE__).'/classes/controller.php';\n\t\t$controller = new LiveUpdateController();\n\t\t$controller->execute(JRequest::getCmd('task','overview'));\n\t\t$controller->redirect();\n\t}", "public function handle() {\n $this->initDb(((!isset(self::$_config['db']['type'])) ? 'mysql' : self::$_config['db']['type']));\n $request = new corelib_request(self::$_config['routing'], self::$_config['reg_routing']);\n $path = parse_url($_SERVER['REQUEST_URI']);\n\n if (self::$_config['home'] == \"/\" || self::$_config['home'] == \"\") {\n $uri = ltrim($path['path'], '/');\n } else {\n $uri = str_replace(self::$_config['home'], '', $path['path']);\n }\n\n if (\"\" == $uri || \"/\" == $uri) {\n $uri = self::$_config['routing']['default']['controller'] . '/' . self::$_config['routing']['default']['action'];\n }\n self::$isAjax = $request->isAjax();\n self::$request = $request->route($uri);\n self::$request['uri'] = $uri;\n\n if (self::$request['action'] == \"\")\n self::$request['action'] = self::$_config['routing']['default']['action'];\n\n $this->_run( self::$request['params'] );\n }", "public function processRequest() {\n $this->server->service($GLOBALS['HTTP_RAW_POST_DATA']);\n }", "public function request_handler(){\r\n\t\t$route = new Router;\r\n\t\t$session = new Session;\r\n\t\t$segments = $route->urlRoute();\r\n\t\t#check if controller/action exist\r\n\t\t#if not use default_controller / default_action\r\n\t\tif( count($segments) == 0 || count($segments) == 1 ){\r\n\t\t\tinclude_class_method( default_controller , default_action );\r\n\t\t}else{\r\n\t\t#if controller/action exist in the url\r\n\t\t#then check the controller if it's existed in the file\r\n\t\t\tif( file_exists( CONTROLLER_DIR . $segments[0] . CONT_EXT ) )\r\n\t\t\t{\r\n\t\t\t\t#check for segments[1] = actions\r\n\t\t\t\t#if segments[1] exist, logically segments[0] which is the controller is also exist!!\r\n\t\t\t\t//if( isset($segments[1]) ){\r\n\t\t\t\t\tinclude_class_method( $segments[0], $segments[1] . 'Action' );\r\n\t\t\t\t//}\r\n\t\t\t}else{\r\n\t\t\t\terrorHandler(CONTROLLER_DIR . $segments[0] . CONT_EXT);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function handle() {\n if(method_exists($this->class, $this->function)) {\n echo $this->class->{$this->function}($this->request);\n }else {\n echo Response::response(['error' => 'function does not exist on ' . get_class($this->class)], 500);\n }\n }", "public function handle(ClientInterface $client, RequestInterface $request, HttpRequest $httpRequest);", "public function handleRequest() {\n $questions=$this->contactsService->getAllQuestions(\"date\");\n //load all the users\n $userList = User::loadUsers();\n //load all the topics\n \t\t$topics = $this->contactsService2->getAllTopics(\"name\");\n \t\t\n\t\t\t\trequire_once '../view/home.tpl';\n\t}", "public function serve_request()\n {\n }", "public static function process($request){\r\n\t\tcall_user_func($request -> action, $request -> params);\r\n\t}", "function process($request) {\n\t//$logFusion =& LoggerManager::getLogger('fusion');\n//PBXFusion begin\n\t$request=$this->mapRequestVars($request);\n $mode = $request->get('callstatus');\n\t//$logFusion->debug(\"PBX CONTROLLER PROCESS mode=\".$mode);\n//PBXFusion end\n switch ($mode) {\n\t//PBXFusion begin\n \t case \"CallStart\" :\n $this->processCallStart($request);\n break;\n\t//PBXFusion end\n case \"StartApp\" :\n $this->processStartupCallFusion($request);\n break;\n case \"DialAnswer\" :\n $this->processDialCallFusion($request);\n break;\n case \"Record\" :\n $this->processRecording($request);\n break;\n case \"EndCall\" :\n $this->processEndCallFusion($request);\n break;\n case \"Hangup\" :\n $callCause = $request->get('causetxt');\n if ($callCause == \"null\") {\n break;\n }\n $this->processHangupCall($request);\n break;\n }\n }", "public function handle() {\n\t\n\t\t$task = $this->request->getTask();\n\t\t$handler = $this->resolveHandler($task);\n\t\t$action = $this->request->getAction();\n\t\t$method = empty($action) ? $this->defaultActionMethod : $action.$this->actionMethodSuffix;\n\t\t\n\t\tif (! method_exists($handler, $method)) {\n\t\t\tthrow new Task\\NotHandledException(\"'{$method}' method not found on handler.\");\n\t\t}\n\t\t\n\t\t$handler->setRequest($this->request);\n\t\t$handler->setIo($this->io);\n\t\t\n\t\treturn $this->invokeHandler($handler, $method);\n\t}", "private function handleCall() { //$this->request\n $err = FALSE;\n // route call to method\n $this->logToFile($this->request['action']);\n switch($this->request['action']) {\n // Edit form submitted\n case \"edit\":\n // TODO: improve error handling\n try {\n $this->logToFile(\"case: edit\");\n $this->edit($this->request['filename']);\n //$this->save();\n } catch (Exception $e) {\n $err = \"Something went wrong: \";\n $err .= $e.getMessage();\n }\n break;\n }\n // TODO: set error var in response in case of exception / error\n // send JSON response\n if($err !== FALSE) {\n $this->request['error_msg'] = $err;\n }\n $this->giveJSONResponse($this->request);\n }", "function handle()\n {\n $this->verifyPost();\n\n $postTarget = $this->determinePostTarget();\n\n $this->filterPostData();\n\n switch ($postTarget) {\n case 'upload_media':\n $this->handleMediaFileUpload();\n break;\n case 'feed':\n $this->handleFeed();\n break;\n case 'feed_media':\n $this->handleFeedMedia();\n break;\n case 'feed_users':\n $this->handleFeedUsers();\n break;\n case 'delete_media':\n $this->handleDeleteMedia();\n break;\n }\n }", "public function run() {\n\t\t// If this particular request is not a hook, something is wrong.\n\t\tif (!isset($this->server[self::MERGADO_HOOK_AUTH_HEADER])) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s is to be used only for handling hooks sent from Mergado.\n\t\t\t\tMergado-Apps-Hook-Auth is missing.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t}\n\n\t\tif (!$decoded = json_decode($this->rawRequest, true)) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s cannot handle request, because the data to be handled is empty.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t} elseif (!isset($decoded['action'])) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s cannot handle the hook, because the hook action is undefined.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t};\n\n\t\t$this->handle($decoded['action'], $decoded);\n\n\t}", "public function handleRequest()\n {\n $version = $this->versionEngine->getVersion();\n $queryConfiguration = $version->parseRequest($this->columnConfigurations);\n $this->provider->prepareForProcessing($queryConfiguration, $this->columnConfigurations);\n $data = $this->provider->process();\n return $version->createResponse($data, $queryConfiguration, $this->columnConfigurations);\n }", "public function process()\n\t{\n\t\t$action = $this->getAction();\n\t\tswitch (strtolower($action))\n\t\t{\n\t\t\tcase 'get':\n\t\t\tcase 'put':\n\t\t\tcase 'post':\n\t\t\tcase 'delete':\n\t\t}\t\n\t}", "public function run(){\n // server response object \n $requestMethod = $this->requestBuilder->getRequestMethod();\n $this->response = new Response($requestMethod);\n\n try{\n $route = $this->router->validateRequestedRoute($this->requestBuilder);\n\n // serve request object\n $this->requestBuilder->setQuery();\n $this->requestBuilder->setBody();\n $requestParams = $this->requestBuilder->getParam();\n $requestQuery = $this->requestBuilder->getQuery();\n $requestBody = $this->requestBuilder->getBody(); \n $this->request = new Request($requestParams, $requestQuery, $requestBody);\n\n $callback = $route->getCallback();\n $callback($this->request, $this->response);\n }catch(RouteNotImplementedException $e){\n $this->response->statusCode(404)->json($e->getMessage()); \n }\n \n }", "final public function handle()\n {\n \n $this->_preHandle();\n \n if ($this->_request->getActionName() == null) {\n throw new ZendL_Tool_Endpoint_Exception('Endpoint failed to setup the action name.');\n }\n\n if ($this->_request->getProviderName() == null) {\n throw new ZendL_Tool_Endpoint_Exception('Endpoint failed to setup the provider name.');\n }\n \n ob_start();\n \n try {\n $dispatcher = new ZendL_Tool_Rpc_Endpoint_Dispatcher();\n $dispatcher->setRequest($this->_request)\n ->setResponse($this->_response)\n ->dispatch();\n \n } catch (Exception $e) {\n //@todo implement some sanity here\n die($e->getMessage());\n //$this->_response->setContent($e->getMessage());\n return;\n }\n \n if (($content = ob_get_clean()) != '') {\n $this->_response->setContent($content);\n }\n \n $this->_postHandle();\n }", "public function RouteRequest ();", "public function handle(ServerRequestInterface $request, $handler, array $vars): ?ResponseInterface;", "public function DispatchRequest ();", "protected function handleRequest() {\n\t\t// FIXME: is this necessary?\n\t\t$this->getOutput()->allowClickjacking();\n\t\tparent::handleRequest();\n\t}", "public function listen() {\n\t\t// Checks the user agents match\n\t\tif ( $this->user_agent == $this->request_user_agent ) {\n\t\t\t// Determine if a key request has been made\n\t\t\tif ( isset( $_GET['key'] ) ) {\n\t\t\t\t$this->download_update();\n\t\t\t} else {\n\t\t\t\t// Determine the action requested\n\t\t\t\t$action = filter_input( INPUT_POST, 'action', FILTER_SANITIZE_STRING );\n\n\t\t\t\t// If that method exists, call it\n\t\t\t\tif ( method_exists( $this, $action ) )\n\t\t\t\t\t$this->{$action}();\n\t\t\t}\n\t\t}\n\t}", "abstract public function request();", "public function run() {\r\n $this->routeRequest(new Request());\r\n }", "public function processAction(Request $request)\n {\n // Get the request Vars\n $this->requestQuery = $request->query;\n\n // init the hybridAuth instance\n $provider = trim(strip_tags($this->requestQuery->get('hauth_start')));\n $cookieName = $this->get('azine_hybrid_auth_service')->getCookieName($provider);\n $this->hybridAuth = $this->get('azine_hybrid_auth_service')->getInstance($request->cookies->get($cookieName), $provider);\n\n // If openid_policy requested, we return our policy document\n if ($this->requestQuery->has('get') && 'openid_policy' == $this->requestQuery->get('get')) {\n return $this->processOpenidPolicy();\n }\n\n // If openid_xrds requested, we return our XRDS document\n if ($this->requestQuery->has('get') && 'openid_xrds' == $this->requestQuery->get('get')) {\n return $this->processOpenidXRDS();\n }\n\n // If we get a hauth.start\n if ($this->requestQuery->has('hauth_start') && $this->requestQuery->get('hauth_start')) {\n return $this->processAuthStart();\n }\n // Else if hauth.done\n elseif ($this->requestQuery->has('hauth_done') && $this->requestQuery->get('hauth_done')) {\n return $this->processAuthDone($request);\n }\n // Else we advertise our XRDS document, something supposed to be done from the Realm URL page\n\n return $this->processOpenidRealm();\n }", "public function run() {\n $base = $this->request->getNextRoute();\n if ($base !== BASE) {\n $this->response->notFound();\n }\n $start = $this->request->getNextRoute();\n if ($rs = $this->getRs($start)) {\n if ($this->request->isOptions()) {\n $this->response->okEmpty();\n return;\n }\n try {\n $this->response->ok($rs->handleRequest());\n\n } catch (UnauthorizedException $e) {\n $this->response->unauthorized();\n\n } catch (MethodNotAllowedException $e) {\n $this->response->methodNotAllowed();\n\n } catch (BadRequestExceptionInterface $e) {\n $this->response->badRequest($e->getMessage());\n\n } catch (UnavailableExceptionInterface $e) {\n $this->response->unavailable($e->getMessage());\n\n } catch (Exception $e) {\n $this->response->unavailable($e->getMessage());\n }\n } else {\n $this->response->badRequest();\n }\n }", "public function handle(Request $request, Response|JsonResponse|BinaryFileResponse|StreamedResponse $response, int $length);", "public function handle(Request $request, Closure $next);", "public function handleGetRequest($id);", "abstract function doExecute($request);", "public function parseCurrentRequest()\n {\n // If 'action' is post, data will only be read from 'post'\n if ($action = $this->request->post('action')) {\n die('\"post\" method action handling not implemented');\n }\n \n $action = $this->request->get('action') ?: 'home';\n \n if ($response = $this->actionHandler->trigger($action, $this)) {\n $this->getResponder()->send($response);\n } else {\n die('404 not implemented');\n }\n }", "abstract public function mapRequest($request);", "public function handle(ServerRequestInterface $request)\n {\n $router = $this->app->get(RouterInterface::class);\n $response = $router->route($request);\n\n if (! headers_sent()) {\n\n // Status\n header(sprintf(\n 'HTTP/%s %s %s',\n $response->getProtocolVersion(),\n $response->getStatusCode(),\n $response->getReasonPhrase()\n ));\n\n // Headers\n foreach ($response->getHeaders() as $name => $values) {\n foreach ($values as $value) {\n header(sprintf('%s: %s', $name, $value), false);\n }\n }\n }\n\n echo $response->getBody()->getContents();\n }", "abstract public function processRequest(PriceWaiter_NYPWidget_Controller_Endpoint_Request $request);", "private function handleRequest()\n {\n // we check the inputs validity\n $validator = Validator::make($this->request->only('rowsNumber', 'search', 'sortBy', 'sortDir'), [\n 'rowsNumber' => 'required|numeric',\n 'search' => 'nullable|string',\n 'sortBy' => 'nullable|string|in:' . $this->columns->implode('attribute', ','),\n 'sortDir' => 'nullable|string|in:asc,desc',\n ]);\n // if errors are found\n if ($validator->fails()) {\n // we log the errors\n Log::error($validator->errors());\n // we set back the default values\n $this->request->merge([\n 'rowsNumber' => $this->rowsNumber ? $this->rowsNumber : config('tablelist.default.rows_number'),\n 'search' => null,\n 'sortBy' => $this->sortBy,\n 'sortDir' => $this->sortDir,\n ]);\n } else {\n // we save the request values\n $this->setAttribute('rowsNumber', $this->request->rowsNumber);\n $this->setAttribute('search', $this->request->search);\n }\n }", "public function handle() {\n\t\t\n\t\t\n\t\t\n\t\theader('ApiVersion: 1.0');\n\t\tif (!isset($_COOKIE['lg_app_guid'])) {\n\t\t\t//error_log(\"NO COOKIE\");\n\t\t\t//setcookie(\"lg_app_guid\", uniqid(rand(),true),time()+(10*365*24*60*60));\n\t\t} else {\n\t\t\t//error_log(\"cookie: \".$_COOKIE['lg_app_guid']);\n\t\t\t\n\t\t}\n\t\t// checks if a JSON-RCP request has been received\n\t\t\n\t\tif (($_SERVER['REQUEST_METHOD'] != 'POST' && (empty($_SERVER['CONTENT_TYPE']) || strpos($_SERVER['CONTENT_TYPE'],'application/json')===false)) && !isset($_GET['d'])) {\n\t\t\t\techo \"INVALID REQUEST\";\n\t\t\t// This is not a JSON-RPC request\n\t\t\treturn false;\n\t\t}\n\t\t\t\t\n\t\t// reads the input data\n\t\tif (isset($_GET['d'])) {\n\t\t\tdefine(\"WEB_REQUEST\",true);\n\t\t\t$request=urldecode($_GET['d']);\n\t\t\t$request = stripslashes($request);\n\t\t\t$request = json_decode($request, true);\n\t\t\t\n\t\t} else {\n\t\t\tdefine(\"WEB_REQUEST\",false);\n\t\t\t//error_log(file_get_contents('php://input'));\n\t\t\t$request = json_decode(file_get_contents('php://input'),true);\n\t\t\t//error_log(print_r(apache_request_headers(),true));\n\t\t}\n\t\t\n\t\terror_log(\"Method: \".$request['method']);\n\t\tif (!isset($this->exemptedMethods[$request['method']])) {\n\t\t\ttry {\n\t\t\t\t$this->authenticate();\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$this->authenticated = false;\n\t\t\t\t$this->handleError($e);\n\t\t\t}\n\t\t} else {\n\t\t\t//error_log('exempted');\n\t\t}\n\t\ttrack_call($request);\n\t\t//error_log(\"RPC Method Called: \".$request['method']);\n\t\t\n\t\t//include the document containing the function being called\n\t\tif (!function_exists($request['method'])) {\n\t\t\t$path_to_file = \"./../include/methods/\".$request['method'].\".php\";\n\t\t\tif (file_exists($path_to_file)) {\n\t\t\t\tinclude $path_to_file;\n\t\t\t} else {\n\t\t\t\t$e = new Exception('Unknown method. ('.$request['method'].')', 404, null);\n \t$this->handleError($e);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t// executes the task on local object\n\t\ttry {\n\t\t\t\n\t\t\t$result = @call_user_func($request['method'],$request['params']);\n\t\t\t\n\t\t\tif (!is_array($result) || !isset($result['result']) || $result['result']) {\n\t\t\t\t\n\t\t\t\tif (is_array($result) && isset($result['result'])) unset($result['result']);\n\t\t\t\t\n\t\t\t\t$response = array (\n\t\t\t\t\t\t\t\t\t'jsonrpc' => '2.0',\n\t\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t\t'result' => $result,\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t );\n\t\t\t} else {\n\t\t\t\tunset($result['result']);\n\t\t\t\t\n\t\t\t\t$response = array (\n\t\t\t\t\t\t\t\t\t'jsonrpc' => '2.0',\n\t\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t\t'error' => $result\n\t\t\t\t\t\t\t\t );\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t\n\t\t\t$response = array (\n\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t'result' => NULL,\n\t\t\t\t\t\t\t\t'error' => $e->getMessage()\n\t\t\t\t\t\t\t\t);\n\t\t\t\n\t\t}\n\t\t// output the response\n\t\tif (!empty($request['id'])) { // notifications don't want response\n\t\t\theader('content-type: text/javascript');\n\t\t\t//error_log(@print_r($response));\n\t\t\tif (isset($_GET['d'])) $str_response = $_GET['jsoncallback'].\"(\".str_replace('\\/','/',json_encode($response)).\")\";\n\t\t\telse $str_response = str_replace('\\/','/',json_encode($response));\n\t\t\t\n\t\t\tif ($_SERVER['SERVER_ADDR']=='192.168.1.6') {\n\t\t\t\t//error_log($str_response);\n\t\t\t}\n\t\t\techo $str_response;\n\t\t}\n\t\t\n\t\t\n\t\t// finish\n\t\treturn true;\n\t}", "protected function handle(Request $request)\n {\n return 1;\n }", "public function __invoke(Request $request, RequestHandler $handler) {\n R::setup('mysql:host=127.0.0.1;dbname=cellar','root','');\n \n $response = $handler->handle($request);\n R::close();\n return $response;\n }", "public function handle($req)\n {\n $params = $req->post ?: [];\n\n $files = $this->transformFiles($req->files);\n\n $cookies = $req->cookie ?: [];\n\n $server = $this->transformHeadersToServerVars(array_merge($req->header, [\n 'PATH_INFO' => array_get($req->server, 'path_info'),\n ]));\n $server['X_REQUEST_ID'] = Str::uuid()->toString();\n\n $requestUri = $req->server['request_uri'];\n if (isset($req->server['query_string']) && $req->server['query_string']) {\n $requestUri .= \"?\" . $req->server['query_string'];\n }\n\n $resp = $this->call(\n strtolower($req->server['request_method']),\n $requestUri, $params, $cookies, $files,\n $server, $req->rawContent()\n );\n\n return [\n 'status' => $resp->getStatusCode(),\n 'headers' => $resp->headers,\n 'body' => $resp->getContent(),\n ];\n }", "public function handle(Request $request)\n {\n $route_params = $this->_router->match($request->getUri());\n $route = $route_params['route'];\n $params = $route_params['params'];\n\n $func = reset($route) . self::CONTROLLER_METHOD_SUFIX;\n $class_name = key($route);\n $controller = new $class_name($request);\n\n $response = call_user_func_array(\n [\n $controller,\n $func,\n ],\n [$params]\n );\n\n if ($response instanceof Response) {\n return $response;\n } else {\n throw new InvalidHttpResponseException();\n }\n }" ]
[ "0.8299201", "0.8147294", "0.8147294", "0.8147294", "0.8127764", "0.7993589", "0.7927201", "0.7912899", "0.7899075", "0.76317674", "0.75089735", "0.7485808", "0.74074036", "0.7377414", "0.736802", "0.7294553", "0.72389543", "0.7230166", "0.72108", "0.71808434", "0.7170364", "0.71463037", "0.7126907", "0.7122795", "0.71225274", "0.7116879", "0.70607233", "0.6981947", "0.6966695", "0.69393975", "0.6912079", "0.68985975", "0.6887614", "0.68774897", "0.6806274", "0.67969805", "0.67778915", "0.6762979", "0.67565143", "0.67533374", "0.67192745", "0.6683243", "0.66487724", "0.66395754", "0.6634629", "0.66283566", "0.6617558", "0.6610097", "0.6610011", "0.6544976", "0.653806", "0.6512757", "0.64682734", "0.64381886", "0.6416964", "0.63373476", "0.63359964", "0.6334543", "0.63308066", "0.6321675", "0.63176167", "0.631661", "0.6310991", "0.63108873", "0.6295945", "0.6279438", "0.62778515", "0.62508965", "0.62422955", "0.62321424", "0.62237644", "0.6203428", "0.61954546", "0.6191255", "0.61774665", "0.61682004", "0.6151806", "0.61271876", "0.61257905", "0.6116093", "0.61126447", "0.6112368", "0.6101652", "0.60893977", "0.60871464", "0.60862815", "0.60734737", "0.60535145", "0.6028341", "0.60250086", "0.60224646", "0.6011745", "0.6011483", "0.60106593", "0.5998867", "0.5997086", "0.5991233", "0.59844923", "0.59668386", "0.5961315", "0.5954762" ]
0.0
-1
Create Icon From Original
public function delete($filename) { $sessionVideo = Video::where('file_name', 'like', $filename)->first(); if (empty($sessionVideo)) { $sessionVideo = Video::where('display_name', 'like', $filename)->first(); if (empty($sessionVideo)) { return Response::json([ 'status' => false, 'file_name' => $filename, 'code' => 400 ], 400); } } $path = storage_path($this->full_save_path . $filename); if (File::exists($path)) { Storage::delete('uploads/images/' . $filename); } if (!empty($sessionVideo)) { $sessionVideo->delete(); } return Response::json([ 'status' => true, 'id' => $sessionVideo->id, 'filename' => $filename, 'message' => 'تم حذف الفيديو بنجاح', 'code' => 200 ], 200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIcon() {}", "public function getIcon();", "public function getIcon();", "public function icon(): string;", "public function getIcon()\n {\n }", "protected function establish_icon() {\n\t\t$this->icon = \"<i class='sw swp_{$this->key}_icon'></i>\";\n\t}", "public function icon($icon);", "private function createIconModifier($icon)\n {\n return $this->getBaseClass(\n str_replace(\"_\", \"-\", $icon),\n true\n );\n }", "public static function getIcon(): string\n {\n }", "public static function getIcon(): string\n {\n }", "function icon($which, $alt='', $url=false, $print_alt = false, $class=false) {\n return new Icon($which, $alt, $url, $print_alt, $class);\n}", "public function getIconName() {}", "public function getIconName() {}", "public function getIconName() {}", "public function getIconName() {}", "public static function getFactoryIconUseIt() {\n }", "public function icon(): string\n {\n return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACYSURBVEhLYxgFJIHU1FSjtLS0i0D8AYj7gEKMEBkqAaAFF4D4ERCvAFrwH4gDoFIMKSkpFkB+OTEYqgUTACXfA/GqjIwMQyD9H2hRHlQKJFcBEiMGQ7VgAqCBvUgK32dmZspCpagGGNPT0/1BLqeF4bQHQJePpiIwhmrBBEADR1MRfgB0+WgqAmOoFkwANHA0FY0CUgEDAwCQ0PUpNB3kqwAAAABJRU5ErkJggg==';\n }", "public function icon(): string\n {\n return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADLSURBVEhL5ZRLCsIwGAa7UkE9gd5HUfEoekxxJx7AhXoCca/fhESkJiQxBHwMDG3S/9EmJc0n0JMruZVXK/fMdWQRY7mXt4A7OZJvwZu74hRayIEc2nv3jGtXZrOWrnifiRY0OkhiWK5sWGeS52bkZymJ2ZhRJmwmySxLCL6CmIsZZUIixkiNezCRR+kSUyWH3Cgn6SuQIk2iuOBckvN+t8FMnq1TJloUN3jefN9mhvJeCAVWb8CyUDj0vxc3iPFHDaofFdUPu2+iae7nYJMCY/1bpAAAAABJRU5ErkJggg==';\n }", "function addIcon($i){\n return $this->add('Icon',null,'Icon')->set($i)->addClass('atk-size-mega');\n }", "public function getIcon(): string\n {\n return $this->icon ?: static::DEFAULT_ICON;\n }", "public function get_icon() {\n\t\treturn 'eicon-image';\n\t}", "public function getIconForResourceWithPngFileReturnsIcon() {}", "protected function get__icon()\n\t{\n\t\treturn NULL;\n\t}", "public function getIcon() {\n\t\t//regex is used to check if there's a filename within the iconFile string\n\t\treturn preg_replace('/^.*\\/([^\\/]+\\.(gif|png))?$/i', '\\1', $this->iconFile) ? $this->iconFile : '';\n\t}", "public function getIcon()\n {\n return $this->get(self::_ICON);\n }", "public function get_icon()\n {\n return 'fa fa-image';\n }", "private function _renderIcon()\n {\n return !empty($this->_icon) ? '<i class=\"' . $this->_icon . '\"></i>' : '';\n }", "private function get_icon()\n\t{\n\t\treturn $this->m_icon;\n\t}", "private function get_icon()\n\t{\n\t\treturn $this->m_icon;\n\t}", "public function getIconReturnsReplacementIconWhenDeprecatedDataProvider() {}", "public function getIcon()\n {\n return $this->Icon;\n }", "function image_svg_to_icon($svg_abspath, $icon_abspath, &$height = 0, &$width = 0, $color = false)\n{\n $svg_string = file_get_contents($svg_abspath);\n $im = image_svg_string_to_icon_obj($svg_string, $height, $width, $color);\n return image_return_write($im, $icon_abspath);\n}", "public function get_icon() {\n\t\treturn 'eicon-icon-box';\n\t}", "public function getIcon() {\r\n\t\r\n\t$fileType = $this->getType();\r\n\t\r\n\t$image = array(\r\n\t 'image/gif',\r\n\t 'image/png',\r\n\t 'image/jpg',\r\n\t 'image/jpeg'\r\n\t);\r\n\t\r\n\t$rarZip = array(\r\n\t 'application/zip',\r\n 'application/x-rar-compressed'\r\n\t);\r\n\t\r\n\t$audio = array(\r\n\t 'audio/mpeg'\r\n\t);\r\n\t\r\n\t$video = array(\r\n\t 'video/quicktime',\r\n\t 'video/mp4'\r\n\t);\r\n\t\r\n\t$pdf = array(\r\n\t 'application/pdf'\r\n\t);\r\n\t\r\n\t$wordExcelPptx = array(\r\n\t 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\r\n\t 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\r\n\t 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\r\n\t 'application/msword',\r\n\t 'application/vnd.ms-excel',\r\n\t 'application/vnd.ms-powerpoint'\r\n\t);\r\n\t\r\n\tif (in_array($fileType, $image)) {\r\n\t return \"image.png\";\r\n\t} elseif (in_array($fileType, $audio)) {\r\n\t return \"audio.png\";\r\n\t} elseif (in_array($fileType, $video)) {\r\n\t return \"video.png\";\r\n\t} elseif (in_array($fileType, $rarZip)) {\r\n\t return \"rarZip.png\";\r\n\t} elseif (in_array($fileType, $pdf)) {\r\n\t return \"pdf.png\";\r\n\t} elseif (in_array($fileType, $wordExcelPptx)) {\r\n\t return \"wordExcelPptx.png\";\r\n\t} else {\r\n\t return \"default.png\";\r\n\t}\r\n\t\r\n }", "public function icon ( )\n\t{\n\t\treturn Array( 'id' => $this->id,\t// shoud be consistent with what is passed to _uicmp_stuff_fold class\n\t\t\t\t\t 'title' => $this->messages['icon'] );\n\t}", "function loadIcon16($name) {\n echo \"<img src=\\\"icos/16-$name.png\\\" alt=\\\"\\\" width=\\\"16\\\" height=\\\"16\\\">\";\n }", "protected function get__icon()\n\t{\n\t\treturn 'coffee';\n\t}", "protected function imageIcon(): string\n {\n $types = [\n 'image' => 'file-image',\n 'video' => 'file-video',\n 'document' => 'file-document',\n 'audio' => 'file-audio',\n 'code' => 'file-code',\n 'archive' => 'file-zip'\n ];\n\n $extensions = [\n 'xls' => 'file-spreadsheet',\n 'xlsx' => 'file-spreadsheet',\n 'csv' => 'file-spreadsheet',\n 'docx' => 'file-word',\n 'doc' => 'file-word',\n 'rtf' => 'file-word',\n 'mdown' => 'file-text',\n 'md' => 'file-text'\n ];\n\n return $extensions[$this->model->extension()] ??\n $types[$this->model->type()] ??\n parent::imageDefaults()['color'];\n }", "static function Icon($icon_to_test)\n\t{\n\t\tif(in_array($icon_to_test, self::$_icons) )\n\t\t\treturn $icon_to_test;\n\t\tWdfException::Raise(\"Invalid Icon '$icon_to_test'\");\n return '';\n\t}", "public function getSpriteIconCode() {}", "public function get_icon2d(): string\n {\n return $this->_download('icon2d.png');\n }", "public function getSvgIcon();", "public function setIcon($icon);", "protected function upload_icon()\n {\n $config = array();\n $config['upload_path'] = './upload';\n $config['allowed_types'] = 'ico';\n $config['max_size'] = '0';\n $config['overwrite'] = TRUE;\n $config['encrypt_name'] = TRUE;\n\n $this->load->library('upload', $config);\n $this->upload->do_upload('icon');\n $hasil = $this->upload->data();\n\n return $hasil;\n }", "function icon() {\n global $CFG;\n\n return \"<img src='$CFG->wwwroot/blocks/ilp/pix/graphicon.jpg' height='24' width='24' />\";\n }", "public function get_icon() {\n\t\tglobal $wc_authorize_sim;\n\n\t\t$icon = '';\n\n\t\t$icon = '<img src=\"' . esc_url( $wc_authorize_sim->force_ssl( $wc_authorize_sim->plugins_url('assets/images/authorize-net-co.png') ) ) . '\" alt=\"' . esc_attr( $this->title ) . '\" />';\n\n\t\treturn apply_filters( 'woocommerce_authorize_sim_icon', $icon, $this->id );\n\t}", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIconForResourceWithCustomImageMimeTypeReturnsImageIcon() {}", "public function Icon()\n {\n $ext = strtolower($this->getExtension());\n if (!Director::fileExists(FRAMEWORK_DIR . \"/images/app_icons/{$ext}_32.gif\")) {\n $ext = $this->appCategory();\n }\n\n if (!Director::fileExists(FRAMEWORK_DIR . \"/images/app_icons/{$ext}_32.gif\")) {\n $ext = \"generic\";\n }\n\n return FRAMEWORK_DIR . \"/images/app_icons/{$ext}_32.gif\";\n }", "function imagemIcone($nomeArquivo, $width = 17)\r\n\t{\r\n\t\t$imagem = \"<img src='/revoc/sistemas/pdv_premium/requires/img/icons/$nomeArquivo' width='\".$width.\"px'>\";\r\n\t\treturn $imagem;\r\n\t}", "public abstract function render_pix_icon(renderer_base $output, pix_icon $icon);", "public function getIconTag() {\n\t\treturn '<img class=\"languageIcon jsTooltip\" src=\"' . $this->getIconPath() . '\" title=\"' . $this->getTitle() . '\" alt=\"' . $this->getTitle() . '\" />';\n\t}", "public function icon($name , $alt)\n {\n return Wgt::icon($name,'xsmall',$alt);\n }", "function sIcon($icon, $class = null)\n {\n return '<svg xmlns=\"http://www.w3.org/2000/svg\" class=\"' . $class . '\"><use xlink:href=\"#' . $icon . '\"></use></svg>';\n }", "public function getIcon()\n {\n return $this->getMethod()->images['size2x'];\n }", "public function getIcon()\n {\n return $this->_icon;\n }", "protected function getIcon()\n {\n /** @var IconFactory $iconFactory */\n $iconFactory = GeneralUtility::makeInstance(IconFactory::class);\n return $iconFactory->getIcon('px-shopware-clear-cache', Icon::SIZE_SMALL)->render();\n }", "public static function icon($params)\n {\n $name = isset($params[0]) ? $params[0] : '';\n $template = isset($params[1]) ? $params[1] : 'base/_icon.tpl';\n return self::renderTemplate($template, [\n 'name' => $name\n ]);\n }", "public function getIcon()\n\t{\n\t\treturn $this->icon;\n\t}", "public function getBsShowIcon($icon = null);", "public function getIcon() {\n\t\treturn $this->icon;\n\t}", "public function getIcon() {\n return $this->icon;\n }", "public function getIcon() {\n return $this->icon;\n }", "public function icon()\n {\n return $this->icon;\n }", "public function icon($name , $alt)\n {\n return Wgt::icon($name, 'xsmall', $alt);\n }", "function av_icon($icon, $font = false, $string = 'string')\n{\t\n\treturn avia_font_manager::frontend_icon($icon, $font, $string);\n}", "public function getIcon() {\r\n \r\n $mime = explode(\"/\", $this->mime); \r\n \r\n switch ($mime[0]) {\r\n case \"video\" : \r\n return [\r\n \"label\" => \"Video\",\r\n \"icon\" => '<i class=\"fa fa-file-video-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n case \"image\" : \r\n return [\r\n \"label\" => \"Image\",\r\n \"icon\" => '<i class=\"fa fa-file-image-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n }\r\n \r\n switch ($this->mime) {\r\n case \"application/msword\":\r\n case \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\":\r\n return [ \r\n \"label\" => \"Microsoft Word\",\r\n \"icon\" => '<i class=\"fa fa-file-word-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n case \"application/vnd.ms-excel\":\r\n case \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\":\r\n return [ \r\n \"label\" => \"Microsoft Excel\",\r\n \"icon\" => '<i class=\"fa fa-file-excel-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n case \"application/pdf\":\r\n case \"application/x-pdf\":\r\n return [ \r\n \"label\" => \"PDF\",\r\n \"icon\" => '<i class=\"fa fa-file-pdf-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n }\r\n \r\n return [\r\n \"label\" => \"Unknown\",\r\n \"icon\" => '<i class=\"fa fa-file-o\"></i>'\r\n ];\r\n \r\n }", "function i($code){\n $icon = '<i class=\"fa fa-'.$code.'\"></i>';\n return $icon;\n }", "static function icon($icon) {\n\t\treturn self::tag('i', 'glyphicon glyphicon-' . $icon);\n\t}", "public static function nativeIcon(string $icon, array $class = [])\n {\n $flag = 'a';\n if (strpos($icon, ':') !== false) {\n [$flag, $icon] = explode(':', $icon) + [2 => null];\n }\n\n if ($flag !== 'b') {\n return '';\n }\n\n array_unshift($class, 'bsw-icon');\n\n return Html::tag(\n 'svg',\n Html::tag('use', null, ['xlink:href' => \"#{$icon}\"]),\n [\n 'class' => $class,\n 'aria-hidden' => true,\n ]\n );\n }", "public static function makeIcon(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return '✕';\n case self::SKIPPED:\n return 's';\n case self::RISKY:\n return 'r';\n case self::INCOMPLETE:\n return 'i';\n case self::WARN:\n return 'w';\n case self::RUNS:\n return '•';\n default:\n return '✓';\n }\n }", "public function getIconForResourceWithUnknownFileTypeReturnsOtherIcon() {}", "public function get_icon() {\n\t\treturn 'fa fa-images';\n\t}", "public function get_icon() {\n\t\t\treturn WC_SUMO_Sagepay_Common_Functions::get_icon( $this->cardtypes, $this->sagelink, $this->sagelogo, $this->id );\n\t\t}", "public function setIcon($var)\n {\n GPBUtil::checkString($var, True);\n $this->Icon = $var;\n\n return $this;\n }", "public function setIcon($var)\n {\n GPBUtil::checkString($var, True);\n $this->icon = $var;\n\n return $this;\n }", "function get_icon() {\n\t\treturn $this->settings['icon'];\n\t}", "public function get_menu_icon() {\n\n\t\treturn file_get_contents( $this->get_base_path() . '/images/menu-icon.svg' );\n\n\t}", "public function getIcon()\n {\n return empty($this->model->icon) ? 'globe' : $this->model->icon;\n }", "function atom_site_icon()\n {\n }", "public function getIcon()\n {\n return 'voyager-external';\n }", "function title_icon_url2icon_filter($custom_field) {\n\t$img = $custom_field;\n\tif (preg_match('#\\[img\\](.+?)\\[/img\\]#i', $custom_field, $matches)) {\n\t\t$img = '<img src=\"'.$matches[1].'\" alt =\"\" />';\n\t}\n\treturn $img;\n}", "protected function buildCssAndRegisterIcons() {}", "private function set_icon(\\Saklient\\Cloud\\Resources\\Icon $v=null)\n\t{\n\t\tUtil::validateArgCount(func_num_args(), 1);\n\t\tUtil::validateType($v, \"\\\\Saklient\\\\Cloud\\\\Resources\\\\Icon\");\n\t\t$this->m_icon = $v;\n\t\t$this->n_icon = true;\n\t\treturn $this->m_icon;\n\t}", "private function set_icon(\\Saklient\\Cloud\\Resources\\Icon $v=null)\n\t{\n\t\tUtil::validateArgCount(func_num_args(), 1);\n\t\tUtil::validateType($v, \"\\\\Saklient\\\\Cloud\\\\Resources\\\\Icon\");\n\t\t$this->m_icon = $v;\n\t\t$this->n_icon = true;\n\t\treturn $this->m_icon;\n\t}", "function iron_icon_shortcode( $atts ) {\n $a = shortcode_atts( array(\n\t\t'icon' => '',\n\t\t'color' => '',\n\t\t'size' => 24\n ), $atts );\n\t\n\t$icon = explode(':',$a['icon']);\n\tif(empty($icon[1])) {\n\t\t$icon[1] = $icon[0];\n\t\t$icon[0] = 'iron';\n\t} elseif($icon[0] === 'icons')\n\t\t$icon[0] = 'iron';\n\t\t\n\t$icon_svg = plugins_url(\"icons/{$icon[0]}.svg\",__FILE__);\t\n\t$color = empty($a['color']) ? 'currentColor' : $a['color'];\n\t$style = \" style=\\\"fill:{$color}\\\"\";\t\n\t\n\t$size = 0+$a['size'];\n\t$s = $size / 24;\n\t\n\t$uses = \"<use x='0' y='0' transform='scale($s)' xlink:href='{$icon_svg}#{$icon[1]}' $style/>\";\n return \"<svg width='$size' height='$size' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>$uses</svg>\";\n}", "public function uploadIcon() {\n\t\t$icon = $this->request->getUploadedFile('uploadicon');\n\t\tif (empty($icon)) {\n\t\t\treturn new DataResponse([\n\t\t\t\t'error' => $this->l10n->t('No file uploaded'),\n\t\t\t], Http::STATUS_UNPROCESSABLE_ENTITY);\n\t\t}\n\n\t\t$imageSize = getimagesize($icon['tmp_name']);\n\n\t\tif ($imageSize === false && $icon['type'] !== 'image/svg+xml') {\n\t\t\t// Not an image\n\t\t\treturn new DataResponse([\n\t\t\t\t'error' => $this->l10n->t('Provided file is not an image'),\n\t\t\t], Http::STATUS_UNPROCESSABLE_ENTITY);\n\t\t}\n\n\t\tif ($imageSize !== false && (!in_array($imageSize[0], [16, 24, 32], true) || $imageSize[0] !== $imageSize[1])) {\n\t\t\t// Not a square\n\t\t\treturn new DataResponse([\n\t\t\t\t'error' => $this->l10n->t('Provided image is not a square of 16, 24 or 32 pixels width'),\n\t\t\t], Http::STATUS_UNPROCESSABLE_ENTITY);\n\t\t}\n\n\t\ttry {\n\t\t\ttry {\n\t\t\t\t$icons = $this->appData->getFolder('icons');\n\t\t\t} catch (NotFoundException $e) {\n\t\t\t\t$icons = $this->appData->newFolder('icons');\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t$target = $icons->getFile($icon['name']);\n\t\t\t} catch (NotFoundException $e) {\n\t\t\t\t$target = $icons->newFile($icon['name']);\n\t\t\t}\n\t\t} catch (NotPermittedException $e) {\n\t\t\treturn new DataResponse([\n\t\t\t\t'error' => $this->l10n->t('An error occurred while uploading the icon, please make sure the data directory is writable'),\n\t\t\t], Http::STATUS_UNPROCESSABLE_ENTITY);\n\t\t} catch (\\RuntimeException $e) {\n\t\t\treturn new DataResponse([\n\t\t\t\t'error' => $this->l10n->t('An error occurred while uploading the icon, please make sure the data directory is writable'),\n\t\t\t], Http::STATUS_UNPROCESSABLE_ENTITY);\n\t\t}\n\n\t\t$target->putContent(file_get_contents($icon['tmp_name'], 'r'));\n\n\t\treturn new DataResponse([\n\t\t\t'id' => $target->getName(),\n\t\t\t'name' => $target->getName(),\n\t\t]);\n\t}", "public function getIconForRecordWithMockRecordReturnsNormalIcon() {}", "function format_icon($p_icon, $p_color = '', $p_space_right = '5px'){\n\treturn '<i class=\"ace-icon fa ' . $p_icon . ' ' . $p_color . '\"></i>' . format_hspace($p_space_right);\n}", "public function get_icon() {\n\t\treturn 'fa fa-code';\n\t}", "public function get_icon() {\n\t\treturn 'fa fa-code';\n\t}", "public static function icon_factory( $fresh = false ) {\n\n\t\treturn self::factory( 'icon-factory', $fresh );\n\t}", "public function get_icon()\n\t{\n\t\treturn 'fab fa-algolia';\n\t}", "public function get_icon() {\n\t\treturn 'eicon-product-images';\n\t}", "protected function createIcon($item)\n {\n $output = '';\n\n if (array_key_exists('icon', $item)) {\n $output .= sprintf(\n '<i class=\"fa fa-lg fa-fw fa-%s\"></i> ',\n $item['icon']\n );\n }\n\n return $output;\n }" ]
[ "0.7376265", "0.73347664", "0.73347664", "0.7043662", "0.6994336", "0.6948517", "0.6934703", "0.6879293", "0.68766904", "0.68766904", "0.6814825", "0.68137974", "0.68137974", "0.6812595", "0.6812595", "0.6737506", "0.6670323", "0.6650333", "0.6632902", "0.66207975", "0.65877575", "0.6577137", "0.65619844", "0.65300804", "0.65277624", "0.64938426", "0.64883834", "0.6481576", "0.6481576", "0.6472354", "0.64596957", "0.64534366", "0.64420384", "0.64206713", "0.64057815", "0.63891786", "0.6386082", "0.63858724", "0.6385826", "0.6381707", "0.63682276", "0.636562", "0.63263994", "0.63243824", "0.6322285", "0.6307211", "0.630069", "0.630069", "0.630069", "0.630069", "0.630069", "0.630069", "0.630069", "0.62967515", "0.629516", "0.62921387", "0.62869245", "0.62525046", "0.62455344", "0.62394047", "0.6222017", "0.6208042", "0.6202409", "0.61849815", "0.61782473", "0.6164468", "0.6153984", "0.61532974", "0.61532974", "0.61428404", "0.61348146", "0.6127923", "0.6124323", "0.6116923", "0.611561", "0.61104363", "0.6103087", "0.6099256", "0.6098229", "0.608823", "0.60751504", "0.60461277", "0.60375434", "0.603464", "0.6031276", "0.60273093", "0.60201794", "0.60024405", "0.6001497", "0.5984012", "0.5984012", "0.5983984", "0.59803617", "0.597535", "0.59692174", "0.59640145", "0.59640145", "0.5960424", "0.5957554", "0.5955303", "0.5950326" ]
0.0
-1
public : the property or method can be accessed from everywhere. This is default public $week; Inheritance in OOP = When a class derives from another class. Constructor with DB The __construct() function creates a new SimpleXMLElement object
public function __construct($db) { $this->conn = $db; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getWeek()\n {\n return $this->week;\n }", "public function getWeek()\n {\n return $this->hasOne(WeekDay::className(), ['id' => 'week_id']);\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()\n {\n $this->thisWeekStart = date('Y-m-d 00:00:00',strtotime('7 days ago'));\n $this->thisWeekEnd = date('Y-m-d 23:59:59',strtotime('1 days ago'));\n $this->lastWeekStart = date('Y-m-d 00:00:00',strtotime('14 days ago'));\n $this->lastWeekEnd = date('Y-m-d 23:59:59',strtotime('7 days ago'));\n parent::__construct();\n }", "public function week()\n {\n return $this->belongsTo('App\\Models\\Week');\n }", "function nextWeek(){ return $this->_getDate(7);\t}", "public function getDayOfTheWeek();", "public function setWeek($week) {\n\t\t$this->schedule->setWeek($week);\n\n\t\treturn $this;\n\t}", "public function setWeek($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\StringValue::class);\n $this->week = $var;\n\n return $this;\n }", "public function showWeekNumber(): self\n {\n $this->attributes(['showWeekNumber' => true]);\n return $this;\n }", "public function __construct() {\n\t\t\n\t\t// Init translator\n\t\t$this->_translator = Lumia_Translator::get();\n\t\t\n\t\t// The Weekdays\n\t\t$this->_weekdays[0] = /* translators: weekday */ $this->_translator->translate('Locale:@Sunday');\n\t\t$this->_weekdays[1] = /* translators: weekday */ $this->_translator->translate('Locale:@Monday');\n\t\t$this->_weekdays[2] = /* translators: weekday */ $this->_translator->translate('Locale:@Tuesday');\n\t\t$this->_weekdays[3] = /* translators: weekday */ $this->_translator->translate('Locale:@Wednesday');\n\t\t$this->_weekdays[4] = /* translators: weekday */ $this->_translator->translate('Locale:@Thursday');\n\t\t$this->_weekdays[5] = /* translators: weekday */ $this->_translator->translate('Locale:@Friday');\n\t\t$this->_weekdays[6] = /* translators: weekday */ $this->_translator->translate('Locale:@Saturday');\n\t\n\t\t// Abbreviations for each day.\n\t\t$this->_weekdaysAbbrev[$this->_translator->translate('Locale:@Sunday')] = /* translators: three-letter abbreviation of the weekday */ $this->_translator->translate('Locale:@Sun');\n\t\t$this->_weekdaysAbbrev[$this->_translator->translate('Locale:@Monday')] = /* translators: three-letter abbreviation of the weekday */ $this->_translator->translate('Locale:@Mon');\n\t\t$this->_weekdaysAbbrev[$this->_translator->translate('Locale:@Tuesday')] = /* translators: three-letter abbreviation of the weekday */ $this->_translator->translate('Locale:@Tue');\n\t\t$this->_weekdaysAbbrev[$this->_translator->translate('Locale:@Wednesday')] = /* translators: three-letter abbreviation of the weekday */ $this->_translator->translate('Locale:@Wed');\n\t\t$this->_weekdaysAbbrev[$this->_translator->translate('Locale:@Thursday')] = /* translators: three-letter abbreviation of the weekday */ $this->_translator->translate('Locale:@Thu');\n\t\t$this->_weekdaysAbbrev[$this->_translator->translate('Locale:@Friday')] = /* translators: three-letter abbreviation of the weekday */ $this->_translator->translate('Locale:@Fri');\n\t\t$this->_weekdaysAbbrev[$this->_translator->translate('Locale:@Saturday')] = /* translators: three-letter abbreviation of the weekday */ $this->_translator->translate('Locale:@Sat');\n\t\n\t\t// The Months\n\t\t$this->_months['01'] = /* translators: month name */ $this->_translator->translate('Locale:@January');\n\t\t$this->_months['02'] = /* translators: month name */ $this->_translator->translate('Locale:@February');\n\t\t$this->_months['03'] = /* translators: month name */ $this->_translator->translate('Locale:@March');\n\t\t$this->_months['04'] = /* translators: month name */ $this->_translator->translate('Locale:@April');\n\t\t$this->_months['05'] = /* translators: month name */ $this->_translator->translate('Locale:@May');\n\t\t$this->_months['06'] = /* translators: month name */ $this->_translator->translate('Locale:@June');\n\t\t$this->_months['07'] = /* translators: month name */ $this->_translator->translate('Locale:@July');\n\t\t$this->_months['08'] = /* translators: month name */ $this->_translator->translate('Locale:@August');\n\t\t$this->_months['09'] = /* translators: month name */ $this->_translator->translate('Locale:@September');\n\t\t$this->_months['10'] = /* translators: month name */ $this->_translator->translate('Locale:@October');\n\t\t$this->_months['11'] = /* translators: month name */ $this->_translator->translate('Locale:@November');\n\t\t$this->_months['12'] = /* translators: month name */ $this->_translator->translate('Locale:@December');\n\t\n\t\t// Abbreviations for each month. Uses the same hack as above to get around the 'May' duplication.\n\t\t$this->_monthsAbbrev[$this->_translator->translate('Locale:@January')] = /* translators: three-letter abbreviation of the month */ $this->_translator->translate('Locale:@Jan');\n\t\t$this->_monthsAbbrev[$this->_translator->translate('Locale:@February')] = /* translators: three-letter abbreviation of the month */ $this->_translator->translate('Locale:@Feb');\n\t\t$this->_monthsAbbrev[$this->_translator->translate('Locale:@March')] = /* translators: three-letter abbreviation of the month */ $this->_translator->translate('Locale:@Mar');\n\t\t$this->_monthsAbbrev[$this->_translator->translate('Locale:@April')] = /* translators: three-letter abbreviation of the month */ $this->_translator->translate('Locale:@Apr');\n\t\t$this->_monthsAbbrev[$this->_translator->translate('Locale:@May')] = /* translators: three-letter abbreviation of the month */ $this->_translator->translate('Locale:@May');\n\t\t$this->_monthsAbbrev[$this->_translator->translate('Locale:@June')] = /* translators: three-letter abbreviation of the month */ $this->_translator->translate('Locale:@Jun');\n\t\t$this->_monthsAbbrev[$this->_translator->translate('Locale:@July')] = /* translators: three-letter abbreviation of the month */ $this->_translator->translate('Locale:@Jul');\n\t\t$this->_monthsAbbrev[$this->_translator->translate('Locale:@August')] = /* translators: three-letter abbreviation of the month */ $this->_translator->translate('Locale:@Aug');\n\t\t$this->_monthsAbbrev[$this->_translator->translate('Locale:@September')] = /* translators: three-letter abbreviation of the month */ $this->_translator->translate('Locale:@Sep');\n\t\t$this->_monthsAbbrev[$this->_translator->translate('Locale:@October')] = /* translators: three-letter abbreviation of the month */ $this->_translator->translate('Locale:@Oct');\n\t\t$this->_monthsAbbrev[$this->_translator->translate('Locale:@November')] = /* translators: three-letter abbreviation of the month */ $this->_translator->translate('Locale:@Nov');\n\t\t$this->_monthsAbbrev[$this->_translator->translate('Locale:@December')] = /* translators: three-letter abbreviation of the month */ $this->_translator->translate('Locale:@Dec');\n\t\n\t\t// The Meridiems\n\t\t$this->_meridiem['Locale:@am'] = $this->_translator->translate('Locale:@am');\n\t\t$this->_meridiem['Locale:@pm'] = $this->_translator->translate('Locale:@pm');\n\t\t$this->_meridiem['Locale:@AM'] = $this->_translator->translate('Locale:@AM');\n\t\t$this->_meridiem['Locale:@PM'] = $this->_translator->translate('Locale:@PM');\n\t\n\t\t// Numbers formatting\n\t\t// See http://php.net/number_format\n\t\t$this->_numberFormat['thousands_sep'] = $this->_translator->translate('Locale:@The thousands separator');\n\t\t$this->_numberFormat['decimals'] = $this->_translator->translate('Locale:@The number of decimal points');\n\t\t$this->_numberFormat['decimal_point'] = $this->_translator->translate('Locale:@The separator for the decimal point');\n\t\n\t\t// Set text direction.\n\t\tif ( isset( $GLOBALS['text_direction'] ) ) {\n\t\t\t$this->_textDirection = $GLOBALS['text_direction'];\n\t\t}\n\t\n\t\tif ( 'rtl' === $this->_textDirection ) {\n\t\t\t$this->_textDirection = 'ltr';\n\t\t}\n\t}", "public function week()\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$disable = 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$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' => 'string',\n\t\t\t\t'multi' => 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),\n\t\t\tarray(\n\t\t\t\t'name' => 'event_id',\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' => 'event_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),\n\t\t\tarray(\n\t\t\t\t'name' => 'event_limit',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer'\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' => 'time_range_start',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'time',\n\t\t\t\t'default' => '0000'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'time_range_end',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'time',\n\t\t\t\t'default' => '2400'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'enable',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'default' => '',\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'allowed_values' => $disable\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'first_day_of_week',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'default' => $this->first_day_of_week\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// Need to modify the starting date?\n\t\t// -------------------------------------\n\n\t\t$this->first_day_of_week = $this->P->value('first_day_of_week');\n\n\t\tif ($this->P->value('date_range_start') === FALSE)\n\t\t{\n\t\t\t$this->P->set('date_range_start', $this->CDT->datetime_array());\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->CDT->change_date(\n\t\t\t\t$this->P->value('date_range_start', 'year'),\n\t\t\t\t$this->P->value('date_range_start', 'month'),\n\t\t\t\t$this->P->value('date_range_start', 'day')\n\t\t\t);\n\t\t}\n\n\t\t$drs_dow = $this->P->value('date_range_start', 'day_of_week');\n\n\t\tif ($drs_dow != $this->first_day_of_week)\n\t\t{\n\t\t\tif ($drs_dow > $this->first_day_of_week)\n\t\t\t{\n\t\t\t\t$offset = ($drs_dow - $this->first_day_of_week);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$offset = (7 - ($this->first_day_of_week - $drs_dow));\n\t\t\t}\n\n\t\t\t$this->P->set('date_range_start', $this->CDT->add_day(-$offset));\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Define parameters specific to this calendar view\n\t\t// -------------------------------------\n\n\t\t$this->CDT->change_ymd($this->P->value('date_range_start', 'ymd'));\n\t\t$this->P->set('date_range_end', $this->CDT->add_day(6));\n\t\t$this->P->set('pad_short_weeks', FALSE);\n\n\t\t// -------------------------------------\n\t\t// Define our tagdata\n\t\t// -------------------------------------\n\n\t\t$find = array(\n\t\t\t'EVENTS_PLACEHOLDER',\n\t\t\t'{/',\n\t\t\t'{',\n\t\t\t'}'\n\t\t);\n\n\t\t$replace = array(\n\t\t\tee()->TMPL->tagdata,\n\t\t\tLD.T_SLASH,\n\t\t\tLD,\n\t\t\tRD\n\t\t);\n\n\t\tee()->TMPL->tagdata = str_replace(\n\t\t\t$find,\n\t\t\t$replace,\n\t\t\t$this->view(\n\t\t\t\t'week.html',\n\t\t\t\tarray(),\n\t\t\t\tTRUE,\n\t\t\t\t$this->sc->addon_theme_path . 'templates/week.html'\n\t\t\t)\n\t\t);\n\n\t\t// -------------------------------------\n\t\t// Tell TMPL what we're up to\n\t\t// -------------------------------------\n\n\t\tif (strpos(ee()->TMPL->tagdata, LD.'events'.RD) !== FALSE)\n\t\t{\n\t\t\tee()->TMPL->var_pair['events'] = TRUE;\n\t\t}\n\n\t\tif (strpos(ee()->TMPL->tagdata, LD.'display_each_hour'.RD) !== FALSE)\n\t\t{\n\t\t\tee()->TMPL->var_pair['display_each_hour'] = TRUE;\n\t\t}\n\n\t\tif (strpos(ee()->TMPL->tagdata, LD.'display_each_day'.RD) !== FALSE)\n\t\t{\n\t\t\tee()->TMPL->var_pair['display_each_day'] = TRUE;\n\t\t}\n\n\t\tif (strpos(ee()->TMPL->tagdata, LD.'display_each_week'.RD) !== FALSE)\n\t\t{\n\t\t\tee()->TMPL->var_pair['display_each_week'] = TRUE;\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// If you build it, they will know what's going on.\n\t\t// -------------------------------------\n\n\t\t$this->parent_method = __FUNCTION__;\n\n\t\treturn $this->build_calendar();\n\t}", "public function this_week($week) {\n\t\t$ts = $week;\n\t\t$start = strtotime( 'monday this week', $ts );\n\t\t$end = strtotime( 'monday this week +1 week', $ts );\n\t\t$end = strtotime( '-1 day', $end );\n\t\n\t\t$start_time = $start;\n\t\t$end_time = $end;\n\t\n\t\treturn array(\n\t\t\t'start'\t\t\t=>\tdate('Y-m-d', $start),\n\t\t\t'end'\t\t\t=>\tdate('Y-m-d', $end),\n\t\t\t'start_time'\t\t=>\t$start_time,\n\t\t\t'end_time'\t\t=>\t$end_time\n\t\t);\n\t}", "public function getDataWeek()\n {\n return $this->model()->where('created_at', '>=', Carbon::now()->startOfWeek())->get();\n }", "function setWeekNumber(){ //prelievo weeknumber \r\n if (isset($_GET['weekNumber']))\r\n $weekNumber = $_GET['weekNumber'];\r\n else\r\n $weekNumber = \"\";\r\n\r\n return $weekNumber;\r\n }", "public function __construct(){\n\t\t\tparent::__construct();\n\n\t\t\t$this->_name = 'Multilingual Publish Date';\n\t\t\t$this->_driver = ExtensionManager::create('multilingual_publish_date');\n\t\t}", "protected function setUp() {\n\t\t$this->object = new WeekStart;\n\t}", "function _wp_mysql_week($column)\n {\n }", "public static function week(){\n\t\t$w = date(\"w\", time());\n\t\treturn date('Y-m-d', time() - $w*24*60*60 );\n\t}", "function week( \n\t $name, $title = null, $value = null, \n\t $required = false, \n\t $attributes = null\n\t){\n return $this->input(\n\t $name, \n\t Form::TYPE_WEEK,\n\t $title, \n\t $value, \n\t $required, \n\t $attributes,\n\t null,\n\t Form::DATA_STRING\n );\n\t}", "public function fetchWeatherWeekly(){\n\t $url = \"http://opendata.cwb.gov.tw/opendata/MFC/F-C0032-005.xml\"; // 7days\n\t $forecasting = $this->fetchWeather($url);\n\t \n\t return $forecasting;\n\t}", "public static function getWeek($date, $format = 'Y-m-d') {\r\n \r\n }", "function getWeekNum($var){\nreturn date(\"W\", $this->mkActiveTime(0,0,1,$this->actmonth,$var,$this->actyear))+0;\n}", "public function __construct($propertyName, $date, $weekID)\n {\n $this->propertyName = $propertyName;\n $this->date = $date;\n $this->weekID = $weekID;\n }", "public function getWeeklySchedule()\n {\n return $this->weekly_schedule;\n }", "public function getWeeklySchedule()\n {\n return $this->weekly_schedule;\n }", "public static function getFirstSeventhWeekDay($week = null)\n {\n $first_day = $seventh_day = null;\n if(isset($week))\n {\n $first_day = Carbon::now()->addWeeks($week)->startOfWeek();\n $seventh_day = Carbon::now()->addWeeks($week)->endOfWeek();\n // $first_day = Carbon::now()->addWeeks($week);\n // $seventh_day = Carbon::now()->addWeeks($week + 1)->subDays(1);\n }\n $dateCollection['first_day'] = $first_day;\n $dateCollection['seventh_day'] = $seventh_day;\n $period = CarbonPeriod::create($first_day, $seventh_day);\n foreach($period as $key => $dateobj)\n {\n $dateCollection['datePeriod'][$key] = $dateobj;\n }\n \n return $dateCollection;\n }", "public static function getWeek(){\n\t\t// this represents the number of seconds ni a month\n\t\t// editing this will lead to false values\n\t\treturn 604800;\n\t}", "public function songoftheweek() {\n list($year,$week) = explode('.', date(\"Y.W\",time()));\n\n //$this->loadModel('Part');\n $this->loadModel('Song');\n $mSong = $this->Song->find('first', array('conditions'=>array('year' => $year, 'week' => $week)));\n // 1. Determine if we have a song for this week yet\n if ($mSong) {\n // We have an song to display\n $song = Song::normalizeArrayKeys($mSong['Song']['arrangement']);\n } else {\n // Create a new one\n $song = $this->Song->createSong();\n\n // Save it to db as this week's song\n $savedata = array(\n 'Song' => array(\n 'created'=>date(\"Y-m-d H:i:s\", time()),\n 'arrangement'=>$song\n ),\n 'Songs_week' => array(\n 'year'=>$year,\n 'week'=>$week,\n ),\n );\n $this->Song->saveAll($savedata);\n }\n\n // Shows song of the week\n $songoftheweek = $this->Song->makeSongDisplayParts($song);\n $this->set('key', $songoftheweek['key']);\n $this->set('affinity', $songoftheweek['affinity']);\n $this->set('chords', $songoftheweek['chords']);\n $this->set('concepts', $songoftheweek['concepts']);\n $this->set('arrangement', $songoftheweek['arrangement']);\n $this->set('mode', $songoftheweek['mode']);\n $this->set('scale', Song::getKeyValue($songoftheweek,'scale'));\n\n // Calculate how much time to next song\n $nextweek = (date(\"W\",time())) + 1;\n $curyear = date(\"Y\",time());\n $dt = new DateTime('now');\n $dt->setISODate($curyear,$nextweek);\n $newsongtime = strtotime($dt->format('Y-m-d') . ' 00:00:00');\n // Calculate times\n $seconds = ($newsongtime - time());\n $minutes = ($seconds / 60);\n $hours = ($minutes / 60);\n $days = ($hours / 24);\n //Decide whether to show days, hours, minutes, or seconds\n $timevalue = (float)$days;\n $units = (int)$timevalue == 1 ? 'day' : 'days';\n // Switch to hours\n if ($timevalue < 1.0) {\n $timevalue = (float)$hours;\n $units = (int)$timevalue == 1 ? 'hour' : 'hours';\n }\n // Switch to minutes\n if ($timevalue < 1.0) {\n $timevalue = (float)$minutes;\n $units = (int)$timevalue ? 'minute' : 'minutes';\n }\n // Switch to seconds\n if ($timevalue < 1.0) {\n $timevalue = (float)$seconds;\n $units = (int)$timevalue ? 'second' : 'seconds';\n }\n // Round timeval\n $timevalue = floor((float)$timevalue);\n\n $this->set('timeleft', \"$timevalue $units\");\n\n // Show existing songs\n // $this->set('songs', $this->Song->find('all'));\n\n // Show my todo list\n $list = <<<qq\n <li>Song of the week has to recover and fill in missing weeks if not gen'd\n <li>Concepts came up with same word twice.\n <li>Unique constraint on week+year on arr_weeks\n <li>have a debug controller, so I can just, when logged in, type in my\n ideas and they save in a pagn'td list.\n <li>Unit tests, deploy\n <li>on 1/1/2012 at 5 pm it said there are 364 more days until the next song</li>\n <li>LInking to the site always send you to login page.</li>\n\t\nqq;\n $this->set('todo', $list);\n }", "function getWeekday($var){\nreturn $this->mkActiveDate(\"w\", $this->mkActiveTime(0,0,1,$this->actmonth,$var,$this->actyear));\n}", "public function printTalkRoster($week) {\n\n\t\ttry {\n\t\t\tif (empty($week)) {\n\t\t\t\tthrow new \\Exception('Week is missing.');\n\t\t\t}\n\t\t\t$start_date = Carbon::parse($week)->startOfWeek();\n\t\t\t$end_date = $start_date->copy()->addDays(6);\n\n\t\t\t$user = \\Auth::User();\n\n\t\t\t$station_id = $user->station->id;\n\n\t\t\t$talk_shows = \\App\\ConnectContent::where('content_type_id', ContentType::GetTalkContentTypeID())\n\t\t\t\t->where('station_id', $station_id)\n\t\t\t\t->where('start_date', '<', $end_date)\n\t\t\t\t->where('end_date', '>', $start_date)\n\t\t\t\t->get();\n\n\t\t\t$events = [];\n\n\t\t\tforeach($talk_shows as $talk_show) {\n\t\t\t\t$event['id'] = $talk_show['id'];\n\t\t\t\t$event['title'] = $talk_show['what'];\n\t\t\t\t$event['start'] = $talk_show['start_time'];\n\t\t\t\t$event['end'] = $talk_show['end_time'];\n\t\t\t\t$event['who'] = $talk_show['who'];\n\n\t\t\t\t$dow = [];\n\t\t\t\tif($talk_show['content_weekday_0']) {\n\t\t\t\t\t$dow[] = 0;\n\t\t\t\t}\n\t\t\t\tif($talk_show['content_weekday_1']) {\n\t\t\t\t\t$dow[] = 1;\n\t\t\t\t}\n\t\t\t\tif($talk_show['content_weekday_2']) {\n\t\t\t\t\t$dow[] = 2;\n\t\t\t\t}\n\t\t\t\tif($talk_show['content_weekday_3']) {\n\t\t\t\t\t$dow[] = 3;\n\t\t\t\t}\n\t\t\t\tif($talk_show['content_weekday_4']) {\n\t\t\t\t\t$dow[] = 4;\n\t\t\t\t}\n\t\t\t\tif($talk_show['content_weekday_5']) {\n\t\t\t\t\t$dow[] = 5;\n\t\t\t\t}\n\t\t\t\tif($talk_show['content_weekday_6']) {\n\t\t\t\t\t$dow[] = 6;\n\t\t\t\t}\n\n\t\t\t\t$event['dow'] = $dow;\n\t\t\t\t$event['is_ready'] = $talk_show['is_ready'];\n\t\t\t\t$event['className'] = $talk_show['is_ready'] ? '' : 'not-ready';\n\t\t\t\t$range['start'] = $talk_show->start_date;\n\t\t\t\t$range['end'] = $talk_show->end_date;\n\t\t\t\t$event['ranges'] = array($range);\n\t\t\t\t$event['url'] = 'javascript:void(0)';\n\n\t\t\t\t$events[] = $event;\n\t\t\t}\n\n\t\t\t$content = ConnectContent::findOrFail(3623);\n\n\t\t\tif ($content->content_type_id != ContentType::GetMaterialInstructionContentTypeID()) {\n\t\t\t\tthrow new \\Exception('Content type is Invalid.');\n\t\t\t}\n//\n//\t\t\t$pdf = \\App::make('dompdf.wrapper');\n//\n//\t\t\t$pdf->loadView('pdf.talkroster', array('content' => $content));\n\n\t\t\treturn view('pdf.talkroster')->with('content', $content)\n\t\t\t\t->with('talk_shows', $talk_shows);\n\n//\t\t\treturn $pdf->download($content->getPrintFileName());\n\n\t\t\t//return view('pdf.materialInstruction')->with('content', $content);\n\n\t\t} catch (\\Exception $ex){\n\t\t\t\\Log::error($ex);\n\t\t\treturn response($ex->getMessage(), 500);\n\t\t}\n\n\t}", "function week_class($monday) {\n $class = '';\n \n $this_monday = get_monday();\n \n if ($monday == $this_monday) {\n $class = 'currentweek';\n } elseif ($monday < $this_monday) {\n $class = 'past';\n }\n \n \n \n return $class;\n}", "public function __construct() {\n\t\tparent::__construct(\n\t \t\t'ws7_weather_widget', // Base ID\n\t\t\t'WS7 Weather Widget', // Name\n\t\t\tarray( 'description' => __( 'Shows a pretty forecast based on today\\'s forecast by Kevin Jones', 'ws7weather' ), ) // Args\n\t\t);\n\t}", "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}", "function __construct($weekNo = null, $year = null, $timezone = null, $latitude = null, $longitude = null)\n {\n if (is_null($year)) {\n $year = Sunny::now()->year;\n }\n $this->setYear($year, false);\n\n if (is_null($weekNo)) {\n $weekNo = Sunny::now()->weekOfYear;\n }\n $this->setWeek($weekNo, false);\n\n if (!is_null($timezone)) {\n $this->setTimezone($timezone, false);\n }\n\n $this->latitude = $latitude;\n $this->longitude = $longitude;\n\n $this->updateDays();\n }", "function previousWeek(){ return $this->_getDate(-7); }", "function LoadWeek($WeekNumber)\n {\n //Construction du tableau\n $days = array('lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi','samedi','dimanche');\n\n //Semaine en cours\n $week = ($WeekNumber == 'current')? date('W') : $WeekNumber;\n $year = date('Y');\n echo $StartDate = Date::GetFirstDay($week, $year);\n\n //Affichage de la semaine et des controles de selection\n $html = $this->GetTool($week);\n\n $html .= \"<div class='content-panel'>\";\n //Tableau de la semaine\n $html .= \"<table id='taAgenda' class='calendar'>\";\n\n //Entete\n $html .= '<tr>';\n $html .= '<td class=\"subTitle\"></td>';\n\n //\n $dateDay = array();\n foreach($days as $day)\n {\n //Creation de la date actuelle\n $dateDay[] = $StartDate;\n\n $html .=\t'<th class=\"subTitle\">'.$this->Core->GetCode($day);\n $html .= '<span class=\"calendar date\">'.$StartDate.'</span>';\n $html .= '</th>';\n\n $StartDate = Date::AddDay($StartDate, 1);\n }\n\n //Creation des lignes\n $html .= '</tr>';\n\n //recuperation des evenements de l'utilisateur\n echo \"DateStart : \" . $DateStart = Date::AddDay($dateDay[0],-1, true);\n echo \"Date End :\" . $DateEnd = Date::AddDay($dateDay[0],7, true);\n\n $AgendaEvent = new AgendaEvent($this->Core);\n $AgendaEvent->AddArgument(new Argument(\"Apps\\Agenda\\Entity\\AgendaEvent\", \"UserId\", EQUAL, $this->Core->User->IdEntite));\n $AgendaEvent->AddArgument(new Argument(\"Apps\\Agenda\\Entity\\AgendaEvent\", \"DateStart\", MORE, $DateStart));\n $AgendaEvent->AddArgument(new Argument(\"Apps\\Agenda\\Entity\\AgendaEvent\", \"DateEnd\", LESS, $DateEnd));\n $EventsUser = $AgendaEvent->GetByArg();\n\n //Recuperation Des évenement ou l'utilisateur est invités\n $EventInvits = AgendaEvent::GetInvitation($this->Core, $this->Core->User->IdEntite, $DateStart, $DateEnd);\n\n for($hours=0; $hours < 24; $hours++)\n {\n $html .= '<tr>';\n\n if($hours < 10)\n {\n $hours = \"0\".$hours;\n }\n\n $html .= '<td>'.$hours.':00</td>';\n\n //Parcourt des jours\n //foreach($dateDay as $day)\n for($d = 0; $d < count($dateDay) ; $d++ )\n {\n //Charge un tableau avec touts les rendez-vous\n $drawCell = true;\n\n //Parcourt des rendez-vous de l'utilisateur\n if(count($EventsUser) > 0)\n {\n foreach($EventsUser as $event)\n {\n echo \"DATE :\" . $event->DateStart->Value . \"\" . $dateDay[$d].' '.$hours.':00:00';\n \n //Evenement qui commence dans la cellule\n if($event->DateStart->Value == $dateDay[$d].' '.$hours.':00:00' )\n {\n //Dimension de l'evenement\n $rowSpan = DateHelper::GetDiffHour($event->DateStart->Value, $event->DateEnd->Value);\n $colSpan = DateHelper::GetDiffDay($event->DateStart->Value, $event->DateEnd->Value);\n\n\n //Affichage de la cellule\n $html .=\t '<td id=\"'.$dateDay[$d].'!'.$hours.'\" >';\n $html .= $this->GetEvent($event, $colSpan, $rowSpan);\n $html.='</td>';\n\n $drawCell = false;\n }\n }\n }\n\n //Evenements invités\n if(count($EventInvits) > 0)\n {\n foreach($EventInvits as $event)\n {\n //Evenement qui commence dans la cellule\n if($event->Event->Value->DateStart->Value == $dateDay[$d].' '.$hours.':00:00' )\n {\n //Dimension de l'evenement\n $rowSpan = DateHelper::GetDiffHour($event->Event->Value->DateStart->Value, $event->Event->Value->DateEnd->Value);\n $colSpan = DateHelper::GetDiffDay($event->Event->Value->DateStart->Value, $event->Event->Value->DateEnd->Value);\n\n //Affichage de la cellule\n //$html .=\t '<td id=\"'.$day.'!'.$hours.'\" colspan=\"'.$colSpan.'\" rowspan=\"'.$rowSpan.'\" >';\n $html .=\t '<td id=\"'.$dateDay[$d].'!'.$hours.'\" >';\n\n $html .=\t$this->GetInvit($event, $colSpan, $rowSpan);\n $html.='</td>';\n\n $drawCell = false;\n }\n }\n }\n\n //La cellule n'a pas d'évenement\n if($drawCell)\n {\n $html .=\t '<td id=\"'.$dateDay[$d].'!'.$hours.'\"></td>';\n }\n }\n\n $html .= '</tr>';\n }\n $html .= \"</table'>\";\n\n $html .= \"</div>\";\n\n echo $html;\n }", "public static function createFromXML(\\SimpleXMLElement $xml)\n {\n $weekScheme = new WeekScheme();\n\n // loop attributes\n foreach ($xml->attributes() as $attributeName => $value) {\n $method = 'set' . ucfirst($attributeName);\n\n switch ($attributeName) {\n default:\n $value = (string) $value;\n }\n\n if (!method_exists($weekScheme, $method)) {\n if (UitDatabank::DEBUG) {\n throw new Exception('Unknown attribute: ' . $attributeName);\n }\n } else {\n if ($value !== null) {\n call_user_func(array($weekScheme, $method), $value);\n }\n }\n }\n\n // loop elements\n foreach ($xml as $element) {\n $skip = false;\n $value = null;\n $elementName = $element->getName();\n $method = 'set' . ucfirst($element->getName());\n\n switch ($elementName) {\n case 'weekscheme':\n foreach ($element as $day) {\n $className = '\\\\TijsVerkoyen\\\\UitDatabank\\\\Entities\\\\Event\\\\Calendar\\\\WeekScheme\\\\' . ucfirst($day->getName());\n $weekScheme->addDay(\n call_user_func(array($className, 'createFromXML'), $day)\n );\n }\n $skip = true;\n break;\n default:\n $value = (string) $element;\n break;\n }\n\n if (!$skip) {\n if (!method_exists($weekScheme, $method)) {\n if (UitDatabank::DEBUG) {\n throw new Exception('Unknown element: ' . $elementName);\n }\n } else {\n if ($value !== null) {\n call_user_func(array($weekScheme, $method), $value);\n }\n }\n }\n }\n\n return $weekScheme;\n }", "function get_weekname()\n {\n $newdate=$this->aclone();\n $newdate->find_start_of_week();\n $return_string=$newdate->get_year();\n $return_string=$return_string.\"_\";\n $return_string=$return_string.$newdate->get_month();\n $return_string=$return_string.\"_\";\n $return_string=$return_string.$newdate->get_day();\n return $return_string;\n }", "public static function weekly() {return new ScheduleViewMode(2);}", "function GetTool($week)\n {\n $html = \"<div id='Week'>\";\n\n $html .= \"<img src='../Apps/Agenda/Images/logo.png' />\";\n\n $imgBefore = new Libelle(\"<b onclick='AgendaAction.LoadWeekBefore($week);' class='icon-arrow-left' title='\".$this->Core->GetCode(\"Agenda.WeekBefore\").\"' ></b>\");\n $html .= $imgBefore->show().\" \";\n\n $imgAfter = new Libelle(\"<b onclick='AgendaAction.LoadWeekAfter($week);' class='icon-arrow-right' title='\".$this->Core->GetCode(\"Agenda.WeekBefore\").\"' ></b>\");\n $html .= \" \".$imgAfter->Show();\n\n\n //Semaine selectionnée\n $html .= $this->Core->GetCode(\"Week\") .' : ';\n\n $lstWeek = new ListBox(\"lstWeek\");\n\n //Ajout des semaines\n for($i= 1 ; $i< 53; $i++)\n {\n $lstWeek->Add($i, $i);\n }\n\n $lstWeek->Selected = $week;\n $lstWeek->OnChange = 'AgendaAction.LoadWeek(this)';\n $html .= $lstWeek->Show();\n\n //Legend \n $html .= \"<i class='legendEvent'>&nbsp;</i><i>\".$this->Core->GetCode(\"Agenda.MyEvent\").\"</i>\";\n $html .= \"<i class='legendInvit'>&nbsp;</i><i>\".$this->Core->GetCode(\"Agenda.MyInvit\").\"</i>\";\n $html .= \"<i class='legendApp'>&nbsp;</i><i>\".$this->Core->GetCode(\"Agenda.EventApp\").\"</i>\";\n\n $html .= \"</div><br/></div>\";\n\n return $html;\n }", "function __construct(){\n $this->connect(DB_HOST,DB_USER,DB_PASS,DB_NAME);\n $this->_model=get_class($this);\n $this->_table=strtolower($this->_model).\"s\";\n $this->watchdog=new Watchdog();\n }", "public function setWeekDate($a = null, $b = null, $c = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function history($project = null, $year = null, $week = null) {\n\t\t$this->set('pageTitle', $this->request['project']);\n\t\t$this->set('subTitle', __(\"timesheets\"));\n\t\t$project = $this->_getProject($project);\n\n\t\t// Validate the Year\n\t\tif (($_year = $this->Time->validateYear($year)) != $year) {\n\t\t\treturn $this->redirect(array('project' => $project['Project']['name'], 'year' => $_year, 'week' => $week));\n\t\t}\n\t\t// Validate the week\n\t\tif (($_week = $this->Time->validateWeek($week, $year)) != $week) {\n\t\t\treturn $this->redirect(array('project' => $project['Project']['name'], 'year' => $_year, 'week' => $_week));\n\t\t}\n\n\t\t// Optionally filter by user\n\t\t$user = null;\n\t\t$userName = null;\n\t\tif (isset($this->request->query['user'])) {\n\t\t\t$user = $this->request->query['user'];\n\t\t\tif (!preg_replace('/^\\s*(\\d+)\\s*$/', '$1', $user)) {\n\t\t\t\t$user = null;\n\t\t\t} else {\n\t\t\t\t$userObject = $this->Time->User->find('first', array(\n\t\t\t\t\t'conditions' => array('id' => $user),\n\t\t\t\t\t'fields' => array('User.name')\n\t\t\t\t));\n\t\t\t\tif ($userObject) {\n\t\t\t\t\t$userName = $userObject['User']['name'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->set('user', $user);\n\t\t\t$this->set('userName', $userName);\n\t\t}\n\n\t\t// Start and end dates\n\t\t$startDate = new DateTime(null, new DateTimeZone('UTC'));\n\t\t$startDate->setISODate($year, $week, 1);\n\t\t$endDate = new DateTime(null, new DateTimeZone('UTC'));\n\t\t$endDate->setISODate($year, $week, 7);\n\n\t\t// Fetch summary details for the week\n\t\t$weekTimes = $this->Time->fetchWeeklySummary($project['Project']['id'], $year, $week, $user);\n\n\t\t$this->set('weekTimes', $weekTimes);\n\t\t$this->set('project', $project);\n\n\t\t$this->set('thisWeek', $week);\n\t\t$this->set('thisYear', $year);\n\t\t$this->set('startDate', $startDate);\n\t\t$this->set('endDate', $endDate);\n\n\t\tif ($week == $this->Time->lastWeekOfYear($year)) {\n\t\t\t$this->set('nextWeek', 1);\n\t\t\t$this->set('nextYear', $year + 1);\n\t\t} else {\n\t\t\t$this->set('nextWeek', $week + 1);\n\t\t\t$this->set('nextYear', $year);\n\t\t}\n\n\t\tif ($week == 1) {\n\t\t\t$this->set('prevWeek', $this->Time->lastWeekOfYear($year - 1));\n\t\t\t$this->set('prevYear', $year - 1);\n\t\t} else {\n\t\t\t$this->set('prevWeek', $week - 1);\n\t\t\t$this->set('prevYear', $year);\n\t\t}\n\n\t\t// List of tasks we can log time against, for modal add dialog\n\t\t$this->set('tasks', $this->Time->Project->Task->fetchLoggableTasks($this->Auth->user('id')));\n\n\t\t// Downloadable timesheets\n\t\tif (isset($this->request->query['format'])) {\n\t\t\tswitch (strtolower(trim($this->request->query['format']))) {\n\t\t\t\tcase 'csv':\n\t\t\t\t\t$this->layout = 'ajax';\n\t\t\t\t\t$this->RequestHandler->respondAs('text/csv');\n\t\t\t\t\t$this->response->header(array(\n\t\t\t\t\t\t'Content-Disposition' => 'attachment; filename=\"timesheet.csv\"'\n\t\t\t\t\t));\n\t\t\t\t\t$this->render('/Elements/Time/tempo.csv');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'json':\t\n\t\t\t\t\t$this->autoRender = false;\n\t\t\t\t\t$this->set('data', $weekTimes);\n\t\t\t\t\t$this->render('/Elements/json');\n\n\t\t\t\t\tbreak;\n\t\t\t\t// Explicitly specified HTML, or unknown format - just render the page as normal\n\t\t\t\tcase 'html':\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t}", "public function __construct() {\n\n\t\t\tparent::__construct(\n\t\t\t\t'zthemename_business_hours',\n\t\t\t\tesc_html__( 'Business Hours', 'zthemename' ),\n\t\t\t\tarray(\n\t\t\t\t\t'description' => esc_html__( \"Displays the business' hours\", 'zthemename' ),\n\t\t\t\t\t'customize_selective_refresh' => true,\n\t\t\t\t)\n\t\t\t);\n\t\t\t// get opening hours from db.\n\t\t\t$this->opening_hours = $this->generate_hours();\n\t\t}", "function setFirstWeekDay($daynum){\n\tif ($daynum==0) $this->startOnSun=true;\n\telse $this->startOnSun=false;\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 actionIndex($week = '', $id = null)\n {\n try {\n if ($id) {\n if (Yii::$app->user->id != $id) {\n if (!AuthHelper::isAdmin()) {\n throw new UnauthorizedHttpException();\n }\n }\n } else {\n $id = Yii::$app->user->id;\n }\n $date = new DateTime();\n $dateStr = $date->format(Constants::DATE_FORMAT);\n if (!empty($week)) {\n $dateStr = $week;\n $date = DateTime::createFromFormat(Constants::DATE_FORMAT, $dateStr); \n }\n $dayOfWeek = $date->format('N');//1 Monday, 7: Sunday \n $fromStr = date(Constants::DATE_DISPLAY_FORMAT, strtotime($dateStr.' -'.($dayOfWeek - 1).' day'));\n $fromDate = date(Constants::DATE_FORMAT, strtotime($dateStr.' -'.($dayOfWeek - 1).' day'));\n $previousDate = date(Constants::DATE_FORMAT, strtotime($dateStr.' -'.$dayOfWeek.' day'));\n $toStr = date(Constants::DATE_DISPLAY_FORMAT, strtotime($dateStr.' +'.(7 - $dayOfWeek).' day'));\n $nextDate = date(Constants::DATE_FORMAT, strtotime($dateStr.' +'.(8 - $dayOfWeek).' day'));\n Yii::trace(\"dayOfWeek $dayOfWeek - From $fromStr - To $toStr\");\n \n $searchModel = new TimetableSearch();\n $params = Yii::$app->request->queryParams;\n $params['TimetableSearch']['week'] = $fromDate;\n $params['TimetableSearch']['user_id'] = $id;\n $dataProvider = $searchModel->search($params);\n\n if ($dataProvider->getCount() == 0) {\n $dataProvider = new EmptyDataProvider(new Timetable());\n }\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'fromStr' => $fromStr,\n 'toStr' => $toStr,\n 'fromDate' => $fromDate,\n 'previousDate' => $previousDate,\n 'nextDate' => $nextDate,\n ]);\n } catch (Exception $ex) {\n throw new InvalidArgumentException();\n } \n }", "function getWeekdays() {\n\t\t$week = array(\n\t\t\t$this->pi_getLL('sunday'),\n\t\t\t$this->pi_getLL('monday'),\n\t\t\t$this->pi_getLL('tuesday'),\n\t\t\t$this->pi_getLL('wednesday'),\n\t\t\t$this->pi_getLL('thursday'),\n\t\t\t$this->pi_getLL('friday'),\n\t\t\t$this->pi_getLL('saturday')\n\t\t);\n\n\t\treturn $week;\n\t}", "public static function instance() {\n\t\treturn tribe( 'tec.customizer.month-week-view' );\n\t}", "public static function getThisWeek(){\n\t\t\t$cur = DB::select('SELECT WEEKDAY((SELECT CURDATE())) as cur')[0]->cur;\n\n\t\t\t// SQL find this monday\n\t\t\t$fir = DB::select('SELECT DATE_SUB( (SELECT CURDATE()), INTERVAL ?+1 DAY) as fir', array($cur))[0]->fir;\n\t\t\t$firstDay = DB::select('SELECT UNIX_TIMESTAMP(?) as firstDay', array($fir))[0]->firstDay;\n\n\t\t\t// SQL find this sunday\n\t\t\t$lst = DB::select('SELECT DATE_SUB( (SELECT CURDATE()), INTERVAL ?-5 DAY) as lst', array($cur))[0]->lst;\n\t\t\t$lastDay = DB::select('SELECT UNIX_TIMESTAMP(?) as lastDay', array($lst))[0]->lastDay;\n\t\t\t\n\t\t\t// Number, String\n\t\t\treturn array(array($firstDay, $lastDay+ 86399), array($fir, $lst));\n\t\t}", "public function week($callback = null)\n {\n return $this->weeks($callback);\n }", "function get_day_of_week()\n {\n if (date(\"D\", $this->timestamp)==\"Sun\")\n {\n return 0;\n } else if (date(\"D\", $this->timestamp)==\"Mon\")\n {\n return 1;\n } else if (date(\"D\", $this->timestamp)==\"Tue\")\n {\n return 2;\n } else if (date(\"D\", $this->timestamp)==\"Wed\")\n {\n return 3;\n } else if (date(\"D\", $this->timestamp)==\"Thu\")\n {\n return 4;\n } else if (date(\"D\", $this->timestamp)==\"Fri\")\n {\n return 5;\n } else if (date(\"D\", $this->timestamp)==\"Sat\")\n {\n return 6;\n } else\n {\n return \"error\";\n }\n }", "function find_start_of_week()\n {\n $this->move_to_start_of_day();\n $this->move_to_start_of_day();\n while ($this->get_day_of_week()>0)\n {\n $this->move_forward_n_days(-1);\n }\n }", "public function action_index()\n\t{\n\t\t$type = 'week';\n\n\t\t$settings = array\n\t\t(\n\t\t\t'_label' => 'Week 1',\n\t\t\t'_namespace' => 'mmi',\n\t\t\t'class' => 'week',\n\t\t\t'id' => 'week1',\n\t\t\t'required' => 'required',\n\t\t\t'step' => 3,\n\t\t\t'value' => '1970-W01'\n\t\t);\n\t\t$field = MMI_Form_Field::factory($type, $settings);\n\t\t$this->_form->add_field($field);\n\t\tif ($this->debug)\n\t\t{\n\t\t\tMMI_Debug::dump($field->render(), $type.' (step 3)');\n\t\t}\n\n\t\t$settings = array_merge($settings, array\n\t\t(\n\t\t\t'_after' => '2010-W10',\n\t\t\t'_before' => '2010-W01',\n\t\t\t'_label' => 'Week 2',\n\t\t\t'id' => 'week2',\n\t\t\t'max' => '2010-W10',\n\t\t\t'min' => '2010-W01',\n\t\t\t'required' => FALSE,\n\t\t\t'step' => 1,\n\t\t\t'value' => '',\n\t\t));\n\t\t$field = MMI_Form_Field::factory($type, $settings);\n\t\t$this->_form->add_field($field);\n\t\tif ($this->debug)\n\t\t{\n\t\t\tMMI_Debug::dump($field->render(), $type.' (min 2010-W01; max 2010-W10; step 1)');\n\t\t}\n\n\t\t$settings = array_merge($settings, array\n\t\t(\n\t\t\t'_before' => '2010-W10',\n\t\t\t'_label' => 'Week 3',\n\t\t\t'id' => 'week3',\n\t\t\t'min' => '2010-W10',\n\t\t\t'step' => 2,\n\t\t));\n\t\tunset($settings['_after'], $settings['max']);\n\t\t$field = MMI_Form_Field::factory($type, $settings);\n\t\t$this->_form->add_field($field);\n\t\tif ($this->debug)\n\t\t{\n\t\t\tMMI_Debug::dump($field->render(), $type.' (min 2010-W10; step 2)');\n\t\t}\n\n\t\t$settings = array_merge($settings, array\n\t\t(\n\t\t\t'_after' => '2010-W30',\n\t\t\t'_label' => 'Week 4',\n\t\t\t'id' => 'week4',\n\t\t\t'max' => '2010-W30',\n\t\t\t'step' => 4,\n\t\t));\n\t\tunset($settings['_before'], $settings['min']);\n\t\t$field = MMI_Form_Field::factory($type, $settings);\n\t\t$this->_form->add_field($field);\n\t\tif ($this->debug)\n\t\t{\n\t\t\tMMI_Debug::dump($field->render(), $type.' (max 2010-W30; step 4)');\n\t\t}\n\t}", "public function __construct($winner, $weekDay) {\n\t\t$this->winner = $winner;\n\t\t$this->weekDay = $weekDay;\n\t}", "public function setWeek($week, $updateDays = true)\n {\n $this->weekNo = $week;\n\n if ($updateDays) {\n $this->updateDays();\n }\n\n return $this;\n }", "public function setMinimalDaysInFirstWeek($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function __construct() {\n\t\tparent::__construct(\n\t \t\t'wunderground_widget',\n\t\t\t'Meteo Widget',\n\t\t\tarray( 'description' => 'A Widget for displaying the current weather using the openweather API' ) \n\t\t);\n\t}", "public static function xml2json(): string\n {\n $lessonxml = new SimpleXMLElement('data/' . Conf::section() . '-timetable.xml', 0, true);\n $day = date(\"w\") - 1;\n if ($day < 0 || $day > 4) {\n $day = 4; //friday \n }\n $data = ['day' => $day, 'min-hour' => 99, 'max-hour' => 0, 'week' => '-'];\n foreach ($lessonxml->Timetables[0] as $class) {\n //echo $class->Entity->Abbrev . ' ';\n if (in_array($class->Entity->Abbrev, Conf::get(\"classes\"))) {\n foreach ($class->Cells[0] as $cell) {\n if ($day != intval($cell->DayIndex)) {\n continue;\n }\n $hour = intval($cell->HourIndex) - 2;\n if ($hour < $data['min-hour']) {\n $data['min-hour'] = $hour;\n }\n if ($hour > $data['max-hour']) {\n $data['max-hour'] = $hour;\n }\n foreach ($cell->Atoms[0] as $atom) {\n $week = strval($atom->Cycles[0]->Cycle->Abbrev);\n if ($data['week'] == '-') {\n $data['week'] = $week;\n } else if ($data['week'] !== $week) {\n $data['week'] = '';\n }\n $data['classes'][strval($class->Entity->Abbrev)][$hour][] = [\n 'subject' => strval($atom->Subject->Abbrev),\n 'teacher' => strval($atom->Teacher->Abbrev),\n 'room' => strval($atom->Room->Abbrev),\n 'group' => strval($atom->Group->Abbrev),\n 'week' => $week\n ];\n }\n }\n }\n }\n return json_encode($data);\n }", "static function timeline($year, $week) {\n //default values\n if (!$year) {\n $year = date('Y');\n }\n\n if (!$week) {\n $week = date('W') - 1;\n }\n\n $data =[];\n\n $sql = \"SET @d := STR_TO_DATE(concat(:year,:week,' Monday'), '%X%V %W');\";\n Yii::app()\n ->db\n ->createCommand($sql)\n ->bindParam(':year', $year, PDO::PARAM_INT)\n ->bindParam(':week', $week, PDO::PARAM_INT)\n ->execute();\n //start date\n $sql = \"SET @date_from := ADDDATE(@d , INTERVAL 2-DAYOFWEEK(@d) DAY);\";\n Yii::app()->db->createCommand($sql)->execute();\n\n //end date\n $sql = \"SET @date_to := ADDDATE(@date_from , 12);\";\n Yii::app()->db->createCommand($sql)->execute();\n\n $sql = \"\n SELECT \n vvoy_id,\n date(vvoy_start_date) start_date,\n date(vvoy_end_date) end_date,\n concat(vtrc_car_reg_nr,'/',vtrl_reg_nr) label,\n CASE vvoy_status \n WHEN '\" . self::VVOY_STATUS_PROJECT . \"' THEN 'icon-question'\n WHEN '\" . self::VVOY_STATUS_ACCEPTED . \"' THEN 'icon-check' \n WHEN '\" . self::VVOY_STATUS_CANCELED . \"' THEN 'icon-times' \n WHEN '\" . self::VVOY_STATUS_IN_WAY . \"' THEN 'icon-road' \n WHEN '\" . self::VVOY_STATUS_CLOSED . \"' THEN 'icon-lock' \n WHEN '\" . self::VVOY_STATUS_FINISHED . \"' THEN 'icon-unlock' \n END icon,\n CASE vvoy_status \n WHEN '\" . self::VVOY_STATUS_PROJECT . \"' THEN 'warning'\n WHEN '\" . self::VVOY_STATUS_ACCEPTED . \"' THEN 'success' \n WHEN '\" . self::VVOY_STATUS_CANCELED . \"' THEN 'light' \n WHEN '\" . self::VVOY_STATUS_IN_WAY . \"' THEN 'danger' \n WHEN '\" . self::VVOY_STATUS_CLOSED . \"' THEN 'grey' \n WHEN '\" . self::VVOY_STATUS_FINISHED . \"' THEN 'yellow' \n END color\n FROM\n vvoy_voyage \n INNER JOIN vtrc_truck \n ON vvoy_vtrc_id = vtrc_id \n LEFT OUTER JOIN vtrl_trailer \n ON vvoy_vtrl_id = vtrl_id \n WHERE \n vvoy_sys_ccmp_id = \" . Yii::app()->sysCompany->getActiveCompany() . \" \n AND \n (\n vvoy_start_date >= @date_from AND vvoy_start_date <= @date_to\n OR vvoy_end_date >= @date_from AND vvoy_end_date <= @date_to\n OR vvoy_start_date <= @date_from AND vvoy_end_date >= @date_to \n )\n ORDER BY vtrc_car_reg_nr,\n vvoy_start_date \n \";\n\n $data['body_data'] = Yii::app()\n ->db\n ->createCommand($sql)\n ->queryAll();\n\n //create urls\n foreach ($data['body_data'] as $k => $row) {\n $data['body_data'][$k]['url'] = Yii::app()->createUrl(\n 'vvoy/vvoyVoyage/view', \n array('vvoy_id' => $row['vvoy_id'])\n );\n }\n\n $sql = \"SELECT \n @date_from date_from,\n @date_to date_to,\n year(adddate(@date_from,interval -1 week)) prev_period_year,\n week(adddate(@date_from,interval -1 week)) prev_period_week,\n year(adddate(@date_from,interval 1 week)) next_period_year,\n week(adddate(@date_from,interval 1 week)) next_period_week\n ;\";\n $data['header_data'] = Yii::app()->db->createCommand($sql)->queryRow();\n \n return $data;\n }", "public function &GetWeekdays()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n return $this->_weekdays;\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('week', $this->week);\n $criteria->compare('w1', $this->w1, true);\n $criteria->compare('w2', $this->w2, true);\n $criteria->compare('w3', $this->w3, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\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}", "function getActiveWeek(\n){\n\n $mysql = \"\n select week\n from active_week\n where active_status = 1\";\n \n $week = 0;\n $active_week = 0;\n while (1) {\n \n $driver = new mysqli_driver();\n $driver->report_mode = MYSQLI_REPORT_OFF;\n \n try {\n $conn = db_connect();\n \n $sth = $conn->prepare($mysql);\n if (!$sth->execute()) {\n $ref_status_text = 'dberror';\n @ $sth->close();\n break;\n }\n \n $sth->bind_result($week);\n \n if (!$sth->fetch()) {\n $ref_status_text = 'noactiveweek';\n @ $sth->close();\n break;\n }\n @ $sth->close();\n \n } catch (mysqli_sql_exception $e) {\n $ermsg = \"setActiveWeek() \\n\" .\n 'sql set: ' . $mysql . \"\\n\\n\" .\n 'MYSQL ERROR TO STRING: ' . $e->__toString();\n writeDataToFile($ermsg, __FILE__, __LINE__);\n $ref_status_text = 'dberror';\n break;\n }\n $active_week = $week;\n break;\n }\n return $active_week;\n}", "public function getWeek($date){\n // OUTPUT : JSON format of all the week according the the DB\n $week = $this->_makeWeek($date);\n for($i = 0; $i < count($week); $i += 1){\n $_day = $week[$i];\n // Get from the data base if a date exists (this means that there is somekind of agenda stored in the DB w.r.t. this day)\n $day = \\App\\Day::where('date', $_day['full_date'])->first();\n if ($day != null){\n foreach($day->Agenda as $agenda){\n $week[$i]['items'][] = $this->_makeAgenda($agenda);\n }\n }\n }\n return $week;\n }", "public function index()\n {\n return PatientWeek::all();\n }", "public function show($id)\n {\n return PatientWeek::find($id);\n }", "function __construct() {\n\t\t\tparent:: __construct();\n\t\t\t$this->db = $this->load->database('report', TRUE);\n\t\t\t//set waktu yang digunakan ke zona jakarta\n\t\t\t//$this->db->query(\"SET time_zone='Asia/Jakarta'\");\n\t\t}", "function __construct() {\n\t\t\tparent:: __construct();\n\t\t\t$this->db = $this->load->database('report', TRUE);\n\t\t\t//set waktu yang digunakan ke zona jakarta\n\t\t\t//$this->db->query(\"SET time_zone='Asia/Jakarta'\");\n\t\t}", "function getWeek(){\n global $db;\n \n $stmt=$db->prepare(\"SELECT MAX(week) AS 'week' from purchases\");\n \n if($stmt->execute() && $stmt->rowCount()>0){\n $results = $stmt->fetch(PDO::FETCH_ASSOC);\n if($results['week']==NULL){\n $results = ['week' => 0];\n }\n return $results;\n }\n else{\n return null;\n }\n }", "static public function getWeek($date)\n {\n\t \t$start_date = $date->startOfWeek();\n\t\t$end_date = $date->copy()->endOfWeek()->subDay(2); ;\n\n\t\t$weeks = array(\n\t\t\t\"start_end\" => array(\"start\" => $start_date,\"end\" => $end_date,\"week\" => $start_date->copy()->weekOfYear),\n\t\t\t\"days\" => array(\"monday\" => $start_date,\"tuesday\" => $start_date->copy()->addDay(),\"wednesday\" => $start_date->copy()->addDay(2),\"thursday\" => $start_date->copy()->addDay(3),\"friday\" => $start_date->copy()->addDay(4))\n\t\t\t);\n\n\t\treturn $weeks;\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($daysOfWeek = null, $firstDayOfWeek = null)\n {\n $this\n ->setDaysOfWeek($daysOfWeek)\n ->setFirstDayOfWeek($firstDayOfWeek);\n }", "function __construct() {\n $this->sql = new Site_SQL;\n }", "public function isWeekDateSupported($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function getXML()\n {\n\n\t\t\t\t// Helper-Klasse\n\t\t\t\t$this->WebttHelper = new WebttHelper;\n\t\t\t\t$this->WebttHelperSpielplan = new WebttHelperSpielplan;\n\t\t\t\t$this->WebttHelperHallen = new WebttHelperHallen;\n\n\t\t\t\t// GET-Variable team abfragen\n\t\t\t\t$team = $this->WebttHelper->getTeam();\n\n\t\t\t\n\t\t\t\t// Überprüfen, ob GET-Variable team eine Webtt-Manschaft ist\n\t\t\t\tif ($team === FALSE)\n\t\t\t\t{\n\t\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\n\t\t\t\t// Wenn Aktualisierungsintervall abgelaufen ist, dann aktualisieren\n\t\t\t\tif ($this->WebttHelper->update_test('spielplan') === TRUE)\n\t\t\t\t{\n\t\t\t\t\t\t$update = $this->WebttHelperSpielplan->update($team);\n\t\t\t\t}\n\t\t\t\t\n\n // sql-Query bilden und DB abfragen \n $db = JFactory::getDBO();\n $query = $db->getQuery(true);\n\n $query\n ->select('xml')\n ->from('#__webtt_tabellen')\n\t\t\t\t\t->where(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'typ='. $db->quote(\"spielplan\"),\n\t\t\t\t\t\t\t\t\t'team='. $db->quote($team))\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$db->setQuery($query);\n\n\t\t\t\t$results = $db->loadObject();\n\n\t\t\t\t$xml = new SimpleXMLElement($db->loadObject()->xml);\n\t\t\n\t\t\t\t$hallen = $this->WebttHelperHallen->getHallen();\n\t\t\t\tforeach ($xml->ZEILE as $row)\n\t\t\t\t{\n\t\t\t\t\t\t// HALEENINFORMATIONEN IN DEN XML EINFÜGEN\n\t\t\t\t\t\tif ($row->HALLE == \"(1)\" OR $row->HALLE == \"\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$row->HALLE = \"1\";\n\t\t\t\t\t\t\t\tforeach ($hallen as $verein => $array)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (strstr($row->HEIM, $verein))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$row->HALLE_TITLE = $hallen[$verein]['halle_1'];\n\t\t\t\t\t\t\t\t\t\t\t\t$row->HALLE_ADRESSE = $hallen[$verein]['addr_1'];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse if ($row->HALLE == \"(2)\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$row->HALLE = \"2\";\n\t\t\t\t\t\t\t\tforeach ($hallen as $verein => $array)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (strstr($row->HEIM, $verein))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$row->HALLE_TITLE = $hallen[$verein]['halle_2'];\n\t\t\t\t\t\t\t\t\t\t\t\t$row->HALLE_ADRESSE = $hallen[$verein]['addr_2'];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse if ($row->HALLE == \"(3)\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$row->HALLE = \"3\";\n\t\t\t\t\t\t\t\tforeach ($hallen as $verein => $array)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (strstr($row->HEIM, $verein))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$row->HALLE_TITLE = $hallen[$verein]['halle_3'];\n\t\t\t\t\t\t\t\t\t\t\t\t$row->HALLE_ADRESSE = $hallen[$verein]['addr_3'];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($row->HALLE == \"(H)\" OR $row->HALLE == \"H\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$row->HALLE = \"H\";\n\t\t\t\t\t\t\t\tforeach ($hallen as $verein => $array)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (strstr($row->HEIM, $verein))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (stristr($row->HALLE_VERL, \",\"))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$expl = explode(\",\", $row->HALLE_VERL); \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$row->HALLE_TITLE = $expl[0];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$row->HALLE_ADRESSE = $expl[count($expl) - 2] . $expl[count($expl) - 1];\n\t\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}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n return $xml;\n\n\t\t}", "function __construct() {\n\t\tparent::__construct(\n\t\t\t'upcoming_tours', // Base ID\n\t\t\t__( 'Upcoming Tours', 'text_domain' ), // Name\n\t\t\tarray( 'description' => __( 'Show 2 Upcoming Tours', 'text_domain' ), ) // Args\n\t\t);\n\t}", "function get_weekday_stats(){\n if(!DashboardCommon::is_su()) return null;\n \n $sat = strtotime(\"last saturday\");\n $sat = date('w', $sat) == date('w') ? $sat + 7 * 86400 : $sat;\n $fri = strtotime(date(\"Y-m-d\", $sat) . \" +6 days\");\n $from = date(\"Y-m-d\", $sat);//for current week only\n $to = date(\"Y-m-d\", $fri);//for current week only\n $sql = \"SELECT DAYNAME(atr.call_start) as dayname,count(*) as total \n FROM week_days wd \n LEFT JOIN ( SELECT * FROM calls WHERE call_start >= '\" . $this->from . \"' AND call_start <= '\" . $this->to . \"') atr\n ON wd.week_day_num = DAYOFWEEK(atr.call_start)\n GROUP BY\n DAYOFWEEK(atr.call_start)\";\n\n $this_week_rec = DashboardCommon::db()->Execute($sql);\n $saturday = $sunday = $monday = $tuesday = $wednesday = 0;\n $thursday = $friday = 0;\n// $data = array();\n// while (!$this_week_rec->EOF) {\n// $k = $this_week_rec->fields['dayname'];\n// $data[$k]= $this_week_rec->fields['total'];\n// $this_week_rec->MoveNext();\n// }\n// \n// return array_keys($data, max($data));\n\n while (!$this_week_rec->EOF) {\n $daynames = $this_week_rec->fields['dayname'];\n $totalcalls = $this_week_rec->fields['total'];\n if ($daynames == 'Saturday') {\n $saturday = $this_week_rec->fields['total'];\n }\n if ($daynames == 'Sunday') {\n $sunday = $this_week_rec->fields['total'];\n }\n if ($daynames == 'Monday') {\n $monday = $this_week_rec->fields['total'];\n }\n if ($daynames == 'Tuesday') {\n $tuesday = $this_week_rec->fields['total'];\n }\n if ($daynames == 'Wednesday') {\n $wednesday = $this_week_rec->fields['total'];\n }\n if ($daynames == 'Thursday') {\n $thursday = $this_week_rec->fields['total'];\n }\n if ($daynames == 'Friday') {\n $friday = $this_week_rec->fields['total'];\n }\n\n $this_week_rec->MoveNext();\n }\n\n $arr = array('Saturday' => $saturday,\n 'Sunday' => $sunday,\n 'Monday' => $monday,\n 'Tuesday' => $tuesday,\n 'Wednesday' => $wednesday,\n 'Thursday' => $thursday,\n 'Friday' => $friday\n );\n $max_day = array_keys($arr, max($arr));\n \n $avg_calltime_sql = \"SELECT sum(duration) as total_call_time, count(*) as total_records, \n sum(duration) / count(*) as avg_time\n FROM \n (\n SELECT call_end-call_start as duration\n FROM calls\n WHERE call_start >= '\".$this->from.\"' AND call_start <= '\".$this->to.\"'\n ) as dt\";\n $avg_calltime_res = DashboardCommon::db()->Execute($avg_calltime_sql);\n \n \n return array('weekday'=>$max_day[0],'avg_call_time'=>$avg_calltime_res->fields['avg_time']);\n \n }", "public function __construct(){\n\t\tif(date(\"l G\") == \"Sunday 3\" || date(\"l G\") == \"Thursday 3\"){\n\t\t\t// set 5 random chosen item id's into popularItems.csv \n\t\t\t$this->sortPopularProduct();\n\t\t}\n\n\t}", "public function __construct()\n {\n parent::__construct('BaseMtc_open_dates');\n }", "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 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}", "function weekviewHeader()\n {\n }", "public function __construct(year $year, week $week, task $task, classified $classified, user $user, vatclients $vatclients)\n\t{\n\t\t$this->middleware('userauth');\n\t\t$this->year = $year;\n\t\t$this->week = $week;\n\t\t$this->task = $task;\n\t\t$this->classified = $classified;\n\t\t$this->user = $user;\n\t\t$this->vatclients = $vatclients;\n\t\tdate_default_timezone_set(\"Europe/Dublin\");\n\t}", "function getWeather(){\n\t\t$this->racine->asXml();\n\t}", "public function weekly($args=null,$model=null){\n\n if($this->model==null){\n $this->model=$model;\n }\n\n $this->where['field'][]='weekly';\n $this->where['operator'][]=null;\n $this->where['value'][]=null;\n\n return $this;\n }", "public function afficherXML(){\n echo\"<humidite>\";\n\n echo\"<moyenne>\".$this->moyenne.\"</moyenne>\";\n echo\"<max>\".$this->max.\"</max>\";\n echo\"<min>\".$this->min.\"</min>\";\n echo\"<nombreHumiditeReference>\".$this->nombreHumiditeReference.\"</nombreHumiditeReference>\";\n echo\"<date>\".$this->date.\"</date>\";\n\n echo\"</humidite>\";\n }", "function jr_week_start_date($week, $year, $format = \"d-m-Y\") {\r\n\r\n\t$first_day_year = date(\"N\", mktime(0,0,0,1,1,$year));\r\n\tif ($first_day_year < 5)\r\n\t\t$shift =-($first_day_year-1)*86400;\r\n\telse\r\n\t\t$shift=(8-$first_day_year)*86400;\r\n\tif ($week > 1) $week_seconds = ($week-1)*604800; else $week_seconds = 0;\r\n\t$timestamp = mktime(0,0,0,1,1,$year) + $week_seconds + $shift;\r\n\r\n\treturn date($format, $timestamp);\r\n}", "public function getWeekYear($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function __construct()\n\t{\n\t\t$this->setTimeStamp();\n\t}", "public function getXml($name)\n{\nreturn $this->$name->getXML();\n}", "public function test_One_T_Wed_Z_2()\n {\n $this->assertEquals(\"Fri\", DaysOfWeek(\"Wed\",2));\n\n }", "function __construct() {\n $this->day = strtolower(date('l')); // monday, tuesday ....\n //$this->day = 'monday';\n //$this->day = $url;\n \n $ltime = localtime();\n $this->time = ($ltime[2] * 60 * 60) + ($ltime[1] * 60) + $ltime[0]; // seconds past in day\n $ltime = null;\n \n //$utc = new DateTime(NULL, new DateTimeZone('UTC'));\n //$utc->setDate(1985, 1, 22);\n //$this->UTCday = $utc->getTimestamp();\n }", "public function week_projects()\n {\n return $this->hasMany(WeekValidationProject::class, 'project_id');\n }", "public function setMon($mon)\n {\n $this->mon = $mon;\n return $this;\n }", "public function __construct()\n {\n // since this class extends Mage_Core_Model_Config we have access to that classes protected properties\n $this->_xml = \\Mage::getConfig()->_xml;\n }", "public function getDayOfWeek()\n {\n return $this->day_of_week;\n }", "public function test_Two_T_Sat_Z_23()\n {\n $this->assertEquals(\"Mon\", DaysOfWeek(\"Sat\",23));\n\n }", "function the_date_xml()\n {\n }", "public function __construct() {\n\t\tglobal $wgHooks;\n\t\t$wgHooks['SpecialRecentChangesQuery'][] = $this;\n\t\tif( !$this->getRequest()->getVal( 'feed' ) ) $this->getRequest()->setVal( 'feed', 'rss' );\n\t\tif( !$this->getRequest()->getVal( 'days' ) ) $this->getRequest()->setVal( 'days', 1000 );\n\t\tparent::__construct( 'BlikiFeed' );\n\t}" ]
[ "0.65216744", "0.6418595", "0.62591124", "0.62128115", "0.60180724", "0.5860398", "0.5697918", "0.56706524", "0.561442", "0.560381", "0.5587381", "0.5576971", "0.5576769", "0.5560737", "0.54876673", "0.5471796", "0.54644704", "0.54605985", "0.5443513", "0.5393592", "0.53804904", "0.53753823", "0.5369862", "0.5364323", "0.536133", "0.536133", "0.5356924", "0.53269523", "0.53030246", "0.52971894", "0.528755", "0.5282395", "0.52706957", "0.52379984", "0.52198994", "0.5209273", "0.5202704", "0.5192497", "0.51893103", "0.51807547", "0.51591355", "0.51347363", "0.51187515", "0.5112457", "0.5062865", "0.4994986", "0.49937636", "0.4959687", "0.4952059", "0.49519008", "0.4948536", "0.4945535", "0.49448237", "0.4937039", "0.49177563", "0.49085373", "0.489513", "0.487974", "0.4879582", "0.48789293", "0.48779327", "0.48641604", "0.48604506", "0.48453972", "0.48451", "0.4843942", "0.48361322", "0.4835212", "0.48319086", "0.48319086", "0.48255062", "0.48232338", "0.4819801", "0.48132974", "0.48125973", "0.48024893", "0.4788621", "0.4781956", "0.4781862", "0.47720128", "0.4765822", "0.47647178", "0.47640833", "0.4760353", "0.47573438", "0.47491518", "0.47463503", "0.47415304", "0.47410014", "0.47310606", "0.47301263", "0.47191238", "0.4717573", "0.47147506", "0.47094047", "0.470152", "0.4696262", "0.46943966", "0.46926066", "0.46924943", "0.4685743" ]
0.0
-1
Read Pocasi by Date
public function readByDate($start = '2001-07-13', $end = '2012-08-22', $orderBy = 'datum', $sort = 'DESC'){ // Create query $query = "SELECT * FROM $this->table WHERE date >= '$start' AND date <= '$end' order by $orderBy $sort"; // Prepare statement // A prepared statement is a feature used to execute the same (or similar) // SQL statements repeatedly with high efficiency $stmt = $this->conn->prepare($query); // Execute query // $stmt->execute(); // return $stmt; try { $stmt->execute(); } catch( PDOException $Exception ) { return(false); } return($stmt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testReadByDate()\n {\n $today = date('Y-m-d');\n $tomorrow = date('Y-m-d', strtotime('tomorrow'));\n\n $result = $this->_leads->getDate($today, $tomorrow);\n $this->assertTrue(is_array($result));\n }", "public function getDataWithTypeDate() {}", "public function read() {\n // Create query\n $query = 'SELECT * FROM ' . $this->table . ' p ORDER BY Day ASC';\n \n // Prepare statement\n $stmt = $this->conn->prepare($query);\n // Execute query\n $stmt->execute();\n return $stmt;\n }", "public function getFileFilterByDate($conn, $date){\n\t\t//preparo lo statement che mi ricava tutte le informazioni \n\t\t$sth = $conn->prepare(\"select * from Filmato_Presentazione where data_inizio >= :data_inizio or data_fine >= :data_fine limit 1\");\n\t\t$sth->bindParam(':data_inizio', $date, PDO::PARAM_STR);\n\t\t$sth->bindParam(':data_fine', $date, PDO::PARAM_STR);\n\t\t$sth->execute();\n\t\treturn $sth; \n\t}", "public function read_single() {\n try{\n // Create query\n $query = 'SELECT * FROM ' . $this->table . ' WHERE Date= '.$this->Date. ' AND City= ' .$this->City ;\n\n\n // Prepare statement\n $stmt = $this->conn->prepare($query);\n\n\n // print_r($this->Date);\n // print_r($this->City);\n\n\n // print_r($stmt);\n // Execute query\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n // print_r($row);\n // Set properties\n $this->id = $row['id'];\n $this->City = $row['City'];\n $this->Date = $row['Date'];\n $this->Day = $row['Day'];\n $this->Imsak = $row['Imsak'];\n $this->Dawn = $row['Dawn'];\n $this->Sunrise = $row['Sunrise'];\n $this->Noon = $row['Noon'];\n $this->Sunset = $row['Sunset'];\n $this->Maghrib = $row['Maghrib'];\n $this->Midnight = $row['Midnight'];\n }\n catch(Exception $e)\n {\n echo \"Error: \" . $e->getMessage();\n }\n\n }", "public function read(){\n \n //select all data\n $query = \"SELECT\n id, id, num_compte, cle_rib, duree_epargne, frais, solde, created\n FROM\n \" . $this->table_name . \"\n ORDER BY\n created\";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n \n return $stmt;\n }", "function ReadDateSchedules($date)\n {\n $where=$this->UnitEventWhere(array(\"Date\" => $date[ \"ID\" ]));\n\n $rschedules=array();\n foreach ($this->Sql_Select_Hashes($where) as $schedule)\n {\n $schedule=$this->PostProcess($schedule);\n \n $timeid=$schedule[ \"Time\" ];\n $roomid=$schedule[ \"Room\" ];\n \n if (empty($rschedules[ $timeid ])) $rschedules[ $timeid ]=array();\n $rschedules[ $timeid ][ $roomid ]=$schedule;\n\n if (!empty($schedule[ \"Submission\" ]))\n {\n $submissionid=$schedule[ \"Submission\" ];\n }\n }\n \n \n return $rschedules;\n }", "public static function getAllPublicationByDate() :array {\n \tglobal $base, $login, $password;\n\n $publicationGW = new PublicationGateway(new Connection($base, $login, $password));\n $results = $publicationGW->getAllPublicationsByDate(); \n $data = array();\n foreach ($results as $row){\n $data[]=new Publication ($row['ID'], $row['reference'], $row['authors'], $row['title'], $row['date'], $row['journal'], $row['volume'], $row['number'], $row['pages'], $row['note'], $row['abstract'], $row['keywords'], $row['series'], $row['localite'], $row['publisher'], $row['editor'], $row['pdf'], $row['date_display'], $row['categorie_id']);\n }\n \n return $data;\n }", "public function get($date) {\n return Availability::whereDate('date',$date)\n ->get(['doctor_id','clinic_id','date','time','duration']);\n }", "public function getAllPublicationsByDate() :array {\n $query='SELECT * FROM Publication ORDER BY date DESC;';\n $this->connection->executeQuery($query);\n \n return $this->connection->getResults();\n }", "public function findSaneparDate(){\n $data = $this->sanepar->findSaneparDate();\n foreach($data as $dt){\n $data[$dt] = substr($dt,0,4) . '/' . substr($dt,4,5);\n }\n return $data;\n }", "public function getDate($date=null)\n {\n if ($date != null && is_array($this->livres) && count($this->livres)!=0) {\n $table_name = strtolower(get_class($this));\n $query = \"SELECT * FROM $table_name WHERE date = ?\";\n $req = Manager::bdd()->prepare($query);\n $req->execute([$date]);\n $data = \"\";\n if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) {\n$d=$data[0];\n$this->setId($d['id']);\n$this->setTitre($d['titre']);\n$this->setDescription($d['description']);\n$this->setDate($d['date']);\n$this->setClivres_id($d['clivres_id']);\n$this->setAuteur($d['auteur']);\n$this->setPhoto($d['photo']);\n$this->setChemin($d['chemin']);\n$this->livres =$data; \n return $this;\n }\n \n } else {\n return $this->date;\n }\n \n }", "public function notesByDateAction() {\n \n $this->view->consumer_id = $this->consumer_id;\n \n $searchDate = $this->getRequest()->getParam('date', date(\"Y-m-d\"));\n \n $year = $this->getRequest()->getParam('year', false);\n if($year!= false) {\n $searchDate = $year.\"-\"; \n }\n $month = $this->getRequest()->getParam('month', false);\n if($month!= false) {\n $searchDate = $searchDate.$month.\"-\"; \n }\n $day = $this->getRequest()->getParam('day', false); \n if($day!= false) {\n $searchDate = $searchDate.$day; \n }\n \n \n $this->view->notes = $this->_model->findByConsumerIdAndUserId($this->consumer_id,\n $this->user_id,\n $searchDate);\n \n if( $this->xhr ) {\n $this->_asJson($this->view->notes->toArray()); \n } \n \n \n }", "public function searchOrthancBYDate($date)\n {\n $url = $this->url.\"/tools/find\";\n\n $searchQuery = array(\n \"Level\"=>\"Patient\",\n \"Query\"=>array(\"StudyDate\"=>$date),\n );\n\n $res = $this->_curl_c($url,$searchQuery);\n\n if ($res[\"status\"] === false){\n return $this->resultStatus(false, $res[\"result\"]);\n }\n \n $studiesData = array();\n\n foreach ($res[\"result\"] as $uuid){\n $res2 = $this->getPatientData($uuid);\n if ($res2[\"status\"]){\n $studiesData[] = $res2[\"result\"];\n }else{\n return $this->resultStatus(false,$res2[\"result\"]);\n }\n }\n return $this->resultStatus(true,$studiesData);\n }", "public function readByDay()\n {\n $query = \"select Student.ID, Student.name, Student.last_name, Class.class_name from Student\n inner join Booking on Booking.student_ID = Student.ID\n inner join Booking_Day on Booking_Day.booking_ID = Booking.ID\n inner join Class on Class.ID = Student.class_ID\n where Booking_Day.date = ?\n group by Student.ID\n union\n select Student.ID, Student.name, Student.last_name, Class.class_name from Student\n inner join Booking on Booking.student_ID = Student.ID\n inner join Booking_Extra on Booking_Extra.booking_ID = Booking.ID\n inner join Class on Class.ID = Student.class_ID\n where ? between Booking_Extra.start_date and Booking_Extra.end_date\n and Booking_Extra.\" . $this->dow . \" is not null\n group by Student.ID\";\n\n $stmt = $this->conn->prepare($query);\n // bind data\n $stmt->bindParam(1, $this->date);\n $stmt->bindParam(2, $this->date);\n //$stmt->bindParam(3, $this->dow);\n\n $stmt->execute();\n\n return $stmt;\n }", "public function readObjectFromDateUser($date_Ajout , $user){\n $rq = 'SELECT obj.* FROM Objets as obj, Clients as clt WHERE date_Ajout = :date_Ajout AND obj.client = :client AND obj.client = clt.login';\n $stmt = $this->pdo->prepare($rq);\n $data = array(\":date_Ajout\" => $date_Ajout,\n \":client\" => $user\n );\n if(!$stmt->execute($data)){\n throw new Exception($pdo->errorInfo());\n }\n $result = $stmt->fetchAll();\n return $result;\n }", "public function getDate();", "public function getDate();", "public function allRecordsByDate(){\n\t\t\t$news = collect(DB::table('news')->get());\n\t\t\treturn $news->sortBy('createdat');\n\t\t}", "public function getAllDate($datoDesde,$datoHasta){\n $sql = \"SELECT Id, Proveedor, Concepto, FORMAT(Monto, 2) AS Monto, Revisado, DATE_FORMAT(FechaSolicitud,'%d/%m/%Y') AS FechaSolicitud, AutorizadoPago, DATE_FORMAT(FechaAutorizado,'%d/%m/%Y') AS FechaAutorizado, estado, Comentario, ComentarioCapt, DATE_FORMAT(FechaPago,'%d/%m/%Y') AS FechaPago From \" .self::$tablename. \" WHERE FechaSolicitud BETWEEN '{$datoDesde}' AND '{$datoHasta}' ORDER BY Id DESC\";\n return Executor::doit($sql);\n }", "public function getPIDate(Request $request){\n $pi_date = DB::table('cm_pi_asset')\n ->where('id',$request->pi_no)\n ->pluck('pi_date')\n ->first();\n return $pi_date;\n }", "public function getDistribusiHistory($date)\n {\n $distribusi = PenyimpananDistribusi::whereMonth('created_at', Carbon::now()->format('m'))\n ->whereYear('created_at', Carbon::now()->format('Y'))\n ->get();\n\n \n if($date !== \"\")\n {\n $distribusi = PenyimpananDistribusi::whereMonth('created_at', Carbon::parse($date)->format('m'))\n ->whereYear('created_at', Carbon::parse($date)->format('Y'))\n ->get();\n }\n return $distribusi;\n }", "function primer_dia_periodo_anio($anio) {\n\n $sql=\"select fecha_inicio from mocovi_periodo_presupuestario where anio=\".$anio;\n $resul=toba::db('designa')->consultar($sql);\n return $resul[0]['fecha_inicio'];\n }", "private function findByDate(?DateTime $date = null)\n {\n if (! $date) {\n ! $this->data ?: $this->data = reset($this->data);\n }\n\n $date = $date->format('Y-m-d');\n\n foreach ($this->data ?? [] as $data) {\n if (empty($data['time']) || $data['time'] !== $date) {\n continue;\n }\n\n $this->data = $data;\n }\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 readInventario()\n {\n $sql = 'SELECT id_inventario, imagen_producto, nombre_producto, precio_producto, cantidad_inventario FROM inventario INNER JOIN productos USING(id_producto) ORDER BY nombre_producto';\n $params = array(null);\n return Database::getRows($sql, $params);\n }", "public function findByDate($_more)\n {\n $connexion = $this->getEntityManager()->getConnection();\n $sql = \" SELECT * FROM annonce ORDER BY created_at DESC\";\n\n if( $_more == false ){\n $sql .= ' LIMIT 2';\n }\n $statement = $connexion->prepare($sql);\n $statement->execute();\n $results = $statement->fetchAll();\n\n return $results;\n }", "function primer_dia_periodo() {\n\n $sql=\"select fecha_inicio from mocovi_periodo_presupuestario where actual=true\";\n $resul=toba::db('designa')->consultar($sql);\n return $resul[0]['fecha_inicio'];\n \n }", "private function __getMedicationDataOnDate($date) {\n\t\t$userId = $this->Auth->user('id');\n\t\t$timezone = $this->Auth->user('timezone');\n\t\t$result = $this->MedicationSchedule->getUserMedicationDataOnDate($userId, $date, $timezone);\n\t\treturn $result;\n\t}", "public function readObjectFromUserCategorieDate( $user, $categorie, $date){\n $rq = 'SELECT obj.* FROM Objets as obj, Clients as clt WHERE categorie = :categorie AND obj.client = :client AND obj.date_Ajout = :date AND obj.client = clt.login';\n $stmt = $this->pdo->prepare($rq);\n $data = array(\":categorie\" => $categorie,\n \":client\" => $user,\n \":date\" => $date\n );\n if(!$stmt->execute($data)){\n throw new Exception($pdo->errorInfo());\n }\n $result = $stmt->fetchAll();\n return $result;\n }", "function get_pedido_data()\n {\n $date = Carbon::now();\n $currentDate = $date->format('Y-m-d');\n $pedido_data = DB::table('pedidos')->whereRaw('DATE(\"created_at\") = ?',[$currentDate])->get();\n return $pedido_data;\n }", "function getEntriesForDate(DateTime $date);", "public function readTodaysDiary() {\r\n //get authorisation from headers\r\n $headers = getallheaders();\r\n $auth = $headers[\"Authorization\"];\r\n\r\n //check authorization\r\n $role = $this->authenticate($auth);\r\n if ($role !== 'trader') {\r\n throw new RestException(401, \"Unauthorized\");\r\n }\r\n $today = date('Y-m-d');\r\n $traderid = $this->getTraderID($auth);\r\n\r\n $sql = \"SELECT * FROM diary WHERE traderid= '{$traderid}' AND \";\r\n $sql .= \"date = '{$today}'\";\r\n\r\n $diary = Diary::find_by_sql($sql);\r\n\r\n return $diary;\r\n }", "public function readDate()\n {\n $dateReference = $this->readInteger();\n\n $refObj = $this->getReferenceObject($dateReference);\n if($refObj !== false)\n return $refObj;\n\n //$timestamp = floor($this->_stream->readDouble() / 1000);\n $timestamp = new DateTime();\n $timestamp->setTimestamp(floor($this->_stream->readDouble() / 1000));\n\n $this->_referenceObjects[] = $timestamp;\n\n return $timestamp;\n }", "public function get_transaction_by_day($date){\n $this->load->database();\n\n $query = $this->db->select('type,is_of,amount')\n ->get_where('tbl_transactions',array('date' => $date));\n return $query->result_array();\n }", "public function date_duplication($date)\n\t\t{\n\t\t\t$sql=\"SELECT * FROM `covid_data` WHERE `pub_date`='$date' \";\n\t\t\t$row=array();\n\t\t\t$stmt = $this->con->prepare($sql);\n\t\t\t$stmt->execute();\n\t\t\t$row=$stmt->fetchAll();\n\t\t\treturn $row;\n\t\t}", "function getAllVRSRead()\n\t\t {\n\t\t $date = date('Y-m-d');\n $day = date('l',strtotime($date));\n if($day=='Monday')\n {\n $from = date('Y-m-d',strtotime('-1 Monday', time()));\n }\n else{\n $from = date('Y-m-d',strtotime('-2 Monday', time()));\n }\n\t\t\t $to = date('Y-m-d',strtotime('Last Saturday', time()));\n\t\t \t\t \n\t\t$sql =\"SELECT * FROM pof_candidates LEFT JOIN be_users ON pof_candidates.user_id=be_users.id WHERE stage IN (SELECT id FROM segment_name WHERE segment_type_id='5' ) AND (date BETWEEN '\".$from.\"' AND '\".$to.\"') GROUP BY pof_candidates.user_id ORDER BY be_users.username ASC;\";\n\t $q = $this->db->query($sql);\n\t\tif($q->num_rows() > 0)\n\t\t{\n\t\t\tforeach($q->result() as $row)\n\t\t\t{\n\t\t\t\t$data[] = $row;\n\t\t\t}\n\t\t\treturn $data;\n\t\t}\n\t\t\t\n\t}", "public function findOneByDay(\\DateTime $date);", "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 getTableInfo($date){\n\t\t$tableModel = new \\Admin\\Model\\TableModel();\n\t\t$tableInfo = $tableModel ->GetDegree();\n\t\tfor ($i=0; $i <count($tableInfo); $i++) { \n\t\t\tfor ($j=0; $j <count($tableInfo[$i][\"table\"]) ; $j++) { \n\t\t\t\t$id=$tableInfo[$i][\"table\"][$j][\"id\"];\n\t\t\t\t//查询检测该桌号是否被预定\n\t\t\t\t$conBook = array(\"book_table\"=>$id,\"book_status\"=>0,\"book_day\"=>$date);\n\t\t\t\t$book=M(\"book\")->where($conBook)->field(\"book_day,book_time,book_name\")->select();\n\t\t\t\t//获得预订信息\n\t\t\t\tif($book!=null){\n\t\t\t\t\t$tableInfo[$i][\"table\"][$j][\"type\"]=\"book\";\n\t\t\t\t\tforeach ($book as $key => $value) {\n\t\t\t\t\t\t$bookInfo = $value[\"book_day\"].\"-\".$value[\"book_name\"].\"预定\".$value[\"book_time\"];\n\t\t\t\t\t\t$tableInfo[$i][\"table\"][$j][\"info\"].=\" \".$bookInfo;\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t\t//查询检测是否被锁定\n\t\t\t\t$conTable = array(\"id\"=>$id,\"is_lock\"=>\"1\");\n\t\t\t\tif(M(\"table\")->where($conTable)->count()) {\n\t\t\t\t\t// if($date==date(\"Y-m-d\"))\n\t\t\t\t\t// 这里为什么要加日期判断???\n\t\t\t\t\t$tableInfo[$i][\"table\"][$j][\"type\"]=\"lock\";\n\t\t\t\t}\n\t\t\t\tif($tableInfo[$i][\"table\"][$j][\"type\"]==null) $tableInfo[$i][\"table\"][$j][\"type\"]=\"nomal\";\n\t\t\t}\n\t\t}\n\t\treturn($tableInfo);\n\t}", "public function read() {\n\n //create query\n //$query = 'SELECT * FROM products ORDER BY created_at DESC';\n $query = \"SELECT * FROM $this->table ORDER BY created_at DESC\";\n \n $stmt = $this->conn->prepare($query);\n\n $stmt->execute();\n \n $result = $stmt->get_result();\n \n //fetch resulting as array\n $products = mysqli_fetch_all($result, MYSQLI_ASSOC);\n\n return $products; \n \n }", "function getData()\n {\n return $this->date;\n }", "public function read(){\n\n //Consulta anidada FK y PK\n $query=\"SELECT c.name as category_name, p.id, p.name, p.description, p.price, p.category_id, p.created FROM \".$this->tabla.\" p LEFT JOIN categories c ON p.category_id=c.id ORDER BY p.created DESC\";\n\n $consulta = $this->conn->prepare($query);\n $consulta->execute();\n\n return $consulta;\n\n }", "public function view_reader(){\n\t\t$result = $this->con()->query(\"Select * from req ORDER BY tdate DESC\");\n\t\treturn $result;\n\t}", "public function read(){\r\n $conn = $this->connDB();\r\n $sql = \"SELECT * FROM car_info ORDER BY car_id\";\r\n $stmt = $conn->prepare($sql);\r\n $stmt->execute();\r\n $cars = [];\r\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\r\n $cars[] = [\r\n 'car_id' => $row['car_id'],\r\n 'car_brand' => $row['car_brand'],\r\n 'car_plate' => $row['car_plate'],\r\n 'car_current_location' => $row['car_current_location'],\r\n 'car_owner' => $row['car_owner'],\r\n 'is_lost' => $row['is_lost'],\r\n 'created_by' => $row['created_by'],\r\n 'created_date' => $row['created_date'],\r\n 'modify_by' => $row['modify_by'],\r\n 'modify_date' => $row['modify_date']\r\n ];\r\n }\r\n return $cars;\r\n }", "private function getArrayFromAulario($date) {\r\n if (self::sanitizeDate($date)) {\r\n $orario = explode(\"-\", $date);\r\n $year = $orario[0];\r\n $mounth = $orario[1];\r\n $day = $orario[2];\r\n $html = file_get_contents(\"https://aulario.dmsa.unipd.it/mrbs/day.php?year=\" . $year . \"&month=\" . $mounth . \"&day=\" . $day);\r\n //serializzo\r\n $parsifiedHTML = str_get_html($html);\r\n $prenotazione = array();\r\n $aule = array(\"LU3\", \"LU4\", \"P1\", \"P2\", \"P3\", \"P300\", \"P4\", \"P5\");\r\n $cont = 0;\r\n foreach ($parsifiedHTML->find('table') as $tables) {\r\n $cont++;\r\n if ($cont == 8) { //ci sono 2 tabelle, la prima è il calendarietto e la seconda la vista agenda \r\n $indice = 0;\r\n for ($i = 1; $i < 9; $i++) {\r\n $thSaver = 0;\r\n foreach ($tables->find('tr') as $riga) {\r\n if ($thSaver == 0) {\r\n $thSaver++;\r\n } else {\r\n $celle = $riga->find('td');\r\n $ore = $celle[0]->find('a');\r\n $ora = $ore[0]->text();\r\n $script = $celle[$i]->find('script');\r\n if ($script == null) { // se l'aula è prenotata (se la cella è vuota, dentro a td c'è una table con uno script)\r\n $link = $celle[$i]->find('a');\r\n if (!isset($link) || $link == null || $ora==\"19:00\") { // continuazione della prenotazione\r\n $prenotazione[$indice - 1][3] = $ora; // aggiorno ora fine e non incremento $indice\r\n } else { // nuova prenotazione\r\n $prenotazione[$indice][0] = $aule[$i - 1]; // AULA\r\n $prenotazione[$indice][1] = $date; // DATA\r\n $prenotazione[$indice][2] = $ora; // ORA INIZIO\r\n // ORA FINE viene aggiornata al ciclo successivo\r\n $prenotazione[$indice][4] = $link[0]->text(); // CORSO\r\n $prenotazione[$indice][5] = substr($link[0]->title, 14); // COGNOME PROF\r\n $prenotazione[$indice][6] = 0; // NOME PROF\r\n // non è la prima prenotazione dell'aula -> aggiorno ora fine prenotazione prec\r\n if ($indice > 0 && $prenotazione[$indice - 1][0]==$prenotazione[$indice][0] ) { \r\n $prenotazione[$indice - 1][3] = $ora;\r\n }\r\n $indice++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n $prenotazione[$indice][0] = \"P6\"; // AULA\r\n $prenotazione[$indice][1] = $date; // DATA\r\n $prenotazione[$indice][2] = \"07:00\"; // ORA INIZIO\r\n $prenotazione[$indice][3] = \"19:00\"; // ORA FINE \r\n $prenotazione[$indice][4] = \"Servizio Organizzazione/Formazione\"; // CORSO\r\n $prenotazione[$indice][5] = \"Aula gestita dalla Segreteria Delegato Spazi Didattici\"; // COGNOME PROF\r\n $prenotazione[$indice][6] = 0; // NOME PROF\r\n return $prenotazione;\r\n }\r\n }\r\n } else {\r\n echo \"<p>Errore sull'input</p>\";\r\n return;\r\n }\r\n }", "function getInventoryDate($id){\n\t$crud = new CRUD();\n\t$crud->connect();\n\t$now = date('m/d/Y');\n\t$crud->sql(\"select * from inventory_tbl where inventory_date='{$now}'\");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['inventory_date'];\n\n\t}\n\t$crud->disconnect();\n}", "function dayReadings($xml=\"data/brislington_no2.xml\", $day=\"13\", $month=\"12\", $year=\"2016\") {\n\n\t$Data = [];\n\t$xmlReader = new XMLReader();\n\t$xmlReader->open('../' . $xml);\n\n\t$array = [];\n\n\n\t$array[] = $year;\n\t$array[] = $month;\n\t$array[] = $day;\n\n\t$combined_date = implode('/', $array);\n\n\t$timeStamp2 = strtotime($combined_date); //check this is correct\n\t$formatted_date = zeroMonth($combined_date);\n\n\twhile($xmlReader->read()) {\n\t\tif($xmlReader->nodeType == XMLReader::ELEMENT && $xmlReader->localName == \"reading\") {\n\n\t\t\t$date = $xmlReader->getAttribute('date');\n\t\t\t$date = str_replace('/', '-', $date);\n\t\t\t$timeStamp1 = strtotime($date);\n\n\t\t\tif($timeStamp1 == $timeStamp2) {\n\n\t\t\t\t$no2 = $xmlReader->getAttribute('no2');\n\t\t\t\t$time = $xmlReader->getAttribute('time');\n\n\t\t\t\t$s = strtotime($time);\n\n\t\t\t\t$Data[] = array(\n\t\t\t\t\t\t'no2' => $no2,\n\t\t\t\t\t\t'time' => $time\n\t\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\t$t = array();\n\n\tforeach($Data as $key=>$row) {\n\t\t$t[$key] = $row['time'];\n\t}\n\n\tarray_multisort($t, SORT_ASC, $Data);\n\n\tforeach($Data as $key=>$value) {\n\n\t\t$s = strtotime($value['time']);\n\n\t\t$date_object = 'Date(' . $formatted_date[2]. ',' . $formatted_date[1] .',' . $formatted_date[0] . ',' . date('G', $s) . ',' . date('i', $s) . ',' . date('s', $s) . ')';\n\n\t\t$Data[$key]['time'] = $date_object;\n\t}\n\n\treturn $Data;\n}", "public function read(){\n //Create query\n $query = 'SELECT *\n FROM ' . $this->table . '\n ORDER BY created_at DESC';\n\n //Prepare statement\n $stmt = $this->conn->prepare();\n\n //Execute query\n $stmt->execute();\n\n return $stmt;\n }", "public function getDateDebut();", "function readOne(){\n $query = \"SELECT * FROM \" . $this->tableName . \" WHERE idNotaFiscal = ? AND numeroOrdem = ? LIMIT 0,1\";\n\n // prepare query statement\n $stmt = $this->conn->prepare( $query );\n \n // bind id of product to be updated\n $stmt->bindParam(1, $this->idNotaFiscal);\n $stmt->bindParam(2, $this->numeroOrdem);\n \n // execute query\n $stmt->execute();\n \n // get retrieved row\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n // set values to object properties\n $this->idNotaFiscal = $row['idNotaFiscal'];\n $this->numeroOrdem = $row['numeroOrdem'];\n $this->idItemVenda = $row['idItemVenda'];\n $this->unidade = $row['unidade'];\n $this->quantidade = $row['quantidade'];\n $this->valorUnitario = $row['valorUnitario'];\n $this->valorTotal = $row['valorTotal'];\n $this->cnae = $row['cnae'];\n $this->codigoServico = $row['codigoServico'];\n $this->cstIss = $row['cstIss'];\n $this->valorBCIss = $row['valorBCIss'];\n $this->taxaIss = $row['taxaIss'];\n $this->valorIss = $row['valorIss'];\n $this->retencaoIss = $row['retencaoIss'];\n $this->valorIssRetido = $row['valorIssRetido'];\n $this->valorDesconto = $row['valorDesconto'];\n $this->valorImpAproxFed = $row['valorImpAproxFed'];\n $this->valorImpAproxEst = $row['valorImpAproxEst'];\n $this->valorImpAproxMun = $row['valorImpAproxMun'];\n $this->observacao = $row['observacao'];\n\n }", "public function readObjectFromNomUserCategorieDate($nom, $user, $categorie, $date){\n $rq = 'SELECT * FROM Objets WHERE nom = :nom AND client = :userLogin AND categorie = :categorie AND date_Ajout = :date';\n $stmt = $this->pdo->prepare($rq);\n $data = array(\":nom\" => $nom,\n \":userLogin\" => $user,\n \":categorie\" => $categorie,\n \":date\" => $date\n );\n if(!$stmt->execute($data)){\n throw new Exception($pdo->errorInfo());\n }\n $result = $stmt->fetchAll();\n return $result;\n }", "function get_rapport_equilibre_compta_data($export_date, $compte_comptable = NULL)\n{\n\tglobal $dbHandler;\n\tglobal $global_multidevise;\n\tglobal $global_monnaie,$global_id_agence;\n\t\n\t$DATAS = array();\t\n\t$db = $dbHandler->openConnection();\n\t\n\tif(empty($export_date)) {\n\t\t$export_date = date(\"Y\").\"-\".date(\"m\").\"-\".date(\"d\");\n\t}\n\telseif(strpos($export_date, '/')){\n\t\t$export_date = php2pg($export_date);\n\t}\n\t\n\tif(empty($compte_comptable)) {\n\t\t$compte_comptable = 'NULL';\n\t\t$sql = \"SELECT * FROM get_rpt_ecart_compta('$export_date', $compte_comptable);\";\n\t}\n\telse {\n\t\t$sql = \"SELECT * FROM get_rpt_ecart_compta('$export_date', '$compte_comptable');\";\n\t}\n\t\n\t$result = $db->query($sql);\n\t\n\tif (DB::isError($result)) {\n\t\t$dbHandler->closeConnection(false);\n\t\tSignalerreur(__FILE__,__LINE__,__FUNCTION__,_(\"DB\").\": \".$result->getMessage());\n\t}\n\t\n\twhile ($row = $result->fetchrow(DB_FETCHMODE_ASSOC)) \n\t{\t\t \n\t\tif(!empty($row['cre_etat'])) {\t\t\t\n\t\t\t$etat_credit = $row['cre_etat'];\t\t\t\n\t\t\t$info_etat = getListeEtatCredit(\" id = $etat_credit \");\n\t\t\t$row['cre_etat'] = $info_etat[1];\t\t\t\n\t\t}\n\t\t\t\t\n\t\t$row['date_ecart'] = pg2phpDate($row['date_ecart']);\n\t\t$DATAS[] = $row;\t\n\t}\t\n\t$dbHandler->closeConnection(true);\n\treturn $DATAS;\n}", "public function actionFindByNimAndDate($nim, $date){\n Yii::$app->response->format = Response::FORMAT_JSON;\n $response = null;\n\n if (Yii::$app->request->isGet){\n $sql = \"SELECT tb_presensi_detail.id_presensi, tb_presensi_detail.nim, \n tb_mahasiswa.nama as nama_mahasiswa, tb_presensi_detail.status, \n DATE_FORMAT(tb_presensi_detail.waktu, '%d %b %Y %T') as waktu, tb_matakuliah.nama as nama_matakuliah, \n tb_dosen.nama as nama_dosen, tb_kelas.nama as nama_kelas, tb_presensi.pertemuan, \n tb_ruangan.nama as nama_ruangan \n FROM tb_presensi_detail INNER JOIN tb_mahasiswa, \n tb_presensi, tb_mengajar, tb_matakuliah, tb_dosen, tb_kelas, tb_ruangan \n WHERE tb_presensi_detail.id_presensi = tb_presensi.id_presensi \n AND tb_presensi_detail.nim = tb_mahasiswa.nim \n AND tb_presensi.id_mengajar = tb_mengajar.id_mengajar\n AND tb_mengajar.id_matakuliah = tb_matakuliah.id_matakuliah \n AND tb_mengajar.nip = tb_dosen.nip \n AND tb_mengajar.id_kelas = tb_kelas.id_kelas \n AND tb_presensi.id_ruangan = tb_ruangan.id_ruangan \n AND tb_presensi_detail.nim = '$nim' \n AND DATE_FORMAT(tb_presensi_detail.waktu, '%Y-%m-%d') = '$date'\n ORDER BY tb_presensi_detail.waktu DESC\";\n\n $response['master'] = Yii::$app->db->createCommand($sql)->queryAll();\n }\n\n return $response;\n }", "function availableDates($file=\"data/brislington_no2.xml\") {\n\t$xmlReader = new xmlReader();\n\t$xmlReader->open($file);\n\t$Values = [];\n\n\twhile($xmlReader->read()) {\n\t\tif($xmlReader->nodeType == XMLReader::ELEMENT && $xmlReader->localName == \"reading\") {\n\n\t\t\t$no2 = $xmlReader->getAttribute('no2');\n\n\t\t\t$date = $xmlReader->getAttribute('date');\n\t\t\t$date = str_replace('/', '-', $date);\n\t\t\t$d = strtotime($date);\n\n\t\t\t$Values[] = $d;\n\t\t}\n\t}\n\n\t$maxDate = max($Values);\n\t$minDate = min($Values);\n\n\t$max = date('Y-m-d', $maxDate);\n\t$min = date('Y-m-d', $minDate);\n\n\t$array = array(\n\t\t\t'min' => $min,\n\t\t\t'max' => $max\n\t\t);\n\n\treturn $array;\n}", "public function findInadiSanepar(Request $request){\n $pesq = $request->all();\n $data = array();\n \n if($pesq['rto_referencia_arr']){\n $data[\"dtRef1\"] = substr(str_replace(\"-\", \"\", $pesq['rto_referencia_arr']), 0, -2);\n $data[\"dtRef2\"] = substr(str_replace(\"-\", \"\", Carbon::now()->toDateString()), 0, -2);\n\n $data = $this->sanepar->inadiSanepar($data);\n\n foreach($data as $dt){\n $dt->doa_data = date('d/m/Y', strtotime($dt->doa_data));\n }\n\n return $data;\n } else {\n return false;\n }\n }", "public function getDate($i);", "function readOne(){\n $query = \"SELECT * FROM \" . $this->tableName . \" WHERE idNotaFiscal = ? LIMIT 0,1\";\n\n // prepare query statement\n $stmt = $this->conn->prepare( $query );\n \n // bind id of product to be updated\n $stmt->bindParam(1, $this->idNotaFiscal);\n \n // execute query\n $stmt->execute();\n \n // get retrieved row\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n // set values to object properties\n $this->idNotaFiscal = $row['idNotaFiscal'];\n $this->idEmitente = $row['idEmitente'];\n $this->numero = $row['numero'];\n $this->serie = $row['serie'];\n $this->chaveNF = $row['chaveNF'];\n $this->docOrigemTipo = $row['docOrigemTipo'];\n $this->docOrigemNumero = $row['docOrigemNumero'];\n $this->docOrigemParcela = $row['docOrigemParcela'];\n $this->idEntradaSaida = $row['idEntradaSaida'];\n $this->idTomador = $row['idTomador'];\n $this->cfop = $row['cfop'];\n $this->dataInclusao = $row['dataInclusao'];\n $this->dataEmissao = $row['dataEmissao'];\n $this->dataProcessamento = $row['dataProcessamento'];\n $this->situacao = $row['situacao'];\n $this->ambiente = $row['ambiente'];\n $this->textoResposta = $row['textoResposta'];\n $this->textoJustificativa = $row['textoJustificativa'];\n $this->dataCancelamento = $row['dataCancelamento'];\n $this->valorTotal = $row['valorTotal'];\n $this->valorOutrasDespesas = $row['valorOutrasDespesas'];\n $this->valorDesconto = $row['valorDesconto'];\n $this->obsImpostos = $row['obsImpostos'];\n $this->dadosAdicionais = $row['dadosAdicionais'];\n $this->linkNF = $row['linkNF'];\n $this->linkXml = $row['linkXml'];\n }", "public function index(){\n $_allData= array();\n// $query=\"SELECT * FROM `neci`.`consume_details` WHERE `deleted_at` IS NULL and `input_date`= date('Y-m-d') \";\n\n $query=\"SELECT * FROM consume_details WHERE `input_date`= CURDATE() ORDER BY `input_date` DESC \";\n\n\n $result= mysqli_query($this->conn,$query);\n //You can also use mysqli_fetch_object e.g: $row= mysqli_fetch_object($result)\n while($row= mysqli_fetch_assoc($result)){\n $_allData[]=$row;\n }\n return $_allData;\n }", "public function readTask(){\n $query = \"SELECT ordine.id_ordine, ordine.id_fornitore, fornitore.nome as fornitore, ordine.articolo, articolo.taglia, ordine.stato \n FROM \" . $this->table_name . \" LEFT JOIN fornitore ON ordine.id_fornitore = fornitore.id_fornitore \n INNER JOIN articolo ON ordine.id_ordine = articolo.id_ordine \n WHERE stato = 1\";\n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n return $stmt;\n }", "function ritorna_data_attuale() {\n\t$tz = 'Europe/Rome';\n\t$format='d/m/Y H:i:s'; // Formato Italiano\n $retData='';\n//\n// DO NOT EDIT ANYTHING BELOW THIS LINE!\n//\n\tdate_default_timezone_set($tz);\n\t$retData = date($format);\n\treturn($retData);\n}", "function getDatePriment($id=\"\"){\n $ratecheck=DB::table('m_priment')\n ->where('id','=',$id);\n $data=$ratecheck->first();\n return $data;\n }", "public function querySharedNewer(string $date) {\n $statement = sprintf(\"SELECT %s, %s, %s, %s FROM %s WHERE %s > %s AND deleted = 0 AND %s = 1\",\n static::FIELDS[0], static::FIELDS[1], static::FIELDS[2], static::FIELDS[4], static::TABLE,\n static::FIELDS[4], static::PLACEHOLDERS[4], static::FIELDS[3]);\n $req = $this->db->prepare($statement);\n\n $req->bindValue(static::PLACEHOLDERS[4], $date, PDO::PARAM_STR);\n $req->execute();\n\n $response = $req->fetchAll(PDO::FETCH_ASSOC);\n\n return json_encode($response);\n }", "public function Read(){\n //Préparation de la requête\n $sql = \"SELECT * FROM atelier WHERE idAtelier = ?\";\n $requete = $this->connectBdd->prepare($sql);\n\n //Execution de la requete\n $requete->execute([$this->getIdAtelier()]);\n\n //On récupère les données\n while($resultat = $requete->fetch())\n {\n //On modifie l'attibut idLivre, nom, commentaire; de notre objet\n $this->setNom($resultat['nom']);\n $this->setDate($resultat['date']);\n $this->setDescription($resultat['description']);\n $this->setHeure($resultat['heure']);\n $this->setAge($resultat['age']);\n $this->setCapacite($resultat['capacite']);\n }\n \n //Fermeture de la requete\n $requete->closeCursor();\n }", "public function getDate(){\n return $this->getParameter('date');\n }", "public function readOne()\n {\n \n // zapytanie o pojedynczy rekord\n $query = \"SELECT * FROM \" . $this->table_name . \" WHERE id_offer = ?\";\n \n // przygotowanie zapytania\n $stmt = $this->pdo->prepare($query);\n \n // wiazemy id przedstawiciela do zaaktualizowania\n $stmt->bindParam(1, $this->id);\n \n // wykonanie zapytania\n $stmt->execute();\n \n // pobieramy otrzymany rekord\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n \n // ustawienie wartosci dla własciwosci obiektu\n $this->name = $row['name'];\n $this->date_offer = $row['date_offer'];\n $this->start_date = $row['start_date'];\n $this->end_date = $row['end_date'];\n $this->description = $row['description'];\n $this->reduction = $row['reduction'];\n }", "public function getDate() { return $this->date; }", "public function read_log($dt_date=null,$i_user_id=null)\r\n {\r\n try{\r\n $ret_=array();\r\n /**\r\n * Optional date value found then \r\n * Search all XML data for that date and list it\r\n */\r\n if($dt_date && !$i_user_id)\r\n {\r\n $s_log_file=date(\"Y-M\",strtotime($dt_date)).\".bin\";///saved as binary file. ex- 2010-Sep \r\n if(file_exists($this->log_path.$s_log_file))\r\n { \r\n $ret_=$this->read_logxml($this->log_path.$s_log_file,array(\"dt_log\"=>$dt_date));\r\n }\r\n }\r\n else{\r\n ////Get all files in the log directory///\r\n if ($handle = opendir($this->log_path)) \r\n { \r\n $tmp=array();\r\n /* This is the correct way to loop over the directory. */ \r\n while (false !== ($s_log_file = readdir($handle))) \r\n { \r\n if ($s_log_file != \".\" && $s_log_file != \"..\" && $s_log_file != \"index.html\") \r\n { \r\n //echo \"$s_log_file\\n\"; \r\n if($i_user_id)\r\n {\r\n $tmp=$this->read_logxml($this->log_path.$s_log_file,array(\"user_id\"=>$i_user_id)); \r\n $ret_=array_merge($ret_,$tmp);\r\n }\r\n else\r\n {\r\n $tmp=$this->read_logxml($this->log_path.$s_log_file);\r\n $ret_=array_merge($ret_,$tmp);\r\n }\r\n } \r\n \r\n }///end while \r\n\r\n closedir($handle); \r\n } \r\n ////end Get all files in the log directory///\r\n }///end else\r\n unset($dt_date,$i_user_id,$tmp,$handle,$s_log_file);\r\n return $ret_;\r\n }\r\n catch(Exception $err_obj)\r\n {\r\n show_error($err_obj->getMessage());\r\n } \r\n }", "function read_resume_time($user_id, $content_id, $episod_id) {\n\n global $data_base;\n\n $request = $data_base->prepare(\"\n SELECT * \n FROM imago_my_resume \n WHERE user_id = ?\n AND content_id = ?\n AND episod_id = ?\n \"); \n \n $request->execute(array($user_id, $content_id, $episod_id));\n\n return $request->fetchAll(PDO::FETCH_ASSOC); \n }", "function get_sensors_data_by_timestamp($timestamp){\r\n $sensor_json_url = 'https://data.melbourne.vic.gov.au/resource/b2ak-trbp.json';\r\n\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($ch, CURLOPT_URL,$sensor_json_url . '?date_time=' . $timestamp);\r\n $result=curl_exec($ch);\r\n curl_close($ch);\r\n return json_decode($result);\r\n}", "public function read(){\n $query = \"SELECT ordine.id_ordine, ordine.id_fornitore, fornitore.nome as fornitore, ordine.articolo, articolo.taglia, ordine.stato \n FROM \" . $this->table_name . \" LEFT JOIN fornitore ON ordine.id_fornitore = fornitore.id_fornitore INNER JOIN articolo ON ordine.id_ordine = articolo.id_ordine\";\n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n return $stmt;\n }", "public function read()\n {\n \n // select all query\n $query = \"SELECT * FROM \" . $this->table_name . \" ORDER BY date_offer DESC\";\n \n // prepare query statement\n $stmt = $this->pdo->prepare($query);\n \n // execute query\n $stmt->execute();\n \n return $stmt;\n }", "public function getDate(){\n\t\treturn $this->laDate;\n\t}", "public function read() \n {\n // Create query\n $sql = \"\n SELECT \n id,\n name,\n created_at\n FROM\n $this->table\n ORDER BY \n created_at DESC\n ;\";\n\n // Prepare statement\n $stmt = $this->conn->prepare($sql);\n\n // Execute statement\n $stmt->execute();\n \n return $stmt;\n }", "protected function _readRecords() {}", "function tridate(){\r\n $sql=\"SELECT * FROM livraison ORDER BY date ASC\";\r\n$db = config::getConnexion();\r\n try{\r\n $liste=$db->query($sql);\r\n return $liste;\r\n }\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n } \r\n}", "public function actionHistoriPresensiByNimAndDate($nim, $date){\n Yii::$app->response->format = Response::FORMAT_JSON;\n $response = null;\n\n if(Yii::$app->request->isGet){\n $sql = \"SELECT tb_presensi_detail.id_presensi, tb_presensi_detail.nim, DATE_FORMAT(tb_presensi_detail.waktu, '%d %b %Y %T') as waktu, tb_presensi_detail.status, \n tb_presensi.pertemuan, tb_ruangan.nama as nama_ruangan, tb_kelas.nama as nama_kelas, tb_matakuliah.nama as nama_matakuliah,\n tb_dosen.nama as nama_dosen FROM tb_presensi_detail \n INNER JOIN tb_presensi, tb_mengajar, tb_matakuliah, tb_dosen, tb_ruangan, tb_kelas \n WHERE tb_presensi_detail.id_presensi = tb_presensi.id_presensi \n AND tb_presensi.id_mengajar = tb_mengajar.id_mengajar \n AND tb_mengajar.id_matakuliah = tb_matakuliah.id_matakuliah \n AND tb_mengajar.nip = tb_dosen.nip \n AND tb_presensi.id_ruangan = tb_ruangan.id_ruangan\n AND tb_mengajar.id_kelas = tb_kelas.id_kelas\n AND tb_presensi_detail.nim = '$nim' \n AND date(tb_presensi_detail.waktu) = '$date'\";\n\n $response['master'] = Yii::$app->db->createCommand($sql)->queryAll();\n }\n\n return $response;\n }", "public function getData() {\r\n\r\n\t\t$sodexo_domain = 'http://www.sodexo.fi/';\r\n\t\t$path = 'ruokalistat/output/daily_json/';\r\n\r\n\t\tforeach ($this->id_arr as $key => $value) {\r\n\r\n\t\t\t$json_data = file_get_contents($sodexo_domain . $path . $value . '/' . $this->pvm .'/fi');\r\n\r\n\t\t\t$course_info = $this->toObjectArray($json_data);\r\n\t\t\t\r\n\t\t\t$this->id_arr[$key] = $course_info;\r\n\t\t}\r\n\t}", "public function findOneByYear(\\DateTime $date);", "public function getAt() {\n\t\t$jour=array('Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi');\n\t\t$x = shell_exec('atq');\n\t\tif (count($x) >= 1) {\n\t\t\t$x = explode(\"\\n\",trim($x));\n\t\t\t$atq = [];\n\t\t\tforeach ($x as $at) {\n\t\t\t\t$at = explode(\"\\t\", $at);\n\t\t\t\t$at[1] = str_replace(' www-data', '', $at[1]);\n\t\t\t\t$d = substr($at[1],0,-1);\n\t\t\t\t$ts = strtotime($d);\n\t\t\t\t$d = $jour[date('w',$ts)].date(' d/m/Y H:i', $ts);\n\t\t\t\t$atq[] = array('id' => $at[0], 'date' => $d, 'ts' => $ts, 'type' => substr($at[1],-1));\n\t\t\t}\n\t\t\tarray_multisort(array_column($atq, 'ts'),$atq);\n\t\t\tFlight::json(array('Status' => 'OK','At' => $atq));\n\t\t}\n\t\telse Flight::json(array('Status' => 'KO','At' => 'Not Found'));\n\t}", "public function readTaskc(){\n $query = \"SELECT ordine.id_ordine, ordine.id_fornitore, fornitore.nome as fornitore, ordine.articolo, articolo.taglia, ordine.stato \n FROM \" . $this->table_name . \" LEFT JOIN fornitore ON ordine.id_fornitore = fornitore.id_fornitore \n INNER JOIN articolo ON ordine.id_ordine = articolo.id_ordine WHERE stato = 2\";\n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n return $stmt;\n }", "public function getDataPagamento()\n {\n return $this->dataPagamento ?? date('Y-m-d');\n }", "public function readAllVoto(){\n\n return self::read('voto','voto'); \n }", "function date($index)\n\t{\n\t\treturn $this->getItemTagValue($this->_isAtom ? \"updated\" : \"pubDate\" , $index);\n\t}", "public function getDates() {\n // get the files\n $files = $this->readFiles();\n\n // build data using only the names\n $data = [];\n foreach ($files as $file) {\n $data[$file->getName()] = $file->getName();\n }\n\n return $data;\n }", "function get_documentoanulado($fecha){\n\t\tinclude(\"application/config/conexdb_db2.php\");\n\t\t\n\t\t$sql =\"select YHSUCDOC,YHTIPDOC,YHNROPDC,YHNUMSER,YHNUMCOR,YHSTS,YHCODSUC FROM LIBPRDDAT.MMYHREL0 a WHERE a.YHSTS='I' AND a.YHCODCIA='10' and a.YHFECDOC>='\".$fecha.\"'\";\n\t\t$dato = odbc_exec($dbconect, $sql)or die(\"<p>\" . odbc_errormsg());\n\t\tif (!$dato) {\n\t\t\t$data = FALSE;\n\t\t} else { \n\t\t\t$nr = odbc_num_rows($dato);\n\t\t\t$data = ($nr>0)?$dato:false;\n\t\t} \n\t\treturn $data;\n\t\t\n\t}", "public function trie_par_date($date_ajout){\n $marque_page = [];\n if($date_ajout==0){\n $query = $this->db->prepare('SELECT date_a, date_m, description, id_utilisateur, note, somme, logo_choisi, id_marque_page, titre, url, createur FROM ajoute_modifie, marque_page WHERE id_marque_page = id AND createur=1 ORDER BY date_a DESC');\n }else{\n $query = $this->db->prepare('SELECT date_a, date_m, description, id_utilisateur, note, somme, logo_choisi, id_marque_page, titre, url, createur FROM ajoute_modifie, marque_page WHERE id_marque_page = id AND createur=1 AND date_a >= ( CURDATE() - INTERVAL '.$date_ajout.' DAY ) ORDER BY date_a DESC');\n }\n $query->execute();\n\n while ($donnees = $query->fetch(PDO::FETCH_ASSOC)){\n $marque_page[] = $donnees;\n }\n return $marque_page;\n }", "public function dailyParsing()\n {\n $sftpConnection = Connections::CONNECTION_SUP;\n\n switch ($this->sup) {\n case 'DefaultParsingAll':\n break;\n default:\n $sftpConnection = [Connections::CONNECTION_SUP[$this->sup]];\n }\n\n foreach ($sftpConnection as $key => $sftpConnection) {\n $this->sup = empty($key) ? (int)$this->sup : $key;//empty true:表示單一保險公司; false: 表示全連線\n $this->sftp = Connections::login($sftpConnection);\n $files = $this->sftp->nlist();\n $this->getDailyFile($files);\n }\n }", "public function show_pacient(){\n\t\t//El método all() retorna todos los registros\n\t\t$dates = Date::All();\n\t\tforeach ($dates as $date) {\n\t\t\t$id_cita = $date->id_cita;\n\t\t\t$fecha_cita = $date->fecha;\n\t\t\t$id_cliente = $date->id_paciente;\n\t\t\t$paciente = Pacient::find($id_cliente);\n\t\t\t$nombre_paciente = $paciente->nombre.' '.$paciente->apaterno.' '.$paciente->amaterno;\n\t\t\t$doctor = $date->id_doctor;\n\t\t\t$fila_doc = Doctor::find($doctor);\n\t\t\t$doc = $fila_doc['nombre'].' '.$fila_doc['apaterno'].' '.$fila_doc['amaterno'];\n\t\t\t$pesos_array[] = array('id'=> $id_cita, 'paciente'=>$nombre_paciente,\n\t\t\t'fecha'=> $fecha_cita,'hora'=>$date->hora,'division'=>$date->division,\n\t\t\t'tipo_cita'=>$date->tipo_cita,'doctor'=>$doc);\n\t\t}\n\t\t//Se crea el archivo json, si existe, se sobreescribe\n\t\t$collection_2 = Collection::make($pesos_array);\n\t\t$collection_2->toJson();\n\t\t$file = 'json/citas.json';\n\t\tfile_put_contents($file, $collection_2);\n\t\treturn view('Citas/date_pacient');\n\t}", "public function getDate(){\n\t\treturn $this->_date;\n\t}", "public function getData()\n {\n if ($this->today == $this->first_day) {\n $data = $this->getAllData();\n }\n\n if (!empty($data)) {\n foreach ($data as $datum) {\n $this->handleData($datum);\n }\n }\n\n }", "public function getArticle(){\r\n\t\t$sql=\"select * from article where time_at > '\" . date(\"Y-m-d\", time() - 3600 * 24 *21) .\"'order by reply_number desc limit 0,10\";\r\n\t\t$this->article15=$this->query($sql);\r\n\t\t//echo $sql;\r\n\t\t$time = $this->year.\"-\".$this->month.\"-\".$this->day;\r\n\t\t$timeNext = date(\"Y-m-d\", strtotime($time) + 24 * 3600);\r\n\t\t$sql=\"select * from article where city_id=\" . $this->city. \" and time_at between '\" . $time . \"' and '\" . $timeNext . \"' order by read_number desc limit 0,10\";\r\n\t\t$this->article=$this->query($sql);\r\n\t}", "public function readAll(){\n //select all data\n $query = \"SELECT\n id, num_compte, cle_rib, num_agence, duree_epargne, frais, solde, created\n FROM\n \" . $this->table_name . \"\n ORDER BY\n num_compte\";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n \n return $stmt;\n }", "function showDate()\n\t{\n\t\t$lines = file('/home/int322_161a19/secret/topsecret');\n\t\t$j=0;\n\t\t$host = trim($lines[$j++]);\n\t\t$user = trim($lines[$j++]);\n\t\t$pass = trim($lines[$j++]);\n\t\t$dbnm = trim($lines[$j++]);\n\n\t\t//Establish connection\n\t\t$conn = mysqli_connect($host,$user,$pass,$dbnm) or die('Error connecting to database: ' . mysqli_error($conn));\n\n\t\t//Execute command and make sure it worked\n\t\t$sqlCmd = 'SELECT CURDATE()';\n\n\t\t$query = mysqli_query($conn, $sqlCmd) or die('query failed'. mysqli_error($conn));\n\n\t\t//Get result\n\t\t$result = mysqli_fetch_assoc($query);\n\t\techo('<p>' . $result['CURDATE()'] . '</p>');\n\n\t\t//Close connection\n\t\tmysqli_close($conn);\n\t}", "function get_sensors_data_last_day(){\r\n $sensor_json_url = 'https://data.melbourne.vic.gov.au/resource/b2ak-trbp.json';\r\n $last_available_data_time = get_last_available_with_time(0)->date_time;\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($ch, CURLOPT_URL,$sensor_json_url . '?$where=date_time%20>%20\"' . gmdate(\"Y-m-d\\TH:i:s\", strtotime('-1 day', strtotime($last_available_data_time))) . '\"');\r\n $result=curl_exec($ch);\r\n curl_close($ch);\r\n return json_decode($result);\r\n}", "function read()\n{\n $statement = selectFromDB('SELECT * FROM projecten WHERE id = ?', [$_GET['id']]);\n $content = '<table>';\n while ($data = $statement->fetch(PDO::FETCH_ASSOC)) {\n $content .=\n '<tr>' .\n '<td>' . $data['name'] . '</td>' .\n '<td>' . $data['date'] . '</td>' .\n '<td><a href=\"?page=project&function=edit&id=' . $data['id'] . '\">' . $data['date'] . '</td>' .\n '<td>' . $data['date'] . '</td>' .\n '<tr>';\n }\n return page_show($content);\n}", "public function sort_projects_by_date ()\n {\n\n }", "public function getReadingsOfTheDay(\\DateTime $day): array\n {\n if ($this->isLogged === false) {\n $this->login();\n }\n\n $url = str_replace(\n '{date}',\n $day->format('d-m-YH:i:s'),\n self::URI_READINGS_OF_THE_DAY\n );\n\n $response = $this->client->get($url);\n if ($response->getStatusCode() !== 200) {\n $this->isLogged = false;\n return false;\n }\n\n return $this->normalizeMeasurements($response->getBody()->getContents());\n }", "function getData($format = DATE_FORMAT_ISO)\r\n {\r\n switch($format) {\r\n case DATE_FORMAT_ISO:\r\n return $this->format(\"%Y-%m-%d %T\");\r\n break;\r\n case DATE_FORMAT_TIMESTAMP:\r\n return $this->format(\"%Y%m%d%H%M%S\");\r\n break;\r\n case DATE_FORMAT_UNIXTIME:\r\n return mktime($this->hora, $this->minuto, $this->segundo, $this->mes, $this->dia, $this->ano);\r\n break;\r\n }\r\n }", "private function getData($params)\n {\n global $wpdb;\n $year = substr($params['date'], 0, 4);\n $month = substr($params['date'], -5, 2);\n $type = $params['place'];\n\n // 1と2しかない前提(SQLインジェクション対応)\n if ($type !== '1' && $type !== '2') {\n return false;\n }\n\n $prevmonth = date('m', strtotime('-1 month', strtotime($year.'-'.$month.'-01')));\n $prevyear = $prevmonth === '12' ? date('Y', strtotime('-1 year', strtotime($year.'-'.$month.'-01'))) : $year;\n $lastdayprevmonth = date('Y-m-d', strtotime('last day', strtotime($year.'-'.$month.'-01')));\n $lastweekprevmonth = date('Y-m-25', strtotime('last day', strtotime($year.'-'.$month.'-01')));\n $lastdaynextmonth = date('Y-m-06', strtotime('last day of next month', strtotime($year.'-'.$month.'-01')));\n $sql = <<<__SQL\nSELECT *\nFROM fukuri_stadium\nWHERE date <= %s AND date >= %s\nAND type = %d\nORDER BY ID, date ASC\n__SQL;\n\n $args = array(\n $lastdaynextmonth,\n $lastweekprevmonth,\n $type\n );\n\n $prep = $wpdb->prepare($sql, $args);\n $res = $wpdb->get_results($prep);\n return $res;\n }" ]
[ "0.64640725", "0.59494734", "0.5899336", "0.5812199", "0.5776837", "0.5759736", "0.5756507", "0.56664944", "0.56230074", "0.5556188", "0.5553224", "0.5506", "0.5458098", "0.5418239", "0.54096645", "0.5405431", "0.54050046", "0.54050046", "0.53446907", "0.5337182", "0.5335507", "0.5316219", "0.5314269", "0.5268665", "0.52639425", "0.52531993", "0.5252568", "0.5238701", "0.52375907", "0.5237363", "0.5232093", "0.5221873", "0.5209428", "0.52019423", "0.5192113", "0.5189717", "0.51792204", "0.5174459", "0.5169513", "0.51665854", "0.5161231", "0.5157632", "0.5156986", "0.51422507", "0.51282626", "0.5127923", "0.51276153", "0.5119935", "0.51164824", "0.51147485", "0.511072", "0.51100683", "0.5095047", "0.5094562", "0.50895", "0.50736195", "0.5070318", "0.50702053", "0.50675887", "0.50536895", "0.5053648", "0.5049067", "0.503406", "0.50335634", "0.5033305", "0.5032825", "0.50318545", "0.5025793", "0.5016182", "0.5001056", "0.49987507", "0.49771973", "0.49705076", "0.49658817", "0.4958869", "0.49569243", "0.49564844", "0.49523538", "0.4946587", "0.49372885", "0.4935588", "0.49321538", "0.49284413", "0.49269783", "0.49258906", "0.49254793", "0.49250743", "0.49218053", "0.49142903", "0.49076456", "0.4907605", "0.48984447", "0.48966682", "0.48939782", "0.48790565", "0.48649272", "0.4862901", "0.4858502", "0.48555723", "0.48504364" ]
0.53612274
18
Convert huge number to given units format
function format_unit( $value, $base = 1024, $units = ['', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'], $precision = 2 ) { if ($value < 0) { return '-' . format_unit(abs($value), $units, $precision); } if ($value < 1) { return $value . ' ' . $units[0]; } $power = min( floor(log($value, $base)), count($units) - 1 ); return round($value / pow($base, $power), $precision) . ' ' . $units[$power]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convert($size)\n {\n $unit=array('b','kb','mb','gb','tb','pb');\n return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i];\n }", "function iu_format_number($input){\n\t$suffixes = array('', 'k', 'M', 'B');\n\t$suffixIndex = 0;\n\n\twhile(abs($input) >= 1000 && $suffixIndex < sizeof($suffixes)){\n\t\t$suffixIndex++;\n\t\t$input /= 1000;\n\t}\n\treturn round(floatval($input / pow(10, 0)),1).$suffixes[$suffixIndex];\n}", "function convert_number($n) {\r\r\n if($n != ''){\r\r\n $n = (0+str_replace(\",\", \"\", $n));\r\r\n }\r\r\n\r\r\n //if (!is_numeric($n)) return false;\r\r\n\r\r\n if ($n > 1000000000000) return round(($n/1000000000000), 2).'T';\r\r\n elseif ($n > 1000000000) return round(($n/1000000000), 2).'B';\r\r\n elseif ($n > 1000000) return round(($n/1000000), 2).'M';\r\r\n elseif ($n > 1000) return round(($n/1000), 2).'Th';\r\r\n \r\r\n return number_format($n);\r\r\n }", "function num_to_short($num)\n{\n\tif (is_float($num))\n\t\t$num = round($num);\n\t\n\tif ($num >= 1000) {\n\t\t$i = 1000;\n\t\twhile ($num >= $i) {\n\t\t\t$return = ($i/1000). \"K\";\n\t\t\t\n\t\t\tif ($num > $i)\n\t\t\t\t$return .= \"+\";\n\t\t\t\n\t\t\t$i += 1000;\n\t\t}\n\t} else\n\t\t$return = $num;\n\t\n\treturn $return;\n}", "function convertValueToLusin($value) {\r\n\t$unit_lusin = floor($value/12);\r\n\treturn $unit_lusin;\t\t\r\n}", "function convert_number($number) \n{ \n if (($number < 0) || ($number > 999999999)) \n { \n echo \"Number is out of range\";\n } \n\n \t//$Gn = floor($number / 1000000); /* Millions (giga) */ \n //$number -= $Gn * 1000000; \n\n $Gn = floor($number / 100000); /* Lakhs (giga) */ \n $number -= $Gn * 100000; \n $kn = floor($number / 1000); /* Thousands (kilo) */ \n $number -= $kn * 1000; \n $Hn = floor($number / 100); /* Hundreds (hecto) */ \n $number -= $Hn * 100; \n $Dn = floor($number / 10); /* Tens (deca) */ \n $n = $number % 10; /* Ones */ \n\n $res = \"\"; \n\n /*if ($Gn) \n { \n $res .= convert_number($Gn) . \" Millions\"; \n } */\n\n\tif ($Gn) \n { \n $res .= convert_number($Gn) . \" Lakhs\"; \n } \n\n if ($kn) \n { \n $res .= (empty($res) ? \"\" : \" \") . \n convert_number($kn) . \" Thousand\"; \n } \n\n if ($Hn) \n { \n $res .= (empty($res) ? \"\" : \" \") . \n convert_number($Hn) . \" Hundred\"; \n } \n\n $ones = array(\"\", \"One\", \"Two\", \"Three\", \"Four\", \"Five\", \"Six\", \n \"Seven\", \"Eight\", \"Nine\", \"Ten\", \"Eleven\", \"Twelve\", \"Thirteen\", \n \"Fourteen\", \"Fifteen\", \"Sixteen\", \"Seventeen\", \"Eightteen\", \n \"Nineteen\"); \n $tens = array(\"\", \"\", \"Twenty\", \"Thirty\", \"Fourty\", \"Fifty\", \"Sixty\", \n \"Seventy\", \"Eigthy\", \"Ninety\"); \n\n if ($Dn || $n) \n { \n if (!empty($res)) \n { \n $res .= \" and \"; \n } \n\n if ($Dn < 2) \n { \n $res .= $ones[$Dn * 10 + $n]; \n } \n else \n { \n $res .= $tens[$Dn]; \n\n if ($n) \n { \n $res .= \"-\" . $ones[$n]; \n } \n } \n } \n\n if (empty($res)) \n { \n $res = \"zero\"; \n } \n\n return $res; \n}", "function unit_display($bits) {\n\n\t$output = \"\";\n\n\tif (($bits / 1000000000000) > 1 ) {\n\t\t$output = round(($bits / 1000000000000), 3) . \" Tb\";\n\t}elseif (($bits / 1000000000) > 1 ) {\n\t\t$output = round(($bits / 1000000000), 3) . \" Gb\";\n\t}elseif (($bits / 1000000) > 1 ) {\n\t\t$output = round(($bits / 1000000), 3) . \" Mb\";\n\t}elseif (($bits / 1000) > 1 ) {\n\t\t$output = round(($bits / 1000), 3) . \" Kb\";\n\t}else{\n\t\t$output = $bits . \" bits\";\n\t}\n\n\treturn $output;\n\n}", "function unit_multi($unit) {\n\t\n\tif ($unit == \"Kb\") {\n\t\t$multi = 1000;\n\t} elseif ($unit == \"Gb\") {\n\t\t$multi = 1000000000;\n\t} elseif ($unit == \"Tb\") {\n\t\t$multi = 1000000000000;\n\t} else {\n\t\t/* Mb default */\n\t\t$multi = 1000000;\n\t}\n\n\treturn $multi;\n\n}", "function convertMegaBytes($bytes) {\n return number_format($bytes / 1048576, 2);\n}", "public static function human_number( $number ) {\n\n\t\tif ( ! is_numeric( $number ) ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\t$negative = '';\n\t\tif ( abs( $number ) != $number ) {\n\t\t\t$negative = '-';\n\t\t\t$number = abs( $number );\n\t\t}\n\n\t\tif ( $number < 1000 ) {\n\t\t\treturn $negative ? -1 * $number : $number;\n\t\t}\n\n\t\t$unit = intval( log( $number, 1000 ) );\n\t\t$units = array( '', 'K', 'M', 'B', 'T', 'Q' );\n\n\t\tif ( array_key_exists( $unit, $units ) ) {\n\t\t\treturn sprintf( '%s%s%s', $negative, rtrim( number_format( $number / pow( 1000, $unit ), 1 ), '.0' ), $units[ $unit ] );\n\t\t}\n\n\t\treturn $number;\n\t}", "function convertToNotation(int $bytes) {\n\n\t$units = array('B', 'KB', 'MB', 'GB', 'TB'); \n\n\t$bytes = max($bytes, 0); \n\t$pow = floor(($bytes ? log($bytes) : 0) / log(1024)); \n\t$pow = min($pow, count($units) - 1);\n\t$bytes /= pow(1024, $pow);\n\n return round($bytes, 2).$units[$pow]; \n\n}", "function format_toSizeInBytes_shortForm($size_in_bytes) {\n\t\t//\n\t\t// Data sizes are normally specified in KB - powers of 1024, so return KB rather than kB\n\n\t\tif ($size_in_bytes < (1024 * 1024)) {\n\t\t\t$unit = \"K\";\n\t\t\t$unitSize = $size_in_bytes / 1024;\n\t\t} else if ($size_in_bytes < (1024 * 1024 * 1024)) {\n\t\t\t$unit = \"M\";\n\t\t\t$unitSize = $size_in_bytes / (1024 * 1024);\n\t\t} else {\n\t\t\t$unit = \"G\";\n\t\t\t$unitSize = $size_in_bytes / (1024 * 1024 * 1024);\n\t\t}\n\n\t\t$showDecimalPlace = $unitSize < 10 && round($unitSize, 1) != round($unitSize);\n\n\t\treturn sprintf($showDecimalPlace ? \"%1.1f\" : \"%1.0f\", $unitSize) . $unit;\n\t}", "public static function numMassFormat($num) {\n\n if($num>1000) {\n\n $x = round($num);\n $x_number_format = number_format($x);\n $x_array = explode(',', $x_number_format);\n $x_parts = array('K', 'M', 'B', 'T');\n $x_count_parts = count($x_array) - 1;\n $x_display = $x_array[0] . ((int) $x_array[1][0] !== 0 ? '.' . $x_array[1][0] : '');\n $x_display .= $x_parts[$x_count_parts - 1];\n\n return $x_display;\n\n }\n\n return $num;\n }", "function number_to_human_size($bytes){\n\t$border = 1024 * 1.5;\n\tif ($bytes < $border)\n\t\treturn sprintf('%u Byte', $bytes);\n\t\n\t$bytes /= 1024;\n\tif ($bytes < $border)\n\t\treturn sprintf('%u KiByte', $bytes);\n\t\n\t$bytes /= 1024;\n\treturn sprintf('%.1f MiByte', $bytes);\n}", "function convertnumber( $num, $precision = 1 ) {\n\t$last=preg_replace(\"/[^a-zA-Z]/\", '', $num);\n\t$remaining=preg_replace(\"/[^0-9\\.]/\", '', $num);\n\t//$remaining = (float)$remaining;\n\t\n\tif($last == 'K') {\n\t\t$amount = number_format(($remaining*1000), $precision);\n\t} else if($last == 'M') {\n\t\t$amount = number_format(($remaining*1000000), $precision);\n\t} else if($last == 'B') {\n\t\t$amount = number_format(($remaining*1000000000), $precision);\n\t} else if($last == 'T') {\n\t\t$amount = number_format(($remaining*1000000000000), $precision);\n\t} else {\n\t\t$amount = number_format($remaining, $precision);\n\t}\n\treturn $amount;\n}", "function PMA_formatByteDown($value, $limes = 6, $comma = 0)\r\n{\r\n $dh = pow(10, $comma);\r\n $li = pow(10, $limes);\r\n $return_value = $value;\r\n $unit = $byteunits[0];\r\n\t$byteunits = array('Byte', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB');\r\n\t$number_thousands_separator = ',';\r\n\t$number_decimal_separator = '.';\r\n\r\n for ( $d = 6, $ex = 15; $d >= 1; $d--, $ex-=3 ) {\r\n if (isset($byteunits[$d]) && $value >= $li * pow(10, $ex)) {\r\n $value = round($value / ( pow(1024, $d) / $dh) ) /$dh;\r\n $unit = $byteunits[$d];\r\n break 1;\r\n } // end if\r\n } // end for\r\n\r\n if ($unit != $byteunits[0]) {\r\n $return_value = number_format($value, $comma, $number_decimal_separator, $number_thousands_separator);\r\n } else {\r\n $return_value = number_format($value, 0, $number_decimal_separator, $number_thousands_separator);\r\n }\r\n\r\n return array($return_value, $unit);\r\n}", "function bd_nice_number($n) {\n // Strip any formatting;\n $n = (0+str_replace(\",\",\"\",$n));\n \n // Check if it's a num\n if(!is_numeric($n)) return false;\n \n // Filter through trillions, billions, and millions\n if($n>1000000000000) return round(($n/1000000000000),2).'T';\n else if($n>1000000000) return round(($n/1000000000),2).'B';\n else if($n>1000000) return round(($n/1000000),2).'M';\n \n return number_format($n);\n}", "function byteSizeConvert($size){\n $unit=array('b','kb','mb','gb','tb','pb');\n return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i];\n}", "function dokan_number_format( $number ) {\n $threshold = 10000;\n\n if ( $number > $threshold ) {\n return number_format( $number/1000, 0, '.', '' ) . ' K';\n }\n\n return $number;\n}", "function formatNumberToDisplayInMillions($number, $fullFormat=FALSE)\n{\tif(!is_numeric($number)) return false;\n\n\t// now filter it;\n\tif($number>=1000000000000) return round(($number/1000000000000),0). (($fullFormat)? ' Trillion':' T');\n\telse if($number>=1000000000) return round(($number/1000000000),0).(($fullFormat)? ' Billion':' B');\n\telse if($number>=1000000) return round(($number/1000000),0).(($fullFormat)? ' Million':' M');\n\telse if($number>=1000) return round(($number/1000),0).(($fullFormat)? ' Thousand':' K');\n\n\treturn number_format($number, 0, '.', ',');\n}", "function format_gigabytes($gigabytes)\n{\n if ($gigabytes >= 1000) {\n return Metric::gigabytes($gigabytes)->format('Tb/');\n } else {\n return Metric::gigabytes($gigabytes)->format('GB/');\n }\n}", "function number_format_huge($n)\n {\n if ($n>pow(10, 100)) {\n return round(($n/pow(10, 100)), 1).' googol';\n }\n // I'll add more later\n if ($n>pow(1000, 32)) {\n return round(($n/pow(1000, 32)), 1).' untrigintillion';\n }\n if ($n>pow(1000, 31)) {\n return round(($n/pow(1000, 31)), 1).' trigintillion';\n }\n if ($n>pow(1000, 30)) {\n return round(($n/pow(1000, 30)), 1).' novemvigintillion';\n }\n if ($n>pow(1000, 29)) {\n return round(($n/pow(1000, 29)), 1).' octovigintillion';\n }\n if ($n>pow(1000, 28)) {\n return round(($n/pow(1000, 28)), 1).' septenvigintillion';\n }\n if ($n>pow(1000, 27)) {\n return round(($n/pow(1000, 27)), 1).' sexvigintillion';\n }\n if ($n>pow(1000, 26)) {\n return round(($n/pow(1000, 26)), 1).' quinvigintillion';\n }\n if ($n>pow(1000, 25)) {\n return round(($n/pow(1000, 25)), 1).' quattuorvigintillion';\n }\n if ($n>pow(1000, 24)) {\n return round(($n/pow(1000, 24)), 1).' trevigintillion';\n }\n if ($n>pow(1000, 23)) {\n return round(($n/pow(1000, 23)), 1).' duovigintillion';\n }\n if ($n>pow(1000, 22)) {\n return round(($n/pow(1000, 22)), 1).' unvigintillion';\n }\n if ($n>pow(1000, 21)) {\n return round(($n/pow(1000, 21)), 1).' vigintillion';\n }\n if ($n>pow(1000, 20)) {\n return round(($n/pow(1000, 20)), 1).' novemdecillion';\n }\n if ($n>pow(1000, 19)) {\n return round(($n/pow(1000, 19)), 1).' octodecillion';\n }\n if ($n>pow(1000, 18)) {\n return round(($n/pow(1000, 18)), 1).' septendecillion';\n }\n if ($n>pow(1000, 17)) {\n return round(($n/pow(1000, 17)), 1).' sexdecillion';\n }\n if ($n>pow(1000, 16)) {\n return round(($n/pow(1000, 16)), 1).' quindecillion';\n }\n if ($n>pow(1000, 15)) {\n return round(($n/pow(1000, 15)), 1).' quattuordecillion';\n }\n if ($n>pow(1000, 14)) {\n return round(($n/pow(1000, 14)), 1).' tredecillion';\n }\n if ($n>pow(1000, 13)) {\n return round(($n/pow(1000, 13)), 1).' duodecillion';\n }\n if ($n>pow(1000, 12)) {\n return round(($n/pow(1000, 12)), 1).' undecillion';\n }\n if ($n>pow(1000, 11)) {\n return round(($n/pow(1000, 11)), 1).' decillion';\n }\n if ($n>pow(1000, 10)) {\n return round(($n/pow(1000, 10)), 1).' nonillion';\n }\n if ($n>pow(1000, 9)) {\n return round(($n/pow(1000, 9)), 1).' octillion';\n }\n if ($n>pow(1000, 8)) {\n return round(($n/pow(1000, 8)), 1).' septillion';\n }\n if ($n>pow(1000, 7)) {\n return round(($n/pow(1000, 7)), 1).' sextillion';\n }\n if ($n>pow(1000, 6)) {\n return round(($n/pow(1000, 6)), 1).' quintillion';\n }\n if ($n>pow(1000, 5)) {\n return round(($n/pow(1000, 5)), 1).' quadrillion';\n }\n if ($n>pow(1000, 4)) {\n return round(($n/pow(1000, 4)), 1).' trillion';\n }\n if ($n>pow(1000, 3)) {\n return round(($n/pow(1000, 3)), 1).' billion';\n }\n if ($n>1000000) {\n return round(($n/1000000), 1).' million';\n }\n if ($n>1000) {\n return number_format($n);\n }\n }", "function number_format_short( $n, $precision = 1 ) {\r\n\tif ($n < 900) {\r\n\t\t// 0 - 900\r\n\t\t$n_format = number_format($n, $precision);\r\n\t\t$suffix = '';\r\n\t} else if ($n < 900000) {\r\n\t\t// 0.9k-850k\r\n\t\t$n_format = number_format($n / 1000, $precision);\r\n\t\t$suffix = 'K';\r\n\t} else if ($n < 900000000) {\r\n\t\t// 0.9m-850m\r\n\t\t$n_format = number_format($n / 1000000, $precision);\r\n\t\t$suffix = 'M';\r\n\t} else if ($n < 900000000000) {\r\n\t\t// 0.9b-850b\r\n\t\t$n_format = number_format($n / 1000000000, $precision);\r\n\t\t$suffix = 'B';\r\n\t} else {\r\n\t\t// 0.9t+\r\n\t\t$n_format = number_format($n / 1000000000000, $precision);\r\n\t\t$suffix = 'T';\r\n\t}\r\n\t// Remove unecessary zeroes after decimal. \"1.0\" -> \"1\"; \"1.00\" -> \"1\"\r\n\t// Intentionally does not affect partials, eg \"1.50\" -> \"1.50\"\r\n\tif ( $precision > 0 ) {\r\n\t\t$dotzero = '.' . str_repeat( '0', $precision );\r\n\t\t$n_format = str_replace( $dotzero, '', $n_format );\r\n\t}\r\n\treturn $n_format . $suffix;\r\n}", "function convert_mm_to_inches($mmsize)\n{\n if (strpos($mmsize, \"x\")!==false)\n {\n // separated by x\n $sizes = explode(\"x\", $mmsize);\n $sep = 'x';\n }\n elseif (strpos($mmsize, \"&\")!==false)\n {\n // separated by &\n $sizes = explode(\"&\", $mmsize);\n $sep = '&';\n }\n elseif (strpos($mmsize, \"-\")!==false)\n {\n // separated by -\n $sizes = explode(\"-\", $mmsize);\n $sep = '-';\n }\n elseif (strpos($mmsize, \"or\")!==false)\n {\n // separated by or\n $sizes = explode(\"or\", $mmsize);\n $sep = 'or';\n }\n else\n {\n $sizes[] = $mmsize;\n $sep = \"\";\n }\n\n\n foreach ($sizes as $size)\n {\n if (intval($size)<4)\n {\n return $mmsize . \"mm\";\n }\n\n $decimal = (($size/10)/2.54);\n $decimal = round($decimal / 0.125) * 0.125;\n $newsize[] = \" \" . decimal_to_fraction($decimal) . \" inch \";\n $newmm[] = \" \".trim($size).\"mm \";\n }\n\n return implode($sep, $newsize) . \" (\" . trim(implode($sep, $newmm)) . \") \";\n}", "function humanFileSize($size,$unit=\"\") \n {\n if( (!$unit && $size >= 1<<30) || $unit == \"GB\")\n return number_format($size/(1<<30),2).\"GB\";\n if( (!$unit && $size >= 1<<20) || $unit == \"MB\")\n return number_format($size/(1<<20),2).\"MB\";\n if( (!$unit && $size >= 1<<10) || $unit == \"KB\")\n return number_format($size/(1<<10),2).\"KB\";\n return number_format($size).\" bytes\";\n }", "function nice_number( $n ) {\n\t$n = (0 + str_replace( ',', '', $n ) );\n\t// is this a number? (o yes, almost certain - but...)\n\tif ( ! is_numeric( $n ) ) return false;\n\t// now filter it;\n\tif ( $n > 1000000000000 ) return round( ($n / 1000000000000), 1 ) . 't';\n\telse if ( $n > 1000000000 ) return round( ($n / 1000000000), 1 ) . 'b';\n\telse if ( $n > 1000000 ) return round( ($n / 1000000), 1 ) . 'm';\n\telse if ( $n > 1000 ) return round( ($n / 1000), 1 ) . 'k';\n\treturn number_format( $n );\n}", "function humanNumber($num, $places = 1, $type = 'metric') {\n if ($type == 'metric') {\n $k = 'K';\n $m = 'M';\n } else {\n $k = ' thousand';\n $m = ' million';\n }\n if ($num < 1000) {\n $num_format = number_format($num);\n } elseif ($num < 1000000) {\n $num_format = number_format($num / 1000, $places) . $k;\n } else {\n $num_format = number_format($num / 1000000, $places) . $m;\n }\n\n return $num_format;\n}", "function to_inches($mm,$denom) {\n #\n # Arguments:\n # mm - length in millimeters\n # denom - accuracy in fractions of an inch, e.g. 1/8, 1/16, etc.\n #\n $in_frac = round($mm/25.4*$denom,0,PHP_ROUND_HALF_UP);\n $inches = floor($in_frac/$denom);\n $num = $in_frac % $denom;\n $gcd = gcd($num,$denom);\n $num = $num/$gcd;\n $denom = $denom/$gcd;\n $retval = \"\";\n if ($num == 0) {\n $retval = $inches . \"\\\"\";\n } \n else {\n $retval = $inches . \" \" . $num . \"/\" . $denom . \"\\\"\";\n }\n return $retval;\n}", "function fileSizeConvert($bytes)\n{\n $bytes = floatval($bytes);\n $arBytes = array(\n 0 => array(\n \"UNIT\" => \"tb\",\n \"VALUE\" => pow(1024, 4)\n ),\n 1 => array(\n \"UNIT\" => \"gb\",\n \"VALUE\" => pow(1024, 3)\n ),\n 2 => array(\n \"UNIT\" => \"mb\",\n \"VALUE\" => pow(1024, 2)\n ),\n 3 => array(\n \"UNIT\" => \"kb\",\n \"VALUE\" => 1024\n ),\n 4 => array(\n \"UNIT\" => \"b\",\n \"VALUE\" => 1\n ),\n );\n\n foreach ($arBytes as $arItem) {\n if ($bytes >= $arItem[\"VALUE\"]) {\n $result = $bytes / $arItem[\"VALUE\"];\n $result = str_replace(\n \".\", \n \".\", \n strval(round($result, 0))\n ).$arItem[\"UNIT\"];\n break;\n }\n }\n return $result;\n}", "function wolf_share_format_number( $n = 0 ) {\n\n\t$s = array( 'K', 'M', 'G', 'T' );\n\t$out = '';\n\twhile ( $n >= 1000 && count( $s ) > 0) {\n\t\t$n = $n / 1000.0;\n\t\t$out = array_shift( $s );\n\t}\n\treturn round( $n, max( 0, 3 - strlen( (int)$n ) ) ) .\" $out\";\n}", "function formatNumber($number)\n {\n $stringLength = strlen($number);\n\n if ($stringLength > 5) {\n return round($number / 1000, 2).'K';\n }\n return $number;\n }", "function format_toSpeedInBits_shortForm($speed_in_bytes) {\n\t\t//\n\t\t// The decimal SI kilobot definition of 1 kbit/s = 1000 bit/s, is used uniformly in the\n\t\t// context of telecommunication transmission, so return kb rather than Kb\n\n\t\tif ($speed_in_bytes < 125000) {\n\t\t\t$unit = \"k\";\n\t\t\t$unitSpeed = $speed_in_bytes / 125;\n\t\t} else if ($speed_in_bytes < 125000000) {\n\t\t\t$unit = \"m\";\n\t\t\t$unitSpeed = $speed_in_bytes / 125000;\n\t\t} else {\n\t\t\t$unit = \"g\";\n\t\t\t$unitSpeed = $speed_in_bytes / 125000000;\n\t\t}\n\n\t\t$showDecimalPlace = $unitSpeed < 10 && round($unitSpeed, 1) != round($unitSpeed);\n\n\t\treturn sprintf($showDecimalPlace ? \"%1.1f\" : \"%1.0f\", $unitSpeed) . $unit;\n\t}", "function parse_size($size) {\n $unit = preg_replace('/[^bkmgtpezy]/i', '', $size); // Remove the non-unit characters from the size.\n $size = preg_replace('/[^0-9\\.]/', '', $size); // Remove the non-numeric characters from the size.\n if ($unit) {\n // Find the position of the unit in the ordered string which is the power of magnitude to multiply a kilobyte by.\n return round($size * pow(1024, stripos('bkmgtpezy', $unit[0])));\n }\n else {\n return round($size);\n }\n }", "function convert_to_bytes($unit, $value)\n{\n\t$value = (int) $value;\n\n\tswitch (strtolower($unit)) {\n\t\tcase 'g':\n\t\t\treturn $value * pow(1024, 3);\n\t\tcase 'm':\n\t\t\treturn $value * pow(1024, 2);\n\t\tcase 'k':\n\t\t\treturn $value * 1024;\n\t\tdefault:\n\t\t\treturn $value;\n\t}\n}", "function format_toSpeedInBits_longForm($speed_in_bytes) {\n\n\t\tif ($speed_in_bytes < 125000)\n\t\t\t{return sprintf(\"%5.1f kbps\", $speed_in_bytes / 125);}\n\t\tif ($speed_in_bytes < 125000000)\n\t\t\t{return sprintf(\"%5.1f mbps\", $speed_in_bytes / 125000);}\n\t\t// else\n\t\treturn sprintf(\"%5.1f gbps\", $speed_in_bytes / 125000000);\n\t}", "function filesize_formatted($size)\n{\n\t$units = array( 'B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');\n\t$power = $size > 0 ? floor(log($size, 1024)) : 0;\n\treturn number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];\n}", "function bytes_to_gigabytes($value)\n{\n return round($value/1000**4, 2) . \"GB\";\n}", "public function shortNumber($value)\n {\n $value = (0 + str_replace(',', '', $value)); // remove formatting\n if (!is_numeric($value)) {\n return false; // require number\n }\n $t = ($value / 1000000000000); // trillion\n $b = ($value / 1000000000); // billions\n $m = ($value / 1000000); // millions\n $k = ($value / 1000); // thousands\n if ($t >= 1) {\n if (is_float($t) && $t < 100) {\n return round($t, 1) . 'T';\n }\n return round($t) . 'T';\n } else if ($b >= 1) {\n if (is_float($b) && $b < 100) {\n return round($b, 1) . 'B';\n }\n return round($b) . 'B';\n } else if ($m >= 1) {\n if (is_float($m) && $m < 100) {\n return round($m, 1) . 'M';\n }\n return round($m) . 'M';\n } else if ($k >= 1) {\n if (is_float($k) && $k < 100) {\n return round($k, 1) . 'k';\n }\n return round($k) . 'k';\n }\n return is_float($value) ? number_format($value, 2) : number_format($value);\n }", "function convertNum($x){\n\treturn number_format($x, 2, '.', ',');\n}", "function convertNum($x){\n\treturn number_format($x, 2, '.', ',');\n}", "function human_filesize($size,$unit=\"\") {\n if( (!$unit && $size >= 1<<30) || $unit == \"GB\")\n return number_format($size/(1<<30),2).\"GB\";\n if( (!$unit && $size >= 1<<20) || $unit == \"MB\")\n return number_format($size/(1<<20),2).\"MB\";\n if( (!$unit && $size >= 1<<10) || $unit == \"KB\")\n return number_format($size/(1<<10),2).\"KB\";\n return number_format($size).\" bytes\";\n}", "public static function scaleThousandsMillions(string &$format): int\n {\n $scale = 1; // same as no scale\n if (preg_match('/(#|0|\\?)(,+)/', $format, $matches)) {\n $scale = 1000 ** strlen($matches[2]);\n // strip the commas\n $format = self::pregReplace('/([#\\?0]),+/', '${1}', $format);\n }\n\n return $scale;\n }", "public function convert($number)\n {\n $number = str_replace('.', '', $number);\n if ( ! is_numeric($number)) throw new Exception(\"Please input number.\");\n $base = array('nol', 'satu', 'dua', 'tiga', 'empat', 'lima', 'enam', 'tujuh', 'delapan', 'sembilan');\n $numeric = array('1000000000000000', '1000000000000', '1000000000000', 1000000000, 1000000, 1000, 100, 10, 1);\n $unit = array('kuadriliun', 'triliun', 'biliun', 'milyar', 'juta', 'ribu', 'ratus', 'puluh', '');\n $str = null;\n $i = 0;\n if ($number == 0) {\n $str = 'nol';\n } else {\n while ($number != 0) {\n $count = (int)($number / $numeric[$i]);\n if ($count >= 10) {\n $str .= static::convert($count) . ' ' . $unit[$i] . ' ';\n } elseif ($count > 0 && $count < 10) {\n $str .= $base[$count] . ' ' . $unit[$i] . ' ';\n }\n $number -= $numeric[$i] * $count;\n $i++;\n }\n $str = preg_replace('/satu puluh (\\w+)/i', '\\1 belas', $str);\n $str = preg_replace('/satu (ribu|ratus|puluh|belas)/', 'se\\1', $str);\n $str = preg_replace('/\\s{2,}/', ' ', trim($str));\n }\n return $str;\n }", "public function convertToReadableSize($size)\n\t{\n\t\t$base = log($size) / log(1024);\n\t\t$suffix = ['', 'KB', 'MB', 'GB', 'TB'];\n\t\t$f_base = floor($base);\n\t\treturn round(pow(1024, $base - floor($base)), 1) . $suffix[$f_base];\n\t}", "function displayMontant($val) {\n if( $val < 1000 ) return $val;\n $val = $val/1000;\n if( $val < 1000 ) return \"${val} K\";\n $val = $val/1000;\n return \"${val} M\";\n}", "public function nice_number($n) {\r\n $n = (0+str_replace(\",\", \"\", $n));\r\n\r\n // is this a number?\r\n if (!is_numeric($n)) return false;\r\n\r\n // now filter it;\r\n if ($n > 1000000000000) return round(($n/1000000000000), 2).' T'; //trillion\r\n elseif ($n > 1000000000) return round(($n/1000000000), 2).' B'; //billion\r\n elseif ($n > 1000000) return round(($n/1000000), 2).' M';//million\r\n elseif ($n > 1000) return round(($n/1000), 2).' TH'; //thousand\r\n\r\n return number_format($n);\r\n}", "function convertTime($number)\n{\n $str_arr = explode('.', $number);\n\n $num = ($str_arr[0]);\n //floatval\n $point = ($str_arr[1]);\n $count = strlen($str_arr[1]);\n\n if ($count == 1 && $point < 10) {\n $point = $point * 10;\n }\n\n while ($point >= 60) {\n $num = $num + 1;\n $point = $point - 60;\n }\n $t = floatval($num . \".\" . $point);\n\n return $t;\n}", "function formatMBytes( $bytes, $precision = 2 )\n{\n $units = array('Mb', 'Gb', 'Tb');\n $bytes = max($bytes, 0);\n $pow = floor(($bytes ? log($bytes) : 0) / log(1024));\n $pow = min($pow, count($units) - 1);\n $bytes /= pow(1024, $pow);\n return round($bytes, $precision) . ' ' . $units[$pow];\n}", "function formatSizeUnits($bytes) {\n if ($bytes >= 1073741824) {\n $bytes = number_format($bytes / 1073741824, 2) . ' GB';\n } elseif ($bytes >= 1048576) {\n $bytes = number_format($bytes / 1048576, 2) . ' MB';\n } elseif ($bytes >= 1024) {\n $bytes = number_format($bytes / 1024, 2) . ' KB';\n } elseif ($bytes > 1) {\n $bytes = $bytes . ' bytes';\n } elseif ($bytes == 1) {\n $bytes = $bytes . ' byte';\n } else {\n $bytes = '0 bytes';\n }\n return $bytes;\n}", "function formatSizeUnits($bytes)\n {\n if ($bytes >= 1073741824)\n\t {\n\t $bytes = number_format($bytes / 1073741824, 2) . ' GB';\n }\n elseif ($bytes >= 1048576)\n {\n $bytes = number_format($bytes / 1048576, 2) . ' MB';\n\t }\n elseif ($bytes >= 1024)\n {\n $bytes = number_format($bytes / 1024, 2) . ' KB';\n }\n elseif ($bytes > 1)\n {\n $bytes = $bytes . ' bytes';\n }\n\t elseif ($bytes == 1)\n {\n\t $bytes = $bytes . ' byte';\n }\n else\n {\n $bytes = '0 bytes';\n\t }\n\n return $bytes;\n}", "function carton_let_to_num( $size ) {\n $l \t\t= substr( $size, -1 );\n $ret \t= substr( $size, 0, -1 );\n switch( strtoupper( $l ) ) {\n\t case 'P':\n\t $ret *= 1024;\n\t case 'T':\n\t $ret *= 1024;\n\t case 'G':\n\t $ret *= 1024;\n\t case 'M':\n\t $ret *= 1024;\n\t case 'K':\n\t $ret *= 1024;\n }\n return $ret;\n}", "function humanReadableToBytes (string $size): int {\n\t$unitIndex = 0;\n\n\t$chars = str_split($size);\n\t$charsLen = count($chars);\n\n\t$multipliers =\n\t\t[\n\t\t\t'B' => 1,\n\t\t\t'KB' => 1 << 10,\n\t\t\t'MB' => 1 << 20,\n\t\t\t'GB' => 1 << 30,\n\t\t\t'TB' => 1 << 40\n\t\t];\n\n\tfor ($i = 0; $i < $charsLen; $i++) {\n\t\tif (!is_numeric($size[$i]) and $size[$i] != '.') {\n\t\t\t$unitIndex = $i;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t$sizeN = floatval(substr($size, 0, $unitIndex));\n\t$sizeU = substr($size, $unitIndex, $charsLen - $unitIndex);\n\n\treturn round($sizeN * $multipliers[$sizeU]);\n}", "function bytes_to_human_size($size, $decimals = 1)\n {\n $suffix = array('Bytes','KB','MB','GB','TB','PB','EB','ZB','YB','NB','DB');\n $i = 0;\n\n while ($size >= 1024 && ($i < count($suffix) - 1)) {\n $size /= 1024;\n $i++;\n }\n\n return round($size, $decimals) . ' ' . $suffix[$i];\n }", "function human_filesize($size, $precision = 2) {\n $units = array('B','kB','MB','GB','TB','PB','EB','ZB','YB');\n $step = 1024;\n $i = 0;\n while (($size / $step) > 0.9) {\n $size = $size / $step;\n $i++;\n }\n return round($size, $precision).$units[$i];\n}", "function format_megabytes($megabytes)\n{\n if ($megabytes >= 1000) {\n return $megabytes / 1000 . 'GB';\n }\n\n if ($megabytes >= 1000000) {\n return $megabytes / 1000000 . 'TB';\n }\n\n return $megabytes . 'MB';\n}", "function sizeFormat($b = 0){\r\n\t\tif($b < 1024){\r\n\t\t\treturn $b . 'bytes';\r\n\t\t}elseif($b < 1048576){\r\n\t\t\treturn round($b / 1024 * 100 ) / 100 . 'KB';\r\n\t\t}elseif($b < 130023424){\r\n\t\t\treturn round($b / 1048576 * 100 ) / 100 . 'MB';\r\n\t\t}elseif($b < 133143986176){\r\n\t\t\treturn round($b / 130023424 * 100) / 100 . 'GB';\r\n\t\t}else{\r\n\t\t\treturn round($b / 133143986176 * 100) / 100 . 'TB';\r\n\t\t}\r\n\t}", "function format($number) {\r\n\t$number = bcdiv($number, 100000000, 8);\r\n\t$point = strpos($number,\".\");\r\n\tif($point != -1) {\r\n\t\t$after = substr($number,$point+1);\r\n\t\t$after = strlen($after);\r\n\t\t$after = 8-$after;\r\n\t\tfor($i=0;$i<$after;$i++) {\r\n\t\t\t$number .= \"0\";\r\n\t\t}\r\n\t} else {\r\n\t\t$number .= \".00000000\";\r\n\t}\r\n\treturn($number);\r\n}", "function convertFileSize ($filesize){\n $count = 0;\n $newFileSize = '';\n $array = ['byte', 'kb', 'mb', 'gb', 'tb', 'pb'];\n while($filesize > 1024){\n $filesize /= 1024;\n $count++;\n }\n\n $newFileSize .= round($filesize, 2) . $array[$count]; \n\n \n return $newFileSize;\n }", "function formatBytes($size) {\n $units = array(' B', ' KB', ' MB', ' GB', ' TB');\n for ($i = 0; $size >= 1024 && $i < 4; $i++) $size /= 1024;\n return round($size, 2).$units[$i];\n}", "public static function BigNumber($Number) {\n if (!is_numeric($Number))\n return $Number;\n\n if ($Number >= 1000000000) {\n $Number = $Number / 1000000000;\n $Suffix = \"B\";\n } elseif ($Number >= 1000000) {\n $Number = $Number / 1000000;\n $Suffix = \"M\";\n } elseif ($Number >= 1000) {\n $Number = $Number / 1000;\n $Suffix = \"K\";\n }\n\n if (isset($Suffix)) {\n return number_format($Number, 1).$Suffix;\n } else {\n return $Number;\n }\n }", "public static function us($in){\n return number_format((double) $in,0,'.',',');\n }", "function convertToRupee($number){\r\n\t\t$no = round($number);\r\n\t\t$whole = floor($number); \r\n\t\t$point = $number - $whole; \r\n\r\n\t\t$hundred = null;\r\n\t\t$digits_1 = strlen($no);\r\n\t\t$i = 0;\r\n\t\t$str = array();\r\n\t\t$words = array('0' => '', '1' => 'One', '2' => 'Two',\r\n\t\t\t\t'3' => 'Three', '4' => 'Four', '5' => 'Five', '6' => 'Six',\r\n\t\t\t\t'7' => 'Seven', '8' => 'Eight', '9' => 'Nine',\r\n\t\t\t\t'10' => 'Ten', '11' => 'Eleven', '12' => 'Twelve',\r\n\t\t\t\t'13' => 'Thirteen', '14' => 'fourteen',\r\n\t\t\t\t'15' => 'Fifteen', '16' => 'Sixteen', '17' => 'Seventeen',\r\n\t\t\t\t'18' => 'Eighteen', '19' =>'Nineteen', '20' => 'Twenty',\r\n\t\t\t\t'30' => 'Thirty', '40' => 'Forty', '50' => 'Fifty',\r\n\t\t\t\t'60' => 'Sixty', '70' => 'Seventy',\r\n\t\t\t\t'80' => 'Eighty', '90' => 'Ninety');\r\n\t\t\t\t$digits = array('', 'Hundred', 'Thousand', 'Lakh', 'Crore');\r\n\t\twhile ($i < $digits_1) {\r\n\t\t\t$divider = ($i == 2) ? 10 : 100;\r\n\t\t\t$number = floor($no % $divider);\r\n\t\t\t$no = floor($no / $divider);\r\n\t\t\t$i += ($divider == 10) ? 1 : 2;\r\n\t\t\tif ($number) {\r\n\t\t\t\t$plural = (($counter = count($str)) && $number > 9) ? 's' : null;\r\n\t\t\t\t$hundred = ($counter == 1 && $str[0]) ? ' and ' : null;\r\n\t\t\t\t$str [] = ($number < 21) ? $words[$number] .\r\n\t\t\t\t\t\" \" . $digits[$counter] . $plural . \" \" . $hundred\r\n\t\t\t\t\t:\r\n\t\t\t\t\t$words[floor($number / 10) * 10]\r\n\t\t\t\t\t. \" \" . $words[$number % 10] . \" \"\r\n\t\t\t\t\t. $digits[$counter] . $plural . \" \" . $hundred;\r\n\t\t\t} else $str[] = null;\r\n\t\t}\r\n\t\t$str = array_reverse($str);\r\n\t\t$result = implode('', $str);\r\n\t\t$points = $this->paiseValue($point);\r\n\r\n\t\t$finalStr = '';\r\n\r\n\t\tif(!empty($result)){\r\n\t\t\t$finalStr .= $result. \" Rupees \";\r\n\t\t}\r\n\t\tif(!empty($points)){\r\n\t\t\t$finalStr .= \"and \".$points. \" Paise\";\r\n\t\t}\r\n\t\tif(!empty($finalStr)){\r\n\t\t\t$finalStr .= \" Only.\";\r\n\t\t}\r\n\r\n\t\treturn $finalStr;\r\n\t}", "private function convert_dollars($number) {\n\n //check if argument is set to avoid error\n if(isset($number)) {\n //save original int number\n $number_int = (int)$number;\n\n //extract the whole numbers only (ie. excluding the cents) and convert to a string\n $number = (string)((int)$number_int); \n }\n\n //check if number is a number\n if(ctype_digit($number)) {\n\n //stores the numbers in words grouped into lots of thousands\n $words = array();\n\n //determine the precision of the number\n $precision = strlen($number);\n\n //determine the number of levels required in the currency format (ie. levels between the commas, lots of thousands)\n //for example 1 comma has 2 levels to start off with, each level and each level includes 3 decimal precisions to left\n $levels = (int) (($precision+2)/3);\n\n //determine the absolute maximum number of precision based on the levels\n $max_precision = $levels * 3;\n\n //group the numbers into groups 3 numerical precision\n $number = substr('00'.$number , -$max_precision);\n $num_levels = str_split($number, 3); \n\n //loop through each \n foreach($num_levels as $num_part) {\n\n //extract the hundreds precision followed by tens and single\n $levels--;\n $hundreds = (int)($num_part/100);\n $hundreds = ($hundreds ? ' ' . $this->list_singles[$hundreds] . ' Hundred' . ' ' : '' );\n $tens = (int)($num_part % 100);\n $singles = '';\n\n //if number less than 20\n if($tens < 20) {\n $tens = ( $tens ? ' ' . $this->list_singles[$tens] . ' ' : '' );\n } else {\n //number is greater than 20\n $tens = (int) ( $tens / 10 );\n $tens = $this->list_tens[$tens];\n $singles = (int) ( $num_part % 10 );\n $singles = $this->list_singles[$singles];\n }\n\n //put the words together including the thousand's plus precisions\n $words[] = $hundreds . (strlen($hundreds) && strlen($tens) ? $this->conjunction : '') . $tens . (strlen($singles)? $this->hyphen : '') . $singles . (($levels && (int) ( $num_part ) ) ? ' ' . $this->list_thousands[$levels] . ' ' : '');\n }\n\n //clean up and put words into grammically correct english\n $commas = count($words);\n $commas = ($commas > 1 ? $commas - 1 : $commas);\n $words = implode($this->separator,array_filter($words));\n\n //Some finishing touch\n //Replacing multiples of spaces with one space\n $words = trim(str_replace(' ,',',',$words),$this->separator);\n \n return $words . ' dollar' . ($number_int > 1 ? 's' : '');\n\n }\n }", "public static function asShortNumber($value)\r\n {\r\n if ($value >= 9500000) {\r\n return round($value / 1000000, 0) . \"m\";\r\n } else if ($value >= 950000) {\r\n return round($value / 1000000, 1) . \"m\";\r\n } else if ($value >= 95000) {\r\n return round($value / 1000, 0) . \"k\";\r\n } else if ($value >= 950) {\r\n return round($value / 1000, 1) . \"k\";\r\n } else {\r\n return round($value, 1);\r\n }\r\n }", "function mgl_instagram_instagram_format_number($number ) {\n // Set divisor divisor and short letter by number\n if( $number < 1000 ) {\n // If number is less than 1000 do nothing\n return $number;\n\n }else if ($number > 1000 && $number < 1000000) {\n // Anything between 1000 and a million\n $divisor = 1000;\n $letter = 'k';\n\n } else if ($number > 1000000 && $number < 1000000000) {\n // Anything between a million and a billion\n $divisor = 1000000;\n $letter = 'm';\n\n } else {\n // Anything greater than a billion\n $divisor = 1000000000;\n $letter = 'G';\n }\n\n // Set a decimal precision to 1\n $precision = 1;\n // Set dec point to ','\n // TODO: translate dec point by language\n $dec_point = ',';\n // Set thousand sep to '.'\n // TODO: translate thousand sep by language\n $thousand_sep = '.';\n // Remove extra decimals. Trick because of number_format below also always round up and causes weird results\n // More information: http://php.net/manual/es/function.number-format.php#88424\n $short_number = bcdiv( ( $number / $divisor ), 1, 1 );\n // Get formatted number\n $n_format = trim(number_format( $short_number, $precision, $dec_point, $thousand_sep), 0 . $dec_point) . $letter;\n\n return $n_format;\n}", "function opaljob_areasize_unit_format( $value='' ){\n return $value . ' ' . '<span>'.'m2'.'</span>';\n}", "function number_format($number, $type = _NUM_TYPE)\n\t{\n\t\tswitch ($type) {\n\t\t\tcase \"figure\":\n\t\t\t\treturn XoopsLocaleJalali::Convertnumber2farsi($number);\n\t\t\t\tbreak;\n\t\t\tcase \"word\":\n\t\t\t\treturn ($number > 0) ? self::num2Words($number) : _NUMWORDS_ZERO;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn $number;\n\t\t\t\tbreak;\n\t\t}\t\n\t}", "function formatAmountSimply($v,$t=1){\n return number_format($v,2,'.',',');\n}", "function bytesToHumanReadable (int $size, int $decimals = 2): string {\n\tif ($size >= 1 << 40)\n\t\treturn number_format($size / (1 << 40), $decimals).\"TB\";\n\tif ($size >= 1 << 30)\n\t\treturn number_format($size / (1 << 30), $decimals).\"GB\";\n\tif ($size >= 1 << 20)\n\t\treturn number_format($size / (1 << 20), $decimals).\"MB\";\n\tif ($size >= 1 << 10)\n\t\treturn number_format($size / (1 << 10), $decimals).\"KB\";\n\treturn number_format($size, $decimals).\"B\";\n}", "function convertNumber($num) {\n $count = 0;\n global $ones, $tens, $triplets;\n $ones = array(\n '',\n ' One',\n ' Two',\n ' Three',\n ' Four',\n ' Five',\n ' Six',\n ' Seven',\n ' Eight',\n ' Nine',\n ' Ten',\n ' Eleven',\n ' Twelve',\n ' Thirteen',\n ' Fourteen',\n ' Fifteen',\n ' Sixteen',\n ' Seventeen',\n ' Eighteen',\n ' Nineteen'\n );\n $tens = array(\n '',\n '',\n ' Twenty',\n ' Thirty',\n ' Forty',\n ' Fifty',\n ' Sixty',\n ' Seventy',\n ' Eighty',\n ' Ninety'\n );\n\n $triplets = array(\n '',\n ' Thousand',\n ' Million',\n ' Billion',\n ' Trillion',\n ' Quadrillion',\n ' Quintillion',\n ' Sextillion',\n ' Septillion',\n ' Octillion',\n ' Nonillion'\n );\n return convertNum($num);\n}", "function formatUnit($value,$name,$short_name,$symbol,$format)\n\t{\n\t $result=$format;\n\t $result=str_replace('%(v)',$value,$result);\n\t $result=str_replace('%(n)',$name,$result);\n\t $result=str_replace('%(sn)',$short_name,$result);\n\t $result=str_replace('%(s)',$symbol,$result);\n\t if ($result=='') {$result=$value;}\n\t return $result;\n\t}", "function formatSize($b)\n\t{\n\t\t//1024\t\tk\n\t\t//1048576\tm\n\t\t//1073741824\tg\n\n\t\tif ($b >= 1073741824)\n\t\t\t$thesize = round($b / 1073741824 * 100) / 100 . \"G\"; \n\t\telseif ($b >= 1048576)\n\t\t\t$thesize = round($b / 1048576 * 100) / 100 . \"MB\";\n\t\telseif ($b >= 1024)\n\t\t\t$thesize = round($b / 1024 * 100) / 100 . \"K\"; \n\t\telse\n\t\t\t$thesize = $b . \"b\";\n\n\t\treturn $thesize;\n\t}", "function to_feetinches($mm,$denom) {\n #\n # Arguments:\n # mm - length in millimeters\n # denom - accuracy in fractions of an inch, e.g. 1/8, 1/6, etc\n #\n $in_frac = round($mm/25.4*$denom,0,PHP_ROUND_HALF_UP);\n $inches = floor($in_frac/$denom);\n $num = $in_frac % $denom;\n $gcd = gcd($num,$denom);\n $num = $num/$gcd;\n $denom = $denom/$gcd;\n $feet = floor($inches/12);\n $inches = $inches % 12;\n $retval = \"\";\n if ($num == 0) {\n $retval = $feet . \"'-\" . $inches . \"\\\"\";\n }\n else {\n $retval = $feet . \"'-\" . $inches . \" \" . $num . \"/\" . $denom . \"\\\"\";\n }\n return $retval;\n}", "function number_format_i18n($number, $decimals = 0)\n {\n }", "public function formatNumber($number);", "function nice_number($n) {\r\n // first strip any formatting;\r\n $n = (0+str_replace(\",\",\"\",$n));\r\n\r\n // is this a number?\r\n if(!is_numeric($n)) return false;\r\n\r\n // now filter it;\r\n if($n>1000000000000) return round(($n/1000000000000),2).' trillion';\r\n else if($n>1000000000) return round(($n/1000000000),2).' billion';\r\n else if($n>1000000) return round(($n/1000000),2).' million';\r\n else if($n>1000) return round(($n/1000),2).' thousand';\r\n\r\n return number_format($n);\r\n}", "function th($number) {\n\treturn number_format(intval($number));\n}", "function formatRawSize($bytes) {\n if(!empty($bytes)) {\n\n $s = array('bytes', 'kb', 'MB', 'GB', 'TB', 'PB');\n $e = floor(log($bytes)/log(1024));\n\n $output = sprintf('%.2f '.$s[$e], ($bytes/pow(1024, floor($e))));\n\n return $output;\n }\n}", "protected function _convertDimension($size) \n {\n if($this->commerceDimensionUnit === 'mm')\n {\n return $size/10;\n }\n\n if($this->commerceDimensionUnit === 'm')\n {\n return $size*100;\n } \n \n if($this->commerceDimensionUnit === 'ft')\n {\n return $size*30.48;\n }\n\n if($this->commerceDimensionUnit === 'in')\n {\n return $size*2.54;\n }\n\n // centimeters\n return $size;\n }", "function sizeFormat($size) { \n if($size<1024) \n { \n return $size.\" bytes\"; \n } \n else if($size<(1024*1024)) \n { \n $size=round($size/1024,1); \n return $size.\" KB\"; \n } \n else if($size<(1024*1024*1024)) \n { \n $size=round($size/(1024*1024),1); \n return $size.\" MB\"; \n } \n else \n { \n $size=round($size/(1024*1024*1024),1); \n return $size.\" GB\"; \n } \n}", "function tmpl_let_to_num( $size ) {\r\n\t\t$l = substr( $size, -1 );\r\n\t\t$ret = substr( $size, 0, -1 );\r\n\t\tswitch ( strtoupper( $l ) ) {\r\n\t\t\tcase 'P':\r\n\t\t\t\t$ret *= 1024;\r\n\t\t\tcase 'T':\r\n\t\t\t\t$ret *= 1024;\r\n\t\t\tcase 'G':\r\n\t\t\t\t$ret *= 1024;\r\n\t\t\tcase 'M':\r\n\t\t\t\t$ret *= 1024;\r\n\t\t\tcase 'K':\r\n\t\t\t\t$ret *= 1024;\r\n\t\t}\r\n\t\treturn $ret;\r\n\t}", "function format_filesize($size)\r\n{\r\n\r\n // Measure & Number of decimals\r\n $measures = array (\r\n 0 => array ( \"B\", 0 ),\r\n 1 => array ( \"KB\", 0 ),\r\n 2 => array ( \"MB\", 0 ),\r\n 3 => array ( \"GB\", 2 ),\r\n 4 => array ( \"TB\", 3 )\r\n );\r\n\r\n $file_size = (double)$size;\r\n\r\n for ( $i = 0; $file_size >= 1024; $i++ )\r\n {\r\n $file_size = (double)$file_size / 1024;\r\n }\r\n\r\n $file_size = number_format ( $file_size, $measures[$i][1] );\r\n\r\n return $file_size.\" \".$measures[$i][0];\r\n}", "private function _formatConvert($number)\n {\n if ($this->round) {\n $n = floor($number);\n $fraction = ($number - $n);\n if ($fraction != 0) {\n $step = 1 / $this->round;\n $decimal = (((int)($fraction / $step) + 1) * $step);\n $number = $n + $decimal;\n }\n }\n $number = number_format($number, $this->decimal);\n\n return number_format($number, $this->decimal);\n }", "function _parseSize($size)\r\n\t{\r\n\t\tif ($size < 1024) {\r\n\t\t\treturn $size . ' bytes';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif ($size >= 1024 && $size < 1024 * 1024) {\r\n\t\t\t\treturn sprintf('%01.2f', $size / 1024.0) . ' Kb';\r\n\t\t\t} else {\r\n\t\t\t\treturn sprintf('%01.2f', $size / (1024.0 * 1024)) . ' Mb';\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function twe_format_filesize($size) {\n\t$a = array(\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"PB\");\n\t\n\t$pos = 0;\n\twhile ($size >= 1024) {\n\t\t$size /= 1024;\n\t\t$pos++;\n\t}\n\treturn round($size,2).\" \".$a[$pos];\n}", "function megastokas($num){\r\n\t\treturn $num*1024;\r\n\t}", "private function formatMemory(int $memory): string\n {\n return sprintf('%s MB', $memory / 1024 / 1024);\n }", "public static function toDataSizeString($size, $scale = 1024, $unit = 'oct', $kilo = 'Ko', $mega = 'Mo', $giga = 'Go', $tera = 'To') {\r\n if ($size < $scale) {\r\n return $size . ' ' . $unit;\r\n } elseif ($size < ($scale * $scale)) {\r\n return sprintf('%01.2f ' . $kilo, $size / $scale);\r\n } elseif ($size < ($scale * $scale * $scale)) {\r\n return sprintf('%01.2f ' . $mega, $size / ($scale * $scale));\r\n } elseif ($size < ($scale * $scale * $scale * $scale)) {\r\n return sprintf('%01.2f ' . $giga, $size / ($scale * $scale * $scale));\r\n }\r\n return sprintf('%01.2f ' . $tera, $size / ($scale * $scale * $scale * $scale));\r\n }", "function let_to_num($v){ //This function transforms the php.ini notation for numbers (like '2M') to an integer (2*1024*1024 in this case)\n $l = substr($v, -1);\n $ret = substr($v, 0, -1);\n switch(strtoupper($l)){\n case 'P': $ret *= 1024;\n case 'T': $ret *= 1024;\n case 'G': $ret *= 1024;\n case 'M': $ret *= 1024;\n case 'K': $ret *= 1024;\n break;\n }\n return $ret;\n}", "function utilgsmnumber($number){\n return $number;\n }", "static public function formatUnits($str){\n\n $str = strtr($str, self::FORMATS);\n\n return $str;\n }", "function convertToBytes($from){\n $number=substr($from,0,-1);\n switch(strtoupper(substr($from,-1))){\n case \"K\":\n return $number*1024;\n case \"M\":\n return $number*pow(1024,2);\n case \"G\":\n return $number*pow(1024,3);\n default:\n return $from;\n }\n}", "public static function formatSize($size)\n {\n if ($size < DRUSH_KILOBYTE) {\n // format_plural() not always available.\n return dt('@count bytes', ['@count' => $size]);\n } else {\n $size /= DRUSH_KILOBYTE; // Convert bytes to kilobytes.\n $units = [\n dt('@size KB', []),\n dt('@size MB', []),\n dt('@size GB', []),\n dt('@size TB', []),\n dt('@size PB', []),\n dt('@size EB', []),\n dt('@size ZB', []),\n dt('@size YB', []),\n ];\n foreach ($units as $unit) {\n if (round($size, 2) >= DRUSH_KILOBYTE) {\n $size /= DRUSH_KILOBYTE;\n } else {\n break;\n }\n }\n return str_replace('@size', round($size, 2), $unit);\n }\n }", "function timify($input) {return \"about \".round($input*100)/100;}", "function nb2chiffres($nb){\n\treturn sprintf(\"%02d\", $nb);\n}", "public static function _convertir($num)\n {\n //formatea el monto original a formato entendido por MySQL\n $_parse = numfmt_create('es_ES',\\NumberFormatter::DECIMAL);\n\n $_result = numfmt_parse($_parse,$num);\n\n return $_result;\n }", "public function let_to_num( $size ) {\n\t\t$l = substr( $size, - 1 );\n\t\t$ret = substr( $size, 0, - 1 );\n\t\tswitch ( strtoupper( $l ) ) {\n\t\t\tcase 'P':\n\t\t\t\t$ret *= 1024;\n\t\t\tcase 'T':\n\t\t\t\t$ret *= 1024;\n\t\t\tcase 'G':\n\t\t\t\t$ret *= 1024;\n\t\t\tcase 'M':\n\t\t\t\t$ret *= 1024;\n\t\t\tcase 'K':\n\t\t\t\t$ret *= 1024;\n\t\t}\n\n\t\treturn $ret;\n\t}", "public static function humanSize(int $size, ?string $unit = null): string\n {\n if (($unit === null && $size >= 1 << 30) || $unit === 'GB') {\n return number_format($size / (1 << 30), 2) . 'GB';\n }\n\n if (($unit === null && $size >= 1 << 20) || $unit === 'MB') {\n return number_format($size / (1 << 20), 2) . 'MB';\n }\n\n if (($unit === null && $size >= 1 << 10) || $unit === 'KB') {\n return number_format($size / (1 << 10), 2) . 'KB';\n }\n\n return number_format($size) . ' bytes';\n }", "function transByte($size){\n\t$arr = array(\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"EB\");\n\t$i = 0;\n\twhile($size>1024){\n\t\t$size/=1024;\n\t\t$i++;\n\t}\n\treturn round($size,2).$arr[$i];\n}", "public function money($m){\n return number_format($m).' VND';\n }" ]
[ "0.6879596", "0.6768327", "0.6676596", "0.65416396", "0.65198535", "0.649551", "0.6478991", "0.6467862", "0.64666617", "0.6454937", "0.6412401", "0.6366919", "0.6365933", "0.63396466", "0.63339", "0.63155466", "0.62889093", "0.6283369", "0.6255441", "0.6254536", "0.62318295", "0.62092644", "0.61952144", "0.6176178", "0.61676854", "0.61389756", "0.61149406", "0.6099172", "0.60935557", "0.60783225", "0.6069676", "0.60402805", "0.60367", "0.6018796", "0.6017649", "0.5999971", "0.59934103", "0.5991829", "0.59895664", "0.59895664", "0.597524", "0.5969106", "0.5946132", "0.5939253", "0.59324205", "0.5918488", "0.59128386", "0.5912247", "0.5911093", "0.59062564", "0.5899468", "0.58979696", "0.5896297", "0.58838505", "0.5882373", "0.5863148", "0.58625305", "0.5858167", "0.58492386", "0.58464354", "0.58430046", "0.5838684", "0.58270466", "0.5803043", "0.5799058", "0.57932395", "0.57839185", "0.5773807", "0.57733905", "0.57599926", "0.5758155", "0.57452595", "0.5734693", "0.5728125", "0.57225573", "0.5713598", "0.57075065", "0.56953406", "0.56859356", "0.5659889", "0.56490135", "0.5624136", "0.56208235", "0.56169325", "0.5607117", "0.56013495", "0.5591252", "0.55911106", "0.5586771", "0.5580033", "0.5578414", "0.5569506", "0.556811", "0.55577564", "0.55442935", "0.55394316", "0.55333805", "0.55280375", "0.55242735", "0.5520189" ]
0.6804817
1
Run the database seeds.
public function run() { // $this->seedTestForms($faker); }
{ "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
/ Gestion des Joueurs
function insertJoueurs ($tab) { $con = connexion (); if($con != null) { $requete = "insert into joueurs values (null,'".$tab['nom']."','".$tab['prenom']."','".$tab['age']."');"; mysqli_query($con, $requete); deconnexion($con); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function affectation()\n {\n session_start();\n $bdd = new PDO('mysql:host=localhost;dbname=projet', 'root', '', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));\n $allmsg = $bdd->query('SELECT * FROM role ORDER BY ordre ASC ');\n //on va devoir ajouter une colonne dans la BD ca sera le pseudo du joueur on va voir ca\n while($msg= $allmsg->fetch())\n {\n ?>\n <br> <b><?php echo $msg['pseudo'].' a choisis le rôle: ' . $msg['role']. ' !' ?> </b> </br>\n <?php\n }\n\n //nombre de lignes dans la table\n $JoueursRestant = 7 - $allmsg->rowCount();\n\n if($JoueursRestant != 0)\n {\n echo \" <p id='avantlancer1'> En attente de \". $JoueursRestant .\" Joueurs</p>\t<img src=\\\"ajax-loader.gif\\\" alt=\\\"patientez...\\\" id='ajax'> </br>\";\n }\n else{\n echo '<p id=\"avantlancer2\">La partie va commencer dans: <p/>';\n\n\n }\n\n }", "public function listar() {\n\t\t//Esta funcion solo la puede hacer el organizador, hay que poner al inicio de todo una comprobacion\n\t\t//de sesion, falta cambiar\n\t\t$juradoL = $this -> JuradoMapper -> findAll();\n\t\t$this -> view -> setVariable(\"jurado\", $juradoL);\n\t\t//falta agregar la vista, no se continuar\n\t\t$this -> view -> render(\"jurado\", \"listar\");\n\t\t//falta cambiar\n\t}", "public function accueilAction () {\n\t\t$session = $_SESSION['ident'];\n\t\t$app_title=\"Connexion \" ;\n\t\t$app_body=\"Body_Connecte\" ;\n\t\t$app_desc=\"Comeca\" ;\n\t\t// si l admin est connecté\n\t\t$auth = $this->authModule->estConnecte();\n\t\t// si connecté => redirection vers indexAction de CategorieController \n\t\trequire_once('Model/SqlModel.php');\n\t\t\n\t\t$AttenteModel = new SqlModel();\n\t\t$ListeAttente = $AttenteModel->AfficheEnAttente();\n \n\t\trequire('View/Connecte/accueil.php') ;\n\t}", "public function lectureContenu ()\n {\n\n //$metadata = simplexml_load_file(\"xmoddledata/metadata.xml\");\n\n // on Vérifie si le cours existe\n\n /* @TODO Partie à décommenter lorsque le module de navigation sera intégré au reste de l'application */\n\n // $nbrCours = $metadata->attributes()->nbrCours;\n // $isFound = false;\n // $i = 0;\n // for ($i = 0; $i < $nbrCours; $i++) {\n // if ($metadata->cours[$i]->attributes()->title == $title && $metadata->cours[$i]->attributes()->id == $id) {\n // $isFound = true;\n // break;\n // }\n // }\n\n // if ($isFound) {\n //$cours = simplexml_load_file(\"xmoddledata/\" . $metadata->cours[$i]->attributes()->id . \"_\" . $metadata->cours[$i]->attributes()->title . \"/description.xml\"); \n\n $description = simplexml_load_file('xmoddledata/2_ModeleDeSupport2/description.xml');\n $notions = simplexml_load_file('xmoddledata/2_ModeleDeSupport2/descriptionNotions.xml');\n\n // Création d'un tableau associatif de notions avec l'id comme clé\n\n $notionsArray = $this->getNotions($notions);\n\n // Construction de la navigation\n $text_parties = \"\";\n $nav_parties = [];\n for ($i = 0; $i < $description->attributes()->nbrParties; $i++) {\n $text_parties = \"<div style='\";\n $text_parties .= $this->getStyle($description->partie[$i]->attributes());\n $text_parties .= \"'\";\n $text_parties .= \" id='\".$i.\"'>\";\n $nav_chapitres = [];\n $text_parties .= $description->partie[$i]->attributes()->title;\n $text_parties .= \"</div>\";\n $text_parties .= \"<br/><br/>\";\n $text_chapitres = \"\";\n for ($j = 0; $j < $description->partie[$i]->attributes()->nbrChapitres; $j++) {\n $text_chapitres .= \"<div style='\";\n $text_chapitres .= $this->getStyle($description->partie[$i]->chapitre[$j]->attributes());\n $text_chapitres .= \"'\";\n $text_chapitres .= \" id='\".$i.\"_\".$j.\"'>\";\n $nav_paragraphes = [];\n $text_chapitres .= $description->partie[$i]->chapitre[$j]->attributes()->title;\n $text_chapitres .= \"</div>\";\n $text_chapitres .= \"<br/><br/>\";\n $text_paragraphes = \"\";\n for ($k = 0; $k < $description->partie[$i]->chapitre[$j]->attributes()->nbrParagraphes; $k++) {\n // On renseigne le titre du paragraphe\n $text_paragraphes .= \"<div style='\";\n $text_paragraphes .= $this->getStyle($description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes());\n $text_paragraphes .= \"'\";\n // Ajout d'un ancre de navigation\n $text_paragraphes .= \" id='\".$i.\"_\".$j.\"_\".$k.\"'>\";\n $text_paragraphes .= $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->title;\n $text_paragraphes .= \"</div>\";\n $text_paragraphes .= \"<br/>\";\n // Navigation avec paragraphes\n $nav_paragraphes[\"\".$i.\"_\".$j.\"_\".$k] = $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->title;\n // On remplit les notions contenus dans le paragraphe\n for ($l = 0; $l < $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->nbrNotions; $l++) {\n $text_paragraphes .= $notionsArray[\"\".$description->partie[$i]->chapitre[$j]->paragraphe[$k]->notion[$l]->attributes()->id];\n }\n }\n $text_chapitres .= $text_paragraphes;\n $nav_chapitres[\"\".$i.\"_\".$j] = $nav_paragraphes;\n }\n $text_parties .= $text_chapitres;\n $nav_parties[\"\".$i] = $nav_chapitres;\n }\n// dd($nav_parties);\n// dd($navigation);\n// dd($description);\n\n // Construction de la page web\n $titre = $description->attributes()->title;\n// dd($description);\n// forearch( $navigation->partie[] as $partie) {\n// dd($pantie);\n// }\n// dd($titre);\n\n\n // $notions = simplexml_load_file(\"../../../fichiersdestructuration/descriptionNotions.xml\");\n\n\n // $nbrNotions = $cours->attributes()->nbrNotions;\n // $notionsConvertis = array();\n // for ($i = 0; $i < $nbrNotions; $i++) {\n // $attributs = $cours->notion[$i]->attributes();\n // $style = \"\";\n // if ($attributs['font-weight'] != null) {\n // $style .= 'font-weight:' . $attributs['font-weight'] . \";\";\n // }\n // if ($attributs['font-size'] != null) {\n // $style .= 'font-size:' . $attributs['font-size'] . \";\";\n // }\n\n // if ($attributs['font-family'] != null) {\n // $style .= 'font-family:' . $attributs['font-family'] . \";\";\n // }\n\n // if ($attributs['color'] != null) {\n // $style .= 'color:' . $attributs['color'] . \";\";\n // }\n\n // if ($attributs['text-decoration'] != null) {\n // $style .= 'text-decoration:' . $attributs['text-decoration'] . \";\";\n // }\n\n // $text = \"\";\n // foreach ($cours->notion[$i]->children() as $child) {\n // $text .= $child->asXML();\n // }\n // $notionHtml = \"<div style='\";\n // $notionHtml .= $style;\n // $notionHtml .= \"'>\";\n // $notionHtml .= $text;\n // $notionHtml .= \"</div>\";\n\n\n // //dd(strval($text));\n // array_push($notionsConvertis, $notionHtml);\n\n // }\n // }else{\n // return view(\"/\");\n // }\n //$notions = $notionsConvertis;\n // return response()->json($notions,200);\n\n // return \"lecture cours\";\n return 0;\n }", "public function AsistenciaJugadores()\n\t{\n\t\t$data['contenido'] = \"Contenido de Asistencia para Jugadores\"; /* Identificador para la carga en la vista */\n\n\t\t$this->load->view(\"jugador/AsistenciaJugadores\",$data);\n\t}", "function editor_joins(){\n //\n //begin with an empty collection of joins \n $joins=[];\n //\n //Push the editor joins also\n foreach ($this->editor_joins as $join){\n array_push($joins, $join);\n }\n //\n //Set the new joins \n $this->joins=new joins($joins);\n }", "function modalidades_juegos_admin_listar ( ) {\t\n\t$result_set_Modalidad_Juego = db_query( \"SELECT * FROM {eSM_Modalidad_Juego} ORDER BY id_Modalidad_Juego ASC\" );\n\t\t\n\t$output = '<div class=\"form_item\">Lista de modalidades dadas de alta en la base de datos.</div>';\n\t$header = array (t('Name'), t('Plataforma'), t('Game'), t('Min Jugadores'), t('Max Jugadores'), '');\n\t\n\t//Pondremos un listado de modalidads disponibles\n\twhile( $Modalidad_Juego = db_fetch_object( $result_set_Modalidad_Juego ) ) {\n\t\t$result_set_Plataforma = db_query( \"SELECT * from {eSM_Plataforma} WHERE id_Plataforma = %d \", $Modalidad_Juego->id_Plataforma );\n\t\t\n\t\t$Plataforma = db_fetch_object( $result_set_Plataforma );\n\t\t\n\t\t$row = array();\n\t\t$row[] = $Modalidad_Juego->Nombre;\t\t\t\n\t\t$row[] = $Plataforma->Nombre;\n\t\t$row[] = $Modalidad_Juego->Nombre_Juego;\n\t\t$row[] = $Modalidad_Juego->Minimo_Jugadores;\n\t\t$row[] = $Modalidad_Juego->Maximo_Jugadores;\n\t\t$row[] = l( t( 'Editar' ), 'admin/base_datos_externa/modalidades/'.$Modalidad_Juego->id_Modalidad_Juego.'/editar' );\n\t\t\n\t\t$rows[] = $row;\n\t}\n\t$output .= theme('table', $header, $rows);\n\t\n\t$output .= l(t('Agregar modalidad'), 'admin/base_datos_externa/modalidades/insertar');\n\treturn $output;\n}", "public function run()\n {\n \t$juiciouser = new Juiciouser();\n\t\t$juiciouser->juicio_id = 1;\n\t\t$juiciouser->user_id = 2;\n\t\t$juiciouser->role_id = 2;\n\t\t$juiciouser->save();\n\n\t\t$juiciouser = new Juiciouser();\n\t\t$juiciouser->juicio_id = 1;\n\t\t$juiciouser->user_id = 3;\n\t\t$juiciouser->role_id = 3;\n\t\t$juiciouser->save();\n\n\t\t$juiciouser = new Juiciouser();\n\t\t$juiciouser->juicio_id = 1;\n\t\t$juiciouser->user_id = 4;\n\t\t$juiciouser->role_id = 4;\n\t\t$juiciouser->save();\n\n\t\t$juiciouser = new Juiciouser();\n\t\t$juiciouser->juicio_id = 2;\n\t\t$juiciouser->user_id = 2;\n\t\t$juiciouser->role_id = 2;\n\t\t$juiciouser->save();\n\n\t\t$juiciouser = new Juiciouser();\n\t\t$juiciouser->juicio_id = 2;\n\t\t$juiciouser->user_id = 3;\n\t\t$juiciouser->role_id = 3;\n\t\t$juiciouser->save();\n\n\t\t$juiciouser = new Juiciouser();\n\t\t$juiciouser->juicio_id = 2;\n\t\t$juiciouser->user_id = 4;\n\t\t$juiciouser->role_id = 4;\n\t\t$juiciouser->save();\n\n\t\t$juiciouser = new Juiciouser();\n\t\t$juiciouser->juicio_id = 3;\n\t\t$juiciouser->user_id = 2;\n\t\t$juiciouser->role_id = 2;\n\t\t$juiciouser->save();\n\n\t\t$juiciouser = new Juiciouser();\n\t\t$juiciouser->juicio_id = 3;\n\t\t$juiciouser->user_id = 3;\n\t\t$juiciouser->role_id = 3;\n\t\t$juiciouser->save();\n\n\t\t$juiciouser = new Juiciouser();\n\t\t$juiciouser->juicio_id = 3;\n\t\t$juiciouser->user_id = 4;\n\t\t$juiciouser->role_id = 4;\n\t\t$juiciouser->save();\n\n\t\t$juiciouser = new Juiciouser();\n\t\t$juiciouser->juicio_id = 4;\n\t\t$juiciouser->user_id = 2;\n\t\t$juiciouser->role_id = 2;\n\t\t$juiciouser->save();\n\n\t\t$juiciouser = new Juiciouser();\n\t\t$juiciouser->juicio_id = 4;\n\t\t$juiciouser->user_id = 3;\n\t\t$juiciouser->role_id = 3;\n\t\t$juiciouser->save();\n\n\t\t$juiciouser = new Juiciouser();\n\t\t$juiciouser->juicio_id = 4;\n\t\t$juiciouser->user_id = 4;\n\t\t$juiciouser->role_id = 4;\n\t\t$juiciouser->save();\n\n }", "private function listauteur() {\n\t\t$this->_ctrlAuteur = new ControleurAuteur();\n\t\t// cree un auteur\n\t\tif(isset($_SESSION['error_auteur_cree'])) {unset($_SESSION['error_auteur_cree']); }\n\t\tif(isset($_POST['cree_auteur'])) {\n\t\t\t$nom = Utils::getPost('nom_auteur');\n\t\t\tif ($nom ) {\n\t\t\t\t$nom = Utils::filtreForte($nom);\n\t\t\t\tif (strlen($nom) > 2) { \n\t\t\t\t\t$this->_ctrlAuteur->creeAuteur($nom);\n\t\t\t\t} else {\n\t\t\t\t\t\t\t$_SESSION['error_auteur_cree'] = 'Minimum trois caractères !!!';\n\t\t\t\t\t\t\theader(\"Location: index.php?controler=ajoutauteur\");\n\t\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Exception('Valeur introdui incorect !!!');\n\t\t\t}\n\t\t} \n\n\t\t// modifie un auteur\n\t\tif(isset($_SESSION['error_auteur_modifie'])) unset($_SESSION['error_auteur_modifie']);\n\t\tif(isset($_POST['modifie_auteur'])){\n\t\t\t$nom = Utils::getPost('nom_auteur_m');\n\t\t\t$id = Utils::getPost('id_auteur_m');\n\t\t\tif ($nom && $id) {\n\t\t\t\t\t$id = Utils::filtreForte($id);\n\t\t\t\t\t$nom = Utils::filtreForte($nom);\n\t\t\t\t\t\tif (strlen($nom) > 2) {\n\t\t\t\t\t\t\t$this->_ctrlAuteur->auteurModifieBD($id, $nom);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$_SESSION['error_auteur_modifie'] = 'Minimum trois caractères !!!';\n\t\t\t\t\t\t\theader(\"Location: index.php?controler=mauteur&id=\".$id);\n\t\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception('Valeur introdui incorect !!!');\n\t\t\t\t}\n\n\t\t}\n\n\t\t$this->_ctrlAuteur->auteurListe();\n\t}", "public function accueilAction () {\n\t\t$session = $_SESSION['ident'];\n\t\t$app_title=\"Connexion \" ;\n\t\t$app_body=\"Body_Connecte\" ;\n\t\t$app_desc=\"Comeca\" ;\n\t\t// si l admin est connecté\n\t\t$auth = $this->authModule->estConnecte();\n\n\t\trequire_once('Model/SqlModel.php');\n\t\t$AttenteModel = new SqlModel();\n\t\t\t\t \n\t\t$ListeAttente = $AttenteModel->AfficheEnAttente();\n\n\t\trequire('View/Connecte/accueil.php') ;\n\t}", "function replace_journo() {\n $this->add_journo(TRUE);\n }", "public function acessarRelatorios(){\n\n }", "function index() {\n global $autorias;\n global $autores;\n global $livros;\n $autorias = buscarRegistros('tab_autorias');\n $autores = buscarRegistros('tab_autor');\n $livros = buscarRegistros('tab_livro');\n }", "public function getIdJoueur() {\n\t\treturn $this->idJoueur;\n\t}", "public function run()\n {\n //\n $list_admin = new \\App\\Liste_Administratif();\n $list_admin->id=1;\n $list_admin->libelle=\"1 copie originale de l'extrait de naissance\";\n $list_admin->save();\n $list_admin = new \\App\\Liste_Administratif();\n $list_admin->id=2;\n $list_admin->libelle=\"1 photocopie de la carte nationnale d'identité\";\n $list_admin->save();\n $list_admin = new \\App\\Liste_Administratif();\n $list_admin->id=3;\n $list_admin->libelle=\"2 photo d'identité couleur du même tirage\";\n $list_admin->save();\n $list_admin = new \\App\\Liste_Administratif();\n $list_admin->id=4;\n $list_admin->libelle=\"1 photocopie de l'extrait d'acte de naissance des descendants\";\n $list_admin->save();\n $list_admin = new \\App\\Liste_Administratif();\n $list_admin->id=5;\n $list_admin->libelle=\"1 photocopie de l'extrait d'acte de naissance du conjoint\";\n $list_admin->save();\n $list_admin = new \\App\\Liste_Administratif();\n $list_admin->id=6;\n $list_admin->libelle=\"1 photocopie de l'extrait d'acte de mariage\";\n $list_admin->save();\n $list_admin = new \\App\\Liste_Administratif();\n $list_admin->id=7;\n $list_admin->libelle=\"1 photocopie du certificat de célébration du mariage\";\n $list_admin->save();\n $list_admin = new \\App\\Liste_Administratif();\n $list_admin->id=8;\n $list_admin->libelle=\"1 photo d'identité récente des membres de sa famille\";\n $list_admin->save(); $list_admin = new \\App\\Liste_Administratif();\n $list_admin->id=9;\n $list_admin->libelle=\"1 photocopie du ou des diplômes\";\n $list_admin->save();\n $list_admin = new \\App\\Liste_Administratif();\n $list_admin->id=10;\n $list_admin->libelle=\"1 copie du curriculum vitaé actualisé\";\n $list_admin->save();\n $list_admin = new \\App\\Liste_Administratif();\n $list_admin->id=11;\n $list_admin->libelle=\"1 photocopie du ou des certificats de travail (personne en activité ou ayant déjà travaillé)\";\n $list_admin->save();\n $list_admin = new \\App\\Liste_Administratif();\n $list_admin->id=12;\n $list_admin->libelle=\"1 copie du dernier bulletin de salaire\";\n $list_admin->save();\n $list_admin = new \\App\\Liste_Administratif();\n $list_admin->id=13;\n $list_admin->libelle=\"1 copie des attestations de stage\";\n $list_admin->save();\n $list_admin = new \\App\\Liste_Administratif();\n $list_admin->id=14;\n $list_admin->libelle=\"1 copie de l'attestations d'immatriculation CNPS ou numéro sur support\";\n $list_admin->save();\n $list_admin = new \\App\\Liste_Administratif();\n $list_admin->id=15;\n $list_admin->libelle=\"les justificatifs de formation continue ou d'apprentissage\";\n $list_admin->save();\n $list_admin = new \\App\\Liste_Administratif();\n $list_admin->id=16;\n $list_admin->libelle=\"1 relevé d'identité bancaire (RIB)\";\n $list_admin->save();\n\n\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $relationUserEntites = $em->getRepository('UsersBundle:RelationUserEntite')->findByUser();\n if(count($relationUserEntites))\n foreach($relationUserEntites as &$ue) {\n $fonction = $em->getRepository('UsersBundle:Back\\UsersParamRelationsFonctions')->findOneBy(['id' => $ue->getIDRelationFonctionnelle()]);\n if( $fonction ) {\n $ue->setRelations_fonction($fonction);\n $ue->setService($em->getRepository('UsersBundle:Back\\ParamServices')->findOneBy(['id' => $fonction->getIDService()]));\n }\n \n }\n\n\n return $this->render('UsersBundle:relationuserentite:index.html.twig', array(\n 'relationUserEntites' => $relationUserEntites,\n ));\n }", "private function empezarJuego() {\n $this->tateti = new TatetiJuego(); // Se crea el juego\n $respuesta = ['accion' => 'empezar', 'sgteTurno' => $this->tateti->getTurno()];\n // se emite el mensaje a cada jugador\n foreach ($this->jugadores as $jugador) {\n $jugador['conexion']->send(json_encode($respuesta));\n }\n }", "function act_tipo_entrada(){\n\t\t$u= new Tipo_entrada();\n\t\t$related = $u->from_array($_POST);\n\n\t\t// save with the related objects\n\t\tif($u->save($related))\n\t\t{\n\t\t\techo \"<html> <script>alert(\\\"Se han actualizado los datos del Tipo de Entrada.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/\".$GLOBALS['ruta'].\"/menu';</script></html>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tshow_error(\"\".$u->error->string);\n\t\t}\n\t}", "private function liste() {\n\t\t$this->_ctrlLivre = new ControleurLivre();\n\n\t\t// modifie livre\n\t\tif(isset($_SESSION['error_livre_modifie'])) unset($_SESSION['error_livre_modifie']);\n\t\tif(isset($_POST['modifie_livre'])){\n\t\t\t\t$id = Utils::getPost('id_livre_m');\n\t\t\t\t$titre = Utils::getPost('nom_livre_m');\n\t\t\t\t$annee = Utils::getPost('annee_livre_m');\n\t\t\t\t$auteur = Utils::getPost('auteur_livre_m');\n\t\t\t\t$resume = Utils::getPost('resume_livre_m');\n\t\t\t\tif ($id && $titre && $annee && $auteur && $resume) {\n\t\t\t\t\t$id = Utils::filtreForte($id);\n\t\t\t\t\t$annee = Utils::filtreForte($annee);\n\t\t\t\t\t$annee = intval($annee);\n\t\t\t\t\t$titre = Utils::filtreForte($titre);\n\t\t\t\t\t$auteur = Utils::filtreForte($auteur);\n\t\t\t\t\t$resume = Utils::filtreForte($resume);\n\t\t\t\t\t\tif (strlen($annee) > 2 && strlen($titre) > 2 && strlen($resume) > 2) {\n\t\t\t\t\t\t\t$this->_ctrlLivre->modifieLivre($id, $annee, $titre, $auteur, $resume);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$_SESSION['error_livre_modifie'] = 'Minimum trois caractères !!!';\n\t\t\t\t\t\t\theader(\"Location: index.php?controler=mlivre&id=\".$id);\n\t\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception('Valeur introdui incorect !!!');\n\t\t\t\t}\n\t\t\t}\n\n\t\t// cree livre\n\t\tif(isset($_SESSION['error_livre_cree'])) unset($_SESSION['error_livre_cree']);\n\t\tif(isset($_POST['cree_livre'])){\n\t\t\t\t$titre = Utils::getPost('nom_livre');\n\t\t\t\t$annee = Utils::getPost('annee_livre');\n\t\t\t\t$auteur = Utils::getPost('auteur_livre');\n\t\t\t\t$resume = Utils::getPost('resume_livre');\n\t\t\t\tif ($titre && $annee && $auteur && $resume) {\n\t\t\t\t\t$annee = Utils::filtreForte($annee);\n\t\t\t\t\t$annee = intval($annee);\n\t\t\t\t\t$titre = Utils::filtreForte($titre);\n\t\t\t\t\t$auteur = Utils::filtreForte($auteur);\n\t\t\t\t\t$resume = Utils::filtreForte($resume);\n\t\t\t\t\t\tif (strlen($annee) > 2 && strlen($titre) > 2 && strlen($resume) > 2) {\n\t\t\t\t\t\t\t$this->_ctrlLivre->creeLivre($annee, $titre, $auteur, $resume);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$_SESSION['error_livre_cree'] = 'Minimum trois caractères !!!';\n\t\t\t\t\t\t\theader(\"Location: index.php?controler=ajoutuser\");\n\t\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception('Valeur introdui incorect !!!');\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t$filtreArray = ['titre', 'annee', 'nom_auteur'];\n\t\t$ordreArray = ['ASC', 'DESC'];\n\t\t\tif(Utils::getGet('filtre')&& Utils::getGet('ordre')) {\n\t\t\t\t\t\t\t$filtre = Utils::getGet('filtre');\n\t\t\t\t\t\t\t$ordre = Utils::getGet('ordre');\n\t\t\t\t\t\t\tif (!$filtre || !in_array($filtre, $filtreArray)) { \n\t\t\t\t\t\t\t\tthrow new Exception('Tri invalide !!!'); }\n\t\t\t\t\t\t\t\telseif (!$ordre || !in_array($ordre, $ordreArray)) { \n\t\t\t\t\t\t\t\t\tthrow new Exception('Ordre invalide !!!'); } \n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t$this->_ctrlLivre->livreListe($filtre,$ordre); \n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { $this->_ctrlLivre->livreListe(); }\n\t}", "public function getJoueur()\n\t{\n\t\t$cnx=new database();\n\t\t\n\t\t$req = $cnx->_db->query('SELECT * FROM joueurs');\t\n\t\t// $req_q=$req->fetch();\t\t\n\t\treturn $req;\n\t}", "public function juego(array $datos=array()) {\r\n \r\n if(isset($_GET['p3'])){\r\n //$articulo_nombre = str_replace(\"-\", \" \", $_GET['p4']);\r\n //$articulo_nombre = mysql_escape_string($articulo_nombre);\r\n //printf(\"Escaped string: %s\\n\", $articulo_nombre);\r\n //print $articulo_nombre;\r\n //$clausulas['where'] = \" nombre like '%$articulo_nombre%' \";\r\n $clausulas['where'] = \" id like '%{$_GET['p3']}%' \";\r\n }\r\n if ( ! $filas = \\modelos\\Datos_SQL::select( $clausulas, self::$tabla)) {\r\n $datos['mensaje'] = 'El articulo seleccionado no se encuentra en nuestro catálogo de productos';\r\n \\core\\Distribuidor::cargar_controlador('mensajes', 'mensaje', $datos);\r\n return;\r\n }else{ \r\n $datos['articulo'] = $filas[0];\r\n \r\n //Usando articulo_id como FK\r\n $articulo_id = $filas[0]['id'];\r\n $clausulas['where'] = \" articulo_id like '%$articulo_id%' \";\r\n $clausulas['order_by'] = 'fecha_comentario desc';\r\n $datos[\"comentarios\"] = \\modelos\\Modelo_SQL::table(self::$tabla2)->select($clausulas);\r\n \r\n //Usando articulo_nombre como FK\r\n// $clausulas['where'] = \" articulo_nombre like '%$articulo_nombre%' \";\r\n// $clausulas['order_by'] = 'fecha_comentario desc';\r\n// $datos[\"comentarios\"] = \\modelos\\Modelo_SQL::table(self::$tabla2)->select($clausulas);\r\n }\r\n \r\n //Mostramos los datos a modificar en formato europeo. Convertimos el formato de MySQL a europeo para su visualización\r\n self::convertir_formato_mysql_a_ususario($datos['articulo']);\r\n self::convertir_formato_mysql_a_ususario($datos['comentarios']);\r\n\r\n $datos['view_content'] = \\core\\Vista::generar(__FUNCTION__, $datos);\r\n $http_body = \\core\\Vista_Plantilla::generar('DEFAULT', $datos);\r\n \\core\\HTTP_Respuesta::enviar($http_body);\r\n\r\n }", "public function executeAccueil()\n\t{\n\t\t// on récupère la liste des articles\n\t\t$db = PDOFactory::getMysqlConnexion();\n\t\t$objetArticle = new ArticlesManager($db);\n\t\t$listeArticles = $objetArticle->getListArticles();\t\t\n\n\t\t// On require la vue \n\t\t$this->render('accueil', compact('listeArticles'));\n\t}", "function admin_tous() {\n\t\t\t$this->paginate = array(\n\t\t\t\t\t\t\t\t'recursive'=>2,\n\t\t\t\t\t\t\t\t'limit' => 20,\"conditions\"=>\"Personne.deleted = 0\",\n\t\t\t\t\t\t\t\t\"order\" => \"Personne.id desc\"\n\t\t\t\t\t\t\t\t) ; \n\t\t\t$marques = $this->personne->Marque->find('list',array('conditions'=>'Marque.deleted = 0',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'order'=>'Marque.nom asc')); \n\t\t\t/* $this->loadModel('Variete'); \n\t\t\t$varietes = $this->Variete->find('first',array('fields'=>array('Variete.stock')));\n\t\t\t$this->set('varietes',$varietes); */\n\t\t\t$this->set('marques',$marques);\n\t\t\t$this->set('Personnes',$this->paginate('personne') );\n\t\t\t$this->set('page_title','Liste de tous les articles');\n\t\t\t$this->set('balise_h1','Liste de tous les articles');\n\t\t\t$this->render('admin_index');\n\t\t}", "public function listmobilisateuradminAction() {\n\n $sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcadmin');\n \n if (!isset($sessionutilisateur->login)) {$this->_redirect('/administration/login');}\nif($sessionutilisateur->confirmation != \"\"){$this->_redirect('/administration/confirmation');}\n\n $mobilisateur = new Application_Model_EuMobilisateurMapper();\n //$this->view->entries = $mobilisateur->fetchAllByCanton($sessionutilisateur->id_utilisateur);\n $this->view->entries = $mobilisateur->fetchAll();\n\n $this->view->tabletri = 1;\n }", "function cl_db_usuariosrhlota() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"db_usuariosrhlota\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function listeSujetO ($bdd, $lab, $tablePos, $tableO){\n $mode = 1;\n\n $rep = $bdd->prepare(\"SELECT \".$tablePos.\".ID_SUJ_O, \".$tablePos.\".LIBELLE , COMMENT\n FROM \".$tablePos.\",\".$tableO.\"\n WHERE \".$tablePos.\".ID_APPEL = \".$tableO.\".ID_APPEL\n AND \".$tablePos.\".MODE = :mode\n AND \".$tableO.\".MODE = :mode\n ORDER BY \".$tablePos.\".ID_SUJ_O \");\n $rep->bindParam(':mode',$mode, PDO::PARAM_INT);\n $rep->execute();\n $nbr = $rep->rowCount();\n\n if($nbr > 0){\n $datas = $rep->fetchAll(PDO::FETCH_BOTH);\n foreach ($datas as $value){\n ?>\n <li><a class=\"click-post\" href=\"?lab=<?php echo $lab.$value[0];?>\">\n <i class=\"fa fa-angle-double-right\"></i><p><?php echo $value[1];?></p></a><span class=\"badge\">(<?php echo $value[2];?>)</span></li>\n <?php\n }\n }\n elseif($nbr == 0) {?>\n <li><a href=\"#\"><i class=\"fa fa-angle-double-right\"></i><p>Aucun sujet disponible</p></a><span class=\"badge\">(0)</span></li>\n <?php }\n }", "public function listerCaisseAction(Request $request) {\n /*\n * Nom de l'action en cours\n */\n $nomAction = __FUNCTION__;\n /*\n * Description de l'action de l'action en cours\n */\n $descAction = \"Affichage de la liste des caisses\";\n /*\n * Préparation du message de log \n */\n $this->logMessage .= ' [ ' . $nomAction . ' ] ';\n /*\n * Service de gestion des droits\n */\n $loginManager = $this->get('login_manager');\n /*\n * Informations de session\n */\n $sessionData = $this->infosConnecte();\n /*\n * Locale en cours\n */\n $locale = $loginManager->getLocale();\n $this->data['locale'] = $locale;\n /*\n * On vérifie si l'utilisateur est connecté\n */\n $status = $loginManager->isConnecte($nomAction);\n if ($status['isConnecte']) {\n /*\n * Au cas ou l'utilisateur est connecté on vérifie s'il nest pas innactif. S'il est innactif\n * on garde en mémoire flash la route actuelle pour effectuer une redirection lors de la prochaine connexion\n */\n if ($status['isInnactif']) {\n $routeName = $request->get('_route');\n $routeParams = $request->get('_route_params');\n $this->get('session')->getFlashBag()->add('restoreUrl', $this->generateUrl($routeName, $routeParams));\n $this->get('session')->getFlashBag()->add('ina', \"Vous avez accusé un long moment d'inactivité\");\n return $this->redirect($this->generateUrl('app_admin_user_logout'));\n }\n /*\n * Seuls les utilisateurs admins ont le droit d'acceder à cette action\n */\n if (!$status['isUser']) {\n return $this->redirect($this->generateUrl('app_admin_user_logout'));\n }\n } else {\n return $this->redirect($this->generateUrl('app_admin_user_logout'));\n }\n\n /*\n * Gestion des droits\n */\n if (!$loginManager->getOrSetActions(Module::MOD_GEST_CAIS, Module::MOD_GEST_CAIS_DESC, $this->getNomClassRun(__CLASS__), $this->description, $nomAction, $descAction, $sessionData['idProfil'])) {\n $this->logMessage .= ' [ TENTATIVE DE VIOLATION DE DROITS ] ';\n $this->get('session')->getFlashBag()->add('access', \"Vous n'avez pas le droit d'accéder à la liste des abonnés\");\n return $this->redirect($this->generateUrl('app_admin_user_access_refuse'));\n }\n\n try {\n /*\n * Récupération des la liste des critères\n */\n $this->em = $this->getDoctrine()->getManager();\n $listeCaisse = $this->em->getRepository($this->stockBundle . 'Caisse')->getAllCaisse();\n } catch (\\Exception $e) {\n var_dump($e);\n exit;\n }\n /*\n * Préparation des informations que nous allons traiter sur le twig\n */\n $this->data['listeCaisse'] = $listeCaisse;\n $this->data['locale'] = $locale;\n\n return $this->render($this->stockBundle . 'Caisse:listeCaisse.html.twig', $this->data, $this->response);\n }", "public function sel_tornejos(){\n $query = $this->db->query('SELECT * FROM torneig t JOIN joc j ON(j.Id = t.codiJoc) WHERE activo = 1');\n\n return $query->result();\n }", "public function loginTraitement(){\n\n $identifiant = $this->verifierSaisie(\"identifiant\");\n $password = $this->verifierSaisie(\"password\");\n\n //securite\n if (($identifiant != \"\") && ($password != \"\")){\n\n //on crée un objet de la classe \\W\\Security\\AuthentificationModel\n //ce qui nous permet d'utiliser la methode isValidLoginInfo\n $objetAuthentificationModel = new \\W\\Security\\AuthentificationModel;\n\n $idUser = $objetAuthentificationModel->isValidLoginInfo($identifiant, $password);\n\n if($idUser > 0){\n\n // recuperer les infos de l'utilisateur\n //requete base de donnée pour les recuperer\n //je crée un objet de la classe \\W\\Model\\UsersModel\n $objetUsersModel = new \\W\\Model\\UsersModel;\n // je retrouve les infos de la ligne grace à la colonne ID\n // La classe UsersModel herite de la classe Model je peu donc faire un find pour recupeerr les infos\n $tabUser = $objetUsersModel->find($idUser);\n\n // Je vais ajouter des infos dans la session\n $objetAuthentificationModel->logUserIn($tabUser);\n\n // recuperer l'username\n $username = $tabUser[\"username\"];\n\n\n $GLOBALS[\"loginRetour\"] = \"Bienvenue $username\";\n\n $this->redirectToRoute(\"admin_accueil\");\n }\n else{\n $GLOBALS[\"loginRetour\"] = \"Identifiant incorrects \";\n }\n }else{\n\n $GLOBALS[\"loginRetour\"] = \"Identifiant incorrects \";\n }\n }", "public function listagemAction()\n\t{\n\t\n\t}", "private function ajoutauteur() {\n\t\t$this->_ctrlAuteur = new ControleurAuteur();\n\t\t$this->_ctrlAuteur->auteurAjoute();\n\t}", "public function afficherAdministration()\n {\n if (empty($_SESSION[\"id\"])) {\n $controllerUser = new ControllerUser();\n $controllerUser->addErreur(\"Vous devez vous connecter pour accéder à la page d'administration\");\n $controllerUser->afficherConnexion();\n } else {\n $user = new User($_SESSION[\"id\"]);\n if ($user->getAdministrateurSite() != 1) {\n $controllerUser = new ControllerUser();\n $controllerUser->addErreur(\"Vous devez vous connecter pour en tant qu'administrateur pour accéder à la page d'administration\");\n $controllerUser->afficherConnexion();\n } else {\n $this->vue = new Vue(\"Administration\");\n if (!empty($this->erreurs)) $this->vue->setErreurs($this->erreurs);\n $listeUser = new ListeUser();\n $configAdmin = new ConfigAdmin();\n $this->vue->generer(array(\"listeUsers\" => $listeUser, \"inscriptions\" => $configAdmin->getInscriptions()));\n }\n }\n }", "public function getJoursOuvrables()\n {\n $query = $this->_em->createQuery('SELECT jr FROM SLPlateformBundle:Jour jr JOIN jr.composants c order by jr.id ASC');\n $results = $query->getResult();\n return $results;\n }", "function cl_db_projetoscliente() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"db_projetoscliente\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function controler_forum_abo($retour)\n{\n\tglobal $visiteur_session;\n\tif ($visiteur_session) {\n\t\t$statut = $visiteur_session['statut'];\n\t\tif (!$statut OR $statut == '5poubelle') {\n\t\t\task_php_auth(_T('forum_acces_refuse'),\n\t\t\t\t _T('forum_cliquer_retour',\n\t\t\t\t\t\tarray('retour_forum' => $retour)));\n\t\t}\n\t} else {\n\t\task_php_auth(_T('forum_non_inscrit'),\n\t\t\t _T('forum_cliquer_retour',\n\t\t\t\t\tarray('retour_forum' => $retour)));\n\t\t}\n}", "function archobjet_autoriser() {\n}", "function horarios()\n {\n $this->view2->__construct($this->dataView,$this->dataTable);\n $this->view2->show();\n }", "private function listeuser() {\n\n\t\t// si tu est pas un user -> redirect\n\t\tif ($_SESSION['user_biblio']['statut_user'] != 1)\n\t\t\theader(\"Location: index.php?controler=accueil\");\n\n\t\t$this->_ctrlAdmin = new ControleurAdmin();\n\t\t\n\t\t// cree le utilisateur\n\t\tif(isset($_SESSION['error_user_cree'])) unset($_SESSION['error_user_cree']);\n\t\tif(isset($_POST['cree_user'])){\n\t\t\t\t$nom = Utils::getPost('nom_user');\n\t\t\t\t$login = Utils::getPost('login_user');\n\t\t\t\t$statut = Utils::getPost('statut_user');\n\t\t\t\tif ($nom && $login && $statut) {\n\t\t\t\t\t$login = Utils::filtreForte($login);\n\t\t\t\t\t$nom = Utils::filtreForte($nom);\n\t\t\t\t\t$statut = Utils::filtreForte($statut);\n\t\t\t\t\t\tif (strlen($login) > 2 && strlen($nom) > 2) {\n\t\t\t\t\t\t\tif (!$this->_ctrlAdmin->existeUser($login)) {\n\t\t\t\t\t\t\t\t$this->_ctrlAdmin->creeUser($nom, $login, $statut);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$_SESSION['error_user_cree'] = 'Set login deja existe';\n\t\t\t\t\t\t\t\theader(\"Location: index.php?controler=ajoutuser\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$_SESSION['error_user_cree'] = 'Minimum trois caractères !!!';\n\t\t\t\t\t\t\theader(\"Location: index.php?controler=ajoutuser\");\n\t\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception('Valeur introdui incorect !!!'.$nom);\n\t\t\t\t}\n\t\t\t}\n\n\t\t// modifie le utilisateur\n\t\tif(isset($_SESSION['error_user_modifie'])) unset($_SESSION['error_user_modifie']);\n\t\tif(isset($_POST['modifie_user'])){\n\t\t\t\t$nom = Utils::getPost('nom_user_m');\n\t\t\t\t$login = Utils::getPost('login_user_m');\n\t\t\t\t$pass = Utils::getPost('pass_user_m');\n\t\t\t\tif ($nom && $login) {\n\t\t\t\t\t$login = Utils::filtreForte($login);\n\t\t\t\t\t$nom = Utils::filtreForte($nom);\n\t\t\t\t\t\tif (strlen($login) > 2 && strlen($nom) > 2) {\n\t\t\t\t\t\t\tif ($pass) {\n\t\t\t\t\t\t\t\t$pass = Utils::filtreForte($pass);\n\t\t\t\t\t\t\t\tif (strlen($pass) > 2) {\n\t\t\t\t\t\t\t\t\t$this->_ctrlAdmin->modifieUser($nom, $login, $pass);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$_SESSION['error_user_modifie'] = 'Minimum trois caractères !!!';\n\t\t\t\t\t\t\t\t\theader(\"Location: index.php?controler=ajoutuser\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$this->_ctrlAdmin->modifieUser($nom, $login);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$_SESSION['error_user_cree'] = 'Minimum trois caractères !!!';\n\t\t\t\t\t\t\theader(\"Location: index.php?controler=ajoutuser\");\n\t\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception('Valeur introdui incorect !!!');\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t$this->_ctrlAdmin->adminListe();\n\t}", "function RellenarMinuta()\r\n {\r\n $this->AddPage();\r\n\r\n $this->RellenarTitulo();\r\n\r\n $this->RellenarAsistentes();\r\n\r\n $this->RellenarStatusCompromisosYAsistencias();\r\n\r\n $this->RellenarIndice();\r\n\r\n $this->RellenarDesarrolloReunion();\r\n }", "function alta_tipo_entrada(){\n\t\t$u= new Tipo_entrada();\n\t\t$related = $u->from_array($_POST);\n\t\t// save with the related objects\n\t\tif($u->save($related))\n\t\t{\n\t\t\techo \"<html> <script>alert(\\\"Se han registrado los datos del Tipo de Entrada.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/\".$GLOBALS['ruta'].\"/menu';</script></html>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tshow_error(\"\".$u->error->string);\n\t\t}\n\t}", "public function bindUsers($id_competences,$id_region,$id_connect,$id_distant,$role_connect){\n\n\t\t$exist = new TutoratModel();\n\t\t$model = new TutoratModel();\n\t\t//verifier si un cours existe déjà dans la table tilt_tutorat\n\t\t$coursExist = $exist->isBind($id_competences,$id_region,$id_connect,$id_distant);\n\t\t// $a = count($coursExist);\n\t\t// echo '$coursExist : '.$coursExist['id_competence'];\n\t\t// var_dump($coursExist);\n\t\t// echo '<br>';\n\t\t// echo '$id_competences : '.$id_competences;\n\t\t// echo '<br>';\n\t\t// echo '$id_region : '.$id_region;\n\t\t// echo '<br>';\n\t\t// echo '$id_connect : '.$id_connect;\n\t\t// echo '<br>';\n\t\t// echo '$id_distant : '.$id_distant;\n\t\t// echo '<br>';\n\t\t// die();\n\n\t\t// si pas de cours déjà créer alors craetion du cours ds bdd tilt_tutorat\n\t\tif (empty($coursExist)){\n\t\t\t$dateNow = new \\DateTime;\n\t\t\t//enregistrement d'un cours dans la table titl_tutorat\n\t\t\t\tif ($role_connect == 'enseignant'){\n\n\t\t\t\t\t\t\t$data = array(\n\t\t\t\t\t\t\t\t'id_competence' => $id_competences,\n\t\t\t\t\t\t\t\t'id_region' => $id_region,\n\t\t\t\t\t\t\t\t'id_enseignant' => $id_connect,\n\t\t\t\t\t\t\t\t'id_apprenant' => $id_distant,\n\t\t\t\t\t\t\t\t'created_at'\t\t => $dateNow->format('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t'status'\t\t\t\t =>\t1,\n\t\t\t\t\t\t\t);\n\t\t\t\t}else{\n\t\t\t\t\t\t$data = array(\n\t\t\t\t\t\t\t'id_competence' => $id_competences,\n\t\t\t\t\t\t\t'id_region' => $id_region,\n\t\t\t\t\t\t\t'id_enseignant' => $id_distant,\n\t\t\t\t\t\t\t'id_apprenant' => $id_connect,\n\t\t\t\t\t\t\t'created_at'\t\t => $dateNow->format('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t'status'\t\t\t\t =>\t1,\n\t\t\t\t\t\t);\n\t\t\t\t}\n\n\t \t\t$model->insert($data);\n\t\t\t$this->redirectToRoute('tutorat_tutorat');\n\t\t}else{\n\t\t\t$users \t= new UsersModel();\n\t\t\t\t$user = $this->getUser();\n\t\t\t\t$role = $user['role'];\n\t\t\t//si cours déjà créer on affiche l'erreur\n\t\t\t$error = 'Vous participé déjà à ce cours !';\n\t\t\t//$users \t= new UsersModel();\n\t\t\tif($role == 'enseignant'){\n\t\t\t\t//renvoi la liste des apprenants inscrits pour suivre un cours\n\t\t\t\t$inscrits = $users->findApprenantsInRegionById($id_region);\n\t\t\t}else{\n\t\t\t\t//renvoi la liste des enseignants inscrits\tpour donner un cours\n\t\t\t\t$inscrits = $users->findEnseignantsInRegionById($id_region);\n\t\t\t}\n\n\t\t\t$this->show('tutorat/disponibilites', array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'inscrits' => $inscrits,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$error'\t\t=> $error\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\n\t\t}\n\t}", "public function lista2() { // Aqui define o ação: /users/lista\n $usuarios = new Users(); // Aqui carrega o model: Users\n $dados['usuarios'] = $usuarios->getUsuarios();\t\n if(isset($_GET['id']) && !empty($_GET['id'])) {\t\n $this->loadTemplate('usuario', $dados);\n }\n }", "function recreer_jointures_mots($id_mot_annonce, $id_mot_ferme, $mots_preced, $mots_base) {\n\tforeach($mots_base as $m) {\n\t\t$id_nouv = ($m==\"annonce\")?$id_mot_annonce:$id_mot_ferme;\n\t\tif($mots_preced[$m]!=0) {\n\t\t\t# recup jointure mot - articles\n\t\t\t$qa = sql_select(\"id_article\",\"spip_mots_articles\",\"id_mot=\"._q($mots_preced[$m]));\n\t\t\twhile ($ra = sql_fetch($qa)) {\n\t\t\t\t$id_art = $ra['id_article'];\n\t\t\t\t@sql_insertq(\"spip_mots_articles\",array('id_mot'=> $id_nouv, 'id_article'=> $id_art) );\n\t\t\t}\n\n\t\t\t# recup jointure mot - posts\n\t\t\t$qf = sql_select(\"id_forum\",\"spip_mots_forum\",\"id_mot=\"._q($mots_preced[$m]));\n\t\t\twhile ($rf=sql_fetch($qf)) {\n\t\t\t\t$id_post = $rf['id_forum'];\n\t\t\t\t\t@sql_insertq(\"spip_mots_forum\",array( 'id_mot'=>$id_nouv, 'id_forum'=>$id_post) );\n\t\t\t}\n\t\t}\n\t}\n}", "public function tourSuivant() {\n\t\t\t$this -> turn = ($this-> turn == $this -> j1) ? $this -> j2 : $this -> j1 ;\n\t\t}", "function RellenarDesarrolloReunion()\r\n {\r\n $i = 1;\r\n\r\n foreach ($this->eventos as $evento)\r\n {\r\n if (Doctrine_Core::getTable('SAF_EVENTO_CONVOCATORIA')->getEventoConvocatoria($evento, $this->convocatoria)->getStatus() == 'analizado')\r\n {\r\n $this->AddPage();\r\n\r\n if ($i == 1)\r\n {\r\n $i++;\r\n $this->Imprimir('DESARROLLO DE LA REUNIÓN', 10, 12, 18);\r\n }\r\n\r\n $this->RellenarDescripcionDelEvento($evento);\r\n\r\n $this->RellenarFotosDelEvento($evento);\r\n\r\n $this->RellenarRazonesDelEvento($evento);\r\n\r\n $varios = Doctrine_Core::getTable('SAF_VARIO')->findByIdEvento($evento->getID());\r\n\r\n $this->RellenarBitacoraDelEvento($varios);\r\n\r\n $this->RellenarAccionesYRecomendacionesDelEvento($varios);\r\n\r\n $this->RellenarCompromisosDelEvento($varios);\r\n }\r\n }\r\n }", "public function index()\n {\n \n $estados = Estado::all();\n\n $user = \\Auth::user();\n\n if($user->hasRole('administrador')) {\n $juicios = Juicio::select()->where('estado_id',1)->orderBy('fecha_proxima_accion', 'ASC')->orderBy('juzgado_id', 'ASC')->get();\n } elseif ($user->hasRole('coordinador')) {\n $juicios_all = Juicio::select()->where('estado_id',1)->orderBy('fecha_proxima_accion', 'ASC')->orderBy('juzgado_id', 'ASC')->get();\n $juicios = $juicios_all->filter(function($key,$value) use ($user){\n $juicios_users = $key->juiciousers()->get();\n foreach ($juicios_users as $juicios_user) {\n if($juicios_user->user_id == $user->id && $user->roles()->first()->slug == \"coordinador\"){\n return true;\n }\n }\n });\n } elseif ($user->hasRole('colaborador')) {\n $juicios_all = Juicio::select()->where('estado_id',1)->orderBy('fecha_proxima_accion', 'ASC')->orderBy('juzgado_id', 'ASC')->get();\n $juicios = $juicios_all->filter(function($key,$value) use ($user){\n $juicios_users = $key->juiciousers()->get();\n foreach ($juicios_users as $juicios_user) {\n if($juicios_user->user_id == $user->id && $user->roles()->first()->slug == \"colaborador\"){\n return true;\n }\n }\n });\n } else {\n $juicios_all = Juicio::select()->where('estado_id',1)->orderBy('fecha_proxima_accion', 'ASC')->orderBy('juzgado_id', 'ASC')->get();\n $juicios = $juicios_all->filter(function($key,$value) use ($user){\n $juicios_users = $key->juiciousers()->get();\n foreach ($juicios_users as $juicios_user) {\n if($juicios_user->user_id == $user->id && $user->roles()->first()->slug == \"cliente\"){\n return true;\n }\n }\n });\n }\n\n return view('home')->with(\"juicios\", $juicios)\n ->with(\"estados\", $estados);\n }", "public function actionIndex()\n {\n if (isset(\\Yii::$app->user->id)) {\n $session = \\Yii::$app->session;\n $session['tmp'] = '2';\n $session['is_online']=\\Yii::$app->db->createCommand('UPDATE persons SET is_online=1 WHERE id_persons='.\\Yii::$app->user->id)\n ->execute();\n\n\n // $model = New Order();\n // if( \\Yii::$app->request->post()){\n // $order = \\Yii::$app->request->post('Order');\n // $model->telefon=$order['telefon'];\n // //$models->id_persons=\\Yii::$app->user->id;\n \n // $model->save();\n \n // }\n\n\n } else {\n return $this->goBack();\n }\n\n \n\n return $this->render('insert_telefon');\n }", "function joinGame ($date_insc, $partie, $index_equipe, $joueur, $password) {\n\tglobal $bdd;\n\t$result = false;\n\t\n\t$ancienneEquipe = equipeAncienneInscriptionPartie ($partie,$joueur);\n\tif($ancienneEquipe!=0)\n\t\t$equipe=$ancienneEquipe;\n\telse\n\t\t$equipe=$index_equipe;\n\n\t// Verif : la partie existe\n\t$verif = $bdd->prepare('\n\t\tSELECT id_partie, password\n\t\tFROM parties \n\t\tWHERE id_partie = :partie');\n\t$verif->execute(array(\n\t\t\t\t'partie' => $partie\n\t\t\t));\n\tif ($row = $verif->fetch()) {\n\t\t// Verif : Le mot de passe est correct\n\t\tif(sha1($password) == $row['password'] || $row['password'] === NULL) {\n\t\t\t// Verif : Le joueur existe\n\t\t\t$verif2 = $bdd->prepare('\n\t\t\t\tSELECT id_joueur\n\t\t\t\tFROM joueurs \n\t\t\t\tWHERE id_joueur = :joueur');\n\t\t\t$verif2->execute(array(\n\t\t\t\t\t'joueur' => $joueur\n\t\t\t));\n\t\t\tif ($row2 = $verif2->fetch()) {\n\t\t\t\ttry {\n\t\t\t\t\t// Insertion\n\t\t\t\t\t$req = $bdd->prepare('\n\t\t\t\t\t\tINSERT INTO inscriptions (date_inscription, partie, equipe, joueur) \n\t\t\t\t\t\tVALUES (:date_insc, :partie, :equipe, :joueur)');\n\t\t\t\t\t$req->execute(array(\n\t\t\t\t\t\t'date_insc' => $date_insc,\n\t\t\t\t\t\t'partie' => $partie,\n\t\t\t\t\t\t'equipe' => $equipe,\n\t\t\t\t\t\t'joueur' => $joueur\n\t\t\t\t\t));\n\t\t\t\t\t$result = true;\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn $result;\n}", "function formulaires_ajouter_abonne_traiter_dist(){\r\n\tinclude_spip('inc/gestionml_api');\r\n\treturn gestionml_api_ajouter_email(_request('liste'),_request('email')) ;\r\n}", "function ajouterJeu($titreJeu,$qteJeu,$prixJeu){\n\t\t\n\t\t// si le panier existe\n\t\tif (createPanier() && !isVerouille()) {\n\t\t\t\n\t\t\t// si le Jeu exsite déjà, on incrémente seulement la quantité\n\t\t\t$positionJeu = array_search($titreJeu, $_SESSION['panier']['titreJeu']);\n\n\t\t\tif ($positionJeu !== false) {\n\t\t\t\t$_SESSION['panier']['qteJeu'] += $qteJeu;\t\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\t// sinon on ajoute le jeu au panier\n\t\t\t\tarray_push($_SESSION['panier']['titreJeu'],$titreJeu);\n\t\t\t\tarray_push($_SESSION['panier']['qteJeu'],$qteJeu);\n\t\t\t\tarray_push($_SESSION['panier']['prixJeu'],$prixJeu);\n\t\t\t}\n\t\t} \n\t\telse {\n\t\t\techo \"Une erreur inconnue est survenue, veuillez conatacter l'administrateur\";\n\t\t}\n\t}", "public function index()\n {\n $cargo = $this->FacturasQueries->ObtenerCargo(Auth::user()->idEmpleado);\n foreach ($cargo as $row) {\n $rol = $row->idRol;\n }\n if ($rol == 1) {\n //Declaramos el correlativo para despues usarlo para generar el correlativo\n $corre='';\n //Declaramos el contador para poder buscar un ID inicializado en 0\n $contador = 0;\n /*Entramos a un bucle para poder buscar el id que se encuentre en el DB y le pido el método que llamara a la consulta y traera si ese ID se encuentra disponible*/\n //Mietras el ID de hobbie se encuentre ya en uso \n do {\n $contador++; //Se aumentara en 1\n //Almaceno el resultado en una variable $resp, llamo a la propiedad y le pido el método que llamara a la consulta para comprobar el id y traera el booleano \n $resp = $this->FacturasQueries->verificarID($contador);\n\n if ($contador > 0 AND $contador <= 9)\n {\n $corre = 'PHP000'.$contador;\n }\n else if($contador >= 10 AND $contador <= 99)\n {\n $corre = 'PHP00'.$contador;\n }\n else if($contador >= 100 AND $contador <= 999)\n {\n $corre = 'PHP0'.$contador;\n }\n else if($contador >= 1000 AND $contador <= 9999)\n {\n $corre = 'PHP'.$contador;\n }\n\n }while($resp == \"true\"); //Finalizara hasta que encuentre un false en este ciclo\n //Llamo a la propiedad y le pido el método que llamara a la insercion del resultador del contador asi como tambien los datos que mando a pedir con el form de agregar hobbies\n $modo = $this->FacturasQueries->getModoPago();\n $tipo = $this->FacturasQueries->getTipoPago();\n $cliente = $this->FacturasQueries->getClientes();\n $tarjeta = $this->FacturasQueries->getTarjetas();\n $productos = $this->FacturasQueries->getProductos();\n $items = Cart::getContent();\n return view('factura.factura', compact(['modo', 'tipo', 'cliente', 'tarjeta', 'productos', 'corre', 'items', 'rol'])); \n }else{\n return redirect()->action('HomeController@error404'); \n }\n }", "public function listarParaUnir() {\n\t\t//de sesion, falta cambiar\n\t\t$_SESSION[\"nomCon\"] = $_GET[\"NombreCon\"];\n\t\t$juradoL = $this -> JuradoMapper -> findAllPro();\n\n\t\t$this -> view -> setVariable(\"jurado\", $juradoL);\n\t\t//falta agregar la vista, no se continuar\n\t\t$this -> view -> render(\"jurado\", \"listarUnir\");\n\t\t//falta cambiar\n\t}", "public function __construct()\r\n {\r\n try {\r\n\t\t\t\r\n\t\t\t$this->idLOC = Connexion::connect();\r\n \r\n //les requetes AVEC PARAMETRES sont préparées si la connexion est valide\r\n \r\n $AjoutLoc = $this->reqAjoutLoc = $this->idLOC->prepare(\"INSERT INTO louer(numV, numA, dateheureLoc, dateheureDep) VALUES (:numV, :numA, :dateheureLoc, :dateheureDep);\");\r\n \r\n $GetVelosDispos = $this->reqGetVelosDispos = $this->idLOC->prepare(\"SELECT * FROM velo \r\n\t\t\tINNER JOIN vehicule ON velo.numV = vehicule.numV \r\n\t\t\tWHERE etatV='D';\");\r\n \r\n $GetVelosElecDispos = $this->reqGetVelosElecDispos = $this->idLOC->prepare(\"SELECT * FROM veloelectrique \r\n\t\t\tINNER JOIN vehicule ON veloelectrique.numV = vehicule.numV \r\n INNER JOIN borne ON veloelectrique.numB = borne.codeB\r\n\t\t\tWHERE etatV='D';\");\r\n \r\n \r\n }\r\n catch ( PDOException $e ) \r\n {\r\n\t\t\techo \"<h1>probleme access BDD</h1>\";\r\n\t\t}\r\n\t}", "function informationsMonCompte() {\n $this->vue = new V_Vue(\"../vues/templates/template.inc.php\");\n $this->vue->ecrireDonnee(\"titreVue\",\"Margo : Mon Compte\");\n $this->vue->ecrireDonnee('centre',\"../vues/includes/gestionDeCompte/centreMonCompte.inc.php\");\n \n $this->vue->ecrireDonnee(\"titreSection\",\"Mon Compte: Informations\");\n // Centre : formulaire de connexion\n $this->vue->ecrireDonnee('loginAuthentification',MaSession::get('login')); \n \n // ... depuis la BDD \n $daoPers = new M_DaoPersonne();\n $daoPers->connecter();\n $perso = $daoPers->getOneByLogin(MaSession::get('login'));\n \n $this->vue->ecrireDonnee(\"infoPerso\",$perso);\n \n $this->vue->afficher();\n }", "function dw2_ajouterBoutons($boutons_admin) {\r\n\t\t// si on est admin principal\r\n\t\tif ($GLOBALS['connect_statut'] == \"0minirezo\" AND $GLOBALS[\"connect_toutes_rubriques\"]) {\r\n\t\t\t$boutons_admin['statistiques_visites']->sousmenu[\"dw2_stats\"]= new Bouton(\r\n\t\t\t\"../\"._DIR_PLUGIN_DW2.\"img_pack/telech.gif\", // icone\r\n\t\t\t_T('dw:titre_page_admin')\t// titre\r\n\t\t\t);\r\n\t\t\t$boutons_admin['naviguer']->sousmenu[\"dw2_cata_img\"]= new Bouton(\r\n\t\t\t\"../\"._DIR_PLUGIN_DW2.\"img_pack/cata_img.gif\", // icone\r\n\t\t\t_T('dw:cata_images')\t// titre\r\n\t\t\t);\r\n\t\t}\r\n\t\t//\r\n\t\telse {\r\n\t\t\t// redacteur et admin restreint, 2 boutons : catalogue images ; stats doc redacteur\r\n\t\t\t$boutons_admin['statistiques_visites']->sousmenu[\"dw2_redacteur\"]= new Bouton(\r\n\t\t\t\"../\"._DIR_PLUGIN_DW2.\"img_pack/cata_redact.gif\", // icone\r\n\t\t\t_T('dw:titre_page_admin')\t// titre\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$boutons_admin['naviguer']->sousmenu[\"dw2_cata_img\"]= new Bouton(\r\n\t\t\t\"../\"._DIR_PLUGIN_DW2.\"img_pack/cata_img.gif\", // icone\r\n\t\t\t_T('dw:cata_images')\t// titre\r\n\t\t\t);\r\n\t\t}\r\n\t\treturn $boutons_admin;\r\n\t}", "function cl_sau_agendaexames() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_agendaexames\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function run()\n {\n /**\n * Permissões para o CRUD da lista\n */\n $regra1 = new Regras();\n $regra1->nome = \"lista.view\";\n $regra1->descricao = \"Visualização da lista\";\n $regra1->save();\n\n $regra2 = new Regras();\n $regra2->nome = \"lista.create\";\n $regra2->descricao = \"Inserção na lista\";\n $regra2->save();\n\n $regra3 = new Regras();\n $regra3->nome = \"lista.update\";\n $regra3->descricao = \"Atualização da lista\";\n $regra3->save();\n\n $regra4 = new Regras();\n $regra4->nome = \"lista.delete\";\n $regra4->descricao = \"Apagar da lista\";\n $regra4->save();\n\n\n /**\n * Permissões para o CRUD dos usuários\n */\n $regra5 = new Regras();\n $regra5->nome = \"user.view\";\n $regra5->descricao = \"Visualização do usuário\";\n $regra5->save();\n\n $regra6 = new Regras();\n $regra6->nome = \"user.create\";\n $regra6->descricao = \"Inserção do usuário\";\n $regra6->save();\n\n $regra7 = new Regras();\n $regra7->nome = \"user.update\";\n $regra7->descricao = \"Atualização do usário\";\n $regra7->save();\n\n $regra8 = new Regras();\n $regra8->nome = \"user.delete\";\n $regra8->descricao = \"Apagar usuário\";\n $regra8->save();\n\n /**\n * Permissão do master\n */\n $regra8 = new Regras();\n $regra8->nome = \"master\";\n $regra8->descricao = \"Master\";\n $regra8->save();\n\n }", "function TablaVentasCajas()\n {\n $ca = new Login(); \n\t$ca = $ca->CajerosPorId();\t\n\t\n\t//Logo\n $this->Image(\"./assets/img/logo.png\" , 20 ,12, 60 , 20 , \"PNG\");\n\t$this->SetXY(10, 15);\n\t$this->SetFont('courier','B',18);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(120,8,'',0,0,'');\n\t$this->Cell(180,8,'LISTADO DE VENTAS DESDE '.$_GET[\"desde\"].' HASTA '.$_GET[\"hasta\"],0,1,'C');\n \n\t$this->Cell(150,8,'',0,0,'');\n $this->Cell(120,8,'Y CAJA N°.'.$ca[0]['nrocaja'],0,0,'C');\n //Salto de línea\n $this->Ln(15);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',10);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'CÉDULA GERENTE :',0,0,'');\n\t$this->CellFitSpace(95,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->CellFitSpace(42,5,'NOMBRE GERENTE :',0,0,'');\n\t$this->CellFitSpace(120,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'TELÉFONO GERENTE :',0,0,'');\n $this->CellFitSpace(95,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->CellFitSpace(42,5,'CORREO GERENTE :',0,0,'');\n $this->CellFitSpace(120,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->CellFitSpace(10,8,'N°',1,0,'C', True);\n\t$this->CellFitSpace(32,8,'CÓDIGO VENTA',1,0,'C', True);\n\t$this->CellFitSpace(70,8,'CLIENTES',1,0,'C', True);\n\t$this->CellFitSpace(17,8,'STATUS',1,0,'C', True);\n\t$this->CellFitSpace(35,8,'FECHA VENTA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'ARTIC',1,0,'C', True);\n\t$this->CellFitSpace(28,8,'SUBTOT CON IVA',1,0,'C', True);\n\t$this->CellFitSpace(28,8,'SUBTOT IVA 0%',1,0,'C', True);\n\t$this->CellFitSpace(12,8,'IVA',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'TOTAL IVA',1,0,'C', True);\n\t$this->CellFitSpace(12,8,'DESC',1,0,'C', True);\n\t$this->CellFitSpace(20,8,'TOT DESC',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'TOTAL PAGO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->BuscarVentasCajas();\n\t$totalarticulos=0;\n\t$Subtotalconiva=0;\n\t$Subtotalsiniva=0;\n\t$Totaliva=0;\n\t$Totaldescuento=0;\n\t$pagoDescuento=0;\n\t$Pagototal=0;\n\t$a=1;\n\t\n for($i=0;$i<sizeof($reg);$i++){\n\t\n $totalarticulos+=$reg[$i]['articulos'];\n $Subtotalconiva+=$reg[$i]['subtotalivasive'];\n $Subtotalsiniva+=$reg[$i]['subtotalivanove'];\n\t$Totaliva+=$reg[$i]['totalivave']; \n\t$Totaldescuento+=$reg[$i]['totaldescuentove']; \n\t$Pagototal+=$reg[$i]['totalpago']; \n\t\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(10,5,$a++,1,0,'C');\n\t$this->CellFitSpace(32,5,$reg[$i][\"codventa\"],1,0,'C');\n\t$this->CellFitSpace(70,5,utf8_decode($reg[$i][\"nomcliente\"]),1,0,'C');\n\tif($reg[$i]['fechavencecredito']== '0000-00-00') { \n\t$this->CellFitSpace(17, 5,utf8_decode($reg[$i]['statusventa']),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->CellFitSpace(17, 5,utf8_decode($reg[$i]['statusventa']),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->CellFitSpace(17, 5,utf8_decode(\"VENCIDA\"),1,0,'C');\n\t}\n\t$this->CellFitSpace(35,5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($reg[$i]['fechaventa']))),1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"articulos\"]),1,0,'C');\n\t$this->CellFitSpace(28,5,utf8_decode(number_format($reg[$i]['subtotalivasive'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(28,5,utf8_decode(number_format($reg[$i]['subtotalivanove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(12,5,utf8_decode(number_format($reg[$i]['ivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(22,5,utf8_decode(number_format($reg[$i]['totalivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(12,5,utf8_decode(number_format($reg[$i]['descuentove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(20,5,utf8_decode(number_format($reg[$i]['totaldescuentove'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(30,5,utf8_decode(number_format($reg[$i]['totalpago'], 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n } \n \n\t$this->Cell(10,5,'',0,0,'C');\n $this->Cell(32,5,'',0,0,'C');\t\t\n $this->Cell(70,5,'',0,0,'C');\t\t\n $this->Cell(17,5,'',0,0,'C');\t\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n\n $this->Cell(35,5,'TOTAL GENERAL',1,0,'C', True);\n $this->SetFont('courier','B',8);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n\t$this->Cell(15,5,utf8_decode($totalarticulos),1,0,'C');\n $this->Cell(28,5,utf8_decode(number_format($Subtotalconiva, 2, '.', ',')),1,0,'C');\n $this->Cell(28,5,utf8_decode(number_format($Subtotalsiniva, 2, '.', ',')),1,0,'C');\n $this->Cell(12,5,\"\",1,0,'C');\n $this->Cell(22,5,utf8_decode(number_format($Totaliva, 2, '.', ',')),1,0,'C');\n $this->Cell(12,5,\"\",1,0,'C');\n $this->Cell(20,5,utf8_decode(number_format($Totaldescuento, 2, '.', ',')),1,0,'C');\n $this->Cell(30,5,utf8_decode(number_format($Pagototal, 2, '.', ',')),1,0,'C');\n $this->Ln();\n \n $this->Ln(12); \n $this->SetFont('courier','B',9);\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]),0,0,'');\n $this->Cell(80,6,'RECIBIDO:__________________________________',0,0,'');\n $this->Ln();\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'FECHA/HORA ELABORACIÓN: '.date('d-m-Y h:i:s A'),0,0,'');\n $this->Cell(80,6,'',0,0,'');\n $this->Ln(4);\n }", "public function traitement()\n {\n //placement dans la base de donnée\n $utilisateurs = new \\App\\utilisateurs();\n $utilisateurs->prenom = request('prenom');\n $utilisateurs->nom = request('nom');\n $utilisateurs->mail = request('mail');\n $utilisateurs->MDP = request('password');\n $utilisateurs->id_statut ='1';\n $utilisateurs->save();\n return view('/index');\n }", "private function _agregarComponenteTabuladores() {\n $componente_carga = new Acciones_ComponenteAltaInsercion();\n\n $this->_id_componente = $componente_carga->crearComponente($_POST['id_tb_rel'], 'PaginaTabuladores', '');\n\n // crear componente y obtener id de insercion\n $componente_carga->consultaParametro($this->_id_componente, 'id_tabla', $_GET['id_tabla']);\n $componente_carga->consultaParametro($this->_id_componente, 'intermedia_tb_id', $_GET['intermedia_tb_id']);\n $componente_carga->consultaParametro($this->_id_componente, 'id_tabla_trd', $_GET['id_tabla_trd']);\n if (isset($_POST['id_cp_rel']) && ($_POST['id_cp_rel'] != '')) {\n $componente_carga->consultaParametro($this->_id_componente, 'id_cp_rel', $_POST['id_cp_rel']);\n }\n $componente_carga->consultaParametro($this->_id_componente, 'tabla_relacionada', $_POST['id_tb_rel']);\n }", "public function gerer()\n\t{\n\t\t$query = $this->db->select('e.nom, e.date_creation, e.struls, e.salaire_chef, e.anciennete_chef, e.dernier_bonus, e.message_1, e.message_2, e.production, e.derniere_rentree, e.dernier_salaire,\n\t\t\t\t\t\t\te.historique_publique, e.syndicats_autorises, c_e.position, c_e.evolution, o.nom AS nom_objet, o.image_url, o.prix')\n\t\t\t\t ->from('entreprises e')\n\t\t\t\t ->join('objets o', 'o.id = e.objet_id')\n\t\t\t\t ->join('classement_entreprises c_e', 'c_e.entreprise_id = e.id', 'left')\n\t\t\t\t ->where('e.id', $this->session->userdata('entreprise_id'))\n\t\t\t\t ->get();\n\t\t$entreprise = $query->row();\n\n\t\t// On construit la liste des syndicats de l'entreprise\n\t\t$query = $this->db->select('id')\n\t\t\t\t\t\t ->from('clans')\n\t\t\t\t\t\t ->where('entreprise_id', $this->session->userdata('entreprise_id'))\n\t\t\t\t\t\t ->where('type', Bouzouk::Clans_TypeSyndicat)\n\t\t\t\t\t\t ->get();\n\t\t$clans = $query->result();\n\t\t$syndicats = array(0);\n\n\t\tforeach ($clans as $clan)\n\t\t\t$syndicats[] = $clan->id;\n\n\t\t// On va chercher la liste des employés\n\t\t$query = $this->db->select('j.id, j.pseudo, j.experience, j.statut, e.job_id, e.salaire, e.prime_depart, e.anciennete, e.payer, e.dernier_bonus, p.id AS syndique, c.id AS chef_syndicat')\n\t\t\t\t\t\t ->from('employes e')\n\t\t\t\t\t\t ->join('joueurs j', 'j.id = e.joueur_id')\n \t\t\t\t\t\t ->join('politiciens p', 'p.joueur_id = j.id AND p.clan_id IN ('.implode(',', $syndicats).')', 'left')\n \t\t\t\t\t\t ->join('clans c', 'c.chef_id = j.id AND c.type = '.Bouzouk::Clans_TypeSyndicat, 'left')\n\t\t\t\t\t\t ->where('e.entreprise_id', $this->session->userdata('entreprise_id'))\n\t\t\t\t\t\t ->order_by('e.anciennete')\n\t\t\t\t\t\t ->order_by('date_embauche')\n\t\t\t\t\t\t ->order_by('j.pseudo')\n\t\t\t\t\t\t ->get();\n\t\t$nb_employes = $query->num_rows();\n\t\t$employes = $query->result();\n\n\t\t// On calcule la masse salariale\n\t\t$total_salaires = $entreprise->salaire_chef;\n\t\tforeach ($employes as $employe)\n\t\t{\n\t\t\tif ($employe->statut == Bouzouk::Joueur_Actif AND $employe->payer)\n\t\t\t\t$total_salaires += $employe->salaire;\n\t\t}\n\n\t\t// On va chercher la liste des jobs du jeu\n\t\t$query = $this->db->select('id, nom, experience')\n\t\t\t\t\t\t ->from('jobs')\n\t\t\t\t\t\t ->order_by('experience')\n\t\t\t\t\t\t ->get();\n\t\t$jobs = $query->result();\n\n\t\t// On compte le nombre de bonus hier\n\t\t$nb_bonus = 0;\n\n\t\tforeach ($employes as $employe)\n\t\t\tif ($employe->dernier_bonus)\n\t\t\t\t$nb_bonus++;\n\n\t\t// On compte le nombre de syndicats\n\t\t$nb_syndicats = $this->db->where('type', Bouzouk::Clans_TypeSyndicat)\n\t\t\t\t\t\t\t\t ->where('entreprise_id', $this->session->userdata('entreprise_id'))\n\t\t\t\t\t\t\t\t ->count_all_results('clans');\n\t\t// On va chercher tous les objets possibles pour la création d'entreprises\n\t\t$query = $this->db->select('o.id, o.nom, o.type, o.image_url, COUNT(e.id) AS nb_entreprises')\n\t\t\t\t\t\t ->from('objets o')\n\t\t\t\t\t\t ->join('entreprises e', 'e.objet_id = o.id', 'left')\n\t\t\t\t\t\t ->where('o.disponibilite', 'entreprise')\n\t\t\t\t\t\t ->group_by('o.id')\n\t\t\t\t\t\t ->get();\n\t\t $objets = array();\n\t\t// On créé un array pour le formatage bouffzouk etc\n\t\tforeach ($query->result() as $objet)\n\t\t{\n\t\t\tif ( ! isset($objets[$objet->type]))\n\t\t\t{\n\t\t\t\t$objets[$objet->type] = array($objet);\n\t\t\t}\n\n\t\t\telse\n\t\t\t{\n\t\t\t\t$objets[$objet->type][] = $objet;\n\t\t\t}\n\t\t}\n\t\t// ---------- Hook clans ----------\n\t\t$actions = $this->get_clans_actions();\n\t\t$pression_syndicale = $actions[0];\n\t\t$greve_entreprise = $actions[1];\n\t\t$soutien_salarial = $actions[2];\n\t\t$greve_generale = $actions[3];\n\t\t\n\t\t// On affiche\n\t\t$vars = array(\n\t\t\t'entreprise' => $entreprise,\n\t\t\t'objets' \t => $objets,\n\t\t\t'employes' => $employes,\n\t\t\t'nb_employes' => $nb_employes,\n\t\t\t'nb_bonus' => $nb_bonus,\n\t\t\t'estimation' => $entreprise->production,\n\t\t\t'total_salaires' => $total_salaires,\n\t\t\t'jobs' => $jobs,\n\t\t\t'nb_syndicats' => $nb_syndicats,\n\t\t\t'table_smileys' => creer_table_smileys('message'),\n\t\t\t'pression_syndicale' => $pression_syndicale,\n\t\t\t'soutien_salarial' => $soutien_salarial,\n\t\t\t'greve_entreprise' => $greve_entreprise,\n\t\t\t'greve_generale' => $greve_generale\n\t\t\t);\n\t\treturn $this->layout->view('entreprises/gerer', $vars);\n\t}", "private function prevenir_joueurs($texte)\n\t{\n\t\tif (preg_match_all('#{(.+)\\|(\\d+)}#Ui', $texte, $joueurs))\n\t\t{\n\t\t\t$this->load->library('lib_missive');\n\n\t\t\t$data_missives = array();\n\t\t\t$datetime = bdd_datetime();\n\t\t\t$timbre = $this->lib_missive->timbres(0);\n\t\t\t$ids_deja_faits = array();\n\t\t\t\n\t\t\t// Pour chaque lien trouvé\n\t\t\tfor ($i = 0; $i < count($joueurs[0]); $i++)\n\t\t\t{\n\t\t\t\t// On récupère id, pseudo\n\t\t\t\t$id = $joueurs[2][$i];\n\t\t\t\t$pseudo = $joueurs[1][$i];\n\n\t\t\t\t// On vérifie que le bouzouk existe et est valide\n\t\t\t\t$joueur_existe = $this->db->where('id', $id)\n\t\t\t\t\t\t\t\t\t\t ->where('pseudo', $pseudo)\n\t\t\t\t\t\t\t\t\t\t ->where_in('statut', array(Bouzouk::Joueur_Actif, Bouzouk::Joueur_Asile, Bouzouk::Joueur_Pause))\n\t\t\t\t\t\t\t\t\t\t ->count_all_results('joueurs');\n\n\t\t\t\t// Si on a une correspondance, on ajoute la missive\n\t\t\t\tif ($joueur_existe == 1 && ! in_array($id, $ids_deja_faits))\n\t\t\t\t{\n\t\t\t\t\t// On prépare une missive\n\t\t\t\t\t$message = \"\tBonjour $pseudo\\n\\n\";\n\t\t\t\t\t$message .= \"Un informateur anonyme nous a indiqué qu'un journaliste t'a cité dans le journal d'aujourd'hui\\n\";\n\t\t\t\t\t$message .= \"<a href='\".site_url('gazette').\"'>Lire la gazette</a>\\n\\n\";\n\t\t\t\t\t$message .= \"\tAmicalement, Ella Poolett\";\n\n\t\t\t\t\t$data_missives[] = array(\n\t\t\t\t\t\t'expediteur_id' => Bouzouk::Robot_MissPoohLett,\n\t\t\t\t\t\t'destinataire_id' => $id,\n\t\t\t\t\t\t'date_envoi' => $datetime,\n\t\t\t\t\t\t'timbre' => $timbre,\n\t\t\t\t\t\t'objet' => 'Citation gazette',\n\t\t\t\t\t\t'message' => $message\n\t\t\t\t\t);\n\n\t\t\t\t\t$ids_deja_faits[] = $id;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (count($data_missives) > 0)\n\t\t\t\t$this->db->insert_batch('missives', $data_missives);\n\t\t}\n\t}", "public function main(ChansonStorageMySQL $chansonStorage, AccountStorageMysql $accountStorage){\n session_start();\n \n // verifiacation s'il n'existe pas des information à afficher \n $feedback = key_exists('feedback', $_SESSION) ? $_SESSION['feedback'] : '';\n $_SESSION['feedback'] = '';\n\n // on passe le routeur à la vue\n if(!key_exists(\"user\",$_SESSION)){\n $this->view= new View($this,$feedback);\n }else{\n if($_SESSION[\"user\"]->getStatut()===\"admin\" ){\n $this->view= new AdminView($this,$_SESSION[\"user\"],$feedback);\n }else{\n $this->view= new PrivateView($this,$_SESSION[\"user\"],$feedback);\n }\n }\n\n \n\n // on instancie notre controller\n $controllerChansons= new Controller($this->view, $chansonStorage,$accountStorage);\n $controllerAccount= new ControllerAccount($this->view,$accountStorage);\n\n /**\n * gestion des urls afin de pouvoir afficher les pages correspondantes\n */\n // si le parametre ou action son passe en url\n if(key_exists(\"PATH_INFO\" , $_SERVER)){\n\n $tab= explode('/', $_SERVER[\"PATH_INFO\"]);\n $size=count($tab);\n $i=1;\n\n if($size===2){\n $action=htmlspecialchars($tab[1]);\n switch ($action) {\n case 'apropos':\n $this->view->makeApropos();\n break;\n case 'liste':\n $controllerChansons->showList();\n break;\n case 'listUser':\n if(key_exists(\"user\",$_SESSION)){\n if($_SESSION[\"user\"]->getStatut()===\"admin\"){\n $controllerAccount->showUserList();\n }else{\n $this->view->displayAdminPageFeedBack(\".\",\"Vous de ver etre admin pour voir la liste des utilisateur \");\n }\n \n }else{\n $this->view->displayConnexionFeedback(\"Connetez vous pour voir la liste des utilisateur attention vous devez être egalement de statut admin\"); \n }\n \n break;\n\n case 'nouveau':\n if(key_exists(\"user\",$_SESSION)){\n $controllerChansons->getView()->makeCreationFormChansonPage($controllerChansons->newChanson());\n }else{\n $this->view->displayConnexionFeedback(\"Connetez vous pour voir la page personnaliser de la chanson\");\n } \n break;\n\n case 'sauverNouveau':\n if($_SERVER[\"REQUEST_METHOD\"] === \"POST\"){\n if(key_exists(\"user\",$_SESSION)){\n $controllerChansons->saveNewChanson($_POST);\n }else{\n $this->view->displayConnexionFeedback(\"Vous devez etre connecter pour enregistrer une nouvelle chanson\");\n } \n }else{\n $this->view->makePageUnaccessible();\n }\n break;\n case '':\n $this->view->welcomePage();\n break;\n case 'connexion':\n if(!key_exists(\"user\",$_SESSION)){\n $this->view->makeLoginFormPage();\n }else{\n $this->view->displayAlreadyConnectSuccess();\n } \n break;\n case 'deconnexion':\n if(key_exists(\"user\",$_SESSION)){\n $controllerChansons->logout();\n }else{\n $this->view->displayConnexionFeedback(\"Vous devez etre connecter pour experer vous deconnecter\");\n } \n break;\n case 'inscription':\n $this->view->makeSignInFormPage($controllerAccount->newAccount());\n break;\n // à changer pour modification ie controller des account à part;\n case \"confirmConnexion\":\n if($_SERVER[\"REQUEST_METHOD\"] === \"POST\"){\n $controllerChansons->login($_POST);\n }else{\n $this->view->makePageUnaccessible();\n }\n break;\n case 'confirmInscription':\n if($_SERVER[\"REQUEST_METHOD\"] === \"POST\"){\n $controllerAccount->saveAccount($_POST);\n }else{\n $this->view->makePageUnaccessible();\n }\n default:\n if(key_exists(\"user\",$_SESSION)){\n $controllerChansons->showInformation($action);\n }else{\n $this->view->displayConnexionFeedback(\"Connetez vous pour voir la page personnaliser de la chanson\");\n } \n break;\n }\n }\n\n \n if($size===3){\n for($i; $i<$size ; $i++){\n $action= $tab[$i];\n switch ($action){\n case 'supprimer':\n if(key_exists(\"user\",$_SESSION)){\n $id= htmlspecialchars($tab[$i-1]);\n $controllerChansons->askChansonDeletion($id);\n }else{\n $this->view->displayConnexionFeedback(\"Vous devez être connecter pour supprimer des chansons\");\n }\n break;\n case 'confirmerSuppression':\n if($_SERVER[\"REQUEST_METHOD\"] === \"POST\"){\n if(key_exists(\"user\",$_SESSION)){\n $id= htmlspecialchars($tab[$i-1]);\n $controllerChansons->deleteChanson($id);\n }else{\n $this->view->displayConnexionFeedback(\"Vous devez être connecter pour supprimer des chansons\");\n }\n }else{\n $this->view->makePageUnaccessible();\n }\n break;\n case 'confirmerModification':\n if($_SERVER[\"REQUEST_METHOD\"] === \"POST\"){\n if(key_exists(\"user\",$_SESSION)){\n $id= htmlspecialchars($tab[$i-1]);\n // echo \"pas dedans\";\n $controllerChansons->updateChanson($_POST,$id);\n }else{\n $this->view->displayConnexionFeedback(\"Vous devez être connecter pour modifier des chansons\");\n }\n }else{\n $this->view->makePageUnaccessible();\n }\n break;\n case \"modifier\":\n if(key_exists(\"user\",$_SESSION)){\n $id= htmlspecialchars($tab[$i-1]);\n $controllerChansons->askChansonModification($id);\n }else{\n $this->view->displayConnexionFeedback(\"Vous devez être connecter pour modifier des chansons\");\n }\n \n break;\n break;\n case 'supprimerUser':\n if(key_exists(\"user\",$_SESSION)){\n if($_SESSION[\"user\"]->getStatut()===\"admin\"){\n $id= htmlspecialchars($tab[$i-1]);\n $controllerAccount->askDeletionUser($id);\n }else{\n $this->view->displayAdminPageFeedBack(\"Vous de ver etre admin pour supprimer un \");\n }\n }else{\n $this->view->displayConnexionFeedback(\"Connetez vous pour pouvoir supprimer un comptes\"); \n }\n break;\n case 'confirmSuppressionUser':\n if($_SERVER[\"REQUEST_METHOD\"] === \"POST\"){\n if(key_exists(\"user\",$_SESSION)){\n if($_SESSION[\"user\"]->getStatut()===\"admin\"){\n $id= htmlspecialchars($tab[$i-1]);\n $controllerAccount->DeleteAccount($id);\n }else{\n $this->view->displayAdminPageFeedBack(\"Vous devez etre admin pour supprimer un utilisateur\");\n }\n }else{\n $this->view->displayConnexionFeedback(\"Connetez vous pour pouvoir supprimer un comptes\"); \n }\n }else{\n $this->view->makePageUnaccessible();\n }\n break;\n\n default:\n $this->view->makePageUnaccessible();\n break;\n }\n \n \n }\n }\n\n if($size >4){\n //chargement de la page d'erreur \n\n }\n\n\n }else{\n // affichage de la page principale avec menu \n $this->view->welcomePage();\n }\n\n\n\n $this->view->render();\n\n }", "public function ajouter()\n {\n $ajout_return = $this->loadModel('SallesManagerModel')->add_item('salles');\n $this->quit( '/gestionsalles', 'events.gestionsalles.msg', $ajout_return );\n }", "public function VerificaArqueo()\n\t{\n\t\tself::SetNames();\n \n if($_SESSION[\"acceso\"] == \"administrador\" || $_SESSION[\"acceso\"] == \"cajero\"){\n\n $sql = \" SELECT * FROM arqueocaja WHERE codigo = ? and statusarqueo = 1\";\n $stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_SESSION[\"codigo\"]));\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n echo \"<div class='alert alert-danger'>\";\n echo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n echo \"<center><span class='fa fa-info-circle'></span> DISCULPE, NO EXISTE UN ARQUEO DE CAJA PARA PROCESAR VENTAS, DEBERA DE INICIARLO PARA CONTINUAR.<br> SI DESEA REALIZAR UN ARQUEO DE CAJA HAZ CLIC <a href='forarqueo'>AQUI</a></center>\";\n echo \"</div>\";\n\t\t?>\n\t\t<?php\n\t\t}\n\t\telse\n\t\t{\n\t\t\t?>\n\n\t<!-- Aquí todo el código para mesas y sillas --> \n\n <div class=\"row\" id=\"salas-mesas\">\n \n <ul class=\"nav nav-tabs tabs\">\n <?php\n $sala = new Login();\n $sala = $sala->ListarSalas();\n if($sala==\"\"){ \n echo \"<div class='alert alert-danger'>\";\n echo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n echo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN SALAS REGISTRADAS ACTUALMENTE</center>\";\n echo \"</div>\"; \n } else {\n for ($i = 0; $i < sizeof($sala); $i++) {\n ?>\n <?php if ($i === 0): ?>\n <li class=\"tab active\">\n <?php else: ?>\n <li class=\"tab\">\n <?php endif; ?>\n <a href=\"#<?php echo $sala[$i]['codsala'];?>\" data-toggle=\"tab\" aria-expanded=\"true\" role=\"tab\">\n <span class=\"visible-xs\" title=\"<?php echo $sala[$i]['nombresala'];?>\"><i class=\"fa fa-building\"></i></span>\n <span class=\"hidden-xs\"><?php echo $sala[$i]['nombresala'];?></span>\n </a>\n </li>\n <?php\n }\n }\n ?>\n</ul>\n<div class=\"tab-content\">\n <?php\n $sala = new Login();\n $sala = $sala->ListarSalas();\n if($sala==\"\"){ echo \"\"; \n } else {\n for ($i = 0; $i < sizeof($sala); $i++) {\n ?>\n <?php if ($i === 0): ?>\n <div class=\"tab-pane active\" id=\"<?php echo $sala[$i]['codsala'];?>\">\n <?php else: ?>\n <div class=\"tab-pane\" id=\"<?php echo $sala[$i]['codsala'];?>\">\n <?php endif; ?>\n <?php\n $codigo_sala = $sala[$i]['codsala'];\n ?>\n <p>\n <!--AQUI LISTO LAS MESAS -->\n <ul class=\"users-list clearfix\" id=\"listMesas\">\n <?php\n $mesa = new Login();\n $mesa = $mesa->ListarMesas();\n if($mesa==\"\"){ \n echo \"<div class='alert alert-danger'>\";\n echo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n echo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN MESAS REGISTRADAS EN LAS SALAS ACTUALMENTE</center>\";\n echo \"</div>\"; \n } else {\n for ($ii = 0; $ii < sizeof($mesa); $ii++) {\n ?>\n <?php\n if ($mesa[$ii]['codsala'] == $codigo_sala) {\n ?>\n <li style=\"display:inline;float: left; margin-right: 4px;\">\n<div class=\"users-list-name codMesa\" title=\"<?php echo $mesa[$ii]['nombremesa']; ?>\" style=\"cursor:pointer;\" onclick=\"RecibeMesa('<?php echo base64_encode($mesa[$ii]['codmesa']); ?>')\">\n <div id=\"<?php\n echo $mesa[$ii]['nombremesa'];\n ?>\" style=\"width:110px;height:110px;-moz-border-radius:50%;-webkit-border-radius: 50%;border-radius: 50%;background:<?php\n if ($mesa[$ii]['statusmesa'] == '0') {\n ?>#5cb85c;<?php\n }\n ?>red\" class=\"miMesa\"><img src=\"assets/images/mesa.png\" style=\"display:inline;margin:18px;float:left;width:78px;height:65px;\"></div>\n <center><strong><?php\n echo $mesa[$ii]['nombremesa'];\n ?></strong></center>\n </div>\n </li>\n <?php\n }\n ?>\n <?php\n }\n }\n ?>\n </ul>\n <!--AQUI LISTO LAS MESAS FIN -->\n </p>\n </div>\n <?php\n }\n }\n ?>\n </div>\n</div>\n<!-- Fin de todo el código para mesas y sillas -->\n\n\t\t\t<?php\n\t\t} \n\n\t} else {\n\n $sql = \" SELECT * FROM arqueocaja WHERE statusarqueo = '1'\";\n $stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\techo \"<div class='alert alert-danger'>\";\n echo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n echo \"<center><span class='fa fa-info-circle'></span> DISCULPE, NO EXISTE UN ARQUEO DE CAJA PARA PROCESAR VENTAS, DIRIJASE AL ADMINISTRADOR O CAJERO PARA QUE INICIE PARA PROCESAR VENTAS</center>\";\n echo \"</div>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t?>\n\n\t<!-- Aquí todo el código para mesas y sillas --> \n\n <div class=\"row\" id=\"salas-mesas\">\n \n <ul class=\"nav nav-tabs tabs\">\n <?php\n $sala = new Login();\n $sala = $sala->ListarSalas();\n if($sala==\"\"){ \n echo \"<div class='alert alert-danger'>\";\n echo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n echo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN SALAS REGISTRADAS ACTUALMENTE</center>\";\n echo \"</div>\"; \n } else {\n for ($i = 0; $i < sizeof($sala); $i++) {\n ?>\n <?php if ($i === 0): ?>\n <li class=\"tab active\">\n <?php else: ?>\n <li class=\"tab\">\n <?php endif; ?>\n <a href=\"#<?php echo $sala[$i]['codsala'];?>\" data-toggle=\"tab\" aria-expanded=\"true\" role=\"tab\">\n <span class=\"visible-xs\"><i class=\"fa fa-building\"></i></span>\n <span class=\"hidden-xs\"><?php echo $sala[$i]['nombresala'];?></span>\n </a>\n </li>\n <?php\n }\n }\n ?>\n</ul>\n<div class=\"tab-content\">\n <?php\n $sala = new Login();\n $sala = $sala->ListarSalas();\n if($sala==\"\"){ echo \"\"; \n } else {\n for ($i = 0; $i < sizeof($sala); $i++) {\n ?>\n <?php if ($i === 0): ?>\n <div class=\"tab-pane active\" id=\"<?php echo $sala[$i]['codsala'];?>\">\n <?php else: ?>\n <div class=\"tab-pane\" id=\"<?php echo $sala[$i]['codsala'];?>\">\n <?php endif; ?>\n <?php\n $codigo_sala = $sala[$i]['codsala'];\n ?>\n <p>\n <!--AQUI LISTO LAS MESAS -->\n <ul class=\"users-list clearfix\" id=\"listMesas\">\n <?php\n $mesa = new Login();\n $mesa = $mesa->ListarMesas();\n if($mesa==\"\"){ \n echo \"<div class='alert alert-danger'>\";\n echo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n echo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN MESAS REGISTRADAS EN LAS SALAS ACTUALMENTE</center>\";\n echo \"</div>\"; \n } else {\n for ($ii = 0; $ii < sizeof($mesa); $ii++) {\n ?>\n <?php\n if ($mesa[$ii]['codsala'] == $codigo_sala) {\n ?>\n <li style=\"display:inline;float: left; margin-right: 4px;\">\n<div class=\"users-list-name codMesa\" title=\"<?php echo $mesa[$ii]['nombremesa']; ?>\" style=\"cursor:pointer;\" onclick=\"RecibeMesa('<?php echo base64_encode($mesa[$ii]['codmesa']); ?>')\">\n <div id=\"<?php\n echo $mesa[$ii]['nombremesa'];\n ?>\" style=\"width: 110px;height: 110px;-moz-border-radius: 50%;-webkit-border-radius: 50%;border-radius: 50%;background:<?php\n if ($mesa[$ii]['statusmesa'] == '0') {\n ?>#5cb85c;<?php\n }\n ?>red\" class=\"miMesa\"><img src=\"assets/images/mesa.png\" style=\"padding:12px;margin:11px;float:left;width:90px;\"></div>\n <center><strong><?php\n echo $mesa[$ii]['nombremesa'];\n ?></strong></center>\n </div>\n </li>\n <?php\n }\n ?>\n <?php\n }\n }\n ?>\n </ul>\n <!--AQUI LISTO LAS MESAS FIN -->\n </p>\n </div>\n <?php\n }\n }\n ?>\n </div>\n</div>\n<!-- Fin de todo el código para mesas y sillas -->\n\n\t\t\t<?php\n\t\t}\n\t}\n}", "public function run()\n {\n //\n \t$componentes = array (\n // seguridad\n array('nombre' => 'indice perfiles', 'modulo_id' => 1),\n array('nombre' => 'ver perfil', 'modulo_id' => 1),\n array('nombre' => 'crear perfil', 'modulo_id' => 1),\n array('nombre' => 'editar perfil', 'modulo_id' => 1),\n array('nombre' => 'eliminar perfil', 'modulo_id' => 1),\n array('nombre' => 'indice usuarios', 'modulo_id' => 1),\n array('nombre' => 'ver usuario', 'modulo_id' => 1),\n array('nombre' => 'crear usuario', 'modulo_id' => 1),\n array('nombre' => 'editar usuario', 'modulo_id' => 1),\n array('nombre' => 'eliminar usuario', 'modulo_id' => 1),\n // empleado\n array('nombre' => 'indice empleados', 'modulo_id' => 2),\n array('nombre' => 'ver empleado', 'modulo_id' => 2),\n array('nombre' => 'crear empleado', 'modulo_id' => 2),\n array('nombre' => 'editar empleado', 'modulo_id' => 2),\n array('nombre' => 'indice datos empleado', 'modulo_id' => 2),\n array('nombre' => 'ver datos empleado', 'modulo_id' => 2),\n array('nombre' => 'crear datos empleado', 'modulo_id' => 2),\n array('nombre' => 'editar datos empleado', 'modulo_id' => 2),\n array('nombre' => 'indice grupos', 'modulo_id' => 2),\n array('nombre' => 'ver grupo', 'modulo_id' => 2),\n array('nombre' => 'crear grupo', 'modulo_id' => 2),\n array('nombre' => 'editar grupo', 'modulo_id' => 2),\n // clientes\n array('nombre' => 'indice clientes', 'modulo_id' => 3),\n array('nombre' => 'ver cliente', 'modulo_id' => 3),\n array('nombre' => 'crear cliente', 'modulo_id' => 3),\n array('nombre' => 'editar cliente', 'modulo_id' => 3),\n array('nombre' => 'pagos cliente', 'modulo_id' => 3),\n array('nombre' => 'cotizacion cliente', 'modulo_id' => 3),\n // crm\n array('nombre' => 'indice crm', 'modulo_id' => 4),\n array('nombre' => 'ver crm', 'modulo_id' => 4),\n array('nombre' => 'crear crm', 'modulo_id' => 4),\n array('nombre' => 'editar crm', 'modulo_id' => 4),\n // solicitantes\n array('nombre' => 'indice solicitantes', 'modulo_id' => 5),\n array('nombre' => 'ver solicitante', 'modulo_id' => 5),\n array('nombre' => 'crear solicitante', 'modulo_id' => 5),\n array('nombre' => 'editar solicitante', 'modulo_id' => 5),\n array('nombre' => 'cotizacion solicitante', 'modulo_id' => 5),\n // proveedores\n array('nombre' => 'indice proveedores', 'modulo_id' => 6),\n array('nombre' => 'ver proveedor', 'modulo_id' => 6),\n array('nombre' => 'crear proveedor', 'modulo_id' => 6),\n array('nombre' => 'editar proveedor', 'modulo_id' => 6),\n array('nombre' => 'indice datos proveedor', 'modulo_id' => 6),\n array('nombre' => 'ver datos proveedor', 'modulo_id' => 6),\n array('nombre' => 'crear datos proveedor', 'modulo_id' => 6),\n array('nombre' => 'editar datos proveedor', 'modulo_id' => 6),\n array('nombre' => 'indice filtros', 'modulo_id' => 6),\n array('nombre' => 'ver filtros', 'modulo_id' => 6),\n array('nombre' => 'crear filtros', 'modulo_id' => 6),\n array('nombre' => 'editar filtros', 'modulo_id' => 6),\n array('nombre' => 'indice tipos', 'modulo_id' => 6),\n array('nombre' => 'ver tipos', 'modulo_id' => 6),\n array('nombre' => 'crear tipos', 'modulo_id' => 6),\n array('nombre' => 'editar tipos', 'modulo_id' => 6),\n // productos\n array('nombre' => 'indice productos', 'modulo_id' => 7),\n array('nombre' => 'ver producto', 'modulo_id' => 7),\n array('nombre' => 'alta excel', 'modulo_id' => 7),\n // oficinas\n array('nombre' => 'indice regiones', 'modulo_id' => 8),\n array('nombre' => 'indice estados', 'modulo_id' => 8),\n array('nombre' => 'indice oficinas', 'modulo_id' => 8),\n array('nombre' => 'ver oficina', 'modulo_id' => 8),\n array('nombre' => 'crear oficina', 'modulo_id' => 8),\n array('nombre' => 'editar oficina', 'modulo_id' => 8),\n array('nombre' => 'indice puntos', 'modulo_id' => 8),\n array('nombre' => 'ver punto', 'modulo_id' => 8),\n array('nombre' => 'crear punto', 'modulo_id' => 8),\n array('nombre' => 'editar punto', 'modulo_id' => 8),\n // precargas\n array('nombre' => 'canal de ventas', 'modulo_id' => 9),\n array('nombre' => 'bancos', 'modulo_id' => 9),\n array('nombre' => 'contratos', 'modulo_id' => 9),\n array('nombre' => 'puestos', 'modulo_id' => 9),\n array('nombre' => 'giros', 'modulo_id' => 9),\n array('nombre' => 'forma contacto', 'modulo_id' => 9),\n \t);\n\n \tComponente::insert($componentes);\n }", "public function add()\n {\n \n // 1 charge la class client dans models\n // 2 instantantie la class client (Cree objet de type client)\n $this->loadModel(\"Chambres\") ;\n // 3 apell de la methode getAll() display all room from database\n $datas = $this->model->getAll() ;\n \n //save room added \n $this->model->insert() ; \n \n // 4 Affichage du tableua\n \n $this->render('chambre',compact('datas')) ;\n }", "public function tomados($id)//id planilla\n {\n $planilla = Planilla::where('id', $id)->where('estado', 'Activa')->first();\n\n if (empty($planilla)) {\n session()->flash('danger', 'La planilla no existe');\n return redirect()->action('HomeController@index');\n }\n\n //el usuario debe ser encargado, pertenecer al local, no estar desvinculado, si no redirecciona al index\n $locales = Local_User::where('user_id', Auth::user()->id)\n ->where('estado', '!=', 'Desvinculado')\n ->where('local_id', $planilla->local_id)\n ->where('rol', 'Encargado')\n ->first();\n\n if (empty($locales)) {\n session()->flash('danger', 'Usted no tiene privilegios suficientes.');\n return redirect()->action('HomeController@index');\n }\n\n //Esta opción de asignar solo es para locales premmiums\n if($locales->Local->cuenta == 'Free'){\n session()->flash('danger', 'Opción disponibles solo para locales Premium.');\n return redirect()->route('usuario.planilla.opciones', ['id' => $id]);\n }\n\n //Esta opción es para locales Activos, no para bloqueados\n if($locales->Local->estado == 'Bloqueado'){\n session()->flash('danger', 'El local se encuentra temporalmente bloqueado.');\n return redirect()->route('usuario.mis-locales');\n }\n //Fin Validación \n\n /*\n $usuarios = //DB::table('local_user')\n Local_User::where('local_id', $planilla->local_id)\n ->where('estado', '!=', 'Desvinculado')\n //->orderBy('rol', 'desc')\n ->paginate(20);\n\n \n $turnos = DB::table('planilla_turno_user')\n ->where('planilla_id', $id)\n ->where('estado', 'Activo')\n ->select('id','tipo','exTipo','local_user_id')\n ->get();\n\n foreach ($usuarios as $usuario) {\n $asignar = 0;\n $toma = 0;\n $repechaje = 0;\n $pretoma = 0;\n $regalo = 0;\n $cambio = 0;\n $cedido = 0;\n\n foreach ($turnos as $turno) {\n if($usuario->id == $turno->local_user_id)\n {\n if (($turno->tipo == \"Toma\") || ($turno->tipo == \"Regalando\" && $turno->exTipo == \"Toma\") || ($turno->tipo == \"Cediendo\" && $turno->exTipo == \"Toma\") || ($turno->tipo == \"Cambiando\" && $turno->exTipo == \"Toma\")) {\n $toma++;\n }elseif (($turno->tipo == \"Asignado\") || ($turno->tipo == \"Regalando\" && $turno->exTipo == \"Asignado\") || ($turno->tipo == \"Cediendo\" && $turno->exTipo == \"Asignado\") || ($turno->tipo == \"Cambiando\" && $turno->exTipo == \"Asignado\")) {\n $asignar++;\n }elseif (($turno->tipo == \"Repechaje\") || ($turno->tipo == \"Regalando\" && $turno->exTipo == \"Repechaje\") || ($turno->tipo == \"Cediendo\" && $turno->exTipo == \"Repechaje\") || ($turno->tipo == \"Cambiando\" && $turno->exTipo == \"Repechaje\")) {\n $repechaje++;\n }elseif (($turno->tipo == \"Pre Toma\") || ($turno->tipo == \"Regalando\" && $turno->exTipo == \"Pre Toma\") || ($turno->tipo == \"Cediendo\" && $turno->exTipo == \"Pre Toma\") || ($turno->tipo == \"Cambiando\" && $turno->exTipo == \"Pre Toma\")) {\n $pretoma++;\n }elseif (($turno->tipo == \"Cambio\") || ($turno->tipo == \"Regalando\" && $turno->exTipo == \"Cambio\") || ($turno->tipo == \"Cediendo\" && $turno->exTipo == \"Cambio\") || ($turno->tipo == \"Cambiando\" && $turno->exTipo == \"Cambio\")) {\n $cambio++;\n }elseif (($turno->tipo == \"Regalo\") || ($turno->tipo == \"Regalando\" && $turno->exTipo == \"Regalo\") || ($turno->tipo == \"Cediendo\" && $turno->exTipo == \"Regalo\") || ($turno->tipo == \"Cambiando\" && $turno->exTipo == \"Regalo\")) {\n $regalo++;\n }elseif (($turno->tipo == \"Cedido\") || ($turno->tipo == \"Regalando\" && $turno->exTipo == \"Cedido\") || ($turno->tipo == \"Cediendo\" && $turno->exTipo == \"Cedido\") || ($turno->tipo == \"Cambiando\" && $turno->exTipo == \"Cedido\")) {\n $cedido++;\n }\n }\n }\n $usuario->asignar = $asignar;\n $usuario->toma = $toma;\n $usuario->repechaje = $repechaje;\n $usuario->pretoma = $pretoma;\n $usuario->regalo = $regalo;\n $usuario->cambio = $cambio;\n $usuario->cedido = $cedido;\n $usuario->cantTurnos = $asignar + $toma + $repechaje + $pretoma + $regalo + $cambio + $cedido;\n }\n */\n\n $usuarios = Planilla_Turno_User::select('planilla_turno_user.local_user_id', 'users.nombre', 'users.apellido', 'local_user.rol' )\n ->where([['planilla_id', $planilla->id], ['planilla_turno_user.estado', 'Activo']])\n ->join('local_user', 'local_user.id', '=', 'planilla_turno_user.local_user_id')\n ->join('users', 'users.id', '=', 'local_user.user_id')\n ->selectRaw('count(*) as cantTurnos')\n ->selectRaw('count(case when (tipo = \"Toma\") or (tipo = \"Regalando\" and exTipo = \"Toma\") or (tipo = \"Cediendo\" and exTipo = \"Toma\") or (tipo = \"Cambiando\" and exTipo = \"Toma\") then 9 end) as toma')\n ->selectRaw('count(case when (tipo =\"Repechaje\") or (tipo = \"Regalando\" and exTipo = \"Repechaje\") or (tipo = \"Cediendo\" and exTipo = \"Repechaje\") or (tipo = \"Cambiando\" and exTipo = \"Repechaje\") then 1 end) as repechaje')\n ->selectRaw('count(case when (tipo =\"Asignado\") or (tipo = \"Regalando\" and exTipo = \"Asignado\") or (tipo = \"Cediendo\" and exTipo = \"Asignado\") or (tipo = \"Cambiando\" and exTipo = \"Asignado\") then 1 end) as asignar')\n ->selectRaw('count(case when (tipo =\"Pre Toma\") or (tipo = \"Regalando\" and exTipo = \"Pre Toma\") or (tipo = \"Cediendo\" and exTipo = \"Pre Toma\") or (tipo = \"Cambiando\" and exTipo = \"Pre Toma\") then 1 end) as pretoma')\n ->selectRaw('count(case when (tipo =\"Cedido\") or (tipo = \"Regalando\" and exTipo = \"Cedido\") or (tipo = \"Cediendo\" and exTipo = \"Cedido\") or (tipo = \"Cambiando\" and exTipo = \"Cedido\") then 1 end) as cedido')\n ->selectRaw('count(case when (tipo =\"Cambio\") or (tipo = \"Regalando\" and exTipo = \"Cambio\") or (tipo = \"Cediendo\" and exTipo = \"Cambio\") or (tipo = \"Cambiando\" and exTipo = \"Cambio\") then 1 end) as cambio')\n ->selectRaw('count(case when (tipo =\"Regalo\") or (tipo = \"Regalando\" and exTipo = \"Regalo\") or (tipo = \"Cediendo\" and exTipo = \"Regalo\") or (tipo = \"Cambiando\" and exTipo = \"Regalo\") then 1 end) as regalo')\n ->groupBy('planilla_turno_user.local_user_id')\n ->paginate(20);\n\n //'Usuario : '.$usuarios->id.' Cant. Tomados : '.$usuarios->cantTurnos\n //dd($usuarios);\n return view('usuario.planilla.tomados')\n ->with('planilla', $planilla)\n ->with('usuarios', $usuarios);\n }", "public function index()\n\t{\n\t\t// On charge le modele\n\t\t$this->load->model('candidat');\n\n\t\t// On recupere les enregistrements\n\t\t$tuples = $this->candidat->tous_les_candidats();\n\n\t\tvar_dump($tuples);\n\t}", "public function listarAtletas($id,$liga){\n //$sql = \"SELECT `EntrenadoresAthlete`.`id`, `EntrenadoresAthlete`.`coache_id`, `CdeportivoUser`.`athlete_id`, `CdeportivoUser`.`cdeportivo_id`, `CdeportivoUser`.`nivelrendimiento`,`Coache`.`id`, `Coache`.`user_id`, `Coache`.`liga_id`, `Coache`.`disponibilidad`, `Coache`.`descripcion` FROM `sporte`.`entrenadores_athletes` AS `EntrenadoresAthlete` LEFT JOIN `sporte`.`cdeportivo_users` AS `CdeportivoUser` ON (`EntrenadoresAthlete`.`cdeportivo_id` = `CdeportivoUser`.`cdeportivo_id`) LEFT JOIN `sporte`.`athletes` AS `Athlete` ON (`CdeportivoUser`.`athlete_id`=`Athlete`.`id`) LEFT JOIN `sporte`.`coaches` AS `Coache` ON (`EntrenadoresAthlete`.`coache_id` = `Coache`.`id`) WHERE `Coache`.`liga_id`=:em and `Coache`.`user_id`=:enSELECT `EntrenadoresAthlete`.`id`, `EntrenadoresAthlete`.`coache_id`, `CdeportivoUser`.`athlete_id`, `User`.nombre,`User`.apellido, `CdeportivoUser`.`cdeportivo_id`, `CdeportivoUser`.`nivelrendimiento`, `Coache`.`user_id`, `Coache`.`liga_id` FROM `sporte`.`entrenadores_athletes` AS `EntrenadoresAthlete` LEFT JOIN `sporte`.`cdeportivo_users` AS `CdeportivoUser` ON (`EntrenadoresAthlete`.`cdeportivo_id` = `CdeportivoUser`.`cdeportivo_id`) LEFT JOIN `sporte`.`athletes` AS `Athlete` ON (`CdeportivoUser`.`athlete_id`=`Athlete`.`id`) LEFT JOIN `sporte`.`users` AS `User` ON (`Athlete`.`user_id`=`User`.`id`) LEFT JOIN `sporte`.`coaches` AS `Coache` ON (`EntrenadoresAthlete`.`coache_id` = `Coache`.`id`) WHERE `Coache`.`liga_id`= :em and `Coache`.`user_id`= :en\";\n $sql=\"SELECT `EntrenadoresAthlete`.`id`, `EntrenadoresAthlete`.`coache_id`, `CdeportivoUser`.`athlete_id`, `User`.nombre,`User`.apellido, `CdeportivoUser`.`cdeportivo_id`, `CdeportivoUser`.`nivelrendimiento`, `Coache`.`user_id`, `Coache`.`liga_id` FROM `sporte`.`entrenadores_athletes` AS `EntrenadoresAthlete` LEFT JOIN `sporte`.`cdeportivo_users` AS `CdeportivoUser` ON (`EntrenadoresAthlete`.`cdeportivo_id` = `CdeportivoUser`.`cdeportivo_id`) LEFT JOIN `sporte`.`athletes` AS `Athlete` ON (`CdeportivoUser`.`athlete_id`=`Athlete`.`id`) LEFT JOIN `sporte`.`users` AS `User` ON (`Athlete`.`user_id`=`User`.`id`) LEFT JOIN `sporte`.`coaches` AS `Coache` ON (`EntrenadoresAthlete`.`coache_id` = `Coache`.`id`) WHERE `Coache`.`liga_id`= :em and `Coache`.`user_id`= :en\";\n $sentencia = $this->dblink->prepare($sql);\n $sentencia->bindParam(\":em\", $liga);\n $sentencia->bindParam(\":en\", $id);\n $sentencia->execute(); \n return $sentencia->fetchAll(PDO::FETCH_OBJ);\n }", "function tous_auteurs_date_passage() {\r\n\tglobal $couleur_claire, $connect_id_auteur;\r\n\r\n\t// fixer le nombre de ligne du tableau (tranche)\r\n\t$fl = $GLOBALS['actijour']['nbl_aut'];\r\n\r\n\t// recup $vl dans URL\r\n\t$dl = intval(_request('vl'));\r\n\t$dl = ($dl + 0);\r\n\t// valeur de tranche affichꥍ\r\n\t$nba1 = $dl + 1;\r\n\r\n\t$p_st = _request('st');\r\n\tif (!$p_st) {\r\n\t\t$where_st = \"statut IN ('0minirezo','1comite','6forum')\";\r\n\t\t$p_st = 'tous';\r\n\t} else {\r\n\t\t$where_st = \"statut = \" . _q($p_st);\r\n\t}\r\n\r\n\t$q = sql_select(\"SQL_CALC_FOUND_ROWS id_auteur, statut, nom,\r\n\t\t\t\t\t\tDATE_FORMAT(en_ligne,'%d/%m/%y %H:%i') AS vu \"\r\n\t\t. \"FROM spip_auteurs \"\r\n\t\t. \"WHERE $where_st \"\r\n\t\t. \"ORDER BY en_ligne DESC,nom \"\r\n\t\t. \"LIMIT $dl,$fl\"\r\n\t);\r\n\r\n\t// recup nombre total d'entrees\r\n\t$nl = sql_select(\"FOUND_ROWS()\");\r\n\t$found = @sql_fetch($nl);\r\n\t$nb_auteurs = $found['FOUND_ROWS()'];\r\n\r\n\t$ifond = 0;\r\n\r\n\t$aff = '';\r\n\r\n\t# onglet select statut\r\n\t$lst_statut = array('tous', '0minirezo', '1comite', '6forum');\r\n\t$script = _request('exec');\r\n\r\n\t$aff .= debut_onglet();\r\n\tforeach ($lst_statut as $statut) {\r\n\t\t$aff .= onglet(_T('actijour:onglet_connect_' . $statut),\r\n\t\t\tgenerer_url_ecrire($script, 'st=' . ($statut == 'tous' ? '' : $statut)),\r\n\t\t\t$statut,\r\n\t\t\t($p_st == $statut ? $statut : ''), '');\r\n\t}\r\n\t$aff .= fin_onglet();\r\n\r\n\r\n\t# tableau\r\n\t#\r\n\t$aff .= debut_cadre_relief(\"annonce.gif\", true);\r\n\r\n\t$aff .= \"<table align='center' border='0' cellpadding='2' cellspacing='0' width='100%'>\\n\"\r\n\t\t. \"<tr><td colspan='3' class='verdana3 bold'>\" . _T('actijour:tous_date_connections')\r\n\t\t. \"</td></tr>\";\r\n\t# Tranches\r\n\t$aff .= \"<tr><td colspan='3' class='verdana3 bold'>\";\r\n\t$aff .= \"<div align='center' class='iconeoff verdana2 bold' style='clear:both;'>\\n\"\r\n\t\t. tranches_liste_art($nba1, $nb_auteurs, $fl)\r\n\t\t. \"\\n</div>\\n\";\r\n\t$aff .= \"</td></tr>\";\r\n\r\n\twhile ($row = sql_fetch($q)) {\r\n\t\t$ifond = $ifond ^ 1;\r\n\t\t$couleur = ($ifond) ? '#FFFFFF' : $couleur_claire;\r\n\r\n\t\t$aff .= \"<tr bgcolor='$couleur'>\"\r\n\t\t\t. \"<td width='5%'>\\n\"\r\n\t\t\t. bonhomme_statut($row) . \"</td>\\n\"\r\n\t\t\t. \"<td width='75%'>\"\r\n\t\t\t. \"<a class='verdana2 bold' href='\" . generer_url_ecrire(\"auteur_infos\", \"id_auteur=\" . $row['id_auteur']) . \"'>\"\r\n\t\t\t. entites_html($row['nom']) . \"</a>\\n\"\r\n\t\t\t. \"<td width='20%'>\\n\"\r\n\t\t\t. \"<div align='right' class='verdana1'>\" . $row['vu'] . \"</div>\\n\"\r\n\t\t\t. \"</td></tr>\\n\";\r\n\r\n\t}\r\n\t$aff .= \"</table>\\n\\n\";\r\n\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n}", "public function tratarDados(){\r\n\t\r\n\t\r\n }", "function courtjus_trouver_objet($id_rubrique, $objets_in_rubrique) {\n\n\t// Aller chercher les filtres\n\tinclude_spip('inc/filtres');\n\tinclude_spip('inc/config');\n\n\t// On récupère le configuration du plugin\n\t$config = lire_config('courtjus');\n\n\t// Maintenant qu'on a le tableau des objets de la rubrique on compte\n\t$nb_objet = count($objets_in_rubrique);\n\n\t// Si on est à 0 objet, on descend dans une sous rubrique\n\tif ($nb_objet <= 0) {\n\t\t// On renvoie false pour déclencher éventuellement la recherche dans une sous rubrique\n\t\treturn false;\n\t} elseif ($nb_objet == 1) {\n\t\t// Un seul objet dans la rubrique, on renvoie le tableau\n\t\treturn generer_url_entite($objets_in_rubrique[0]['id_objet'], $objets_in_rubrique[0]['objet'], '', '', true);\n\t} elseif ($nb_objet > 1\n\t\t\t and array_sum(array_column($objets_in_rubrique, 'num_titre')) > 0\n\t\t\t and $config['num_titre'] == 'on') {\n\t\t// S'il y plusieurs objets dans la rubrique et que le mode \"par num titre\"\n\t\t// est activé, on regiride sur le num titre le plus petit.\n\n\t\t// On créer un tableau avec uniquement les num titre\n\t\t$minmax = array_column($objets_in_rubrique, 'num_titre');\n\n\t\t// On va filtrer ce tableau pour n'avoir que des nombres à tester\n\t\t$minmax = array_filter($minmax, 'is_numeric');\n\n\t\t// On recherche l'index dans le tableau minmax\n\t\t$index = array_search(min($minmax), $minmax);\n\n\t\t// Créer l'URL de redirection\n\t\treturn generer_url_entite(\n\t\t\t$objets_in_rubrique[$index]['id_objet'],\n\t\t\t$objets_in_rubrique[$index]['objet'],\n\t\t\t'',\n\t\t\t'',\n\t\t\ttrue\n\t\t);\n\t} elseif ($nb_objet > 1\n\t\t\t and $config['recent'] == 'on') {\n\t\t// Si le mode par article le plus récent est activé\n\n\t\t// On créer un tableau avec uniquement les timestamps des dates\n\t\t$minmax = array_column($objets_in_rubrique, 'date');\n\n\t\t// On va filtrer ce tableau pour n'avoir que des nombres à tester\n\t\t$minmax = array_filter($minmax, 'is_numeric');\n\n\t\t// On recherche l'index avec le timestamp le plus grand\n\t\t$index = array_search(max($minmax), $minmax);\n\n\t\t// Créer l'URL de redirection\n\t\treturn generer_url_entite(\n\t\t\t$objets_in_rubrique[$index]['id_objet'],\n\t\t\t$objets_in_rubrique[$index]['objet'],\n\t\t\t'',\n\t\t\t'',\n\t\t\ttrue\n\t\t);\n\t}\n}", "public function liste() {\n if(isset($this->post->liste)){\n $entity = new Abonnement();\n foreach ($this->post->liste as $id) {\n $entity->setId($id);\n $this->em->delete($entity);\n }\n $this->handleStatus('Abonnement(s) ' . implode(',', $this->post->liste) . ' supprimé(s)');\n }\n // Charger la vue liste\n $this->loadView('liste', 'content');\n // Lire les données à partir de la bd et formater\n $arr = $this->em->selectAll('client');\n $arrClient = $this->em->getRefined($arr);\n $arr = $this->em->selectAll('compteur');\n $arrCompteur = $this->em->getRefined($arr);\n $liste = $this->em->selectAll('abonnement');\n $html = '';\n foreach ($liste as $key => $entity) {\n $client = $arrClient[$entity->getIdClient()];\n $compteur = $arrCompteur[$entity->getIdCompteur()];\n $id = $entity->getId();\n $html .= '<tr>';\n $html .= '<td>' . $id . '</td>';\n //$html .= '<td> <a href=\"abonnements/detail/' . $id . '\" title=\"Détails\">' . $entity->getNumero() . '</a> </td>';\n $html .= '<td>' . $entity->getNumero() . '</td>';\n $html .= '<td><a href=\"clients/detail/' . $client->id . '\">' . $client->nomFamille . '</a></td>';\n $html .= '<td><a href=\"compteurs/detail/' . $compteur->id . '\">' . $compteur->numero . '</a></td>';\n $html .= '<td><a href=\"abonnements/modifier/' . $id . '\"> Modifier </a></td>';\n $html .= '<td><input type=\"checkbox\" name=\"liste[]\" value=\"' . $id . '\"></td>';\n //$html .= '<td><form type=\"POST\" action=\"compteurs/liste\"><button type=\"submit\" name=\"id\" value=\"' . $id . '\">Supprimer</button></form></td>';\n $html .= '</tr>';\n }\n // Ajouter les compteurs à la vue\n $this->loadHtml($html, 'list');\n }", "public function clasesParticulares(){\n $entrenadores = $this->entrenadorMapper->findAll();\n $this->view->setVariable(\"entrenadores\", $entrenadores);\n $misclasesParticulares = $this->claseMapper->misClasesParticulares($_SESSION[\"currentuser\"]);//Deportista Logueado\n foreach ($misclasesParticulares as $clase) {\n $reserva = $this->reservaMapper->getReserva($clase->getReserva());\n $clase->setFecha($reserva[\"fecha\"]);\n $aceptar = $this->claseMapper->getClaseParticular($clase->getIdClase());\n $clase->setAceptar($aceptar[\"aceptar\"]);\n }\n $this->view->setVariable('misClasesParticulares', $misclasesParticulares);\n $this->view->render('clases', 'clasesParticulares');\n }", "function configurar() {\n //SOLO EL ADMINISTRADOR PUEDE MATRICULAR\n if(!$this->AppUser->isRoot())\n return $this->vista->acceso_restringido();\n\n $this->includeModel('TComponente');\n\n //TODO: actualizar el codigo del programa a matricular.\n $cod_programa = $this->params['cod_programa'];\n $this->vista->addJS('jquery.dataTable');\n\n $tiene_cursos = $this->TPrograma->tieneCursos($cod_programa);\n \n $this->vista->set('tiene_cursos', $tiene_cursos);\n if(!$tiene_cursos){\n if($this->TPersona == null)\n $this->TPersona = new TPersona();\n $tiene_participantes = $this->TPersona->hayAdmitidos();\n $this->vista->set('tiene_participantes', $tiene_participantes);\n }\n \n $this->vista->display();\n }", "public function gestioneUtenti(){\n\t\t// Istanzio Grocery Crud\n\t\t$crud = new grocery_CRUD();\n\t\t$crud->set_model('Mod_GCR');\n\t\t$crud->set_theme('bootstrap');\n\t\t$crud->set_language('italian');\n\t\t// Determino la tabella di riferimento\n\t\t//$crud->set_table('utenti');\n\t\t$crud->set_table('users');\n\t\t// Imposto la relazione n-n\n\t\t$crud->set_relation_n_n('elenco_categorie', 'utenti_categorie', 'tasks_categorie', 'id', 'id_categoria', 'categoria');\n\t\t$crud->unset_columns(array('ip', 'password','salt'));\n\t\t//$crud->unset_fields(array('id_cliente','username','last_login','ip_address', 'password','salt','activation_code','forgotten_password_code','forgotten_password_time','remember_code','created_on','phone'));\n\t\t$crud->fields(array('last_name','first_name','email','active','elenco_categorie'));\n\t\t$crud->columns(array('last_name','first_name','email','active','elenco_categorie'));\n\t\t$crud->display_as('first_name', 'Nome');\n\t\t$crud->display_as('last_name', 'Cognome');\n\t\t$crud->display_as('active', 'Abilitato');\n\n\t\t$crud->unset_delete();\n\t\t$crud->unset_bootstrap();\n\t\t$output = $crud->render();\n\t\t// Definisco le opzioni\n\t\t$opzioni=array();\n\t\t// Carico la vista\n\t\t$this->opzioni=array();\n\t\t$this->codemakers->genera_vista_aqp('crud',$output,$this->opzioni);\n\t}", "function TablaListarCajas()\n {\n //Logo\n $this->Image(\"./assets/img/logo.png\" , 20 ,12, 60 , 20 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',15);\n //Movernos a la derecha\n $this->Cell(100);\n //Título\n $this->Cell(65,20,'LISTADO GENERAL DE CAJAS DE VENTAS',0,0,'C');\n //Salto de línea\n $this->Ln(25);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(10,5,'',0,0,'');\n\t$this->Cell(35,5,'CÉDULA GERENTE: ',0,0,'');\n\t$this->Cell(44,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->Cell(30,5,'NOMBRE GERENTE:',0,0,'');\n\t$this->Cell(83,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(10,5,'',0,0,'');\n\t$this->Cell(35,5,'TELÉFONO GERENTE: ',0,0,'');\n $this->Cell(44,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->Cell(30,5,'CORREO GERENTE:',0,0,'');\n $this->Cell(83,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',10);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es BLANCO)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->Cell(10,8,'N°',1,0,'C', True);\n\t$this->Cell(25,8,'N° CAJA',1,0,'C', True);\n\t$this->Cell(45,8,'NOMBRE DE CAJA',1,0,'C', True);\n\t$this->Cell(40,8,'CÉDULA CAJERO',1,0,'C', True);\n\t$this->Cell(70,8,'NOMBRE CAJERO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->ListarCajas();\n\t$a=1;\n for($i=0;$i<sizeof($reg);$i++){\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(10,5,$a++,1,0,'C');\n\t$this->CellFitSpace(25,5,utf8_decode($reg[$i][\"nrocaja\"]),1,0,'C');\n $this->CellFitSpace(45,5,utf8_decode($reg[$i][\"nombrecaja\"]),1,0,'C');\n $this->CellFitSpace(40,5,utf8_decode($reg[$i][\"cedula\"]),1,0,'C');\n\t$this->CellFitSpace(70,5,utf8_decode($reg[$i][\"nombres\"]),1,0,'C');\n $this->Ln();\n\t\n }\n $this->Ln(12); \n $this->SetFont('courier','B',9);\n $this->Cell(5,6,'',0,0,'');\n $this->Cell(100,6,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]),0,0,'');\n $this->Cell(60,6,'RECIBIDO:__________________________________',0,0,'');\n $this->Ln();\n $this->Cell(5,6,'',0,0,'');\n $this->Cell(100,6,'FECHA/HORA ELABORACIÓN: '.date('d-m-Y h:i:s A'),0,0,'');\n $this->Cell(60,6,'',0,0,'');\n $this->Ln(4);\n }", "function onSave()\r\n\t{\r\n\t\t$params\t= JRequest::getVar( 'params', array(), 'post', 'array' );\r\n\t\t$details\t= JRequest::getVar( 'details', array(), 'post', 'array' );\r\n\t\t$element =& $this->getElement();\r\n\t\t//load join based on this element id\r\n\t\t$join =& JTable::getInstance( 'Join', 'Table' );\r\n\t\t$origKey = $join->_tbl_key;\r\n\t\t$join->_tbl_key = \"element_id\";\r\n\t\t$join->load( $this->_id );\r\n\t\t$join->_tbl_key = $origKey;\r\n\t\t$join->table_join = '#__users';\r\n\t\t$join->join_type = 'left';\r\n\t\t$join->group_id = $details['group_id'];\r\n\t\t$join->table_key = str_replace('`', '', $element->name);\r\n\t\t$join->table_join_key = 'id';\r\n\t\t$join->join_from_table = '';\r\n\t\t$join->attribs = \"join-label=\" . $params['my_table_data'] . \"\\n\";\r\n\t\t$join->store();\r\n\t}", "function obtenerJugadores(){\r\n\t\t// Devuelve la lista de los jugadores del equipo\r\n\t\t\r\n\t\t/* Porteros */\r\n\t\t$porteros = array( \r\n\t\t\tarray(\"n\" => \"Wuilker\", \t\"a\" => \"Fariñez\"), \r\n\t\t\tarray(\"n\" => \"Alain\", \t\t\"a\" => \"Baroja\"),\r\n\t\t\tarray(\"n\" => \"José\", \t\t\"a\" => \"Contreras\"),\r\n\t\t\tarray(\"n\" => \"Joel\", \t\t\"a\" => \"Graterol\"),\r\n\t\t\tarray(\"n\" => \"Luis\", \t\t\"a\" => \"Romero\"),\r\n\t\t\tarray(\"n\" => \"Rafael\", \t\t\"a\" => \"Romo\") \r\n\t\t);\r\n\t\t\r\n\t\t/* Mediocampistas */\r\n\t\t$mediocampistas = array( \r\n\t\t\tarray(\"n\" => \"Cristian\", \t\"a\" => \"Cásseres\"), \r\n\t\t\tarray(\"n\" => \"Yangel\", \t\t\"a\" => \"Herrera\"),\r\n\t\t\tarray(\"n\" => \"Darwin\", \t\t\"a\" => \"Machís\"),\r\n\t\t\tarray(\"n\" => \"José\", \t\t\"a\" => \"Martínez\"),\r\n\t\t\tarray(\"n\" => \"Junior\", \t\t\"a\" => \"Moreno\"),\r\n\t\t\tarray(\"n\" => \"Jhon\", \t\t\"a\" => \"Murillo\"),\r\n\t\t\tarray(\"n\" => \"Rómulo\", \t\t\"a\" => \"Otero\"),\r\n\t\t\tarray(\"n\" => \"Tomás\", \t\t\"a\" => \"Rincón\"),\r\n\t\t\tarray(\"n\" => \"Jefferson\", \t\"a\" => \"Savarino\"),\r\n\t\t\tarray(\"n\" => \"Yeferson\", \t\"a\" => \"Soteldo\"),\r\n\t\t\tarray(\"n\" => \"Edson\", \t\t\"a\" => \"Castillo\"),\r\n\t\t\tarray(\"n\" => \"Richard\", \t\"a\" => \"Celis\"),\r\n\t\t\tarray(\"n\" => \"Bernardo\", \t\"a\" => \"Manzano\"),\r\n\t\t\tarray(\"n\" => \"Freddy\", \t\t\"a\" => \"Vargas\")\r\n\t\t);\t\r\n\r\n\t\t/* Defensas */\r\n\t\t$defensas = array( \r\n\t\t\tarray(\"n\" => \"Wilker\", \t\t\"a\" => \"Ángel\"), \r\n\t\t\tarray(\"n\" => \"Jhon\", \t\t\"a\" => \"Chancellor\"),\r\n\t\t\tarray(\"n\" => \"Luis\", \t\t\"a\" => \"Del Pino\"),\r\n\t\t\tarray(\"n\" => \"Rolf\", \t\t\"a\" => \"Feltscher\"),\r\n\t\t\tarray(\"n\" => \"Francisco\", \t\"a\" => \"La Mantía\"),\r\n\t\t\tarray(\"n\" => \"Nahuel\", \t\t\"a\" => \"Ferraresi\"),\r\n\t\t\tarray(\"n\" => \"Alexander\", \t\"a\" => \"González\"),\r\n\t\t\tarray(\"n\" => \"Ronald\", \t\t\"a\" => \"Hernández\"),\r\n\t\t\tarray(\"n\" => \"Yordan\", \t\t\"a\" => \"Osorio\"),\r\n\t\t\tarray(\"n\" => \"Roberto \", \t\"a\" => \"Rosales\"),\r\n\t\t\tarray(\"n\" => \"Mikel\", \t\t\"a\" => \"Villanueva\"),\r\n\t\t\tarray(\"n\" => \"Yohan\", \t\t\"a\" => \"Cumana\"),\r\n\t\t\tarray(\"n\" => \"Adrián\", \t\t\"a\" => \"Martínez\")\r\n\t\t);\t\r\n\r\n\t\t/* Delanteros */\r\n\t\t$delanteros = array( \r\n\t\t\tarray(\"n\" => \"Fernando \", \t\"a\" => \"Aristiguieta\"), \r\n\t\t\tarray(\"n\" => \"Jhonder\", \t\"a\" => \"Cádez\"),\r\n\t\t\tarray(\"n\" => \"Sergio \", \t\"a\" => \"Córdova\"),\r\n\t\t\tarray(\"n\" => \"Jan\", \t\t\"a\" => \"Hurtado\"),\r\n\t\t\tarray(\"n\" => \"Josef\", \t\t\"a\" => \"Martínez\"),\r\n\t\t\tarray(\"n\" => \"Daniel\", \t\t\"a\" => \"Pérez\"),\r\n\t\t\tarray(\"n\" => \"Eric\", \t\t\"a\" => \"Ramírez\"),\r\n\t\t\tarray(\"n\" => \"Salomón\", \t\"a\" => \"Rondón\")\r\n\t\t);\t\r\n\t\t\t\r\n\t\t$jugadores = array( \r\n\t\t\t\t\t\t\"porteros\" \t\t=> $porteros, \r\n\t\t\t\t\t\t\"mediocampistas\" => $mediocampistas, \r\n\t\t\t\t\t\t\"defensas\" \t\t=> $defensas, \r\n\t\t\t\t\t\t\"delanteros\" \t=> $delanteros \r\n\t\t\t\t\t);\r\n\t\t\r\n\t\treturn $jugadores;\r\n\t}", "public function gestores(){\n\t\t$gestores = $this->query(\"SELECT id, Nombre, Clave, supervisor FROM gestors AS Gestor WHERE Activo=1\");\n\t\treturn $gestores;\n\t}", "public function manageConnection() {\n\t\tif (isset($_POST['connexion'])) {\n\t\t\t$login = $_POST['login'];\n\t\t\t$password = $_POST['password'];\n\t\t\t$this->login($login, $password);\n\t\t}\n\t\telse if (isset($_POST['deconnexion'])) {\n\t\t\t$this->logout();\n\t\t\tPager::redirect('accueil.php');\n\t\t}\n\t}", "public function attaquerAdversaire() {\n\n }", "public function index()\n {\n $joueur = DB::table('joueurs')->orderBy('created_at','DESC')->paginate(10);\n\n\n return view('admin\\joueurs',compact('joueur'));\n }", "function joueContre($adversaire, $lieu, $date) // trois argument définis pour la première fois\n{\n // contenant les infos de la rencontre\n array_push($this->rencontres, [\"adversaire\" => $adversaire, \n \"lieu\" => $lieu, \n \"date\" => $date\n\n ]); // on range les données dans le tableau rencontres, tableau de niveau 2\n\n}", "function setColeccion() {\n $this->query = \"SELECT * FROM PROFESOR\";\n $this->datos = BDConexionSistema::getInstancia()->query($this->query);\n\n for ($x = 0; $x < $this->datos->num_rows; $x++) {\n $this->addElemento($this->datos->fetch_object(\"Profesor\"));\n }\n }", "function formulaires_moderation_lieu_traiter_dist()\n{\n\t$message = array();\n\t$valeurs = array();\n\n\t$valeurs['id_lieu'] = (int) _request('id_lieu');\n\t$valeurs['nom'] = entites_html(stripslashes(_request('nom')));\n\t$valeurs['adresse'] = entites_html(stripslashes(_request('adresse')));\n\t$valeurs['tel'] = entites_html(stripslashes(_request('tel')));\n\t$valeurs['email'] = entites_html(stripslashes(_request('email')));\n\t$valeurs['ville'] = entites_html(stripslashes(_request('ville')));\n\t$valeurs['site_web'] = _request('site_web');\n\n\tif (_request('enregistrer'))\n\t{\n\t\tsql_updateq(\n\t\t\t\"spip_lieux\",\n\t\t\tarray(\n\t\t\t\t\"nom\" => $valeurs['nom'],\n\t\t\t\t\"ville\" => $valeurs['ville'],\n\t\t\t\t\"adresse\" => $valeurs['adresse'],\n\t\t\t\t\"tel\" => $valeurs['tel'],\n\t\t\t\t\"email\" => $valeurs['email'],\n\t\t\t\t\"site_web\" => $valeurs['site_web']\n\n\t\t\t),\n\t\t\t\"id_lieu=\".$valeurs['id_lieu']\n\t\t);\n\n\t\t$message['redirect'] = generer_url_ecrire(\"lieux\",\"message_ok=\"._T('modification_lieu_ok'));\n\t}\n\telse if (_request('supprimer'))\n\t{\n\t\tsql_delete(\"spip_lieux\",\"id_lieu=\".$valeurs['id_lieu']);\n\t\t$message['redirect'] = generer_url_ecrire(\"lieux\",\"message_ok=\"._T('suppression_lieu_ok'));\n\t}\n\treturn $message;\n}", "function cl_sau_agendaexames() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_agendaexames\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function index()\n {\n //$this->set('myname', \"Jérémy Camilleri\");\n \n $playerIdActual = $this->Session->read('Auth.User.id');\n $playerActual = $this->User->findById($playerIdActual);\n \n $this->set('raw',$playerActual);\n $this->set('email', $playerActual['User']['email']);\n \n \n //On affiche la liste des nom de joueurs actuellement dans l'arène\n \n \n /*foreach ($Events as $event) \n {\n <td>$event['Event']['name']</td>\n }*/\n \n $fightersActual = $this->Fighter->find('all',array(\n 'conditions' => array(\n 'Fighter.player_id' => $playerIdActual\n )\n ));\n \n \n $fightersUser = array();\n\n foreach($fightersActual as $fighter){\n $fightersUser[$fighter['Fighter']['id']] = $fighter['Fighter']['name'];\n \n \n }\n $this->set('fighterList',$fightersUser);\n\n $fighterIdActual = $this->Session->read('Fighter.id');\n \n if(empty($fighterIdActual)){\n $fighterIdActual = $fightersActual[0]['Fighter']['id'];\n }\n \n \n $this->set('fighterId',$fighterIdActual);\n \n \n //Si on demande la création d'un nouveau personnage.\n if($this->request->data('Fightercreate'))\n {\n $message = $this->Fighter->generate($playerIdActual,$this->request->data['Fightercreate']['name']);\n \n $dataTool = array();\n \n $random = rand(1,3);\n \n if($random == 1){\n $dataTool['type'] = 'strength';\n }\n Elseif($random == 2){\n $dataTool['type'] = 'sight';\n }\n Else {\n $dataTool['type'] = 'life';\n }\n \n $dataTool['bonus'] = rand(1,3);\n \n $message = $message . \" \" . $this->Tool->add($dataTool);\n $this->set('messages',$message);\n }\n \n //Si on demande la création d'un nouveau personnage.\n if($this->request->data('Fighterchoice'))\n {\n $this->Session->write('Fighter.id',$this->request->data['Fighterchoice']['fighter']);\n $fighterIdActual = $this->Session->read('Fighter.id');\n \n $this->set('messages',\"You change your character !\");\n echo \"<script>window.location = window.location.href;</script>\"; \n }\n \n //Si on demande un nouvel avatar\n if($this->request->data('Fighternewavatar'))\n {\n /*debug($this->request->data['Playernewavatar']);\n $this->request->data->Player->id = '0c3ebe52-8024-11e5-96f5-5dcadefa4980';\n if(!$this->Player->save($this->request->data))\n {\n debug($this->Player->invalidFields()); die();\n }*/\n $message = $this->Fighter->newAvatar($fighterIdActual, $this->request->data['Fighternewavatar']);\n $this->set('messages',$message);\n }\n \n \n\n $currentFighter = $this->Fighter->find('first' , array('conditions'=> array(\n 'Fighter.id' => $fighterIdActual\n )\n )\n );\n \n $this->set('myFighter',$currentFighter);\n \n \n \n $this->set('othersFighters',$this->Fighter->find('all' , array('conditions'=> array(\n 'Fighter.coordinate_x <=' => $currentFighter['Fighter']['coordinate_x'] + $currentFighter['Fighter']['skill_sight'],\n 'Fighter.coordinate_x >=' => $currentFighter['Fighter']['coordinate_x'] - $currentFighter['Fighter']['skill_sight'],\n 'Fighter.coordinate_y <=' => $currentFighter['Fighter']['coordinate_y'] + $currentFighter['Fighter']['skill_sight'],\n 'Fighter.coordinate_y >=' => $currentFighter['Fighter']['coordinate_y'] - $currentFighter['Fighter']['skill_sight'],\n 'Fighter.id !=' => $fighterIdActual\n )\n )\n ));\n\n $this->set('invisibleFighters',$this->Fighter->find('all' , array('conditions'=> array(\n 'Fighter.coordinate_x >' => $currentFighter['Fighter']['coordinate_x'] + $currentFighter['Fighter']['skill_sight'],\n 'Fighter.coordinate_x <' => $currentFighter['Fighter']['coordinate_x'] - $currentFighter['Fighter']['skill_sight'],\n 'Fighter.coordinate_y >' => $currentFighter['Fighter']['coordinate_y'] + $currentFighter['Fighter']['skill_sight'],\n 'Fighter.coordinate_y <' => $currentFighter['Fighter']['coordinate_y'] - $currentFighter['Fighter']['skill_sight'],\n 'Fighter.id !=' => $fighterIdActual\n )\n )\n ));\n \n $toolsCurrent = $this->Tool->find('all', array(\n 'conditions' => array(\n 'Tool.coordinate_x' => $currentFighter['Fighter']['coordinate_x'],\n 'Tool.coordinate_y' => $currentFighter['Fighter']['coordinate_y']\n \n )\n ));\n \n $this->set('tool',$toolsCurrent);\n \n $toolList = array();\n\n foreach($toolsCurrent as $tool){\n $toolList[$tool['Tool']['id']] = $tool['Tool']['type'].\" \".$tool['Tool']['bonus'];\n }\n $this->set('toolList',$toolList);\n \n //Si on demande la création d'un nouveau personnage.\n if($this->request->data('Toolpickup'))\n {\n $message = $this->Fighter->ramasserWeapon($fighterIdActual, $this->request->data['Toolpickup']['toolChoice']);\n $this->set('messages',$message);\n }\n \n //Si c'est une action de mouvement\n if($this->request->data('Fightermove'))\n {\n $message = $this->Fighter->doMove($fighterIdActual, $this->request->data['Fightermove']['direction']);\n $this->set('messages',$message);\n\n }\n \n //Si c'est une action d'attaque\n Elseif($this->request->data('Fighterattack'))\n {\n $message = $this->Fighter->doAttack($fighterIdActual, $this->request->data['Fighterattack']['direction']);\n $this->set('messages',$message);\n \n\n }\n \n }", "public function gestionPedidos(){\n Utils::isAdmin();\n $gestion = true;\n\n $oPedido = new Pedido();\n $pedidos = $oPedido->getAll();\n\n require_once 'views/pedido/mis_pedidos.php';\n }", "public function index()\n {\n\n //Extraire la liste des vaccins de la base de données\n $allVaccins = Vaccin::get();\n\n //Extraire la liste des allergies de la base de données\n $allAllergies = Allergie::get();\n\n //Extraire la liste des educatrices de la base de données\n $allEducatrices = Educatrice::get();\n\n //Retourner la liste a la vue correspondante\n return view('enfant.ajoutEnfant', [\n 'vaccins' => $allVaccins,\n 'allergies' => $allAllergies,\n 'educatrices' => $allEducatrices,\n ]);\n }", "public function listeSujetA ($bdd, $lab, $tablePos, $tableA){\n $mode = 1;\n\n $rep = $bdd->prepare(\"SELECT \".$tablePos.\".ID_SUJ_A, \".$tablePos.\".LIBELLE ,COMMENT\n FROM \".$tablePos.\",\".$tableA.\"\n WHERE \".$tablePos.\".ID_AGR = \".$tableA.\".ID_AGR\n AND \".$tablePos.\".MODE = :mode\n AND \".$tableA.\".MODE = :mode\n ORDER BY \".$tablePos.\".ID_SUJ_A \");\n $rep->bindParam(':mode',$mode, PDO::PARAM_INT);\n $rep->execute();\n $nbr = $rep->rowCount();\n\n if($nbr > 0){\n $datas = $rep->fetchAll(PDO::FETCH_BOTH);\n foreach ($datas as $value){\n ?>\n <li><a class=\"click-post\" href=\"?lab=<?php echo $lab.$value[0];?>\">\n <i class=\"fa fa-angle-double-right\"></i><p><?php echo $value[1];?></p></a><span class=\"badge\">(<?php echo $value[2];?>)</span></li>\n <?php\n }\n }\n elseif($nbr == 0) {?>\n <li><a href=\"#\"><i class=\"fa fa-angle-double-right\"></i><p>Aucun sujet disponible</p></a><span class=\"badge\">(0)</span></li>\n <?php }\n }", "public function admin_index() {\r\n $this->Caja->recursive = 0;\r\n $this->getTipos();\r\n $this->getUsers(); \r\n $conditions = \" 1 \"; \r\n $cajas = $this->Caja->query(\"Select * from cajas as Caja\r\n left join users as User on Caja.user_id = User.id\r\n left join tipo_movimientos TipoMovimiento on Caja.tipo_movimiento_id = TipoMovimiento.id\r\n where $conditions\r\n order by Caja.fecha DESC\");\r\n $this->set(compact(\"cajas\"));\r\n \r\n }", "public function getJuego()\n {\n return $this->hasOne(Juegos::className(), ['id' => 'juego_id'])->inverseOf('deseados');\n }", "public function liste() {\n // Charger la vue liste compteur\n $this->loadView('liste', 'content');\n // Lire les compteurs à partir de la bd et formater\n //$reglements = $this->em->selectAll('reglement');\n //$reglements = $this->em->getRefined($reglements);\n $liste = $this->em->selectAll('facture');\n $html = '';\n foreach ($liste as $key => $entity) {\n $state = 'impayée';\n if ($entity->getPaye()) {\n $state = 'payée';\n }\n $consommation = $this->em->selectById('consommation', $entity->getId());\n $compteur = $this->em->selectById('compteur', $consommation->getIdCompteur());\n $html .= '<tr>';\n $html .= '<td>' . $entity->getId() . '</td>';\n $html .= '<td><a href=\"reglements/facture/' . $entity->getNumero() . '\">' . $entity->getNumero() . '</a></td>';\n $html .= '<td>' . $compteur->getNumero() . '</td>';\n $html .= '<td>' . $consommation->getQuantiteChiffre() . ' litres</td>';\n $html .= '<td>' . $entity->getMontant() . ' FCFA</td>';\n $html .= '<td>' . $state . '</td>';\n $html .= '</tr>';\n }\n // Ajouter les compteurs à la vue\n $this->loadHtml($html, 'list');\n }", "function connexionAdministration(){\n require 'app/views/back/connexionUsers.php';\n }", "function buscarJuegos($datos) {\n global $textos, $sql, $configuracion, $sesion_usuarioSesion;\n\n $juego = new Juego();\n $destino = \"/ajax\".$juego->urlBase.\"/searchGames\";\n\n if (empty($datos)) {\n\n $forma2 = HTML::campoOculto(\"datos[criterio]\", \"titulo\");\n $forma2 .= HTML::parrafo($textos->id(\"TITULO\"), \"negrilla margenSuperior\");\n $forma2 .= HTML::parrafo(HTML::campoTexto(\"datos[patron]\", 30, 255).HTML::boton(\"buscar\", $textos->id(\"BUSCAR\")), \"margenSuperior\");\n\n // $codigo1 = HTML::forma($destino, $forma1);\n $codigo1 = HTML::forma($destino, $forma2);\n $codigo = HTML::contenedor($codigo1, \"bloqueBorde\");\n $codigo .= HTML::contenedor(\"\",\"margenSuperior\", \"resultadosBuscarJuegos\");\n\n $respuesta[\"generar\"] = true;\n $respuesta[\"codigo\"] = $codigo;\n $respuesta[\"destino\"] = \"#cuadroDialogo\";\n $respuesta[\"titulo\"] = HTML::contenedor(HTML::frase(HTML::parrafo($textos->id(\"BUSCAR_JUEGOS\"), \"letraNegra negrilla\"), \"bloqueTitulo-IS\"), \"encabezadoBloque-IS\");\n $respuesta[\"ancho\"] = 500;\n $respuesta[\"alto\"] = 400;\n\n } else {\n\n if (!empty($datos[\"criterio\"]) && !empty($datos[\"patron\"])) {\n\n if ($datos[\"criterio\"] == \"titulo\") {\n $palabras = explode(\" \", $datos[\"patron\"]);\n\n foreach ($palabras as $palabra) {\n $palabrasResaltadas[] = HTML::frase($palabra, \"resaltado\");\n $palabrasMarcadas[] = \"%\".$palabra.\"%\";\n }\n }\n\n $tablas = array(\n \"j\" => \"juegos\",\n \"i\" => \"imagenes\"\n );\n\n $columnas = array(\n \"id\" => \"j.id\",\n \"nombre\" => \"j.nombre\",\n \"descripcion\" => \"j.descripcion\", \n \"id_imagen\" => \"j.id_imagen\",\n \"idImagen\" => \"i.id\",\n \"ruta\" => \"i.ruta\"\n );\n $condicion = \"(j.id_imagen = i.id AND j.nombre REGEXP '(\".implode(\"|\", $palabras).\")') OR( j.id_imagen = i.id AND j.descripcion REGEXP '(\".implode(\"|\", $palabras).\")')\";\n \n //$sql->depurar = true;\n $consulta = $sql->seleccionar($tablas, $columnas, $condicion);\n \n \n $listaJuegos = array();\n \n if($sql->filasDevueltas){\n while ($fila = $sql->filaEnObjeto($consulta)) {\n \n $nombre = str_ireplace($palabras, $palabrasMarcadas, $fila->nombre);\n \n $imagen = $configuracion[\"SERVIDOR\"][\"media\"].$configuracion[\"RUTAS\"][\"imagenesDinamicas\"].\"/\".$fila->imagen; \n $item = HTML::enlace(HTML::imagen($imagen, \"flotanteIzquierda margenDerecha miniaturaListaUltimos5\"), HTML::urlInterna(\"JUEGOS\", $fila->id)); \n $item3 = HTML::parrafo(HTML::enlace(str_ireplace($palabrasMarcadas, $palabrasResaltadas, $nombre).\" \".\" \".HTML::imagen($configuracion[\"SERVIDOR\"][\"media\"].$configuracion[\"RUTAS\"][\"imagenesEstilos\"].\"goButton.png\"), HTML::urlInterna(\"JUEGOS\", $fila->id)), \"negrilla\");\n $item3 .= HTML::parrafo( substr($fila->descripcion, 0, 50).\"...\", \" cursiva pequenia\"); \n $item = HTML::contenedor($item3, \"fondoBuscadorBlogs\");//barra del contenedor gris\n $listaJuegos[] = $item;\n\n }//fin del while\n }//fin del if\n \n \n if(sizeof($listaJuegos) == 0){\n $listaJuegos[] = HTML::frase($textos->id(\"SIN_REGISTROS\"));\n }\n \n $listaJuegos = HTML::lista($listaJuegos, \"listaVertical listaConIconos bordeSuperiorLista\");\n \n\n $respuesta[\"accion\"] = \"insertar\";\n $respuesta[\"contenido\"] = $listaJuegos;\n $respuesta[\"destino\"] = \"#resultadosBuscarJuegos\";\n\n } else {\n $respuesta[\"error\"] = true;\n $respuesta[\"mensaje\"] = $textos->id(\"ERROR_FALTA_CADENA_BUSQUEDA\");\n }\n\n }\n\n Servidor::enviarJSON($respuesta);\n}", "public function DAOModulosxRol() {\n }", "public function buildRelations()\n\t{\n\t\t$this->addRelation('Cargo', 'Cargo', RelationMap::MANY_TO_ONE, array('cargo_id' => 'id', ), null, null);\n\t\t$this->addRelation('Departamento', 'Departamento', RelationMap::MANY_TO_ONE, array('departamento_id' => 'id', ), null, null);\n\t\t$this->addRelation('Endereco', 'Endereco', RelationMap::MANY_TO_ONE, array('endereco_id' => 'id', ), null, null);\n\t\t$this->addRelation('Perfil', 'Perfil', RelationMap::MANY_TO_ONE, array('perfil_id' => 'id', ), null, null);\n\t\t$this->addRelation('Auditoria', 'Auditoria', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'Auditorias');\n\t\t$this->addRelation('AvaliacaoRespostaForum', 'AvaliacaoRespostaForum', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'AvaliacaoRespostaForums');\n\t\t$this->addRelation('ColetaPesquisa', 'ColetaPesquisa', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'ColetaPesquisas');\n\t\t$this->addRelation('ComentarioNoticia', 'ComentarioNoticia', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'ComentarioNoticias');\n\t\t$this->addRelation('CurtidaForum', 'CurtidaForum', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'CurtidaForums');\n\t\t$this->addRelation('Noticia', 'Noticia', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'Noticias');\n\t\t$this->addRelation('Pesquisa', 'Pesquisa', RelationMap::ONE_TO_MANY, array('id' => 'criador_id', ), null, null, 'Pesquisas');\n\t\t$this->addRelation('PesquisaHabilitada', 'PesquisaHabilitada', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'PesquisaHabilitadas');\n\t\t$this->addRelation('Premio', 'Premio', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'Premios');\n\t\t$this->addRelation('RespostaForum', 'RespostaForum', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'RespostaForums');\n\t\t$this->addRelation('SolicitacaoResgateRelatedByAprovadorId', 'SolicitacaoResgate', RelationMap::ONE_TO_MANY, array('id' => 'aprovador_id', ), null, null, 'SolicitacaoResgatesRelatedByAprovadorId');\n\t\t$this->addRelation('SolicitacaoResgateRelatedBySolicitanteId', 'SolicitacaoResgate', RelationMap::ONE_TO_MANY, array('id' => 'solicitante_id', ), null, null, 'SolicitacaoResgatesRelatedBySolicitanteId');\n\t}", "function retourneListeAdministrateurs(){\n\tglobal $connexion; // on définie la variables globale de connection dans la fonction\n\t\n\t$utilisateurs = array();\n\t$requete = $connexion->query(\"SELECT * FROM utilisateur WHERE type='1' OR type='2'\");\n\t$requete->setFetchMode(PDO::FETCH_OBJ);\n\twhile($enregistrement = $requete->fetch()){\n\t\t$utilisateurs[] = $enregistrement; // on ajoute à $utilisateurs[n+1] un objet utilisateur\n\t}\n\treturn $utilisateurs;\n}" ]
[ "0.59918356", "0.5946393", "0.570071", "0.56989753", "0.56896883", "0.56631994", "0.5563768", "0.5560532", "0.5554846", "0.5501207", "0.54922605", "0.5421884", "0.5414745", "0.54125726", "0.53983384", "0.53915596", "0.53859836", "0.53797066", "0.5373463", "0.5357785", "0.535355", "0.53525084", "0.5351414", "0.53475696", "0.5332559", "0.5332343", "0.5329937", "0.53206116", "0.53112257", "0.5311156", "0.5300262", "0.52968645", "0.52917004", "0.5291432", "0.52744305", "0.52617407", "0.52594936", "0.52547234", "0.52532893", "0.5251281", "0.52402705", "0.5236021", "0.5235714", "0.5230675", "0.52292997", "0.5225404", "0.52181405", "0.52105236", "0.5209627", "0.52080905", "0.5203739", "0.520359", "0.5202992", "0.51910555", "0.5190804", "0.51847595", "0.5170669", "0.5169578", "0.5162352", "0.51601297", "0.5158054", "0.51561815", "0.51560056", "0.5153621", "0.5149504", "0.5141966", "0.5137083", "0.5131235", "0.51278865", "0.51229113", "0.5122674", "0.5122302", "0.51217383", "0.51194006", "0.5117369", "0.5117064", "0.5115946", "0.51144254", "0.51119405", "0.5110622", "0.5108997", "0.51085323", "0.51070964", "0.5105009", "0.5104347", "0.5103257", "0.51025337", "0.51025337", "0.5101634", "0.51006603", "0.51004136", "0.50988346", "0.5096301", "0.50962424", "0.5093376", "0.5087964", "0.5083287", "0.5083203", "0.507845", "0.5076365" ]
0.54715157
11
/ Gestion des Coach
function insertCoach ($tab) { $con = connexion (); if($con != null) { $requete = "insert into coach values (null,'".$tab['nom']."','".$tab['prenom']."','".$tab['adresse']."','".$tab['email']."','".$tab['tel']."');"; mysqli_query($con, $requete); deconnexion($con); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function contarInventario(){\n\t}", "public function videPanier()\n {\n $this->CollProduit->vider();\n }", "public function echarlemagne(){\n //on inclut les scripts pour la recuperation des experiences et google maps pour l'autocomplete des lieux\n \t$this->set('jsIncludes',array('http://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&language=fr&libraries=places','add_experiences'));\n }", "public function hacer(){\n // renderizamos vista\n require_once 'views/pedido/hacer.php';\n }", "public function makeATrip()\n {\n $this->travelStrategy->move();\n echo \"This place is kewl\";\n $this->travelStrategy->move();\n }", "public function alejarCamaraPresidencia() {\n\n self::$presidencia->alejarZoom();\n\n }", "public function onCheatDetect($cheatType){\n //add point TODO\n //Check player status about points TODO\n }", "public function getChapeau();", "public function pageCaptain()\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$oExtras = new Oeventextra($eventId);\r\n\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\t\t\t\r\n\t\t// Preparer les champs de saisie\r\n\t\t$body = new Body();\r\n\r\n\t\t// Titres\r\n\t\t$t = $body->addP('', '', 'bn-title-2');\r\n\t\t$t->addBalise('span', '', LOC_ITEM_CAPTAIN);\r\n\r\n\t\t// Infos generales\r\n\t\t$p = $body->addP('msgParam', LOC_MSG_PREF_CAPTAIN, 'bn-p-info');\r\n\t\t$captainCost = Bn::getConfigValue('captain', 'cost');\r\n\t\t$p->addMetaContent($captainCost);\r\n\r\n\t\t$form = $body->addForm('frmCaptain', BPREF_UPDATE_CAPTAIN, 'targetDlg');\r\n\t\t$form->getForm()->addMetadata('success', \"updated\");\r\n\t\t$form->getForm()->addMetadata('dataType', \"'json'\");\r\n\r\n\t\t//------- Gestion des capitaines\r\n\t\t$div = $form->addDiv('divCaptain', 'bn-div-left');\r\n\t\t// Verifier s'il a des equipes inscrites\r\n\t\t$teams = $oEvent->getTeams();\r\n\t\t$nbTeams = count($teams);\r\n\t\t$cost = $captainCost * $nbTeams;\r\n\t\tif ($cost>0)\r\n\t\t{\r\n\t\t\tif ( $oExtras->getVal('captain')==NO )\r\n\t\t\t{\r\n\t\t\t\t$oAdhe = new Oadhe(Bn::getValue('user_id'));\r\n\t\t\t\t$nbTicknets = $oAdhe->getVal('ticknets');\r\n\t\t\t\tif ($nbTicknets >= $cost) $msg = new Bn_balise('', '', LOC_MSG_ACTIVATION_CAPTAIN);\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$lnk = $div->addP()->addLink('btnBuy', CACCOUNT_PAGE_BUY, LOC_LNK_BUY_TICKNETS, 'targetBody');\r\n\t\t\t\t\t$lnk->addIcon('cart');\r\n\t\t\t\t\t$lnk->addMetaData('nbTicknets', $cost-$nbTicknets);\r\n\t\t\t\t\t$msg = new Bn_balise('', '', LOC_MSG_NOACTIVATION_CAPTAIN);\r\n\t\t\t\t}\r\n\t\t\t\t$msg->addMetaContent($nbTeams);\r\n\t\t\t\t$msg->addMetaContent($nbTicknets);\r\n\t\t\t\t$msg->addMetaContent($cost);\r\n\t\t\t\t$div->addWarning($msg);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$msg = new Bn_balise('', '', LOC_MSG_DEACTIVATION_CAPTAIN);\r\n\t\t\t\t$msg->addMetaContent($nbTeams);\r\n\t\t\t\t$msg->addMetaContent($cost);\r\n\t\t\t\t$div->addWarning($msg);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$chk = $div->addCheckbox('captain', LOC_LABEL_ALLOW_CAPTAIN, YES, $oExtras->getVal('captain')==YES);\r\n\t\tif ($oExtras->getVal('captain')==NO && $nbTicknets < $cost) $chk->getInput()->setAttribute('disabled');\r\n\t\t$div = $div->addDiv('divCaptain2');\r\n\t\t$div->setAttribute('style', 'margin-left:15px;');\r\n\t\t$div->addP('', LOC_MSG_CAPTAIN, 'bn-p-info');\r\n\t\t$d = $div->addDiv('', 'bn-div-line');\r\n\t\t$d->addRadio('allowaddplayer', 'nerver', LOC_LABEL_NEVER, OEVENTEXTRA_DELAY_NEVER, $oExtras->getVal('allowaddplayer')==OEVENTEXTRA_DELAY_NEVER);\r\n\t\t$d->addRadio('allowaddplayer', 'always', LOC_LABEL_ALWAYS, OEVENTEXTRA_DELAY_ALWAYS, $oExtras->getVal('allowaddplayer')==OEVENTEXTRA_DELAY_ALWAYS);\r\n\t\t$bal = new Bn_balise();\r\n\t\t$slt = $bal->addSelect('delayaddplayer');\r\n\t\t$nbJours = range(0,5);\r\n\t\t$slt->addOptions($nbJours, $oExtras->getVal('delayaddplayer'));\r\n\t\t$slt->addContent(LOC_LABEL_DAYS);\r\n\t\t$d->addRadio('allowaddplayer', 'days', $slt, OEVENTEXTRA_DELAY_PARAM, $oExtras->getVal('allowaddplayer')==OEVENTEXTRA_DELAY_PARAM);\r\n\t\t$d->addBreak();\r\n\t\t$div->addP('', LOC_MSG_BADNETTEAM, 'bn-p-info');\r\n\r\n\t\t$d = $div->addDiv('', 'bn-div-clear');\r\n\t\t$d->addCheckbox('licenseonly', LOC_LABEL_ALLOW_LICENSE, YES, $oExtras->getVal('licenseonly')==YES);\r\n\t\tif (Bn::getConfigValue('squash', 'params'))\r\n\t\t{\r\n\t\t\t$d2 = $d->addDiv('divCaptain2');\r\n\t\t\t$d2->setAttribute('style', 'margin-left:15px;');\r\n\t\t\t$d = $d2->addDiv('', 'bn-div-left');\r\n\t\t\t$licenseType = explode(';', $oExtras->getVal('licensetype'));\r\n\t\t\t$d->addCheckbox('federale', LOC_LABEL_FEDERALE, 'FEDERALE', in_array('FEDERALE', $licenseType));\r\n\t\t\t$d->addCheckbox('corpo', LOC_LABEL_CORPO, 'CORPORATIVE', in_array('CORPORATIVE', $licenseType));\r\n\t\t\t$d = $d2->addDiv('', 'bn-div-left');\r\n\t\t\t$d->addCheckbox('jeune', LOC_LABEL_JEUNE, 'JEUNE', in_array('JEUNE', $licenseType));\r\n\t\t\t$d->addCheckbox('scolaire', LOC_LABEL_SCOLAIRE, 'SCOLAIRE', in_array('SCOLAIRE', $licenseType));\r\n\t\t\t$d = $d2->addDiv('', 'bn-div-left');\r\n\t\t\t$d->addCheckbox('squashpass', LOC_LABEL_PASS, 'SQUASH PASS', in_array('SQUASH PASS', $licenseType));\r\n\t\t}\r\n\t\t$d = $div->addDiv('', 'bn-div-clear');\r\n\t\t$licenseCatage = explode(';', $oExtras->getVal('licensecatage'));\r\n\t\t$d2 = $d->addDiv('', 'bn-div-left');\r\n\t\t$d2->addCheckbox('male', LOC_LABEL_MALE, OPLAYER_GENDER_MALE, in_array(OPLAYER_GENDER_MALE, $licenseCatage));\r\n\t\t$d2->addCheckbox('female', LOC_LABEL_FEMALE, OPLAYER_GENDER_FEMALE, in_array(OPLAYER_GENDER_FEMALE, $licenseCatage));\r\n\t\t$d2 = $d->addDiv('', 'bn-div-left');\r\n\t\t$d2->addCheckbox('vet', LOC_LABEL_VETERAN, OPLAYER_CATAGE_VET, in_array(OPLAYER_CATAGE_VET, $licenseCatage));\r\n\t\t$d2->addCheckbox('sen', LOC_LABEL_SENIOR, OPLAYER_CATAGE_SEN, in_array(OPLAYER_CATAGE_SEN, $licenseCatage));\r\n\t\t$d2 = $d->addDiv('', 'bn-div-left');\r\n\t\t$d2->addCheckbox('u19', LOC_LABEL_U19, OPLAYER_CATAGE_U19, in_array(OPLAYER_CATAGE_U19, $licenseCatage));\r\n\t\t$d2->addCheckbox('u17', LOC_LABEL_U17, OPLAYER_CATAGE_U17, in_array(OPLAYER_CATAGE_U17, $licenseCatage));\r\n\t\t$d2 = $d->addDiv('', 'bn-div-left');\r\n\t\t$d2->addCheckbox('u15', LOC_LABEL_U15, OPLAYER_CATAGE_U15, in_array(OPLAYER_CATAGE_U15, $licenseCatage));\r\n\t\t$d2->addCheckbox('u13', LOC_LABEL_U13, OPLAYER_CATAGE_U13, in_array(OPLAYER_CATAGE_U13, $licenseCatage));\r\n\t\t$d2 = $d->addDiv('', 'bn-div-left');\r\n\t\t$d2->addCheckbox('u11', LOC_LABEL_U11, OPLAYER_CATAGE_U11, in_array(OPLAYER_CATAGE_U11, $licenseCatage));\r\n\r\n\t\t$d = $div->addDiv('', 'bn-div-clear');\r\n\t\t$d->addCheckbox('multiteamplayer', LOC_LABEL_MULTITEAMPLAYER, YES, $oExtras->getVal('multiteamplayer')==YES);\r\n\t\t$d = $div->addDiv('', 'bn-div-clear');\r\n\t\t$d->addCheckbox('multiassoteam', LOC_LABEL_MULTIASSOTEAM, YES, $oExtras->getVal('multiassoteam')==YES);\r\n\t\t$d = $div->addDiv('', 'bn-div-clear');\r\n\t\t$d->addEdit('delaycaptain', LOC_LABEL_DELAY_CAPTAIN, $oExtras->getVal('delaycaptain'), 5);\r\n\r\n\t\t$d = $form->addDiv('', 'bn-div-btn');\r\n\t\t$d->addButtonValid('', LOC_BTN_UPDATE);\r\n\r\n\t\t// Envoi au navigateur\r\n\t\t$body->addJQReady('pageCaptain();');\r\n\t\t$body->display();\r\n\t\treturn false;\r\n\t}", "function factures_autoriser(){}", "public function clickFinger()\n {\n }", "public function boleta()\n\t{\n\t\t//\n\t}", "final function velcom(){\n }", "public function linea_colectivo();", "public function relatorioAction() { \r\n \r\n }", "public function index()\n {\n return Gestion::all();\n }", "function hitung()\n\t{\n\t\t$this->model->hitungMhs();\n\t\t//$this->dashboardukmapendaftar(); //controller dikembalikan ke method index setelah selesai mengakses method ini.\n\t}", "function faireCours ()\n {\n // ECHAUFFEMENT\n echo \"(echauffez-vous d'abord)\";\n\n parent::faireCours();\n\n // RANGER LES SKIS\n echo \"(e)tirez-vous...\";\n }", "function apropos(){\n\t\t\t$this->data->content=\"aProposView.php\";\n\t\t\t$this->prepView();\n\t\t\t// Selectionne et charge la vue\n\t\t\trequire_once(\"view/mainView.php\");\n\t\t}", "public function actividadesPorSegmento()\n {\n //\n }", "public function index() {\n \t$this->set('jsIncludes',array('http://maps.googleapis.com/maps/api/js?key=AIzaSyA7d3ppUSRkOeGZ-ZAmU0R8f_PxyheJch0&sensor=true&libraries=geometry','map','overlays','upload_position','tools','loader','bootstrap.min','hook/mousewheel','hook/hook.modif'));\n \t\n \t$this->set('cssIncludes',array('hook/hook.css?v=1','instant-sprite'));\n \t\n \t//on recupere la derniere annee pour savoir si la course est en cours\n \t$year = $this->Position->User->Year->find('first',array('order' => array('Year.id' => 'DESC'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'fields' => 'Year.en_cours'));\n\t\t$en_cours = $year['Year']['en_cours'];\n \t$this->set('en_cours',$en_cours);\n \t\n \t//on recupere toutes les années pour le selector\n \t$this->Position->User->Year->recursive = 0;\n \t$years = $this->Position->User->Year->find('all',array('order' => array('Year.id' => 'DESC')));\n \t$this->set('years',$years);\n \t\n \t//on recupere toutes les écoles pour le selector\n \t$this->Position->User->School->recursive = 0;\n \t$schools = $this->Position->User->School->find('all',array('order' => array('School.name' => 'ASC')));\n \t$this->set('schools',$schools);\n \t\n \t$user_id = $this->Auth->user('id');\n \t\n \t//pour la distance\n \t//on recupere la position de son école\n $this->Position->User->recursive = 0;\n $school = $this->Position->User->find('first', array('conditions' => array('User.id' => $user_id),\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'fields' => array('School.lat', 'School.lon')));\n $this->set('school',$school);\n \t\n \t\n \t//pour l'ajout de photo\n \tif(!empty($this->request->data)){\n \t\t\n \t\t$position = $this->Position->find('first',array('order' => array('Position.modified' => 'DESC'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'fields' => 'Position.id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conditions' => array('Position.user_id' => $user_id)));\n\t\t\t$position_id = $position['Position']['id'];\n\t\t\t\n\t\t\t$this->request->data['Position']['id']=$position_id;\n\t\t\t\n\t\t\t$this->Position->save($this->request->data);\n \t\n \t\t$extension = strtolower(pathinfo($this->request->data['Position']['photo_file']['name'] , PATHINFO_EXTENSION));\n \t\t\n \t\t//taille en bytes\n \t\t$size = $this->request->data['Position']['photo_file']['size'];\n \t\n\t \tif(!empty($this->request->data['Position']['photo_file']['tmp_name'])){\n\t \t\n\t \t\tif(in_array($extension, array('jpg','jpeg','png'))&&($size<=3560938)){\n\t \t\t\n\t\t \t\t$file_name = $user_id . '-' . time() . '.' . $extension;\n\t\t \t\tmove_uploaded_file($this->request->data['Position']['photo_file']['tmp_name'], IMAGES . 'photos' . DS . $file_name);\n\t\t\t \t$this->Position->saveField('photo_url',$file_name);\n\t\t\t \t\n\t\t\t \t//redimensionnement de la photo\n\t\t\t \tApp::import('Vendor', 'ImageTool');\n\t\t\t \t\n\t\t\t \t//on effectue la rotation de l'image a partir des données EXIF de la photo\n\t\t\t \t$image = ImageTool::autorotate(array(\n\t\t\t\t\t 'input' => IMAGES . 'photos' . DS . $file_name,\n\t\t\t\t\t 'output' => null\n\t\t\t\t\t));\n\t\t\t \t\n\t\t\t \t//on réduit l'image pour l'affichage sur la carte\n\t\t\t \t$status_S = ImageTool::resize(array(\n\t\t\t\t\t 'input' => $image,\n\t\t\t\t\t 'output' => IMAGES . 'photos' . DS . 'S_' . $file_name,\n\t\t\t\t\t 'width' => 200,\n\t\t\t\t\t 'height' => 200,\n\t\t\t\t\t 'crop' => true,\n\t\t\t\t\t 'keepRatio' => false,\n\t\t\t\t\t 'paddings' => false,\n\t\t\t\t\t));\n\t\t\t\t\t\n\t\t\t\t\t//on reduit l'image pour l'affichage dans la galerie\n\t\t\t\t\t$status_L = ImageTool::resize(array(\n\t\t\t\t\t 'input' => $image,\n\t\t\t\t\t 'output' => IMAGES . 'photos' . DS . $file_name,\n\t\t\t\t\t 'width' => 800,\n\t\t\t\t\t 'height' => 800,\n\t\t\t\t\t 'keepRatio' => true,\n\t\t\t\t\t 'paddings' => false,\n\t\t\t\t\t));\n\t\t \t}\n\t\t \telse{\n\t\t\t \t$this->Session->setFlash(\"Seuls les fichiers jpg, jpeg et png de moins de 3,4 Mo sont autorisés.\", 'default', array('class' => 'alert-box radius warning'));\n\t\t\t \treturn $this->redirect(array('action' => 'index'));\n\t\t \t}\n\t \t}\n \t}\n \t\n\t\n }", "public function traits(){\n $this->clapHands();\n }", "public function activate();", "public function activate();", "public function interventionListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Intervention\");//type array\n\t}", "function grappes_autoriser() {\n}", "public function view(){\n\t\t\t$this->__switchboard();\n\t\t}", "public function attachEvents();", "public function attachEvents();", "public function main(ChansonStorageMySQL $chansonStorage, AccountStorageMysql $accountStorage){\n session_start();\n \n // verifiacation s'il n'existe pas des information à afficher \n $feedback = key_exists('feedback', $_SESSION) ? $_SESSION['feedback'] : '';\n $_SESSION['feedback'] = '';\n\n // on passe le routeur à la vue\n if(!key_exists(\"user\",$_SESSION)){\n $this->view= new View($this,$feedback);\n }else{\n if($_SESSION[\"user\"]->getStatut()===\"admin\" ){\n $this->view= new AdminView($this,$_SESSION[\"user\"],$feedback);\n }else{\n $this->view= new PrivateView($this,$_SESSION[\"user\"],$feedback);\n }\n }\n\n \n\n // on instancie notre controller\n $controllerChansons= new Controller($this->view, $chansonStorage,$accountStorage);\n $controllerAccount= new ControllerAccount($this->view,$accountStorage);\n\n /**\n * gestion des urls afin de pouvoir afficher les pages correspondantes\n */\n // si le parametre ou action son passe en url\n if(key_exists(\"PATH_INFO\" , $_SERVER)){\n\n $tab= explode('/', $_SERVER[\"PATH_INFO\"]);\n $size=count($tab);\n $i=1;\n\n if($size===2){\n $action=htmlspecialchars($tab[1]);\n switch ($action) {\n case 'apropos':\n $this->view->makeApropos();\n break;\n case 'liste':\n $controllerChansons->showList();\n break;\n case 'listUser':\n if(key_exists(\"user\",$_SESSION)){\n if($_SESSION[\"user\"]->getStatut()===\"admin\"){\n $controllerAccount->showUserList();\n }else{\n $this->view->displayAdminPageFeedBack(\".\",\"Vous de ver etre admin pour voir la liste des utilisateur \");\n }\n \n }else{\n $this->view->displayConnexionFeedback(\"Connetez vous pour voir la liste des utilisateur attention vous devez être egalement de statut admin\"); \n }\n \n break;\n\n case 'nouveau':\n if(key_exists(\"user\",$_SESSION)){\n $controllerChansons->getView()->makeCreationFormChansonPage($controllerChansons->newChanson());\n }else{\n $this->view->displayConnexionFeedback(\"Connetez vous pour voir la page personnaliser de la chanson\");\n } \n break;\n\n case 'sauverNouveau':\n if($_SERVER[\"REQUEST_METHOD\"] === \"POST\"){\n if(key_exists(\"user\",$_SESSION)){\n $controllerChansons->saveNewChanson($_POST);\n }else{\n $this->view->displayConnexionFeedback(\"Vous devez etre connecter pour enregistrer une nouvelle chanson\");\n } \n }else{\n $this->view->makePageUnaccessible();\n }\n break;\n case '':\n $this->view->welcomePage();\n break;\n case 'connexion':\n if(!key_exists(\"user\",$_SESSION)){\n $this->view->makeLoginFormPage();\n }else{\n $this->view->displayAlreadyConnectSuccess();\n } \n break;\n case 'deconnexion':\n if(key_exists(\"user\",$_SESSION)){\n $controllerChansons->logout();\n }else{\n $this->view->displayConnexionFeedback(\"Vous devez etre connecter pour experer vous deconnecter\");\n } \n break;\n case 'inscription':\n $this->view->makeSignInFormPage($controllerAccount->newAccount());\n break;\n // à changer pour modification ie controller des account à part;\n case \"confirmConnexion\":\n if($_SERVER[\"REQUEST_METHOD\"] === \"POST\"){\n $controllerChansons->login($_POST);\n }else{\n $this->view->makePageUnaccessible();\n }\n break;\n case 'confirmInscription':\n if($_SERVER[\"REQUEST_METHOD\"] === \"POST\"){\n $controllerAccount->saveAccount($_POST);\n }else{\n $this->view->makePageUnaccessible();\n }\n default:\n if(key_exists(\"user\",$_SESSION)){\n $controllerChansons->showInformation($action);\n }else{\n $this->view->displayConnexionFeedback(\"Connetez vous pour voir la page personnaliser de la chanson\");\n } \n break;\n }\n }\n\n \n if($size===3){\n for($i; $i<$size ; $i++){\n $action= $tab[$i];\n switch ($action){\n case 'supprimer':\n if(key_exists(\"user\",$_SESSION)){\n $id= htmlspecialchars($tab[$i-1]);\n $controllerChansons->askChansonDeletion($id);\n }else{\n $this->view->displayConnexionFeedback(\"Vous devez être connecter pour supprimer des chansons\");\n }\n break;\n case 'confirmerSuppression':\n if($_SERVER[\"REQUEST_METHOD\"] === \"POST\"){\n if(key_exists(\"user\",$_SESSION)){\n $id= htmlspecialchars($tab[$i-1]);\n $controllerChansons->deleteChanson($id);\n }else{\n $this->view->displayConnexionFeedback(\"Vous devez être connecter pour supprimer des chansons\");\n }\n }else{\n $this->view->makePageUnaccessible();\n }\n break;\n case 'confirmerModification':\n if($_SERVER[\"REQUEST_METHOD\"] === \"POST\"){\n if(key_exists(\"user\",$_SESSION)){\n $id= htmlspecialchars($tab[$i-1]);\n // echo \"pas dedans\";\n $controllerChansons->updateChanson($_POST,$id);\n }else{\n $this->view->displayConnexionFeedback(\"Vous devez être connecter pour modifier des chansons\");\n }\n }else{\n $this->view->makePageUnaccessible();\n }\n break;\n case \"modifier\":\n if(key_exists(\"user\",$_SESSION)){\n $id= htmlspecialchars($tab[$i-1]);\n $controllerChansons->askChansonModification($id);\n }else{\n $this->view->displayConnexionFeedback(\"Vous devez être connecter pour modifier des chansons\");\n }\n \n break;\n break;\n case 'supprimerUser':\n if(key_exists(\"user\",$_SESSION)){\n if($_SESSION[\"user\"]->getStatut()===\"admin\"){\n $id= htmlspecialchars($tab[$i-1]);\n $controllerAccount->askDeletionUser($id);\n }else{\n $this->view->displayAdminPageFeedBack(\"Vous de ver etre admin pour supprimer un \");\n }\n }else{\n $this->view->displayConnexionFeedback(\"Connetez vous pour pouvoir supprimer un comptes\"); \n }\n break;\n case 'confirmSuppressionUser':\n if($_SERVER[\"REQUEST_METHOD\"] === \"POST\"){\n if(key_exists(\"user\",$_SESSION)){\n if($_SESSION[\"user\"]->getStatut()===\"admin\"){\n $id= htmlspecialchars($tab[$i-1]);\n $controllerAccount->DeleteAccount($id);\n }else{\n $this->view->displayAdminPageFeedBack(\"Vous devez etre admin pour supprimer un utilisateur\");\n }\n }else{\n $this->view->displayConnexionFeedback(\"Connetez vous pour pouvoir supprimer un comptes\"); \n }\n }else{\n $this->view->makePageUnaccessible();\n }\n break;\n\n default:\n $this->view->makePageUnaccessible();\n break;\n }\n \n \n }\n }\n\n if($size >4){\n //chargement de la page d'erreur \n\n }\n\n\n }else{\n // affichage de la page principale avec menu \n $this->view->welcomePage();\n }\n\n\n\n $this->view->render();\n\n }", "public function lectureContenu ()\n {\n\n //$metadata = simplexml_load_file(\"xmoddledata/metadata.xml\");\n\n // on Vérifie si le cours existe\n\n /* @TODO Partie à décommenter lorsque le module de navigation sera intégré au reste de l'application */\n\n // $nbrCours = $metadata->attributes()->nbrCours;\n // $isFound = false;\n // $i = 0;\n // for ($i = 0; $i < $nbrCours; $i++) {\n // if ($metadata->cours[$i]->attributes()->title == $title && $metadata->cours[$i]->attributes()->id == $id) {\n // $isFound = true;\n // break;\n // }\n // }\n\n // if ($isFound) {\n //$cours = simplexml_load_file(\"xmoddledata/\" . $metadata->cours[$i]->attributes()->id . \"_\" . $metadata->cours[$i]->attributes()->title . \"/description.xml\"); \n\n $description = simplexml_load_file('xmoddledata/2_ModeleDeSupport2/description.xml');\n $notions = simplexml_load_file('xmoddledata/2_ModeleDeSupport2/descriptionNotions.xml');\n\n // Création d'un tableau associatif de notions avec l'id comme clé\n\n $notionsArray = $this->getNotions($notions);\n\n // Construction de la navigation\n $text_parties = \"\";\n $nav_parties = [];\n for ($i = 0; $i < $description->attributes()->nbrParties; $i++) {\n $text_parties = \"<div style='\";\n $text_parties .= $this->getStyle($description->partie[$i]->attributes());\n $text_parties .= \"'\";\n $text_parties .= \" id='\".$i.\"'>\";\n $nav_chapitres = [];\n $text_parties .= $description->partie[$i]->attributes()->title;\n $text_parties .= \"</div>\";\n $text_parties .= \"<br/><br/>\";\n $text_chapitres = \"\";\n for ($j = 0; $j < $description->partie[$i]->attributes()->nbrChapitres; $j++) {\n $text_chapitres .= \"<div style='\";\n $text_chapitres .= $this->getStyle($description->partie[$i]->chapitre[$j]->attributes());\n $text_chapitres .= \"'\";\n $text_chapitres .= \" id='\".$i.\"_\".$j.\"'>\";\n $nav_paragraphes = [];\n $text_chapitres .= $description->partie[$i]->chapitre[$j]->attributes()->title;\n $text_chapitres .= \"</div>\";\n $text_chapitres .= \"<br/><br/>\";\n $text_paragraphes = \"\";\n for ($k = 0; $k < $description->partie[$i]->chapitre[$j]->attributes()->nbrParagraphes; $k++) {\n // On renseigne le titre du paragraphe\n $text_paragraphes .= \"<div style='\";\n $text_paragraphes .= $this->getStyle($description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes());\n $text_paragraphes .= \"'\";\n // Ajout d'un ancre de navigation\n $text_paragraphes .= \" id='\".$i.\"_\".$j.\"_\".$k.\"'>\";\n $text_paragraphes .= $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->title;\n $text_paragraphes .= \"</div>\";\n $text_paragraphes .= \"<br/>\";\n // Navigation avec paragraphes\n $nav_paragraphes[\"\".$i.\"_\".$j.\"_\".$k] = $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->title;\n // On remplit les notions contenus dans le paragraphe\n for ($l = 0; $l < $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->nbrNotions; $l++) {\n $text_paragraphes .= $notionsArray[\"\".$description->partie[$i]->chapitre[$j]->paragraphe[$k]->notion[$l]->attributes()->id];\n }\n }\n $text_chapitres .= $text_paragraphes;\n $nav_chapitres[\"\".$i.\"_\".$j] = $nav_paragraphes;\n }\n $text_parties .= $text_chapitres;\n $nav_parties[\"\".$i] = $nav_chapitres;\n }\n// dd($nav_parties);\n// dd($navigation);\n// dd($description);\n\n // Construction de la page web\n $titre = $description->attributes()->title;\n// dd($description);\n// forearch( $navigation->partie[] as $partie) {\n// dd($pantie);\n// }\n// dd($titre);\n\n\n // $notions = simplexml_load_file(\"../../../fichiersdestructuration/descriptionNotions.xml\");\n\n\n // $nbrNotions = $cours->attributes()->nbrNotions;\n // $notionsConvertis = array();\n // for ($i = 0; $i < $nbrNotions; $i++) {\n // $attributs = $cours->notion[$i]->attributes();\n // $style = \"\";\n // if ($attributs['font-weight'] != null) {\n // $style .= 'font-weight:' . $attributs['font-weight'] . \";\";\n // }\n // if ($attributs['font-size'] != null) {\n // $style .= 'font-size:' . $attributs['font-size'] . \";\";\n // }\n\n // if ($attributs['font-family'] != null) {\n // $style .= 'font-family:' . $attributs['font-family'] . \";\";\n // }\n\n // if ($attributs['color'] != null) {\n // $style .= 'color:' . $attributs['color'] . \";\";\n // }\n\n // if ($attributs['text-decoration'] != null) {\n // $style .= 'text-decoration:' . $attributs['text-decoration'] . \";\";\n // }\n\n // $text = \"\";\n // foreach ($cours->notion[$i]->children() as $child) {\n // $text .= $child->asXML();\n // }\n // $notionHtml = \"<div style='\";\n // $notionHtml .= $style;\n // $notionHtml .= \"'>\";\n // $notionHtml .= $text;\n // $notionHtml .= \"</div>\";\n\n\n // //dd(strval($text));\n // array_push($notionsConvertis, $notionHtml);\n\n // }\n // }else{\n // return view(\"/\");\n // }\n //$notions = $notionsConvertis;\n // return response()->json($notions,200);\n\n // return \"lecture cours\";\n return 0;\n }", "public function inPreview();", "public function RicercaAvanzata(){\n $view = new VRicerca();\n $view->mostraFiltri();\n }", "function FotografiaControl(){\n\t\t$this->acceso=new AccesoDatos();\n\t}", "public function GestorReglasNegocios() {\n $this->gestorAccesoDatos = new GestorAccesoDatos();\n }", "public function listaVisitantes(){\n \n }", "public function show(Gestion $gestion)\n {\n //\n }", "public function dictaphoneAction() {\n\t\t$this->initInstance(); \t\t\t\t\n\t\t\n\t}", "function afficherInterface2()\r\n {\r\n echo \"<h1>code pour MonInterface2 SURCHARGE ENFANT</h1>\";\r\n }", "public function partidos_cancha()\n\t{\n\t\tif($this->moguardia->isloged(true) and $torneo > 0)\n\t\t{\n\t\t\t$this->load->view('torneos/partidos_cancha');\n\t\t}\n\t}", "function cl_pcorcamfornelic() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"pcorcamfornelic\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_autoriser(){}", "public function oneto50kAction(){\r\n\tif($this->_getParam('id',false)){\r\n\t$gazetteers = new Osdata();\r\n\t$this->view->gazetteer = $gazetteers->getGazetteer($this->_getParam('id'));\t\r\n\t} else {\r\n\t\tthrow new Pas_Exception_Param($this->_missingParameter);\t\r\n\t}\r\n\t}", "function ordmarca() {\n $coche=new coches_model();\n\n //Uso metodo del modelo de coches\n $datos=$coche->ordmarca();\n $titulo = \"Listado de Coches ordenado\";\n\n //Cargar vista\n $this->view(\"coches_listado.phtml\",array(\n \"datos\" => $datos,\n \"Listado de Personas\" => $titulo\n ));\n //require_once(\"views/coches_listado.phtml\"); }\n }", "function informationsMonCompte() {\n $this->vue = new V_Vue(\"../vues/templates/template.inc.php\");\n $this->vue->ecrireDonnee(\"titreVue\",\"Margo : Mon Compte\");\n $this->vue->ecrireDonnee('centre',\"../vues/includes/gestionDeCompte/centreMonCompte.inc.php\");\n \n $this->vue->ecrireDonnee(\"titreSection\",\"Mon Compte: Informations\");\n // Centre : formulaire de connexion\n $this->vue->ecrireDonnee('loginAuthentification',MaSession::get('login')); \n \n // ... depuis la BDD \n $daoPers = new M_DaoPersonne();\n $daoPers->connecter();\n $perso = $daoPers->getOneByLogin(MaSession::get('login'));\n \n $this->vue->ecrireDonnee(\"infoPerso\",$perso);\n \n $this->vue->afficher();\n }", "public function updateCaptain()\r\n\t{\r\n\t\t$eventId = Bn::getValue('event_id');\r\n\t\t$oExtra = new Oeventextra($eventId);\r\n\r\n\t\t// Controle de l'autorisation\r\n\t\t$oEvent = new Oevent($eventId);\r\n\t\tif ( $oEvent->getVal('ownerid') != Bn::getValue('user_id') && !Oaccount::isLoginAdmin() ) return false;\r\n\r\n\t\t// Controle des ticknets\r\n\t\t$captain = Bn::getValue('captain', NO);\r\n\t\tif ($captain == YES && $oExtra->getVal('captain', NO)==NO)\r\n\t\t{\r\n\t\t\t$teams = $oEvent->getTeams();\r\n\t\t\t$nbTeams = count($teams);\r\n\t\t\t$captainCost = Bn::getConfigValue('captain', 'cost');\r\n\t\t\t$cost = $captainCost * $nbTeams;\r\n\t\t\tif ($cost > 0)\r\n\t\t\t{\r\n\t\t\t\t$oAdhe = new Oadhe(Bn::getValue('user_id'));\r\n\t\t\t\t$nbTicknets = $oAdhe->getVal('ticknets');\r\n\t\t\t\tif ($nbTicknets >= $cost) $oAdhe->addTicknets(-$cost, $oEvent->getVal('name') .\" :\" . \"Gestion des capitaines pour $nbTeams équipes\"); \r\n\t\t\t\telse return BEVENT_PAGE_MANAGER_IC;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Donnees du compte\r\n\t\t$oExtra->setVal('eventid', $eventId);\r\n\t\t$oExtra->setVal('captain', $captain);\r\n\t\t$oExtra->setVal('allowaddplayer', Bn::getValue('allowaddplayer', OEVENTEXTRA_DELAY_NEVER));\r\n\t\t$oExtra->setVal('delayaddplayer', Bn::getValue('delayaddplayer', 0));\r\n\t\t$oExtra->setVal('licenseonly', Bn::getValue('licenseonly', NO));\r\n\t\t$licenceType = array();\r\n\t\t$type = Bn::getValue('squashpass', null);\r\n\t\tif (!empty($type)) $licenceType[] = $type;\r\n\t\t$type = Bn::getValue('jeune', null);\r\n\t\tif (!empty($type)) $licenceType[] = $type;\r\n\t\t$type = Bn::getValue('scolaire', null);\r\n\t\tif (!empty($type)) $licenceType[] = $type;\r\n\t\t$type = Bn::getValue('corpo', null);\r\n\t\tif (!empty($type)) $licenceType[] = $type;\r\n\t\t$type = Bn::getValue('federale', null);\r\n\t\tif (!empty($type)) $licenceType[] = $type;\r\n\t\t$oExtra->setVal('licensetype', implode(';', $licenceType));\r\n\r\n\t\t$licenceCatage = array();\r\n\t\t$type = Bn::getValue('male', null);\r\n\t\tif (!empty($type)) $licenceCatage[] = $type;\r\n\t\t$type = Bn::getValue('female', null);\r\n\t\tif (!empty($type)) $licenceCatage[] = $type;\r\n\t\t$type = Bn::getValue('vet', null);\r\n\t\tif (!empty($type)) $licenceCatage[] = $type;\r\n\t\t$type = Bn::getValue('sen', null);\r\n\t\tif (!empty($type)) $licenceCatage[] = $type;\r\n\t\t$type = Bn::getValue('u19', null);\r\n\t\tif (!empty($type)) $licenceCatage[] = $type;\r\n\t\t$type = Bn::getValue('u17', null);\r\n\t\tif (!empty($type)) $licenceCatage[] = $type;\r\n\t\t$type = Bn::getValue('u15', null);\r\n\t\tif (!empty($type)) $licenceCatage[] = $type;\r\n\t\t$type = Bn::getValue('u13', null);\r\n\t\tif (!empty($type)) $licenceCatage[] = $type;\r\n\t\t$type = Bn::getValue('u11', null);\r\n\t\tif (!empty($type)) $licenceCatage[] = $type;\r\n\t\t$oExtra->setVal('licensecatage', implode(';', $licenceCatage));\r\n\t\t$oExtra->setVal('multiteamplayer', Bn::getValue('multiteamplayer', NO));\r\n\t\t$oExtra->setVal('multiassoteam', Bn::getValue('multiassoteam', NO));\r\n\t\t$oExtra->setVal('delaycaptain', Bn::getValue('delaycaptain', 0));\r\n\t\t$oExtra->setVal('eventid', Bn::getValue('event_id'));\r\n\t\t$oExtra->save();\r\n\r\n\t\t// Message de fin\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_CAPTAIN);\r\n\t\techo Bn::toJson($res);\r\n\t\treturn false;\r\n\t}", "public function click() {\r\n\t\tswitch($this->current) {\r\n\t\t\tdefault:\r\n\t\t\t\t$this->current = self::SEA;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase self::ISLAND:\r\n\t\t\t\t$this->current = self::NONE;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase self::SEA:\r\n\t\t\t\t$this->current = self::ISLAND;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "public function recap(){\n\t\techo \"----- INFO\" . $this->getNom() . \" ----- <br>\";\n\t\techo $this->getNom() . \" a \" . $this->getVie() . ' points de vie <br>';\n\t}", "public function searchRetraitEspece()\n {\n $this->utils->Restreindre($this->userConnecter->admin, $this->utils->Est_autoriser(47, $this->userConnecter->profil));\n $data['lang'] = $this->lang->getLangFile($this->getSession()->getAttribut('lang'));\n $params = array('view' => 'compte/retrait-espece-carte-search');\n $this->view($params, $data);\n }", "function eventclass_TambahPergerakan()\n\t{\n\t\t$this->events[\"BeforeShowEdit\"]=true;\n\n\n//\tonscreen events\n\n\n\t}", "public function dragguestcompleteAction()\n {\n $uid = $this->_USER_ID;\n $floorId = $this->getParam('CF_floorid');\n $stealFloorId = $this->getParam('CF_stealfloorid');\n $chairId = $this->getParam('CF_chairid');\n $innerUid = $this->getParam('CF_inneruid');\n $ctp = $this->getParam('CF_tp');\n $aryMyFloors = explode(',', $this->_user['floors']);\n $type = '';\n foreach ($aryMyFloors as $key=>$fvalue) {\n $aryTmp = explode('|', $fvalue);\n if ($aryTmp[0] == $floorId) {\n $type = $aryTmp[1];\n break;\n }\n }\n\n if (empty($floorId) || empty($stealFloorId) || empty($chairId) || empty($type)) {\n return $this->_redirectErrorMsg(-1);\n }\n\n $mbllApi = new Mbll_Tower_ServiceApi($uid);\n $aryRst = $mbllApi->stealGuest($stealFloorId, $floorId, $chairId);\n if (!$aryRst || !empty($aryRst['errno']) || empty($aryRst['result']['id'])) {\n $errParam = '-1';\n if (!empty($aryRst['errno'])) {\n $errParam = $aryRst['errno'];\n }\n return $this->_redirectErrorMsg($errParam);\n }\n\n $this->view->chairId = $aryRst['result']['id'];\n $this->view->stealFloorId = $stealFloorId;\n $this->view->waitChair = $aryRst['result']['id'];\n $this->view->floorId = $floorId;\n $this->view->type = $type;\n $this->view->ctp = $ctp;\n $this->view->innerUid = $innerUid;\n $this->render();\n }", "public function fly()\n {\n }", "public function acessarRelatorios(){\n\n }", "public function geraInterface(){\n # Abre o template da classe basica e armazena conteudo do modelo\n $modeloAdm = Util::getConteudoTemplate($this->gui.'/Modelo.adm.tpl');\n $modeloCad = Util::getConteudoTemplate($this->gui.'/Modelo.cad.tpl');\n $modeloEdit = Util::getConteudoTemplate($this->gui.'/Modelo.edit.tpl');\n\n $dir = '';\n\n # Abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n\n # Varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n // === Nao gerar interface de tabelas n:m\n if((string)$aTabela['TIPO_TABELA'] == 'N:M')\n continue;\n\n $copiaModeloAdm = $modeloAdm;\n $copiaModeloCad = $modeloCad;\n $copiaModeloEdit = $modeloEdit;\n\n $nomeClasse\t = ucfirst($this->getCamelMode((string)$aTabela['NOME']));\n $objetoClasse = \"\\$o$nomeClasse\";\n\n # Varre a estrutura dos campos da tabela em questao\n $aPKRequest = $aCampoPK = $aCampoCad = $aCampoEdit = $aTituloAdm = $aCampoAdm = $aGetAll = array();\n $PK = $ID_PK = $label = $campoAdm = $componenteCad = $componenteEdit = NULL;\n\n foreach($aTabela as $oCampo){\n $nomeFKClasse = ucfirst($this->getCamelMode((string)$oCampo->FKTABELA));\n //$label = ((string)$oCampo->FKCAMPO != '') ? ucfirst(preg_replace(\"#^(?:id_?|cd_?)(.*?)#is\", \"$1\", (string)$oCampo->NOME)) : \n $label = ((string)$oCampo->FKCAMPO != '') ? $nomeFKClasse :\n ucfirst(str_replace((string)$aTabela['NOME'], \"\", (string)$oCampo->NOME));\n\n $campoAdm = ((string)$oCampo->FKCAMPO != '') ? $objetoClasse.\"->o$label\".\"->\".$this->getTituloCombo((string)$oCampo->FKTABELA) :\n $objetoClasse.\"->$oCampo->NOME\";\n\n if((int)$oCampo->CHAVE == 1){\n $aPKRequest[] = \"\\$_REQUEST['{$oCampo->NOME}']\";\n $aCampoPK[] = Form::geraHidden((string)$oCampo->NOME);\n\n if((string)$oCampo->FKTABELA != ''){ // Tabela cuja PK = FK => Relacao 1:1\n $PK = \"o$nomeFKClasse\".\"->\".$oCampo->FKCAMPO;\n $ID_PK = $oCampo->FKCAMPO;\n\n //print \"($objetoClasse, {$oCampo->NOME}, $label, $nomeFKClasse, \".$this->getTituloCombo((string)$oCampo->FKTABELA).\", 'CAD')\\n\";\n $componenteCad = Form::geraSelect($objetoClasse, (string)$oCampo->NOME, $label, $oCampo->FKCAMPO, $this->getTituloCombo((string)$oCampo->FKTABELA), 'CAD', $this->gui);\n $componenteEdit = Form::geraSelect($objetoClasse, (string)$oCampo->NOME, $label, $oCampo->FKCAMPO, $this->getTituloCombo((string)$oCampo->FKTABELA), 'EDIT', $this->gui);\n\n } else {\n $PK = (string)$oCampo->NOME;\n $ID_PK = (string)$oCampo->NOME;\n }\n } else {\n switch((string)$oCampo->TIPO){\n case \"date\":\n $componenteCad = Form::geraCalendario($objetoClasse, (string)$oCampo->NOME, $label, 'CAD');\n $componenteEdit = Form::geraCalendario($objetoClasse, (string)$oCampo->NOME, $label, 'EDIT');\n $campoAdm = Form::geraCalendario($objetoClasse, (string)$oCampo->NOME, $label, 'ADM');\n break;\n\n case \"datetime\":\n case \"timestamp\":\n $componenteCad = Form::geraCalendarioDataHora($objetoClasse, (string)$oCampo->NOME, $label, 'CAD');\n $componenteEdit = Form::geraCalendarioDataHora($objetoClasse, (string)$oCampo->NOME, $label, 'EDIT');\n $campoAdm = Form::geraCalendarioDataHora($objetoClasse, (string)$oCampo->NOME, $label, 'ADM');\n break;\n\n case \"text\": \n $componenteCad = Form::geraTextArea($objetoClasse, (string)$oCampo->NOME, $label, 'CAD', $this->gui);\n $componenteEdit = Form::geraTextArea($objetoClasse, (string)$oCampo->NOME, $label, 'EDIT', $this->gui);\n break;\n\n case \"tinyint(1)\": \n $componenteCad = Form::geraCheckBox($objetoClasse, (string)$oCampo->NOME, $label, 'CAD', $this->gui);\n $componenteEdit = Form::geraCheckBox($objetoClasse, (string)$oCampo->NOME, $label, 'EDIT', $this->gui);\n break;\n\n default:\n if($oCampo->FKCAMPO != ''){\n $componenteCad = Form::geraSelect($objetoClasse, (string)$oCampo->NOME, $label, $oCampo->FKCAMPO, $this->getTituloCombo((string)$oCampo->FKTABELA), 'CAD', $this->gui);\n $componenteEdit = Form::geraSelect($objetoClasse, (string)$oCampo->NOME, $label, $oCampo->FKCAMPO, $this->getTituloCombo((string)$oCampo->FKTABELA), 'EDIT', $this->gui);\n }\n else{\n $componenteCad = (preg_match(\"#(?:senha|password)#is\", $oCampo->NOME)) ? \n Form::geraPassword($objetoClasse, (string)$oCampo->NOME, $label, 'CAD', $this->gui) :\n Form::geraInput($objetoClasse, (string)$oCampo->NOME, $label, 'CAD', (string)$oCampo->TIPO, $this->gui);\n\n $componenteEdit = (preg_match(\"#(?:senha|password)#is\", $oCampo->NOME)) ? \n Form::geraPassword($objetoClasse, (string)$oCampo->NOME, $label, 'EDIT', $this->gui) :\n Form::geraInput($objetoClasse, (string)$oCampo->NOME, $label, 'EDIT', (string)$oCampo->TIPO, $this->gui);\n }\n # ============ Campo Enum =============\n if(preg_match(\"#enum#i\", (string)$oCampo->TIPO)){\n $componenteCad = Form::geraEnum($objetoClasse, (string)$oCampo->NOME, (string)$oCampo->TIPO, $label, 'CAD', $this->gui);\n $componenteEdit = Form::geraEnum($objetoClasse, (string)$oCampo->NOME, (string)$oCampo->TIPO, $label, 'EDIT', $this->gui);\t\n } \n break;\n }\n }\n $aCampoCad[] = $componenteCad;\n $aCampoEdit[] = $componenteEdit;\n $aTituloAdm[] = \"<th>$label</th>\";\n $aCampoAdm[] = \"<td><?=$campoAdm?></td>\";\n }\n\n # ===== Montar lista dos metodos Carregar Colecao =======\n $aTabelaFK = $this->retornaTabelasFK((string)$aTabela['NOME']);\n\n foreach($aTabelaFK as $oCampoFK => $oDadosTabelaFK){\n $nomeClasseFK\t = ucfirst($this->getCamelMode($oDadosTabelaFK['FKTABELA']));\n $nomeObjetoFK\t = ucfirst(preg_replace(\"#^(?:id_?|cd_?)(.*?)#is\", \"$1\", $oCampoFK));\n $aGetAll[] = \"\\$a$nomeClasseFK = \\$oControle->getAll$nomeClasseFK();\"; \n }\n\n # monta demais valores a serem substituidos\n $sPKRequest = join($aPKRequest, \", \");\n $sTituloAdm = join($aTituloAdm, \"\\n\\t\\t\\t\");\n $sCampoAdm = join($aCampoAdm, \"\\n\\t\\t\\t\");\n $sCampoCad = join($aCampoCad, \"\\n\");\n $sCampoEdit = join($aCampoEdit, \"\\n\");\n $sCampoPK = join($aCampoPK, \"\\n\");\n $sGetAll = (count($aGetAll)>0) ? join($aGetAll,\"\\n\") : \"\";\n\n # substitui todas os parametros pelas variaveis ja processadas\n $copiaModeloAdm = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModeloAdm);\n $copiaModeloAdm = str_replace('%%TITULOATRIBUTOS%%', $sTituloAdm, $copiaModeloAdm);\n $copiaModeloAdm = str_replace('%%VALORATRIBUTOS%%', $sCampoAdm, $copiaModeloAdm);\n $copiaModeloAdm = str_replace('%%ADM_EDIT%%', \t (($PK != '') ? Form::geraAdmEdit($nomeClasse, $ID_PK, $PK, $this->gui) : ''), $copiaModeloAdm);\n $copiaModeloAdm = str_replace('%%ADM_DELETE%%', (($PK != '') ? Form::geraAdmDelete($nomeClasse, $ID_PK, $PK, $this->gui) : ''), $copiaModeloAdm);\n\n /* ========= 2 devido as colunas Editar e Excluir ============= */\n $copiaModeloAdm = str_replace('%%NUMERO_COLUNAS%%', count($aTituloAdm)+2, $copiaModeloAdm);\n $copiaModeloAdm = str_replace('%%PK_REQUEST%%', $sPKRequest, $copiaModeloAdm);\t\t\t\n\n $copiaModeloCad = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModeloCad);\n $copiaModeloCad = str_replace('%%CARREGA_COLECAO%%', $sGetAll, $copiaModeloCad);\n $copiaModeloCad = str_replace('%%ATRIBUICAO%%', $sCampoCad, $copiaModeloCad);\n\n $copiaModeloEdit = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModeloEdit);\n $copiaModeloEdit = str_replace('%%CARREGA_COLECAO%%', $sGetAll, $copiaModeloEdit);\n $copiaModeloEdit = str_replace('%%ATRIBUICAO%%', $sCampoEdit, $copiaModeloEdit);\n $copiaModeloEdit = str_replace('%%CHAVE_PRIMARIA%%', $sCampoPK, $copiaModeloEdit);\n $copiaModeloEdit = str_replace('%%PK%%', $PK, $copiaModeloEdit);\n $copiaModeloEdit = str_replace('%%ID_PK%%', $ID_PK, $copiaModeloEdit);\n\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/\";\n\n if(!file_exists($dir)) mkdir($dir);\n\n $fpAdm = fopen(\"$dir/adm$nomeClasse.php\", \"w\"); fputs($fpAdm, $copiaModeloAdm); fclose($fpAdm);\n $fpCad = fopen(\"$dir/cad$nomeClasse.php\", \"w\"); fputs($fpCad, $copiaModeloCad); fclose($fpCad);\n $fpEdit = fopen(\"$dir/edit$nomeClasse.php\", \"w\"); fputs($fpEdit, $copiaModeloEdit); fclose($fpEdit);\n\n // ======= Limpa arrays ======= \n unset($aGetAll);\n unset($aTituloAdm);\n unset($aCampoAdm);\n unset($aCampoCad);\n unset($aCampoEdit);\n unset($aPKRequest);\n unset($aCampoPK);\n }\n\n # ==== Alterar arquivo index =====\n $modeloIndex = Util::getConteudoTemplate($this->gui.'/index.php');\n $modeloIndex = str_replace('%%PROJETO%%', ucfirst($aBanco['NOME']), $modeloIndex);\n\n $fpIndex = fopen(\"$dir/index.php\", \"w\");\n fputs($fpIndex, $modeloIndex); \n fclose($fpIndex);\n \n # ============== Arquivo de titulo ===================\n $modeloTitulo = Util::getConteudoTemplate($this->gui.'/Modelo.titulo.tpl');\n $modeloTitulo = str_replace('%%DATABASE%%', ucfirst($aBanco['NOME']), $modeloTitulo);\n\n $fpTitulo = fopen($dir.\"includes/titulo.php\", \"w\");\n fputs($fpTitulo, $modeloTitulo); \n fclose($fpTitulo);\n \n // ========= Copiar arquivos adicionais do projeto ========\n copy(dirname(dirname(__FILE__)).\"/templates/{$this->gui}/resIndex.php\", \"$dir/resIndex.php\");\n copy(dirname(dirname(__FILE__)).\"/templates/{$this->gui}/principal.php\", \"$dir/principal.php\");\n copy(dirname(dirname(__FILE__)).\"/templates/{$this->gui}/logoff.php\", \"$dir/logoff.php\");\n\n return true;\t\n }", "public function attaquerAdversaire() {\n\n }", "public function accueilAction () {\n\t\t$session = $_SESSION['ident'];\n\t\t$app_title=\"Connexion \" ;\n\t\t$app_body=\"Body_Connecte\" ;\n\t\t$app_desc=\"Comeca\" ;\n\t\t// si l admin est connecté\n\t\t$auth = $this->authModule->estConnecte();\n\n\t\trequire_once('Model/SqlModel.php');\n\t\t$AttenteModel = new SqlModel();\n\t\t\t\t \n\t\t$ListeAttente = $AttenteModel->AfficheEnAttente();\n\n\t\trequire('View/Connecte/accueil.php') ;\n\t}", "public function liste_conges()\n {\n $menu['title'] = \"IPSSI - Liste demandes de congés\";\n $menu['back'] = $this->back;\n $menu['menu'] = $this->menu->recupMenuBack($this->session->userdata('id'));\n $data['droits'] = $this->droits;\n $data['congesPersonnels'] = $this->ressources_humaines_back_model->recupCongesPersonnels($this->session->userdata('id'));\n $data['conges'] = $this->ressources_humaines_back_model->recupConges($this->session->userdata('id'));\n \n $this->load->view('back/include/menu.php', $menu);\n $this->load->view('back/ressources_humaines/gestion_conges/liste-conges.php', $data);\n }", "function eventclass_offeraride()\n\t{\n\t\t$this->events[\"BeforeMoveNextList\"]=true;\n\n\n//\tonscreen events\n\n\t}", "public function executeVisuSociete(sfWebRequest $request) {\n $this->forward404Unless($cp_etablissement = Doctrine_Core::getTable('CpEtablissement')->find(array($request->getParameter('cp_etablissement_id'))), sprintf('Object cp_etablissement does not exist (%s).', $request->getParameter('cp_etablissement_id')));\n $this->cp_etablissement = $cp_etablissement;\n\n /*\n * récuprération des informations de la fiche pour centrer la carte GoogleMap\n */\n //utilisation des coordonnées\n\n $val_test = 0;\n if (($cp_etablissement->getCpEtablissementLatitude() != '0.000000000'\n && !is_null($cp_etablissement->getCpEtablissementLatitude())\n && $cp_etablissement->getCpEtablissementLatitude() != '')\n && ($cp_etablissement->getCpEtablissementLongitude() != '0.000000000'\n && !is_null($cp_etablissement->getCpEtablissementLongitude())\n && $cp_etablissement->getCpEtablissementLongitude() != '')) {\n\n $this->gMap = new GMap();\n //récupération de l'adresse du lieu à partir des coordonnées\n // Reverse geocoding of the center of the map\n $geocoded_address = new GMapGeocodedAddress(null);\n $geocoded_address->setLat($cp_etablissement->getCpEtablissementLatitude());\n $geocoded_address->setLng($cp_etablissement->getCpEtablissementLongitude());\n $geocoded_address->reverseGeocode($this->gMap->getGMapClient());\n\n //gestion de l'adresse dans la bulle\n $info_window = new GMapInfoWindow('<div class=\"icon_map\"><b>Addresse:</b><br />' . $geocoded_address->getGeocodedAddress() . '</div>');\n $gMapEvent = new GMapEvent('click', \"get_click_coord\", false);\n $this->gMap->addEvent($gMapEvent);\n $this->gMap->addGlobalVariable('marker', 'null');\n\n $name = '\"' . $cp_etablissement->getCpEtablissementEtablissementNom() . '\"';\n\n $gMapMarker = new GMapMarker($cp_etablissement->getCpEtablissementLatitude(), $cp_etablissement->getCpEtablissementLongitude(), array('title' => $name), 'marker');\n\n $gMapMarker->addHtmlInfoWindow($info_window);\n\n $this->gMap->addMarker($gMapMarker);\n\n $this->gMap->centerAndZoomOnMarkers();\n }\n //utilisation de l'adresse\n elseif ($cp_etablissement->getCpEtablissementAdresse1() != '' && $cp_etablissement->getCpEtablissementCodePostal() != '' && $cp_etablissement->getCpEtablissementVilleId() != '') {\n //génération de l'adresse pour GMap\n $adresse = $cp_etablissement->getCpEtablissementAdresse1() . \", \" . $cp_etablissement->getCpEtablissementCodePostal() . \" \" . $depVille['nom_ville'];\n\n $this->gMap = new GMap();\n //récupération de l'adresse du lieu\n $geocoded_address = $this->gMap->geocode($adresse);\n //gestion de l'adresse dans la bulle\n $info_window = new GMapInfoWindow('<div class=\"icon_map\"><b>Addresse:</b><br />' . $adresse . '</div>');\n $gMapEvent = new GMapEvent('click', \"get_click_coord\", false);\n $this->gMap->addEvent($gMapEvent);\n $this->gMap->addGlobalVariable('marker', 'null');\n\n $name = '\"' . $cp_etablissement['cp_etablissement_etablissement_nom'] . '\"';\n\n $gMapMarker = new GMapMarker($geocoded_address->getLat(), $geocoded_address->getLng(), array('title' => $name), 'marker');\n\n $gMapMarker->addHtmlInfoWindow($info_window);\n\n $this->gMap->addMarker($gMapMarker);\n\n $this->gMap->centerAndZoomOnMarkers();\n\n //mise à jour des latitudes et longitudes\n }\n //utilisation de l'adresse de covoiturage plus (definie dans app.yml)\n else {\n $this->gMap = new GMap();\n //récupération de l'adresse de covoiturage plus (definie dans app.yml)\n $geocoded_address = $this->gMap->geocode(sfConfig::get('app_covoiturage_adresse_map'));\n $gMapMarker = new GMapMarker($geocoded_address->getLat(), $geocoded_address->getLng());\n //$gMapMarker->addHtmlInfoWindow('<b>Address:</b><br />'.sfConfig::get('app_covoiturage_adresse_map'));\n $this->gMap->addMarker($gMapMarker);\n\n //$this->gMap->addMarker(new GMapMarker($geocoded_address->getLat(),$geocoded_address->getLng()));\n $this->gMap->centerAndZoomOnMarkers();\n //$val_test = $geocoded_address->getLat().\"-\".$geocoded_address->getLng();\n //$val_test = $gAddress->getRawAddress();\n }\n \n //sélection du layout de popup en cas de demande d'affichage en popup\n if ($request->getParameter('popup') && $request->getParameter('popup') == 1) {\n $this->setLayout('layout-popup');\n\n //indicateur de fenetre en popup pour affichage des boutons adéquats\n $this->popup = 1;\n }else{\n $this->popup = 0;\n }\n }", "public abstract function onPlayerSelect();", "public function serch()\n {\n }", "private function cargarGuion() {\n\t\t\t$pl = $this->Modelo->consultaPlantilla('MATRIZ', 'TRIPLEPLAY', 'PRIORIDAD '.$this->peticion->post->obtener('PRIORIDAD'));\n\t\t\t\n\t\t\t$plantilla = new NeuralPlantillasTwig(APP);\n\t\t\t$plantilla->Parametro('Datos', $this->peticion->post->obtener());\n\t\t\t$plantilla->Parametro('plantilla', $pl['PLANTILLA']);\n\t\t\t\n\t\t\t$this->peticion->post->crear('GUION', $plantilla->MostrarPlantilla('TriplePlay', 'ajaxProcesoPlantilla.html'));\n\t\t\t$fecha = explode('/', $this->peticion->post->obtener('HORAFIN'));\n\t\t\t$this->peticion->post->reemplazar('HORAFIN', trim($fecha[0]));\n\t\t\t\n\t\t\t$this->procesar();\n\t\t}", "public function run()\r\n {\r\n $this->spaceShip->navigateTo($this->destination['x'], $this->destination['y'], $this->destination['z']);\r\n }", "function recuperarContrasenia(){\n\t\t$opt \t\t= $this->uri->segment(1);\n\t\t$op['opt'] \t\t= $this->data_model->cargarOptimizacion($opt);\n\n\t\t//validacion para identificar tipo de usuario y desglosar info\n\t\t$user\t\t\t\t= $this->session->userdata('user');\n\t\t$op['info']\t\t\t= array();\n\n\t\t//Vista//\n\t\t$this->load->view('recuperarContraseniaGracias-view' ,$op);\n\t\n\t}", "public function fly() {\n }", "public function accueilAction () {\n\t\t$session = $_SESSION['ident'];\n\t\t$app_title=\"Connexion \" ;\n\t\t$app_body=\"Body_Connecte\" ;\n\t\t$app_desc=\"Comeca\" ;\n\t\t// si l admin est connecté\n\t\t$auth = $this->authModule->estConnecte();\n\t\t// si connecté => redirection vers indexAction de CategorieController \n\t\trequire_once('Model/SqlModel.php');\n\t\t\n\t\t$AttenteModel = new SqlModel();\n\t\t$ListeAttente = $AttenteModel->AfficheEnAttente();\n \n\t\trequire('View/Connecte/accueil.php') ;\n\t}", "public function activate()\n\t{\n\t\techo \"shot...\\n\";\n\t}", "public function executeVisu(sfWebRequest $request) {\n $this->forward404Unless($cp_etablissement = Doctrine_Core::getTable('CpEtablissement')->find(array($request->getParameter('cp_etablissement_id'))), sprintf('Object cp_etablissement does not exist (%s).', $request->getParameter('cp_etablissement_id')));\n $this->cp_etablissement = $cp_etablissement;\n\n /*\n * récuprération des informations de la fiche pour centrer la carte GoogleMap\n */\n //utilisation des coordonnées\n\n $val_test = 0;\n if (($cp_etablissement->getCpEtablissementLatitude() != '0.000000000'\n && !is_null($cp_etablissement->getCpEtablissementLatitude())\n && $cp_etablissement->getCpEtablissementLatitude() != '')\n && ($cp_etablissement->getCpEtablissementLongitude() != '0.000000000'\n && !is_null($cp_etablissement->getCpEtablissementLongitude())\n && $cp_etablissement->getCpEtablissementLongitude() != '')) {\n\n $this->gMap = new GMap();\n //récupération de l'adresse du lieu à partir des coordonnées\n // Reverse geocoding of the center of the map\n $geocoded_address = new GMapGeocodedAddress(null);\n $geocoded_address->setLat($cp_etablissement->getCpEtablissementLatitude());\n $geocoded_address->setLng($cp_etablissement->getCpEtablissementLongitude());\n $geocoded_address->reverseGeocode($this->gMap->getGMapClient());\n\n //gestion de l'adresse dans la bulle\n $info_window = new GMapInfoWindow('<div class=\"icon_map\"><b>Addresse:</b><br />' . $geocoded_address->getGeocodedAddress() . '</div>');\n $gMapEvent = new GMapEvent('click', \"get_click_coord\", false);\n $this->gMap->addEvent($gMapEvent);\n $this->gMap->addGlobalVariable('marker', 'null');\n\n $name = '\"' . $cp_etablissement->getCpEtablissementEtablissementNom() . '\"';\n\n $gMapMarker = new GMapMarker($cp_etablissement->getCpEtablissementLatitude(), $cp_etablissement->getCpEtablissementLongitude(), array('title' => $name), 'marker');\n\n $gMapMarker->addHtmlInfoWindow($info_window);\n\n $this->gMap->addMarker($gMapMarker);\n\n $this->gMap->centerAndZoomOnMarkers();\n }\n //utilisation de l'adresse\n elseif ($cp_etablissement->getCpEtablissementAdresse1() != '' && $cp_etablissement->getCpEtablissementCodePostal() != '' && $cp_etablissement->getCpEtablissementVilleId() != '') {\n $depVille = Doctrine_Core::getTable('VilleFr')->find($cp_etablissement->getCpEtablissementVilleId());\n //génération de l'adresse pour GMap\n $adresse = $cp_etablissement->getCpEtablissementAdresse1() . \", \" . $cp_etablissement->getCpEtablissementCodePostal() . \" \" . $depVille['nom_ville'];\n\n $this->gMap = new GMap();\n //récupération de l'adresse du lieu\n $geocoded_address = $this->gMap->geocode($adresse);\n //gestion de l'adresse dans la bulle\n $info_window = new GMapInfoWindow('<div class=\"icon_map\"><b>Addresse:</b><br />' . $adresse . '</div>');\n $gMapEvent = new GMapEvent('click', \"get_click_coord\", false);\n $this->gMap->addEvent($gMapEvent);\n $this->gMap->addGlobalVariable('marker', 'null');\n\n $name = '\"' . $cp_etablissement['cp_etablissement_etablissement_nom'] . '\"';\n\n $gMapMarker = new GMapMarker($geocoded_address->getLat(), $geocoded_address->getLng(), array('title' => $name), 'marker');\n\n $gMapMarker->addHtmlInfoWindow($info_window);\n\n $this->gMap->addMarker($gMapMarker);\n\n $this->gMap->centerAndZoomOnMarkers();\n\n //mise à jour des latitudes et longitudes\n }\n //utilisation de l'adresse de covoiturage plus (definie dans app.yml)\n else {\n $this->gMap = new GMap();\n //récupération de l'adresse de covoiturage plus (definie dans app.yml)\n $geocoded_address = $this->gMap->geocode(sfConfig::get('app_covoiturage_adresse_map'));\n $gMapMarker = new GMapMarker($geocoded_address->getLat(), $geocoded_address->getLng());\n //$gMapMarker->addHtmlInfoWindow('<b>Address:</b><br />'.sfConfig::get('app_covoiturage_adresse_map'));\n $this->gMap->addMarker($gMapMarker);\n\n //$this->gMap->addMarker(new GMapMarker($geocoded_address->getLat(),$geocoded_address->getLng()));\n $this->gMap->centerAndZoomOnMarkers();\n //$val_test = $geocoded_address->getLat().\"-\".$geocoded_address->getLng();\n //$val_test = $gAddress->getRawAddress();\n }\n\n //sélection du layout de popup en cas de demande d'affichage en popup\n if ($request->getParameter('popup') && $request->getParameter('popup') == 1) {\n $this->setLayout('layout-popup');\n\n //indicateur de fenetre en popup pour affichage des boutons adéquats\n $this->popup = 1;\n }\n \n //utilisation d'un indicateur indiquant que'un module est intégré dans un autre moduel\n // (permet d'éviter d'afficher plusieur fois le bouton \"fermer la fenetre\")\n if ($request->getParameter('listeIntegre') && $request->getParameter('listeIntegre') == 1) {\n $this->listeIntegre = 1;\n }\n }", "public function onRun(){\n\n\t\t// if($_SERVER['REDIRECT_URL'] == '/boletim-especial-2019') return;\n\n\t\t// if(!isset($_GET['teste'])) return;\n\n\t\t$this->popup = $this->getPopup();\n\n\t\tif($this->popup && isset($this->popup[0])) $this->popup=$this->popup[0];\n\t\telse return;\n\n\t\t// $name='banner_float_'.serialize($this->popup->attributes); // $name=preg_replace(\"/[^a-zA-Z0-9]/\", \"\", $name);\n\t\t// return;\n\t\tif(!isset($this->popup->attributes) && !isset($this->popup->attributes['image'])) return;\n\t\t$name='banner_popup_diveramkt'.str_replace(array('/','.'), array('-',''), $this->popup->attributes['image']);\n\t\tif(isset($this->popup->attributes) && isset($this->popup->attributes['dias_oculto']) && $this->popup->attributes['dias_oculto'] > 0){\n\n\t\t\tif(Session::get($name)) {\n\n\t\t\t\t$horas_dia=$this->popup->attributes['dias_oculto']*24;\n\n\t\t\t\t$value = Session::get($name);\n\t\t\t\t$veri=$this->horas_datas($value, date('Y-m-d H:i:s'));\n\t\t\t\t$horas=$veri->horas;\n\t\t\t\tif($horas >= $horas_dia) Session::put($name, date('Y-m-d H:i:s'));\n\t\t\t\telse $this->popup='';\n\n\t\t\t}else Session::put($name, date('Y-m-d H:i:s'));\n\n\t\t\t// $this->popup->attributes['dias_oculto']\n\t\t\t// $dias=$this->popup->attributes['dias_oculto']*(24*60);\n\t\t\t// if (Cache::has($name)) {\n\t\t\t// \t$veri=Cache::get($name);\n\t\t\t// \t$this->popup='';\n\t\t\t// }else{\n\t\t\t// \tCache::pull($name);\n\t\t\t// \tCache::add($name, 'carregado', $dias);\n\t\t\t// }\n\n\t\t// }elseif(Cache::has($name)) Cache::forget($name);\n\t\t// }else Cache::forget($name);\n\t\t}else Session::forget($name);\n\n\n\t\tif(isset($this->popup->attributes) && str_replace(' ','',$this->popup->attributes['link']) != ''){\n\t\t\t$this->popup->attributes['target']='_parent';\n\t\t\t\n\t\t\tif(isset($this->popup->attributes['tipo_link']) && $this->popup->attributes['tipo_link'] == 'whatsapp'){\n\t\t\t\t$this->popup->attributes['link']=$this->link_whats($this->popup->attributes['link']);\n\t\t\t}\n\n\t\t\t$url=$this->popup->attributes['link'];\n\t\t\tif(!strpos(\"[\".$url.\"]\", \"http://\") && !strpos(\"[\".$url.\"]\", \"https://\")) $url='http://'.$url;\n\t\t\t$this->popup->attributes['link']=$url;\n\n\t\t\tif(!strpos(\"[\".$this->popup->attributes['link'].\"]\", $_SERVER['HTTP_HOST'])) $this->popup->attributes['target']='_blank';\n\n\t\t}\n\t\t\n\t}", "public function shootArrow()\n {\n echo \"<p>Disparó una flecha</p>\";\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 run()\n {\n $cables = new Image;\n \t$cables->file_path ='img/products/cables/HDMI CABLE.jpg';\n \t$cables->product_id='226';\n \t$cables->is_front = '1';\n \t$cables->save();\n\n\n \t $cables = new Image;\n \t$cables->file_path ='img/products/cables/PRINTER CABLE.jpg';\n \t$cables->product_id='227';\n \t$cables->is_front = '1';\n \t$cables->save();\n\n\n $cables = new Image;\n \t$cables->file_path ='img/products/cables/SATA to USB 3.0 cable.png';\n \t$cables->product_id='228';\n \t$cables->is_front = '1';\n \t$cables->save();\n\n \t $cables = new Image;\n \t$cables->file_path ='img/products/cables/VGA CABLE.jpg';\n \t$cables->product_id='229';\n \t$cables->is_front = '1';\n \t$cables->save();\n\n\n }", "function __construct() {\n new Wh_parametre();\n\n\n // ajout de google place\n add_action('edit_form_top', array($this, 'wh_place'));\n //api google\n add_action('wp_ajax_back_api_google', array($this, 'back_api_google'));\n add_action('wp_ajax_nopriv_back_api_google', array($this, 'back_api_google'));\n }", "public function compte_client()\n\t{\n\t\t$this->load->view('app/page-compte-client');\n\t}", "public function setActivation(): void;", "public function ogs()\r\n {\r\n }", "public function connexion() {\n\t\t$vue = new View(\"Connexion\");\n\t\t$vue->generer();\n\t}", "public function comprobantes()\n\t{\n\t\tif(!$this->menumodel->VerificarAcceso()) redirect('inicio');\n\t\t\t\t\n\t\t$this->load->view('header');\n\t\t$this->load->view('ventas/comprobantes', array(\n\t\t\t'tipos' => $this->cpm->Tipos(),\n\t\t\t'estados' => $this->cpm->Estados(),\n\t\t\t'pendiente' => $this->cpm->ImpresionPendiente() \n\t\t));\n\t\t$this->load->view('footer');\n\t}", "public function ability() {\n\n $this->startMove(3, 0.2);\n echo \"THE ENGINE IS OVERHEATED!\\n\";\n $this->switchEngine();\n\n\n\n\n }", "public function spec_u_walking(){\n\t\t$this->OnlyAdmin();\n\t\t$info = $this->TicketModel->getspec_u_walking($this->input->get('p_id'));\n\t\t$this->loadView('views/user_walking', array('info'=> $info), true);\t \n\t}", "function make_interface()\n{\n global $url_plugin;\n global $base_plugin;\n global $section;\n global $plugin;\n \n \n if(file_exists($base_plugin.'data/google_key.value'))\n {\n $key=file($base_plugin.'data/google_key.value');\n }\n $list='<div class=\"title\">GPS</div>\n <div class=\"title2\">Google key</div>\n <div class=\"plugin_content\">\n <input type=\"text\" value=\"'.trim($key[0]).'\" id=\"google_key\" name=\"google_key\">\n <input type=\"button\" class=\"bsave\" onclick=\"save_google_key(\\''.$section.'\\',\\''.$plugin.'\\',\\'output\\');\" value=\"Save\">\n </div>\n <div id=\"output\"></div>\n ';\n $list.='\n <div class=\"title2\">GPS NMEA Info</div>\n <div class=\"plugin_content\">';\n $list.='<button type=\"button\" id=\"NMEA_info\" onclick=\"show_nmea(\\''.$section.'\\',\\''.$plugin.'\\',\\'NMEA_info_output\\');\">Show NMEA data</button>';\n $list.=\"<div id='NMEA_info_output' class='nmea'></div>\";\n $list.=\"</div>\";\n $list.='<div class=\"title2\">Map geolocation</div>\n <div class=\"plugin_content\">';\n $list.='<button type=\"button\" id=\"GPS_map_info\" onclick=\"$(\\'#map\\').addClass(\\'map2\\');draw_center(\\''.$section.'\\',\\''.$plugin.'\\',\\'map\\');\">Show map</button>';\n \n $list.='<div id=\"map\" class=\"map\"></div></div>';\n //$list.='<script src=\"http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAxn-X4TVGr_dB3O7qL3vTWBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQccHTstjr5hNv-96qkCEjZLlXVVg\" type=\"text/javascript\"></script>';\n $list.='<script src=\"http://maps.google.com/maps?file=api&amp;v=2&amp;key='.trim($key[0]).'\" type=\"text/javascript\"></script>';\n\treturn $list;\n}", "public function aparecer() {\n // Referencia al objeto dentro de la clase\n echo '<img src=\"' . $this -> foto . '\">';\n\n }", "function onView () {\n\n switch (parent::getAction()) {\n case \"edit\":\n if (Context::hasRole(\"user.image.edit\")) {\n $this->printEditView();\n }\n break;\n case \"crop\":\n if (Context::hasRole(\"user.image.view\")) {\n $this->printCropImageView();\n }\n break;\n case \"upload\":\n if (Context::hasRole(\"user.image.view\")) {\n $this->printUploadImage();\n }\n break;\n default:\n if (Context::hasRole(\"user.image.view\")) {\n $this->printSelectImageView();\n }\n break;\n }\n }", "public function home(){\n $itemsHome = $this->itemsModel->listenerItems(); // Recupération des items de ma bdd ( par default les 8 permier items)\n include(\"home.php\"); // Chargement de la view (page home.php)\n }", "function plugonet_autoriser() {}", "public function equipementachatListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"EquipementAchat\");//type array\n\t}", "public function caleg()\n\t{\n\t\t$data['active'] = 'penugasan';\n\t\t$data['sub'] = 'menu21';\n\t\t$data['sub2'] = '';\n\t\t$url2 = 'https://andro.sitri.online/api/calegprofiles/allnf/asc';\n\t\t$data['data_caleg'] = $this->Main_model->getAPI($url2);\n\t\t$url3 = 'https://andro.sitri.online/api/calegtask/allnf/asc';\n\t\t$data['data_task'] = $this->Main_model->getAPI($url3);\n\t\t$url4 = 'https://andro.sitri.online/api/calegmandiri/allnf/asc';\n\t\t$data['task_mandiri'] = $this->Main_model->getAPI($url4);\n\t\t$this->load->view('template/header',$data);\n\t\t$this->load->view('penugasan/caleg',$data);\n\t\t$this->load->view('template/footer');\n\t}", "public function run()\n\t{\n\t\tif (count($this->liste_attente) > 0)\n\t\t\t$this->analyser_liste_attente();\n\n\t\t// Envoyer une rumeur de temps en temps\n\t\tif ($this->enabled)\n\t\t\t$this->lancer_rumeur();\n\n\t\t// Vérifier les derniers sujets du tobozon\n\t\tif ($this->enabled)\n\t\t\t$this->verifier_tobozon();\n\n\t\t// Vérifier les dernières parties de plouk\n\t\tif ($this->enabled)\n\t\t\t$this->verifier_plouk();\n\n\t\t// On regarde si il faut recharger la config\n\t\tif (file_exists('update_config'))\n\t\t{\n\t\t\t$this->lire_config();\n\t\t\t@unlink('update_config');\n\t\t}\n\t\t\t\n\t\t// On enlève les chut ban qui ont fait leur temps\n\t\t$this->supprimer_chut_bans();\n\t\t\n\t\tif ($this->buffer() === false)\n\t\t\treturn;\n\t\t\t\n\t\tswitch ($this->buffer('event'))\n\t\t{\n\t\t\t// On dit bonjour aux nouveaux arrivants\n\t\t\tcase 'JOIN':\n\t\t\t\tif ($this->buffer('text') == $this->bot->config('chan') && $this->enabled)\n\t\t\t\t{\n\t\t\t\t\tif ($this->autovoice)\n\t\t\t\t\t\t$this->command('MODE '.$this->bot->config('chan').' +v '.$this->buffer('nick'));\n\n\t\t\t\t\t$this->ajouter_bonjour();\n\t\t\t\t\t$this->lignes[$this->buffer('nick')] = '';\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t// On réponds aux messages\n\t\t\tcase 'PRIVMSG':\n\t\t\t\t// Message privé\n\t\t\t\t$params = $this->buffer('params');\n\t\t\t\t\n\t\t\t\tif ($params[0] == $this->bot->config('nick'))\n\t\t\t\t\t$this->analyse_prive();\n\n\t\t\t\t// On analyse les messages publiques\n\t\t\t\telse if ($params[0] == $this->bot->config('chan'))\n\t\t\t\t{\n\t\t\t\t\tif ($this->enabled)\n\t\t\t\t\t\t$this->analyse_publique();\n\n\t\t\t\t\t$this->lignes[$this->buffer('nick')] = $this->buffer('text');\n\t\t\t\t\t$this->analyse_admin();\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tbreak;\n\n\t\t\t// Notices\n\t\t\tcase 'NOTICE':\n\t\t\t\t$params = $this->buffer('params');\n\n\t\t\t\tif ($params[0] == $this->bot->config('nick'))\n\t\t\t\t\t$this->analyse_admin();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'KICK':\n\t\t\t\t// On rejoint le chan si le bot se fait kicker\n\t\t\t\t$params = $this->buffer('params');\n\t\t\t\t\n\t\t\t\tif ($params[0] == $this->bot->config('chan') && $params[1] == $this->bot->config('nick'))\n\t\t\t\t{\n\t\t\t\t\t$this->bot->join_chan();\n\t\t\t\t\t$this->ajouter_liste_attente('Merci beaucoup '.$this->buffer('nick').'...', 3);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function observaciones()\r\n {\r\n $data = new stdClass();\r\n $data->horario = $this->session->horario;\r\n\r\n $this->load->view('overall/head');\r\n $this->load->view('overall/header');\r\n $this->load->view('observaciones/content', $data);\r\n $this->load->view('overall/footer');\r\n }", "public abstract function Ataca();", "public function BestellingOverzichtView() {\r\n include_once('/var/www/filmpje.nl/backend/Stoelen.php');\r\n include_once('/var/www/filmpje.nl/backend/TotaalPrijsCalculatie.php');\r\n }", "function afficher(){?>\n<div id=\"zonetravail\"><div class = 'titre'>GESTION DES COMPTES.</div>\n<form action=\"<?php echo $_SERVER['PHP_SELF']; ?>\" name=\"frmgrid\" method=\"POST\" enctype=\"multipart/form-data\">\n\t<div class = 'cadre'><fieldset><legend>Liste des classes.</legend>\n <?php \n\t$print = new printlink('imprimercompte.php', false);\n\t$print->display();\n\t$query = \"SELECT c.IDCOMPTE, CONCAT(e.NOMEL, ' ', e.PRENOM) AS NOM, c.DATECREATION, c.AUTEUR \n\tFROM compte c \n\tINNER JOIN eleve e ON (e.MATEL = c.CORRESPONDANT) \n\tUNION\n\tSELECT c.IDCOMPTE, CONCAT(p.NOMPROF, ' ', p.PRENOM) AS NOM, c.DATECREATION, c.AUTEUR \n\tFROM compte c \n\tINNER JOIN professeur p ON (p.IDPROF = c.CORRESPONDANT) \n\tUNION \n\tSELECT c.IDCOMPTE, CONCAT(s.NOM, ' ', s.PRENOM) AS NOM, c.DATECREATION, c.AUTEUR \n\tFROM compte c \n\tINNER JOIN staff s ON (s.IDSTAFF = c.CORRESPONDANT)\";\n\t$grid = new grid($query, 0);\n\t$grid->addcolonne(0, \"COMPTE\", 'IDCOMPTE', true);\n\t$grid->addcolonne(1, \"PROPRIETAIRE\", 'NOM', TRUE);\n\t$grid->addcolonne(2, \"DATE CREATION\", 'DATECREATION', TRUE);\n\t$grid->addcolonne(3, \"CREATEUR\", 'AUTEUR', TRUE);\n\t$grid->setColDate(2);\n\t$grid->selectbutton = true;\n\t//On ajoute les cases a cocher que si l'utilisateur peut effectuer des suppressions en cascade\n\tif(is_autorized(\"DEL_COMPTE\"))\n\t\t$grid->selectbutton = true;\n\t//Verifie si l'utilisateur a le droit d'effectuer une suppression de professeur\n\tif(is_autorized(\"DEL_COMPTE\")){\n\t\t$grid->deletebutton = true;\n\t\t$grid->deletebuttontext = \"Supprimer\";\n\t}\n\t//Verifie si l'utilisateur a le droit d'effectuer une modification de professeur\n\tif(is_autorized(\"EDIT_COMPTE\")){\n\t\t$grid->editbutton = true;\n\t\t$grid->editbuttontext = \"Modifier\";\n\t}\n\t$grid->display();\n\t?>\n\t</fieldset></div>\n <div class=\"navigation\"><?php if(is_autorized(\"ADD_COMPTE\")) \n\t\t\tprint \"<input type = 'button' value = 'Ajouter' onclick=\\\"rediriger('ajouter.php');\\\" />\";\n\t\tif(is_autorized(\"DEL_COMPTE\"))\n\t\t\t\tprint \"<input type = 'button' onClick=\\\"deletecheck()\\\" value=\\\"Supprimer\\\"/>\";\n\t?>\n </div>\n </form></div>\n<?php }", "public function viewEvents();", "public function moveFinger()\n {\n }", "public function moveFinger()\n {\n }", "public function cambiar_colegio()\n\t{\n\t\tif ( ! $this->Auth->user() )\n\t\t{\n\t\t\t$this->Session->write('Flujo.loginPending', array('controller' => 'reservas', 'action' => 'add'));\n\t\t\t$this->redirect(array('controller' => 'usuarios', 'action' => 'login'));\n\t\t}\n\n\t\t$this->Carro->vaciar();\n\t\t$this->Session->delete('Flujo.Reserva');\n\t\t$this->redirect(array('action' => 'add'));\n\t}", "function afficher()\r\n\t{\r\n\t\t\r\n\t\tif (!empty($this->zones) || !empty($this->blocs) )\r\n\t\t{\r\n\t\t\t//:: On configure les zones obligatoires\r\n\t\t\t\tif (empty($this->zones['Menu_Log'])) $this->zone('Menu_Log', menu('membre'));\r\n\r\n\t\t\t\tif (empty($this->zones['description'])) $this->zone('description', DESCRIPTION);\r\n\t\t\t\tif (empty($this->zones['keywords'])) $this->zone('keywords', KEYWORDS);\r\n\t\t\t\t$this->zone('nom', NOM);\r\n\t\t\t\t\r\n\t\t\t\t// On s'occupe du chemin des fichiers\r\n\t\t\t\t$this->zone( 'baseUrl', URL ); $this->zone( 'design', $this->style );\r\n\t\t\t\t\r\n\t\t\t\tif (is_admin()) $this->zone('jvs-admin', '<script type=\"text/javascript\" src=\"javascript/-admin.js\"></script>');\r\n\t\t\t\t\r\n\t\t\t\t// Nouveaux messages \r\n\t\t\t\r\n\t\t\t\t// Antibug\r\n\t\t\t\tif ($this->zones['img_titre']!=\"<!-- rien -->\") $this->zone('img_titre', '<img src=\"theme/images/content.png\" class=\"title\" alt=\"\" />');\r\n\t\t\t\t\t\t\t\r\n\t\t\t// Ouverture du template //\r\n\t\t\t$fichier=$this->chemin.$this->template.'.tpl.php';\r\n\t\t\t$source = fopen($fichier, 'r');\r\n\t\t\t$this->design = fread($source, filesize ($fichier));\r\n\t\t\tfclose($source);\r\n\t\t\t\r\n\t\t\t// Parsage du template\r\n\t\t\tforeach ($this->zones as $zone => $contenu)\r\n\t\t\t{\r\n\t\t\t\t$this->design = preg_replace ('/{::'.$zone.'::}/', $contenu, $this->design);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Suppresion des {::xxxx::} inutilisées\r\n\t\t\t$this->design = preg_replace ('/{::[-_\\w]+::}/', '', $this->design);\r\n\r\n\t\t\t// On remplace les blocs par leurs contenus //\r\n\t\t\tforeach($this->blocs as $nomBloc => $occurences)\r\n\t\t\t{\r\n\t\t\t\tpreg_match( '#{--'.$nomBloc.'--}(.*){--/'.$nomBloc.'/--}#ms', $this->design, $contenuBloc );\r\n\t\t\t\t$contenuBloc=$contenuBloc[1];\r\n\t\t\t\t\r\n\t\t\t\t$idNewTab=0; unset($nomZones);\r\n\t\t\t\tforeach($occurences as $occurence => $zones)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (!isset($nomZones))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$nomZones=$zones;\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$i=0;\r\n\t\t\t\t\t\t$newBloc[$idNewTab]=$contenuBloc;\r\n\t\t\t\t\t\tforeach($zones as $remplacement)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$newBloc[$idNewTab]=preg_replace ('/{:'.$nomZones[$i].':}/', $remplacement, $newBloc[$idNewTab]);\r\n\t\t\t\t\t\t\t$i++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$idNewTab++;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\t$newContenuBloc=implode(\"\", $newBloc);\r\n\t\t\t\t$this->design = preg_replace ('#{--'.$nomBloc.'--}(.*){--/'.$nomBloc.'/--}#ms', $newContenuBloc, $this->design);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Suppression des blocs inutilisés\r\n\t\t\t$this->design = preg_replace ('#{--(.*)--}(.*){--/(.*)/--}#ms', '', $this->design);\r\n\r\n\t\t\t\r\n\t\t\t// Affichage du résultat final\r\n\t\t\t//$this->design = preg_replace ('/('.CHR(9).'|'.CHR(13).'|'.CHR(10).')/', \"\", $this->design);\r\n\r\n\t\t\t// Affichage du résultat final\r\n\t\t\techo $this->design;\r\n\t\t}\r\n\t}", "function OGSPlugin_Traitement_Galaxie(){\r\n\tglobal $db, $fp, $is_ogsplugin, $pub_galaxy, $pub_system, $pub_content, $pub_who, $who, $pub_what, $what, $plug_handlegalaxyviews, $ogspy_server_version, $log_logogsgalview, $system, $galaxy;\r\n\tglobal $ogs_set_system;\r\n\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"galaxyview...\\n\"); // ligne débug , commentaire si pas utile\r\n\t\t//\r\n\t\t/////////////////////////////////////////\r\n\t\t// VERIFICATION DROIT IMPORTER GALAXIE //\r\n\t\t/////////////////////////////////////////\r\n\t\t//\r\n\t\t//if (!OGSplugin_controle_droit('system')) SendHttpStatusCode(\"704\"); // ligne chapodepay\r\n\t\tif (!$ogs_set_system) SendHttpStatusCode(\"704\");\r\n\t\t// test handle galaxy view on server - mod option\r\n\t\tif (!$plug_handlegalaxyviews) SendHttpStatusCode(\"780\");\r\n\t\t//\r\n\t\t/////////////////\r\n\t\t// GALAXY VIEW //\r\n\t\t/////////////////\r\n\t\t//\r\n\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"données de galaxy en traitement\\n\");\r\n\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"données brutes: \".$pub_content.\"\\n\");\r\n\t\t//\r\n\t\t$galaxy = (int)$pub_galaxy;\r\n\t\t$system = (int)$pub_system;\r\n\t\t$galaxies_array = explode(\"<==||==>\",utf8_decode($pub_content));\r\n\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"\\n______________________________________________________________________________\\n\");\r\n\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"\\n==>Split tampon galaxies en \".count($galaxies_array).\" éléments\\n\");\r\n\t\t$numbuffer_iter = 0;\r\n\t\tforeach($galaxies_array as $curr_gal_buf) { // découpage du tampon\r\n\t\t\t//\r\n\t\t\t$gv_source = str_replace(\"&nbsp;\",\" \",stripslashes($curr_gal_buf));\r\n\t\t\t$gv_array = explode(\"\\n\",$gv_source);\r\n\t\t\t$solarstring = $gv_array[0];\r\n\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\"))\r\n\t\t\t\tfwrite($fp,\"\\n=>chaîne brute système solaire: \".$solarstring.\"\\n\");\r\n\t\t\tif (preg_match(\"#.*?\\s([0-9]):([0-9]{1,3})#\", $solarstring, $solarstring_array)){\r\n\t\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"parse ss: \".$solarstring_array[1].\"-\".$solarstring_array[2].\"\\n\");\r\n\t\t\t $galaxy = (int)$solarstring_array[1];\r\n\t\t\t $system = (int)$solarstring_array[2];\r\n\t\t\t}\r\n\t\t\tunset ($gv_array[1]);\r\n\t\t\tunset ($gv_array[0]);\r\n\t\t\t//\r\n\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\"))\r\n\t\t\t\tfwrite($fp,\"array count: \".count($gv_array).\"...\\n\"); // ligne débug , commentaire si pas utile\r\n\t\t\t//\r\n\t\t\t//===========================================================================================\r\n\t\t\t// Enregistrement des données de champ de ruine - test de l'existence des champs cible\r\n\t\t\t$ruincols_exist = OGSPlugin_DoDBColumnExists(TABLE_UNIVERSE, 'ruin_metal');\r\n\t\t\t$res_sql_error = $db->sql_error();\r\n\r\n\t\t\tif ($ruincols_exist) {\r\n\r\n\t\t\t if (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"Res test colone `ruin_metal` TABLE_UNIVERSE OK! (\".$res_sql_error[\"code\"].\")\\n\");\r\n\t\t\t} else {\r\n if (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"Res test colone `ruin_metal` TABLE_UNIVERSE échoué! (\".$res_sql_error[\"code\"].\")\\n\");\r\n\t\t\t}\r\n\t\t\t//===========================================================================================\r\n\t\t\t//\r\n\t\t\t$totalinserted = 0;\r\n\t\t\t$totalupdated = 0;\r\n\t\t\t$galcdr_num = $galcdr_added = 0; // vars champs de ruine\r\n\t\t\tforeach ($gv_array as $gv_row) {\r\n\t\t\t\t$gv_entries = explode(\"|\",$gv_row);\r\n\t\t\t\t// determine moonsize\r\n\t\t\t\t$moon = ($gv_entries[2] > 0) ? 1 : 0;\r\n\t\t\t\t//\r\n\t\t\t\t$playerstatus = $gv_entries[6];\r\n\t\t\t\t//\r\n\t\t\t\tif ($gv_entries[0] > 0 && $gv_entries[0] < 16)\t{\r\n\t\t\t\t\t//\r\n\t\t\t\t\t/////////////////////////////\r\n\t\t\t\t\t// PREPARATION DES DONNEES //\r\n\t\t\t\t\t/////////////////////////////\r\n\t\t\t\t\t//\r\n $position = (int)$gv_entries[0];\r\n\r\n // préparation données pour envoie vers ogs::galaxy_add_system(includes...)\r\n\t\t\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,$galaxy.\":\".$system.\":\".$position.\"||\".date(\"Y-m-d\").\" \".date(\"H:i:s\").\"||\".$planetname.\"||\".$moon.\"||\".$playername.\"||\".$allyname.\"<|>\".\"\\n\");\r\n\t\t\t\t\t//\r\n\t\t\t\t\t// CONCATENATION SOUS FORME DE BLOC\r\n\t\t\t\t\t// vérification ligne / pb conflit foxgame\r\n\t\t\t\t\tif ((trim($playername)!='') && (trim($planetname)=='')) {\r\n\t\t\t\t\t\t// send http header -> partial update\r\n\t\t\t\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\"))\tfwrite($fp,\"foxgame conflict...\\n\"); // ligne débug , commentaire si pas utile\r\n\t\t\t\t\t\tSendHttpStatusCode(\"792\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//\r\n\t\t\t\t\t$timestamp = mktime(); // utilisation date et heure en cours // fonction ogs\r\n\t\t\t\t\t//\r\n\t\t\t\t\t//////////////////////////////////////////\r\n\t\t\t\t\t// INSERTION LIGNE DANS BASE DE DONNEES //\r\n\t\t\t\t\t//////////////////////////////////////////\r\n\t\t\t\t\t//\r\n\t\t\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"juste avant galaxy_add_system...\\n\");\r\n\t\t\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"=> vars galaxy_add_system: gal:\".$galaxy.\"-sys:\".$system.\"-pos:\".$position.\"-moon:\". $moon.\"-planetname:\". $planetname.\"-\". $allyname.\"-\". $playername.\"-stats\". $playerstats.\"-\". $timestamp.\"\\n\");\r\n\t\t\t\t\t// au cas où\r\n\t\t\t\t\t// SendHttpStatusCode(\"702\", true, false);\r\n\t\t\t\t\t//\r\n\t\t\t\t\t\r\n \t\t\t// test existence champ moon dans table universe : si non -> unispy\r\n \t\t\t$testcolmoon = OGSPlugin_DoDBColumnExists(TABLE_UNIVERSE, 'moon');\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($testcolmoon) {\r\n \t\t\t\t\t// utf8_decode des champs $gv_entries[1] mis en début de fonction sur $pub_content\r\n \t\t\t\t\t$result = galaxy_add_system ($galaxy, $system, $gv_entries[0], $moon, trim($gv_entries[1]), trim($gv_entries[7]),trim($gv_entries[5]), $playerstatus, $timestamp, true);\r\n\t\t\t\t\t} else { // unispy\r\n\t\t\t\t\t $result = galaxy_add_system ($galaxy, $system, $gv_entries[0], trim($gv_entries[1]), trim($gv_entries[7]),trim($gv_entries[5]), $playerstatus, $timestamp, true);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//\r\n\t\t\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"retour func galaxy_add_system \\n\");\r\n\t\t\t\t\tif (isset($result)) { // pas forcément que des insertions, sinon des mises à jour !!!\r\n\t\t\t\t\t\tlist($inserted, $updated, $canceled) = $result; // $result -> gas_result test\r\n\t\t\t\t\t\tif ($inserted) $totalinserted++;\r\n\t\t\t\t\t\tif ($updated) $totalupdated++;\r\n\t\t\t\t\t\tif ($canceled) $totalcanceled++;\r\n\t\t\t\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"-> ajout ligne réussie : totalinserted: \".$totalinserted.\"(inserted: \".$inserted.\"-updated: \".$updated.\"- canceled\".$canceled.\"\\n\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$totalfailed++;\r\n\t\t\t\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"-> ajout ligner annulé\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n // on vérifie que le module champ de ruine existe\r\n $ruin_metal = ($gv_entries[3] != '' ? intval($gv_entries[3]): 0); // 0 par défaut si champ vide (pas de champ de ruine)\r\n $ruin_cristal = ($gv_entries[4] != '' ? intval($gv_entries[4]): 0); // 0 par défaut si champ vide (pas de champ de ruine)\r\n\r\n if ($ruincols_exist) {\r\n if (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"=> Demande de mise à jour des champs de ruine\\n\");\r\n if (OGSPlugin_MajChampdeRuine($galaxy, $system, $gv_entries[0], $ruin_metal, $ruin_cristal)==false) {\r\n if (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"-> mise à jour des champs de ruine réussie\\n\");\r\n }\r\n \r\n }\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t} // fin test valeur position\r\n\t\t\t}// FIn foreach()\r\n\t\t\t//log_plugin_(\"load_system_OGS\", array($totalplanet, $totalinserted, $totalupdated, $totalcanceled, $totalfailed, $totaltime));\r\n\r\n // mise à jour des alliances et des status joueurs\r\n galaxy_add_system_ally();\r\n\r\n // Enregistrement dans le journal\r\n if ($log_logogsgalview=='1')\r\n\t\t\t\t log_plugin_(\"load_system_OGS\".($cdr_maj==true? \"_cdr\":\"\"), array($galaxy.\":\".$system, ($totalinserted+$totalupdated)));\r\n\t\t\t $numbuffer_iter++;\r\n \t\t} // fin foreach\r\n\t\t//\r\n\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"all entries finished... ->\".$totalinserted.\"+\".$totalupdated.\"\\n\");\r\n\t\tif (($totalinserted+$updated) > 0) {\r\n\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"numinserted+updated: \".$totalinserted.\"+\".$totalupdated.\"\\n\");\r\n\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"gv updated...\\n\"); // ligne débug , commentaire si pas utile\r\n\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"______________________________________________________\\n\");\r\n\t\t\t//\r\n\t\t\t// send http header\r\n\t\t\tif ($numbuffer_iter>1) SendHttpStatusCode(\"705\");\r\n\t\t\telse SendHttpStatusCode(\"701\");\r\n\t\t} else {\r\n\t\t\tif ($numbuffer_iter>1) SendHttpStatusCode(\"706\");\r\n\t\t\t SendHttpStatusCode(\"702\");\r\n\t\t}\r\n\t\t/* if (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"positions wrong...\\n\");\r\n\t\tob_end_clean();\r\n\t\t// send http header\r\n\t\theader(\"HTTP/1.0 602 no update\");\r\n\t\texit(); */\r\n}", "function cl_contacorrenteregravinculo() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"contacorrenteregravinculo\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cplanilla_view() {\n\t\tglobal $conn;\n\n\t\t// Initialize table object\n\t\t$GLOBALS[\"planilla\"] = new cplanilla();\n\n\t\t// Initialize other table object\n\t\t$GLOBALS['usuario'] = new cusuario();\n\n\t\t// Intialize page id (for backward compatibility)\n\t\tif (!defined(\"EW_PAGE_ID\"))\n\t\t\tdefine(\"EW_PAGE_ID\", 'view', TRUE);\n\n\t\t// Initialize table name (for backward compatibility)\n\t\tif (!defined(\"EW_TABLE_NAME\"))\n\t\t\tdefine(\"EW_TABLE_NAME\", 'planilla', TRUE);\n\n\t\t// Open connection to the database\n\t\t$conn = ew_Connect();\n\t}", "public function compteenattente()\n {\n $this->utils->Restreindre($this->userConnecter->admin, $this->utils->Est_autoriser(37, $this->userConnecter->profil));\n $data['lang'] = $this->lang->getLangFile($this->getSession()->getAttribut('lang'));\n $params = array('view' => 'compte/compteenattente');\n $this->view($params, $data);\n }" ]
[ "0.57076097", "0.5683702", "0.5318259", "0.5260537", "0.5228624", "0.5226578", "0.52167356", "0.5189296", "0.51364887", "0.5119117", "0.51111794", "0.50954944", "0.5090329", "0.50768757", "0.5048197", "0.5048058", "0.5023218", "0.50165045", "0.50155425", "0.50132036", "0.5002606", "0.49794975", "0.4957471", "0.4957471", "0.49518737", "0.49465364", "0.4942819", "0.4941065", "0.4941065", "0.49251884", "0.49177435", "0.49134156", "0.49052015", "0.488845", "0.48800012", "0.48700562", "0.4867326", "0.48654333", "0.48605737", "0.48600972", "0.48575056", "0.48569983", "0.48554045", "0.4846536", "0.48238802", "0.48225823", "0.48208869", "0.48166993", "0.4807075", "0.4807021", "0.48061112", "0.48058668", "0.48058343", "0.48020512", "0.4800003", "0.4799754", "0.4794075", "0.47921765", "0.47854593", "0.47781286", "0.47767955", "0.4773418", "0.4771211", "0.4768621", "0.47678706", "0.47676244", "0.47670406", "0.4763909", "0.4762157", "0.47592393", "0.47568396", "0.47565836", "0.47507608", "0.4747558", "0.47451723", "0.47446692", "0.4740425", "0.4737865", "0.47369447", "0.4736242", "0.47283068", "0.47265276", "0.47256568", "0.4725162", "0.47235772", "0.4719913", "0.47159928", "0.47155422", "0.47140634", "0.47085208", "0.47058186", "0.47026345", "0.46956426", "0.46939075", "0.46939075", "0.4693132", "0.4691948", "0.4690744", "0.46903902", "0.4688873", "0.4685206" ]
0.0
-1
/ Gestion des Maillots
function insertMaillot ($tab) { $con = connexion (); if($con != null) { $requete = "insert into maillot values (null,'".$tab['nom']."','".$tab['prenom']."','".$tab['numero']."','".$tab['couleur']."');"; mysqli_query($con, $requete); deconnexion($con); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function mail()\n\t{\n $this->load->model('mailsjabloon_model');\n $this->load->model('gebruiker_model');\n $data['titel'] = 'Send mails';\n $data['auteur'] = \"<u>Lorenzo M.</u>| Arne V.D.P. | Kim M. | Eloy B. | Sander J.\";\n $data['gebruiker'] = $this->authex->getGebruikerInfo();\n $data['link'] = 'admin/index';\n \n $data['sjablonen'] = $this->mailsjabloon_model->getSjablonen();\n \n $partials = array('hoofding' => 'main_header','menu' => 'main_menu', 'inhoud' => 'mails_versturen');\n $this->template->load('main_master', $partials, $data);\n\t}", "function m_dspemails()\n\t{\n\t\t$this->ObTpl=new template();\n\t\t$this->ObTpl->set_file(\"TPL_EMAIL_FILE\",$this->emailTemplate);\n\n\t\t#SETTING ALL TEMPLATE BLOCKS\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_EMAIL_BLK\", \"email_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_MESSAGE_BLK\", \"message_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_MSG_BLK1\", \"msg_blk1\");\n\n\t\t#SETTING TEMPLATE VARIABLE\n\t\t$this->ObTpl->set_var(\"GRAPHICSMAINPATH\",GRAPHICS_PATH);\t\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SALESURL\",SITE_URL.\"sales/\");\n\n\t\t#INTAILIZING ***\n\t\t$this->ObTpl->set_var(\"email_blk\",\"\");\t\n\t\t$this->ObTpl->set_var(\"message_blk\",\"\");\t\n\t\t$this->ObTpl->set_var(\"msg_blk1\",\"\");\t\n\t\t$this->ObTpl->set_var(\"msg_blk2\",\"\");\t\n\n\t\t$this->request['msg']=$this->libFunc->ifSet($this->request,\"msg\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_MESSAGE\",\"\");\n\n\t\t#DATABASE QUERY\n\t\t$this->obDb->query = \"SELECT * FROM \".EMAILS;\n\t\t$queryResult = $this->obDb->fetchQuery();\n\t\t$campaigncount = $this->obDb->record_count;\n\t\tif($this->request['msg']==1)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_EMAIL_INSERTED);\n\t\t\t$this->ObTpl->parse(\"msg_blk1\",\"TPL_MSG_BLK1\");\n\t\t\t$this->ObTpl->parse(\"msg_blk2\",\"TPL_MSG_BLK2\");\n\t\t}\n\t\telseif($this->request['msg']==3)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_EMAIL_DELETED);\n\t\t\t$this->ObTpl->parse(\"msg_blk1\",\"TPL_MSG_BLK1\");\n\t\t\t$this->ObTpl->parse(\"msg_blk2\",\"TPL_MSG_BLK2\");\n\t\t}\n\t\telseif($this->request['msg']==5)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_EMAIL_SENT);\n\t\t\t$this->ObTpl->parse(\"msg_blk1\",\"TPL_MSG_BLK1\");\n\t\t\t$this->ObTpl->parse(\"msg_blk2\",\"TPL_MSG_BLK2\");\n\t\t}\n\n\t\tif($campaigncount>0)\n\t\t{\n\t\t\t#PARSING DISCOUNT BLOCK\n\t\t\tfor($j=0;$j<$campaigncount;$j++)\n\t\t\t{\t\t\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ID\",$queryResult[$j]->iMailid_PK);\n\t\t\t\tif ($queryResult[$j]->vUserList==\"All\"){\n $this->obDb->query = \"SELECT count(*) as cnt FROM \".CUSTOMERS.\" WHERE iStatus=1 AND iMailList !=0\";\n }else{ \n $this->obDb->query = \"SELECT count(*) as cnt FROM \".LEADLIST.\" WHERE iLeadId_FK='\". $queryResult[$j]->vUserList.\"'\";\n }\n\t\t\t\t$qryRs = $this->obDb->fetchQuery();\n\t\t\t\t\n\t\t\t\tif ($queryResult[$j]->vVisitorList==\"1\"){\n $this->obDb->query = \"SELECT count(*) as cnt FROM \".NEWSLETTERS;\n\t\t\t\t $qryVs = $this->obDb->fetchQuery();\n\t\t\t\t $qryRs[0]->cnt = $qryRs[0]->cnt + $qryVs[0]->cnt;\n }\n\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_USERCOUNT\",$qryRs[0]->cnt);\n \n $this->ObTpl->set_var(\"TPL_VAR_SUBJECT\",$this->libFunc->m_displayContent($queryResult[$j]->vSubject));\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SID\",$this->libFunc->m_displayContent($queryResult[$j]->vSid));\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_BUILDDATE\",$this->libFunc->dateFormat2($queryResult[$j]->tmBuildDate));\t\n\t\t\t\t$sentDate=$this->libFunc->dateFormat2($queryResult[$j]->tmSentDate);\n\t\t\t\tif(empty($sentDate))\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SENTDATE\",\"Send now\");\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_VIEWLABEL\",\"View/Sent\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SENTDATE\",$sentDate);\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_VIEWLABEL\",\"View\");\n\t\t\t\t}\n\t\t\t\t$this->ObTpl->parse(\"email_blk\",\"TPL_EMAIL_BLK\",true);\n\t\t\t}\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",$campaigncount.\" records found\");\n\t\t\t$this->ObTpl->parse(\"msg_blk1\",\"TPL_MSG_BLK1\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MESSAGE\",MSG_NOEMAILS);\n\t\t\t$this->ObTpl->parse(\"message_blk\",\"TPL_MESSAGE_BLK\");\n\t\t}\n\t\n\t\treturn($this->ObTpl->parse(\"return\",\"TPL_EMAIL_FILE\"));\n\t}", "private function show_all_mail(){\n $this->get_all_mail();\n $counter =1;\n while ($this->mails[$counter][\"date\"]!=\"\"){\n echo \"<hr/>\";\n echo \"date: \".$this->mails[$counter][\"date\"][\"raw\"].\"<br/>\";\n echo \"year: \".$this->mails[$counter][\"date\"][\"year\"].\"<br/>\";\n echo \"month: \".$this->mails[$counter][\"date\"][\"month\"].\"<br/>\";\n echo \"day: \".$this->mails[$counter][\"date\"][\"day\"].\"<br/>\";\n echo \"hour: \".$this->mails[$counter][\"date\"][\"hour\"].\"<br/>\";\n echo \"minute: \".$this->mails[$counter][\"date\"][\"minute\"].\"<br/>\";\n echo \"subject: \".$this->mails[$counter][\"subject\"].\"<br/>\";\n echo \"mailbox: \".$this->mails[$counter][\"mailbox\"].\"<br/>\";\n echo \"host: \".$this->mails[$counter][\"host\"].\"<br/>\";\n echo \"text: \".$this->mails[$counter][\"text\"].\"<br/>\";\n $pic = 2;\n while ($this->mails[$counter][\"image\"][$pic][\"data\"]!=\"\"){\n $pic--;\n echo \"Bild Nr.\".$pic.\"<br/>\";\n $pic++;\n echo \"Bild Name: <a href=\\\"pics/\".$this->mails[$counter][\"image\"][$pic][\"name\"].\"\\\">\".$this->mails[$counter][\"image\"][$pic][\"name\"].\"</a><br/>\";\n //$this->email_base64_to_file($counter, $pic);\n //echo \"image \".$pic.\": \".$this->mails[$counter][\"image\"][$pic][\"data\"].\"<br/>\";\n $pic++;\n } \n $counter++; \n }\n }", "public function show_mails() {\n\t\t\tforeach($this->$mails as $key => $value) {\n\t\t\t\techo <<<_END\n\t\t\t\t<div>\n\t\t\t\t\t<p>Date: $key</p>\n\t\t\t\t\t<p>Name: $value[0]</p>\n\t\t\t\t\t<p>Subject: $value[1]</p>\n\t\t\t\t\t<p>Message: $value[2]</p>\n\t\t\t\t</div>\n_END;\n\t\t\t}\n\t\t}", "function email_notification_objet($id_objet, $type_objet, $modele) {\n\t$envoyer_mail = charger_fonction('envoyer_mail','inc'); // pour nettoyer_titre_email\n\t$id_type = id_table_objet($type_objet);\n\treturn recuperer_fond($modele,array($id_type=>$id_objet,\"id\"=>$id_objet));\n}", "public function getNewMailsAction()\n {\n $this->View()->success = true;\n $mails = $this->container->get('dbal_connection')->fetchAll('SELECT id, subject, receiverAddress FROM s_plugin_mailcatcher WHERE id > :id ORDER BY id ASC', ['id' => $this->Request()->getParam('id')]);\n $this->View()->mails = $mails;\n }", "function formulaires_ajouter_abonne_traiter_dist(){\r\n\tinclude_spip('inc/gestionml_api');\r\n\treturn gestionml_api_ajouter_email(_request('liste'),_request('email')) ;\r\n}", "function indexs() {\n\t\n\t/**sendmail(\n\t\tarray (\n\t\t\t'subject' => 'Ma premier newsletter',\n\t\t\t'from' => array (\"[email protected]\" => \"WEBINMOVE\"),\n\t\t\t'to' => array (\"[email protected]\"),\n\t\t\t'layout' => 'news'.DS.'news001'\n\t\t\t\n\t\t)\n\t);\n\t**/\n}", "function sendEmails() {\n\t\t$this->substituteValueMarkers(array('templateCode' => $this->data['tx_gokontakt_emailBody'] ));\n\t\t$this->substituteLanguageMarkers(array('templateCode' => $this->data['tx_gokontakt_emailBody'] ));\n\t\t$this->substituteValueMarkers(array('templateCode' => $this->data['tx_gokontakt_emailAdminBody'] ));\n\t\t$this->substituteLanguageMarkers(array('templateCode' => $this->data['tx_gokontakt_emailAdminBody'] ));\n\n\t\t$emailUser = $this->cObj->substituteMarkerArrayCached($this->data['tx_gokontakt_emailBody'], $this->markerArray, $this->subpartMarkerArray, $this->wrappedSubpartMarkerArray);\n\t\t$emailUser = str_replace(\"<br />\", \"\\n\", $emailUser);\n\t\t$emailAdmin = $this->cObj->substituteMarkerArrayCached($this->data['tx_gokontakt_emailAdminBody'], $this->markerArray, $this->subpartMarkerArray, $this->wrappedSubpartMarkerArray);\n\t\t$emailAdmin = str_replace(\"<br />\", \"\\n\", $emailAdmin);\n\t\t$emailFrom = $this->data['tx_gokontakt_emailFrom'];\n\t\t$emailFromName = $this->data['tx_gokontakt_emailFromName'];\n\t\t$emailToAdmin = $this->data['tx_gokontakt_emailToAdmin'];\n\n\t\t$this->sendEmail($this->pi_getLL('subject_email_user'), $emailUser, '', $emailFrom, $emailFromName, $this->piVars['email']);\n\t\t$this->sendEmail($this->pi_getLL('subject_email_admin'), $emailAdmin, '', $emailFrom, $emailFromName, $emailToAdmin);\n\t}", "private function notification_make_mail_html($userto, $courses, $publicids) {\r\n global $CFG, $OUTPUT;\r\n $posthtml = '<head>';\r\n $posthtml .= '</head>';\r\n\r\n $courses_list = \"<ul>\";\r\n foreach($courses as $course){\r\n $courses_list .= '<li>';\r\n if($this->tab == \"course\"){\r\n if(isset($course->course_demourl) && $course->course_demourl != null){\r\n $courses_list .= '<a target=\"_blank\" href=\"'.$course->course_demourl.'\">'.$course->fullname.' (Parcours en démonstration)</a>';\r\n } else{\r\n $courses_list .= '<a target=\"_blank\" href=\"'.$course->course_url.'\">'.$course->fullname.'</a>';\r\n }\r\n } else {\r\n if($course->source == 'local'){\r\n $local_url = $course->course_url.'?id='.$course->courseid;\r\n $courses_list .= '<a target=\"_blank\" href=\"'.$local_url.'\">'.$course->fullname.'</a>';\r\n } else {\r\n $courses_list .= '<a target=\"_blank\" href=\"'.$course->course_url.'\">'.$course->fullname.'</a>';\r\n }\r\n }\r\n $courses_list .= '</li>';\r\n }\r\n $courses_list .= '</ul>';\r\n\r\n $data = new stdClass();\r\n $data->username = $userto->firstname .\" \". $userto->lastname;\r\n $data->courses_list = $courses_list;\r\n $message_intro = get_string('email_message_intro_parcours','local_magistere_offers', $data);\r\n if($this->tab == 'formation'){\r\n $message_intro = get_string('email_message_intro_formation','local_magistere_offers', $data);\r\n }\r\n\r\n $publics_list = '<ul>';\r\n foreach($this->get_publics_by_stringids($publicids) as $public){\r\n $publics_list .= '<li>'.$public->name.'</li>';\r\n }\r\n $publics_list .= '</ul>';\r\n $publics_message = get_string('email_message_publics','local_magistere_offers', $publics_list);\r\n\r\n $link_preference = '<a target=\"_blank\" href=\"'.$CFG->wwwroot.'/local/magistere_offers/index.php?v=parcours&action=changepref\">'.get_string('email_message_preference_link', 'local_magistere_offers').'</a>';\r\n if($this->tab == 'formation'){\r\n $link_preference = '<a target=\"_blank\" href=\"'.$CFG->wwwroot.'/local/magistere_offers/index.php?v=formation&action=changepref\">'.get_string('email_message_preference_link', 'local_magistere_offers').'</a>';\r\n }\r\n\r\n $message_outro = get_string('email_message_outro', 'local_magistere_offers');\r\n\r\n $posthtml .= '<body id=\"notif_offers_email\">';\r\n $posthtml .= '<p>'.$message_intro.'</p>';\r\n $posthtml .= '<p>'.$publics_message.'</p>';\r\n $posthtml .= '<p>'.$link_preference.'</p>';\r\n $posthtml .= '</br>';\r\n $posthtml .= '<p>'.$message_outro.'</p>';\r\n $posthtml .= '</body>';\r\n\r\n $posthtml .= '<footer style=\"text-align:center;\">';\r\n $posthtml .= '<div style=\"margin:auto;display:inline-block;\">\r\n <img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAAuCAIAAADiJ8FWAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAB5USURBVHja7Fx5nFTVlT7nvqXq1drVVb0v0DQNCLLIKiqILCqiuEKMY6LzM9GYmExcJhPNJDEzMU4SdUyiJsYsuBEQN1AwrqACirLL2kA30N30UtXdtb+qt9wzf1R1dVV3NTYugZnh/PgDHq/eu8t3z/3Od859SERw2k7bF23s9BCcti/DxNNDcEIW0UyRoSKezAXZlTDuXN/ZEjVGeeSvjnBML1NOwYHC01vhIO1QSLv/4+43muIWAa4aZr9zUmGxchKWpUl041vtz+wIgYTAQZDwsmGOq2sd86ttXkU4DaxPNToWM7uTZlznJoHAwC6yQotQaj85LrZTNc5+vvlgRxJkBgCQNGfVOt68vEJk+A9uyZ6u5JilTYCACABABGAQcKoskG8d67p+pLPaKZ0GVh5rCOnLDoRXNsT2B/W4CTonAAJAWUCbACMLpIU19mvrnMPc8j+yVY/s7P7uW360pndAAgCdv3p5+YKhji/k+TsDiZUNMYnh4jrnMPfxkLG7K3nm0qOAiLmQJpPAoEKbsGph+bmnwOZ4CnGszR3qjz/oXN+WjKomMADWsyoBAUAzSTNoU2tiU3Pi/i3BqUWWuyZ55g+x/2PatqVDy45zEIA47AgkvxBg/XlP6LZ3/AnNBIBfbel+8qKSywZ+7CiPfOMZziXbQiQzEHvRhQKCgF0x428HoqcCsE6JqDBm8LvW+2e+0PL3xnjUIJQZigwAweRg9PwxCQBAZGhhUYO/czR+ySvHFr/WWh/U/gEtHOuTgGe5BwBAGF1o+fxPbo8b/7qhM8EJrQJahW7V/PcPuww+4DYiID4ys+jhecWTSy2gc0pyyr4ZwS3hqTCnJ38rrA9qt61rf/OQClZERCIAk4CTXRFGFspliiAx1Dj5VfNQWO+KGkAAIiJDIgCNlzjF319QfGWt40ttZHNUn/xcU3tYB0kAAtDMM8uUTYsqbZ87PNzckZiyogkgvbURB6/C6v9pSKFV+FQWv/JQ9OWG2FstamtQByHNudZeUzmrwvb/HVgNIe2yV1v3dCTRwgCADEIBpxVbrh3huGyovcYtIfSuv9aYsbFVXXog8n5Lwh8zQUREIJOA0+Nzi28eU/ClNvXDNvXWtf4DYV1EPMsnPz67eETBF8DzNrUnzn6+GaCHjHPyKMK+64YUDzrEa48bS/aEVhyKx5LmbRMKvjOu4P+7x4po5rQVzXv9SZRZig7XFcqPnV80t/pTmFNb3Lhvc9fvd4ZMDigicQDOV1xSes1w15cd6jdFdIlBheMLCx0+ak9MywVWoSLsu25I0YlrBxonmZ0S++DJ5Fic6KtvtKdQBQCQ5F87w/XR4qpPRRUAlNrE380s/mBR5VCXSDpHBoD4rXcC2/zJL7XNAuJQl/wFogoAbCL2n5L+Fwdjpw6qeqPCpMmX1Uf3d2k1bumGM5yykAbcq43RN47G21VTJ3CIWOeSrhzuONPbl7RuDyRfPBhtCOsxg2QBiyxsvM9y1XCHd2CisOxAZPXBaEoWIo3fMNb1lzklrDfKoY/akh+0qYEkt4s4pdg6q1IREFMb4tL6SCjJ5w+xrbu6cvZLLQ1BHUXsjBk//CDw+sJyADyOq1txIPJJQOvWOAcokNl4n3zdSKfPmh6HnZ3JlQejGsGlQ23TSvvGVh+0qWsOxxUBF9c5hg+wD4Y085WG2Kb2hD/BNU4igtcijCiQ5w+1jfLIPdQfAeBwRDsSNvZ29wk+UOPwZlO8wMJsAo4rslgFlpeYrmyI1gf1oMZNAkXEMkW8oFKZP8TGEI8b3ibWHI4lTDqnTFkw1JZqyZGI/vKhaHuM13rEG0c5Bcb6d2p1Y2xTe7JDNZMmSQL6LGxCkeXSobYyuzTgVhg36Kuvt67aFwGGwGnhKOfKBWUftyfv3dS5piEG1OPXCICTTRG+M8599+RCj0UAgL1d2sPbu5bsi2pJ3juhBABQ5ZH+ZXzBrWPd/RluWDPHL2s6HNJRQNL5BdW2Ny4vF3v6s7Ih+sjO4FtNKhiUfpaAM8qVe8/2zq5UpjzXvPloHBgyCXdcVw0A01c0Rw2ODMngLy4ou7LW2b+f3Unz0R3Bx3aFW0MaYA9zIwCCWq/006ner41yrT4cvf719mDUAACrIvx1Xsm1db2PemZ/+MY3202NA0F5gfy3i0tm5nJkg9Pju0IP7wge7NTS4Em9hQMAKFZ2xTD7zWcWzKpQAOCh7d3/8WFXSDOBIfbzNGQSEAHApGLLo7OKsyG+qyv5h52hJfsiMdXsfUVqnBieU2G99Uz3V0c4hXze6697Q99e608kTAAAxB9O89x/TtFf9obu3hDoCBuACATz6+zLLip1yULPTPEndod+vyt0KLtTlH5pqVv6xmjXt8a6KvrBC4no4e3dt7/tB4Wlf8LpR5M9f9gd7owY/d0rEUGCT6tSVl1WvrUjef3rbZ0xA2Sh/zohk0DjV45yPn1hqV3KwdaKg+HFq9tQYsTBI+P7V1eOSXtBumt94MHN3YAAYu/aIwDQuGIVfjfTe+eGrpDGAQF0vury8suGOm5/v+Phzd1oEUjn51Up719V1aclh8PaotfaNreoILM8s2gQED10vm/J3ujO9kRqayaDXFah/vrqEpsIAB2qMfKZo0HVRBFTLnZCmXXz4qpMtyMa/8Y77c/tDoPMIM9gQCqGZRJ79sLi8T7LmKVHiSAVyuW5OfM31ZxcpWxaVJUai6f2hb/3rj8UN0HO45gIAAwCg189yvnorOJUyzN2NKLXPXNEMwgFTM1OpUv88STPLWv9aRks9YSE+eQlZV8f5QKATzoTN77ZvrUlCTLm7xQn0KjGKz99YfG5Zba+HGv1kTiIkNEikeF9H3d3qibm27QRERVhU2ti1osti19v60xytAh5vS8KiIrw0v7ov2309xni3+0Mp8dT53dM9PSgCu5cH3jwoy6QGEosk7JIrxOZqQa/ZV0gZhAiACe3TZzoswLAjyZ7S9wScQIB93TrftXIfl1rzDj/xZbNbUm0CphvHaOIILI73u/8pFtLEz4AEDCsmUcieupfR8JGMMnTIT0AiNgSM8Nar7R11wb/c7vDqAiYfzAAEdDCONHN6/y/2REkDqk789+c8Xcy60jwpEkA8IvNXTf8vT2kcbTk3+4w1Rer8EJ99IKXmjviOeNwLGZqJkDPCKCAbXHzlncDwBB7+oUAwODNo3EA2BZIzH6xZWtbEhU2YKcYopU1hvRZLxxb1RjtC6ys8cmiqQyJE2mckpx03id2RInt7dIiei/803ca/WJMC/vz7sjmjkTmwjZ/YmOrChISgcXKrqlNs/W3mmIPbemGHpiSSaRzhgAmkc4JABmaBEaqKSac6ZUrHCIA+BRhRrkCJiHDrpjxcda7VINf90bb0aCO/WRDSu826VkHASlPGNjzl36OhRNl/vflhsgfd4Ygi1BSqv0GUa7UiQJGNN6mmoKIgwrHDXJKqIhsaX34RxsCIPaCIOVW+09QahHuDWgXrjoWyZlagtwupuaqL2RMKLUzf1xftKYtoJq9Kw2gFw8a7+08AIpoEF37Wtt7LfEc8t5/GSMA6VTqFC8fZi+1Cdv8yVca40SUveIzPSSNj/DJC2rsFgHXNqubWlTM2vgQIZHkD28PPnNhaerKJ51JUyeUkQw+e5h9lMeSQsAPNnb25lY1flaZ9d8mekZ6pIDKn9oXenpPBKRsck+1WTm1IU4xvX+Y9ElAu2RI+vqT+8LrGmOYG0OQSWASkxgAcY2AIYoDrEjIWso9pLsXiz32/KEY8NwZMqimQPJa2cGQEYwZgAhSz//rdE2tvcIuPrY1SADAsA/oKbPWOZW6pAfO8bXG9G+t9YOAyLIIiU5jSy2zK21ume3v1lYfjkcTZmbkUWI72hI/+jDw25lF6WZjnx5A9jZMBGBwMGFcmfWuszy3b+g8FNAyudHUjHjs4sJR9mFusS1uvn5EbehKZmYEBVR1/u13/e9cUVFsEwfMFZJBs6qVP88uzuR6l9eHb13rDxrUZ+GSTtee4fzDBcVuWQAA3aS7Pwg8uKU7G1sg4NZA0uCUqgVojpmZIVww1N4TjmnbOpIgstQzJ5dZX1tY7uupS5lbpWgmLN8f7Z0DghHu3sYXWnqh05FIPz+YNB/cHoRcekc6H1Mkf2O0e1aFDYDWt6p/2h3Z0ZFA6TMqLwRwMKRDriP5/lnun03zumTWFDVeOBhd2RBb16wSJ+A0pFCeV2W7fqTrkmr7obDeFDUe3BHMzDgR2CX80TSfTWQukc2uVoY4pVvWtkdUjjJmPIfC8D9mem8bX5CJGfd0JW9/P/DGkThmpAqJPboz9M0xrrFe6/HbDxoXZDavxn5Rte2bY9wftqlL90XAkoOqq0Y47j/Hl9GEQ0nzV1u7f701aPQ0HSW2uzXx4PbgL8/x5QcWEcgCPDzDl11B8JURrs3+5AMfd+f4RpPGFluemlci9QR0koC/Ptf3Qbu6sSXZ20MGIY3iBrlkBIDmqAEEBAACjilMv+LvR2JgEApIBLKID8/0+XKqnfDmM13L66OUCUpEnF5qzfLfGcaLQg/2l9ZHDvqTmIU50vm0MuuaheWFPfrChCLrV+qcl71ybFNbVoNPxHSTurMiYiIAhJtGu1OBVZVD+v4Ez/cneFY1RJfsCcsC3je9sMQmAcCCGnsqrH5gezDjFYFIEdgdEzyWHqQeCWtL9kUgy6sxTr+a6bttnCe7GaMLLasuLZ20vHl3QEt1BBG4Tr/dGXriggGBRQTAae5Q+0+nes4rT7Pvez/uJk69O5JB84fZn5tflk203Bbhvuk+ScCfbezshYTMlh6I/nBSgceSN9Vl8Gll1vG+vq25boRTkFgOMzBobqUi5coeiPjdcQWQSyCSnGs9bKNbM9PoYGDvmcu1LWpa1DD4RUNtfUIMAKhxyYqFpR/LqcQhTizqbWGnamb+XulIg+bdY2r2/kQEDqvwxOziDKpSVqSIT15YKg+S9PSnowwUESGbrnF6cm+oTyJ54TDHi5eWL5tfVluQowJGdd7fhWSHBeuOqVqS9wbIBo0rsdyWL29jEYT7zi7MlSnZ0vpIY1gfCFVItGRu0ZtXVGRQdSxm7OxMbx2peyQR/3uGLy99v2N8QVWBlOGRKGBzl7asPjqA8k5Ql6/aaahL8tkEyB3+SkceCbTGKUHfG3u3UCTM5pMAkDCoOWqmuR6HKcV5VphqcKOXS9PUYktBlis6FNaBIQEwCaeWWABAM/muzpwdCnR+aY1trC/Pw0cWyJcPs4PBP5scX+uSIAtGKLEHtoWmLD/66M7usMbh89lLDfEc+mHS10a4BhKBLx/mHFdsyYRQyCCe4B+3D5CQ0Pk9kwtvOCMHo283xcMxsxdFJk0psYz05K/jcFmEm0a7IDtiY7iyMTYgx7IKedotMbAwzHFFCHmrv4+r/UKBRUizSANiOgcAg0jLijIiep7J2NOl6RpPe12CaSW9Xd3dmXyvWQURwaQKlzjeZwGApqjRENb7BCYzSgcsVLp+pGtFffSzzf31Ixwv7o8QZXVcwO1+7bZ3/A9uD82tUBaPcM6t+iwVB3GDb/cns3uBEr7drB4K63n9K0MIaxxZjptoien53BUpinDT6L5i8sY2NVdQgM4Ev+3djryFPAhYH9JyKASDlphpci4OSOjyXaTB3Xl8q3IK6RiF064u7YJKm1VAtwWbwmmJ6I2j8fumkZQF7oTJH98Vyh7fYa6MT6U7NgTCqokyI52urrWnsN4aMxN6r/JEBCjiWcUDVlCN9cqKhakpkewE7cpa5x2TEw991EWykJpUBAARAbAxpD/RqT2xJ7yo1nHLWPecE4RXe9z0J8yc5cFwTWMMBi7YStUUZc9QRKe80+mQmFvuu+E0hI0cb8hwf7e2/zhJWIZ9uKlqksZPLAk9+DHH4yTsKu1CRo1dfSQGACLDqSWWlGqEAu5oS9y/pauXPyWMW9f632pMxzupIrtSu5DaH+9cH3ijMYYyI53XFlnunerNdK8P6kWBFcgD5i5dEtolhM9a6/HAeb57pnstSKTn1IuggGhhwHBFfXTuSy0/3Og3T+QVqpGS8PoquiizAf/0U48GjknyNCXWT4lEdtzX9Xk6AREJeDJKk8f5rExCTgAiW9uk7u5MjvFavjLc+ZdPwunQVWI/3dS1qSNxYaW9KWYsPxBpDhvYE/0iACH+cVdoZ0Bbsje8vS0BMiOTrCL+/nxvZgkKrC+2DZPybrI94QV8HjqEgPdN9y0a7rhzfWBti0o6ZXsORAAZieCXH3Y1Rc2n55WwwS1SiaGAoOcKUCkdbrBaCIMpxSdQ6SqzfOjTBz00Bp1fbpUFPBnA8sozK5R1R+IoMS1prjgUHeO1nFemjC6y7vEnQUJEIAHXHIqtORADBBARRMxmMCjisv3RZXsiICDIDHSuSGz5/NJ51Y5sZYsx5BmVBYF0/klncmpJ/tj7cFiP9Nl0TtwmFFnfvrJyqz/x1N7ws/sjgZgJDDOV6YhAVmHp7tAVw+yLhjsH80CfIrhlIRHP2p44TSuzji6QP3WqOZFLYtfUOc4vP4ES+Aq7mOPpiUoU8ZJRTv5pSCYiEXBamfX6kQ44KYcpGOJ3x7rXHVZTC+R324JX1NgnFFl/f75v1ostZFI6MyX1RrxgciYwyt0OSEQwCBJ8WoXy4ExfnxMEVQ7RpwgdcSN7A9/UnrhptDtvq1YcjJJBGRHy89jEIuvEIutdEz1vHY0v2Rd5tylOPQl1BCCGD20PXjnMMZijYwUWNqJAao8YGc5CBp1ZKP1pdsmXNDsTi6zPUDgrjQOyAH+ZU3wcbpN/luFk2Lwqe61XIoMQsUs1/+U9v2rwmRW2JfOK3RKjJCeTiBNxIp2DQf8+pfDrIx0UN9MXTSKNg8ZHFco/O8/74Vcq+59L8VqFkR4JzByu8drheHNUz8eRjaf2R+BzFLAnTB7VzVwhRrpxtHvdlRV3TykUs8mMyHYEtOaYMUiuelG1LYeqi7j6sOpX9eP/cKs/sXxfpF+x16fbnEpFtvSqlShgU8h4/mDs+L86FtNX1EfeaY6fZGA5ZfbLc7zAiQhQZu81qf/8VrvB6euj3Guvqby8zjHUJfoUodIunlehvHRZ2X+e7fvBWZ7zhihldrHYJtZ5pPk19r9eVLLtq1U/mep9pTF21aqWp/aG+njr0R45R15i2BzSv/eeP56rV8V083vv+btiBn7Wwfjj7uC4Z4+OeebojW+1fdyu9gl4fnGOt8ghZmejdU6xQRO6BUNtqYR9phdtEeOmtztiuTjO2IGg9p11HVOXN1+75ti05U3rj8VPqC9jCuXaAimHwyF8e11H3371WFgzH98VnLisefHq1jnPN/3rhnQly0k7V3hVreOKEY6X66MgM5TZ8n2RpElPzSs5y2d5+dLymM4TJskMnT1k8oxCy/uLqkNJbhLZJZbKeJhEd633P7ilG0x6tUWdVWnLPgd82VDb4zuCObMss5cOxs6PtPx8euGkIisAbPEnfvJh10fHVJQ/I6yeOxC55c0OYAgMntwVfnpv5LqRznsme4a7ZUlAg9Pf6sP+WBZ7I7LLbPDH4c8stJxbZt3QnMhkdVDCVw7Fz17RfP9078wKm1NmCKCZ1BDWf7Mj+PS+cCzBQWJoFSJJ85tr/ZsXV9kHnQkVGP7zKNcP3vVngkkU0K+as19q+cEkz02j3cWKIDI0OQ8k+EuHog9s7T7UrYOIaGFE8MCW4KVDHedXKCcNWAj45NySGUF9Z3sSLQxk9vLB2OTOpp9P9y6qc9ollrfk1d0TG8YNvnR/5Hc7Qzs7EiAyYOSSWZ9S1YuH2C4YYl97JJZTbSHi5vbExSuP+WwCAAZUAzh8NlSlfvPbnaHUYwEAZOQEz+yJvNAYq3GKdpGpJt/brZvZDMWk6SXWPlV4xzGR4S+nF5634lhO+CLhroB22autVS7JZxVEhIjBD0eMhGqChL3dEdn+oN4eN07o4Pj3xruXH4hsaU1knoMCRg36ycbOh3eEy+zMJjCN07G46Y/owDBTDZqKkLYHkmlg9Sf8A4QARNSXwxHhYPRVojwXXbLw4oKyRWtat7Um0cpAwvqgvvjvbbN2heZV2S4ZYh/lkawiy86gHQ7pH7SpH3UkN7Yl9geSgIgSIwBI8june325bkBAds8kz9rDsRxNPEX8AQJqukI3FRkTHVepyycNp67ZxZxsREpZUA2+J1XLm0r6ZKeoCW4b58a+j+kjROdcPLfcfvdUz/0fdlFW4WiqF00RvSmkp+kY67dCkuYlIxyVDgkAgDAnszaA4g0AFoH993m+BauORYzeVDQyBIZdCbMrUz/IoE9JCBnkcogXVyvprVBiuW8gsORL6YiIQr878yqO/X/NMD+BqXXLLywou+Wdjjcb4yBharDWHY2vOxz/8Uddw5xihUO0S0w1eSjB21XeGjN4SlMRECSGAGQCGPxr4wtun+Dp//y5VbZ7phX+4oMuyq26RMgpQyNOsogCYmIAfYgh9StmSqtUP55S+FFbIphVC5WCKwj5BCHNvHqU68Is/Z2lRV/MfnL/jO8vpns74safPwlTtjyW+j0bQPrU+JgS6yMzi2UB05OCmP0qBjjQfjyjwvbXC4tveL0jZlC2BIoM8ioyqdN7Nok9NMObSiwyAJhXqQDPFMgDAMysyCP2KCKbVmqFnvwAcbBa2bllee6scIhuC/YSQIPKbYJrgO2mxiWvXlh+97RCp8RI40CAEkML4wQHg/q7R9U1h6JrD6tb25MtUZ0DpARfEBA4kcaLFfbQrKKn5pVYBxCY75vu/cYEFxhE+TRvAiCDLAwfm+ErtQl9Cj4znqPSIbotQq8nN6jcLrgkBgDnlStPXVRc45bSwSwNkA0zCXR+yXDnsxeWSFkHbyodUoGc/WQotzN3HtUD/zSn9J6zCx0CksYHUu+pp85TALi8zv72lRVDXVJmUlwyy+mCTXRZBqR6V9e6nruktMYlpk7xD5jlIyCDQKdxPsvLl5bdNLog7VzuvffeScWWjR3Jw4EkmAAmzamx/WSKV8rntIY5hRcbY3GVg0lA9PNzvHmPxDglVqIIqxvjXOdgkkthfzzuuWEBcU6V7Ypae5tqNoZ1Q+PACRCAIQiY+twFMARAIAKTwCAgKFaEm8e6n72o9NOOIuLCGkdNgbjVnwzFeer8PhCBCWAQENV55KUXly4cZv/F1m5Vp959C+HmMa4KhwQATlkotLJXG2KgU6pHf5pdnDkBNrLA8vUzXDYZ64N6ROepe3reQqnkf4VDvO8c729mFom5VUYOiZXa2OrGGNc4mOBShD9eUDRigGqCOZW2S2tsx+LG4bBhZL+FExgEBgGC28IWDnM8MbvkromFjiwn6pRZkcLWNMa4TmCSWxGemF00/LiHuesK5BvOcCHDfd1GPMlT30sCDpD6DIJJwEEScFKx5dczfA/PLB7h6X1a+iR0KGm+06TuC2qjPNLFQ+zH+WJdU0R7/ajanTSnllhmlis4cIy+zZ94ryUhMZhXrdQVDDarsL9be/dYfOWh2JZAskPlZPKe0xQoClhoFWqd4owKZV6VMs5rKbadQPDRmTA2tSXeaIrv7jJiBreLONojz61SZpQrBRZhd1dywrImg3q/OyUx2P6Vquwvf3zUrm5oTSgCzqm21bnlvqW+AN0Jc39Q+6At8XF7oilmcgKvVRhbKM2ssE4utnqt4nHHShUZzKu2D+bk/v5ubVsg8f6xxMGQHtW5wLBCEcf5pLNLrXUFcppU5bMt/sT7LapVwDlVtrpBfyKgLWbs7kqub03s8GsdSYMICy1sZIF0dql1dKE8ypPnzNCp+0W/zoRxOGx0JQ2TIwIoEnpkocwh+qxfynfr7lrvf3Bzb30scSq0Cvv/aYjvVPpM3v8iO3W/Qeq1isdZ4oO0t5tjLxyIOi1sos86p8o2EEo2tMYf+ySUUx1v0tQSi085/fHf/3PA+vz22pHYwldajZ7ioOoC6cYznJfXOKucok9hCAhArTHz70dit78fULNC61Rcd+uZ7hNNkJ22/wVb4ee3i1a1vHEolqm3SVebSMxnZdUO0W0VQkneGNa740afc+6k8zHFlh3XVgt4GlinPVY/ixsEfQ5CCkgEAdUMxExIyaYMILfMgDghw0dmFJ1G1eex/8sc4trhDjCJcjVPRMDUCVWJoYiYG8+QQUjwyKyiWZW20+A47bHy23fGFWic/mtzd0fEABGB4UA+iADAJND5UI/80+mFN45yn0bGaY71KXYkov1qS/DtZrUhoutJDgBp6RUyyjEAw2qXeHG17cfTCivt0mlYnAbWYE0z6UBIW9+ibmxLHAzrEY04gIVBoVUY75XnVtnOLVOc8mlx4Quz/xkAPrxbakS+66YAAAAASUVORK5CYII=\">\r\n <img style=\"margin-left: 10px;\" src=\"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEASABIAAD/4Q/eRXhpZgAASUkqAAgAAAAHABIBAwABAAAAAQAAABoBBQABAAAAYgAAABsBBQABAAAAagAAACgBAwABAAAAAgAAADEBAgAcAAAAcgAAADIBAgAUAAAAjgAAAGmHBAABAAAApAAAANAAAACA/AoAECcAAID8CgAQJwAAQWRvYmUgUGhvdG9zaG9wIENTNCBXaW5kb3dzADIwMTk6MTI6MTAgMTc6MjQ6MjAAAAADAAGgAwABAAAA//8AAAKgBAABAAAAyAAAAAOgBAABAAAAPQAAAAAAAAAAAAYAAwEDAAEAAAAGAAAAGgEFAAEAAAAeAQAAGwEFAAEAAAAmAQAAKAEDAAEAAAACAAAAAQIEAAEAAAAuAQAAAgIEAAEAAACoDgAAAAAAAEgAAAABAAAASAAAAAEAAAD/2P/gABBKRklGAAECAABIAEgAAP/tAAxBZG9iZV9DTQAC/+4ADkFkb2JlAGSAAAAAAf/bAIQADAgICAkIDAkJDBELCgsRFQ8MDA8VGBMTFRMTGBEMDAwMDAwRDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAENCwsNDg0QDg4QFA4ODhQUDg4ODhQRDAwMDAwREQwMDAwMDBEMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwM/8AAEQgAMQCgAwEiAAIRAQMRAf/dAAQACv/EAT8AAAEFAQEBAQEBAAAAAAAAAAMAAQIEBQYHCAkKCwEAAQUBAQEBAQEAAAAAAAAAAQACAwQFBgcICQoLEAABBAEDAgQCBQcGCAUDDDMBAAIRAwQhEjEFQVFhEyJxgTIGFJGhsUIjJBVSwWIzNHKC0UMHJZJT8OHxY3M1FqKygyZEk1RkRcKjdDYX0lXiZfKzhMPTdePzRieUpIW0lcTU5PSltcXV5fVWZnaGlqa2xtbm9jdHV2d3h5ent8fX5/cRAAICAQIEBAMEBQYHBwYFNQEAAhEDITESBEFRYXEiEwUygZEUobFCI8FS0fAzJGLhcoKSQ1MVY3M08SUGFqKygwcmNcLSRJNUoxdkRVU2dGXi8rOEw9N14/NGlKSFtJXE1OT0pbXF1eX1VmZ2hpamtsbW5vYnN0dXZ3eHl6e3x//aAAwDAQACEQMRAD8A7vo/RejWdIwbLMDGe9+PU5zjTWSSWNJJ9it/sHof/ldi/wDbNf8A5BP0P/kXp/8A4Wp/89sXM/Xj62dY6H1LHxsA0+nbSbHeqwuO7eWaEPZ+an4sUskuCNX4rZzEI8Utnpf2D0P/AMrsX/tmv/yCX7B6H/5XYv8A2zX/AOQXm/8A45P1n8cb/tp3/pVWumfXj649Uz6On4n2X1sh21pdU7a0Ab7LX/pfo1sbuVg8jlAJJiANTqwjm8RIAuz4PffsHof/AJXYv/bNf/kEv2D0P/yuxf8Atmv/AMgrtbXtra17t7wAHPiJPd20fR3Llvrh9YOs9GyscYnojHyGOgvaXO3sP6Tgs2t2PrVKchAWdvBvcty8+YyjFjIE5AkcR4fl9TufsHof/ldi/wDbNf8A5BL9g9D/APK7F/7Zr/8AILhP+f8A9YvHH/7bd/6UXR/Uz6w9R607NGd6f6uKvT9Npb9P1d26XP8A9E1MjnhKQiLstvmPhPM4MUsszDghV8MrPqlwdv6za630bo9XTnvrwMZrhZSJFNfBtqB/MV79g9D/APK7F/7Zr/8AIKPX/wDkt/8AxlH/AJ+qWipXOaH7B6H/AOV2L/2zX/5BMeh9BBDT0/Ek8D0a5Mf2FoLK6/g5OXVjvw2TmYlv2nFsLtrW2Ma7bVb+f6GW1z8S/Z/g7vUSUkd0b6vMkPwcNsczVUP++pO6N9X2mHYOG08waqx/31Yr+h5dV111lDH1nOyMt9tjmEFluB9le93qfRrdlu+z+n/3G/nPYpU9By6cVuPQxl+Ix+A/BLnB1ldFeTVl5GHZc8u9ejCrr34Vm7e+r9B+ksq9a1Kdf9kfVzX9Sw/a7a79FVo4/mH2/SUD076si2qr7FiF1+70yKayDtiW7wzbu19qx3dAz34PV8b7K21mRjXDDGQa3Xsvs+0FuMzKb/PYbHZDrMe3J/WMf7RdX+k/wWg/pVrOuOyaccV4jqcVgFbaYL678nIuD22e9np/aK7/AFKf8J/wqSm4Oj/V4tLhg4ZaDBPpVQD/AJqdnROgPaHMwMRzTw4U1kf9QuYq+rHVK+m5OOcRptyGY4YGvYGsFGW/KdTZV/M2WbLn5NGR/wCgtvp+l+s9dgVOqpc1zCw+o90uFYc7c7d6jm48V+7/AD/9J+kSUh/YPQ//ACuxf+2a/wDyCrdU6J0WvpmW9nT8Zr20WFrhTXIIY7X6C2FU6t/yVm/+F7f+ockp/9D0fof/ACL0/wD8LU/+e2Lgf8aX/LOF/wCFj/58K77of/IvT/8AwtT/AOe2LD+tfQei9VzmW59+TVbjUCGY5r1a57tvssZZY+zc1/0FPyuSOPKJS2osWeBnjMY7vmWFitybYttGPQ0tFlpBcZcdldVNLfffkWv9tdTf+Mt9Opi6jpnQLei/WDAtOScfLF+1mJk1P/S1uHpXDFzMT16spzGW+/8ARY/pfz99dVS08P6l/VevKosxuo5xtL4q2ODSTHv2Wsx2OZ7He6yqzfsV3E6P0XpW4YuZk025dZFmddtfYKw8VUYw+1V72e/+ar9H9L6f6z6uxW8vOQlYjI0RVcPdgxcsY0SBxA3dvXrkf8YePSOmVZD7H+r67W018t1a/wBQdtns3P8AUW3j9RwG0V4lWRY57oqptdNj3lw9t29+/fzu/SLCzfq/0zJbTVmdT6lfU31bA61zSK9jhQ91nq0eq3c87avZs2ep/gllZQTExiLt1/h+THizwzZJ8Htm+ERMpS01eCXaf4tP5zqfwx//AHYTf80vqpqf2jlwIkjaQA6Nn/ab87ctv6r9J6T0yzLb06+691gr9b1o9u31fTDdtdX77lBiwzjMSI0F/k6/xH4ryuflMuLHKRnPhq418uSE/wDuW91//kt//GUf+fqlorO6/wD8lv8A+Mo/8/VLRVp514e93XB0n9UOccg4Wecnd6xcHAv/AGX6O/8AStzfW2egyn/tN6nr/wDaZbPUDkt6FmCh15ubcyHUG8v2+pUT6Lnl2R/M/wA76P6L+eV7rN/UKG47+nlj7vV9+K+B69YY+y2imxxb6WTsZ6mO/wDmfUZ6d/6J/q1Zb/rM8YOPm47xkY7bHX5zywtNeEbrMVr31+19FtP88/1WfzXT87/CpKbHWg7IxnX4rsgmzIxceysC0M9Nl4+0v9Fu39DZTdazKtb7Lqa/+DWdmftMfbDS/L9VvT2fYPR9csOYLsv6Db9zLPd9m9T7V+i+x/zn6qrV2f1KgZ27OB+yZuHiAuZWAG5B6f6tj4j9JtzL/T/62gnrvUXYlGV6zabMu3MotoLGu+ytx2ZT2XncWOc/Efi0sy/Vf6N32n9H6f6ukpMw9VDczHb6zs9uXbdjNe6z0i30fUx/0u7b9g+0/o/S3f8AB7PUU8Rzz0ul9D805uRTXj2i4va9tln8/kWNtY+inKo23P8AYz7P/g/5r0U2N1zPezJx8rZR1ShlNIoa0uqddc65tGdjOcWvycK+uv1/RZZ61NdGTTZ+mqT9O+sL8u7p3r210B2NlnqFJ2jbk4j8XHvZue7dWyl9uR/1r07ElNfAHUr8vpbcwZbba/tFHUDuubW5+MK68fIOz0qfTytv2ivb+jt9VVsZ/WD0+45Ds4PGC53T43+ocv18z1N0+59mz9mfZ6839B6H/A/alrdI6ll5Wfk132zXVlZNFYHpBpFXpenTt3fafWY19j923Z/4EgY3U8/Ixcq05XpupfmhjopLS3Gvtpraxm5136Oqpn2h9rP8IkpepvVq82vebrsbJyWG5rDZGPexjXXemXn1LukZXv8AY72Y2R/paL/1XX6t/wAlZv8A4Xt/6hyH0O7IyOlYuVkXC9+TVXduDQ0D1GMeWt2e3ZvLtiJ1f/krN/8AC9v/AFDklP8A/9H0fof/ACL0/wD8LU/+e2Kn1q7NZl1toxbr6vRe51lVlrAHg/oqttD2tc6z+p/brVzof/IvT/8AwtT/AOe2K8kp56x+Wxtzhg5b9m40BuVfNga41+7/AELneyytn59b1C617WbrMHLIZrL8i+GvD7GN1935lbLfW/mf0v6SytdIkkp52x+WabHUYmWbG1VWVNfkXw59jtltB91bm/Z/zv8AtxRNuYH2Vjp+a5zLLK2EZVoa/YWejZvc72Myv1j0/wDRejV9o9P7R6i6RJJTzvr2GNuJnOduLXt9e4GuWtfT6vu93q7/APAer6H+FV/pFlrn3tsx76NoZBvsfaHEh2/0vV+jsd+7/OLTSSU53X/+S3/8ZR/5+qWis7rwJ6Y8ASfUo0H/AB1S0UlPK5H1qyqMBmdkYlLy+rNsx9rj7bcIXP8ASfvbv2ZOPj2/rDP5mz9D6Vn84tHPz7cfpOXnejVdaxwr2vY+oPbubXttba31Pa6yz/SVqwOgdI9F9H2YGp9VlBaXOP6O93qZVbNzv0bch/8AP7P53+wjXdLwr8e7GurNlOQQ60Oe8lxG3b7y7f7fTb+ckpqdb6jhdJorstpqey2xnrglrNtLSyu7MLXB3qtxN9fsQ+v9Q/Zm22rGpuN9WQbi/QuFFL8musuDXbmv9L0/f9BX3dKwHttbZWbBkVvquD3OfuZZ/OsPqOd9NQs6L024AW0+oBQcUNe57gKiHVuaGudt3ure+t1/8/s/wiSmlT1S6zK6fQ+mpzMh7xuLH1lnp0NvaamXN93ue6r1G+z0/wDttVMjrDaYGXh44OQwuxryP0Zyd1rfsd8jfXZkto3Y13+Ht/Vv5/0ftGy/o+A8M3McXVOD6n+pYHscGGj9FaH+rX+ic+vax/56k/pXTrKXUW0Mspeyut1T/c3bUd9HsfLW+k872u/fSU5DOr3g519WE227FsvrDKanmx7an1Mda2yG13P2W+q/EY/17dnp0erYo0dcxnXYRbVjDH6h+jZmBrhVa51j634brNm/DzW1srf9izWfp8qz7DXZ62PYtf8AY/T4eBWQLLHXOAe8D1XOFrrmgP8AZbvb9Nn0EzOidLY4ObTqHNefc8hz2Pdk123NL9t1rMix13qXb3+r70lNfoHUsjqFDX2VsqYGT6bGvaGkPtp2tfY1tVrP0H+D/m/8xW+rf8lZv/he3/qHJ8TpuHhBoxmFgY0sYC5zgA53qP2tsc7bvf8ASTdW/wCSs3/wvb/1DklP/9KhX/NV/wBRv5ApLzdJJT6QkvN0klPpCS83SSU+kJLzdJJT6JkfzD/7P/VsRXcn4rzZJJT6QkvN0klPpCS83SSU+kJLzdJJT6QkvN0klPpCZ/8ANv8A6jvyFecJJKf/2f/tFORQaG90b3Nob3AgMy4wADhCSU0EBAAAAAAAKxwBWgADGyVHHAIAAAIAAhwCBQAXMjAxNF9NRU5sb2dvX2hvcml6b250YWwAOEJJTQQlAAAAAAAQWDW9qyYQReGD1gdPdZ0kUThCSU0D7QAAAAAAEABIAAAAAQACAEgAAAABAAI4QklNBCYAAAAAAA4AAAAAAAAAAAAAP4AAADhCSU0EDQAAAAAABAAAAB44QklNBBkAAAAAAAQAAAAeOEJJTQPzAAAAAAAJAAAAAAAAAAABADhCSU0nEAAAAAAACgABAAAAAAAAAAI4QklNA/UAAAAAAEgAL2ZmAAEAbGZmAAYAAAAAAAEAL2ZmAAEAoZmaAAYAAAAAAAEAMgAAAAEAWgAAAAYAAAAAAAEANQAAAAEALQAAAAYAAAAAAAE4QklNA/gAAAAAAHAAAP////////////////////////////8D6AAAAAD/////////////////////////////A+gAAAAA/////////////////////////////wPoAAAAAP////////////////////////////8D6AAAOEJJTQQIAAAAAAAQAAAAAQAAAkAAAAJAAAAAADhCSU0EHgAAAAAABAAAAAA4QklNBBoAAAAAA3kAAAAGAAAAAAAAAAAAAAA9AAAAyAAAACIAbABvAGcAbwBfAG0AaQBuAGkAcwB0AGUAcgBlAF8AZQBkAHUAYwBhAHQAaQBvAG4AXwBuAGEAdABpAG8AbgBhAGwAZQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAyAAAAD0AAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAQAAAAAAAG51bGwAAAACAAAABmJvdW5kc09iamMAAAABAAAAAAAAUmN0MQAAAAQAAAAAVG9wIGxvbmcAAAAAAAAAAExlZnRsb25nAAAAAAAAAABCdG9tbG9uZwAAAD0AAAAAUmdodGxvbmcAAADIAAAABnNsaWNlc1ZsTHMAAAABT2JqYwAAAAEAAAAAAAVzbGljZQAAABIAAAAHc2xpY2VJRGxvbmcAAAAAAAAAB2dyb3VwSURsb25nAAAAAAAAAAZvcmlnaW5lbnVtAAAADEVTbGljZU9yaWdpbgAAAA1hdXRvR2VuZXJhdGVkAAAAAFR5cGVlbnVtAAAACkVTbGljZVR5cGUAAAAASW1nIAAAAAZib3VuZHNPYmpjAAAAAQAAAAAAAFJjdDEAAAAEAAAAAFRvcCBsb25nAAAAAAAAAABMZWZ0bG9uZwAAAAAAAAAAQnRvbWxvbmcAAAA9AAAAAFJnaHRsb25nAAAAyAAAAAN1cmxURVhUAAAAAQAAAAAAAG51bGxURVhUAAAAAQAAAAAAAE1zZ2VURVhUAAAAAQAAAAAABmFsdFRhZ1RFWFQAAAABAAAAAAAOY2VsbFRleHRJc0hUTUxib29sAQAAAAhjZWxsVGV4dFRFWFQAAAABAAAAAAAJaG9yekFsaWduZW51bQAAAA9FU2xpY2VIb3J6QWxpZ24AAAAHZGVmYXVsdAAAAAl2ZXJ0QWxpZ25lbnVtAAAAD0VTbGljZVZlcnRBbGlnbgAAAAdkZWZhdWx0AAAAC2JnQ29sb3JUeXBlZW51bQAAABFFU2xpY2VCR0NvbG9yVHlwZQAAAABOb25lAAAACXRvcE91dHNldGxvbmcAAAAAAAAACmxlZnRPdXRzZXRsb25nAAAAAAAAAAxib3R0b21PdXRzZXRsb25nAAAAAAAAAAtyaWdodE91dHNldGxvbmcAAAAAADhCSU0EKAAAAAAADAAAAAI/8AAAAAAAADhCSU0EEQAAAAAAAQEAOEJJTQQUAAAAAAAEAAAAAThCSU0EDAAAAAAOxAAAAAEAAACgAAAAMQAAAeAAAFvgAAAOqAAYAAH/2P/gABBKRklGAAECAABIAEgAAP/tAAxBZG9iZV9DTQAC/+4ADkFkb2JlAGSAAAAAAf/bAIQADAgICAkIDAkJDBELCgsRFQ8MDA8VGBMTFRMTGBEMDAwMDAwRDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAENCwsNDg0QDg4QFA4ODhQUDg4ODhQRDAwMDAwREQwMDAwMDBEMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwM/8AAEQgAMQCgAwEiAAIRAQMRAf/dAAQACv/EAT8AAAEFAQEBAQEBAAAAAAAAAAMAAQIEBQYHCAkKCwEAAQUBAQEBAQEAAAAAAAAAAQACAwQFBgcICQoLEAABBAEDAgQCBQcGCAUDDDMBAAIRAwQhEjEFQVFhEyJxgTIGFJGhsUIjJBVSwWIzNHKC0UMHJZJT8OHxY3M1FqKygyZEk1RkRcKjdDYX0lXiZfKzhMPTdePzRieUpIW0lcTU5PSltcXV5fVWZnaGlqa2xtbm9jdHV2d3h5ent8fX5/cRAAICAQIEBAMEBQYHBwYFNQEAAhEDITESBEFRYXEiEwUygZEUobFCI8FS0fAzJGLhcoKSQ1MVY3M08SUGFqKygwcmNcLSRJNUoxdkRVU2dGXi8rOEw9N14/NGlKSFtJXE1OT0pbXF1eX1VmZ2hpamtsbW5vYnN0dXZ3eHl6e3x//aAAwDAQACEQMRAD8A7vo/RejWdIwbLMDGe9+PU5zjTWSSWNJJ9it/sHof/ldi/wDbNf8A5BP0P/kXp/8A4Wp/89sXM/Xj62dY6H1LHxsA0+nbSbHeqwuO7eWaEPZ+an4sUskuCNX4rZzEI8Utnpf2D0P/AMrsX/tmv/yCX7B6H/5XYv8A2zX/AOQXm/8A45P1n8cb/tp3/pVWumfXj649Uz6On4n2X1sh21pdU7a0Ab7LX/pfo1sbuVg8jlAJJiANTqwjm8RIAuz4PffsHof/AJXYv/bNf/kEv2D0P/yuxf8Atmv/AMgrtbXtra17t7wAHPiJPd20fR3Llvrh9YOs9GyscYnojHyGOgvaXO3sP6Tgs2t2PrVKchAWdvBvcty8+YyjFjIE5AkcR4fl9TufsHof/ldi/wDbNf8A5BL9g9D/APK7F/7Zr/8AILhP+f8A9YvHH/7bd/6UXR/Uz6w9R607NGd6f6uKvT9Npb9P1d26XP8A9E1MjnhKQiLstvmPhPM4MUsszDghV8MrPqlwdv6za630bo9XTnvrwMZrhZSJFNfBtqB/MV79g9D/APK7F/7Zr/8AIKPX/wDkt/8AxlH/AJ+qWipXOaH7B6H/AOV2L/2zX/5BMeh9BBDT0/Ek8D0a5Mf2FoLK6/g5OXVjvw2TmYlv2nFsLtrW2Ma7bVb+f6GW1z8S/Z/g7vUSUkd0b6vMkPwcNsczVUP++pO6N9X2mHYOG08waqx/31Yr+h5dV111lDH1nOyMt9tjmEFluB9le93qfRrdlu+z+n/3G/nPYpU9By6cVuPQxl+Ix+A/BLnB1ldFeTVl5GHZc8u9ejCrr34Vm7e+r9B+ksq9a1Kdf9kfVzX9Sw/a7a79FVo4/mH2/SUD076si2qr7FiF1+70yKayDtiW7wzbu19qx3dAz34PV8b7K21mRjXDDGQa3Xsvs+0FuMzKb/PYbHZDrMe3J/WMf7RdX+k/wWg/pVrOuOyaccV4jqcVgFbaYL678nIuD22e9np/aK7/AFKf8J/wqSm4Oj/V4tLhg4ZaDBPpVQD/AJqdnROgPaHMwMRzTw4U1kf9QuYq+rHVK+m5OOcRptyGY4YGvYGsFGW/KdTZV/M2WbLn5NGR/wCgtvp+l+s9dgVOqpc1zCw+o90uFYc7c7d6jm48V+7/AD/9J+kSUh/YPQ//ACuxf+2a/wDyCrdU6J0WvpmW9nT8Zr20WFrhTXIIY7X6C2FU6t/yVm/+F7f+ockp/9D0fof/ACL0/wD8LU/+e2Lgf8aX/LOF/wCFj/58K77of/IvT/8AwtT/AOe2LD+tfQei9VzmW59+TVbjUCGY5r1a57tvssZZY+zc1/0FPyuSOPKJS2osWeBnjMY7vmWFitybYttGPQ0tFlpBcZcdldVNLfffkWv9tdTf+Mt9Opi6jpnQLei/WDAtOScfLF+1mJk1P/S1uHpXDFzMT16spzGW+/8ARY/pfz99dVS08P6l/VevKosxuo5xtL4q2ODSTHv2Wsx2OZ7He6yqzfsV3E6P0XpW4YuZk025dZFmddtfYKw8VUYw+1V72e/+ar9H9L6f6z6uxW8vOQlYjI0RVcPdgxcsY0SBxA3dvXrkf8YePSOmVZD7H+r67W018t1a/wBQdtns3P8AUW3j9RwG0V4lWRY57oqptdNj3lw9t29+/fzu/SLCzfq/0zJbTVmdT6lfU31bA61zSK9jhQ91nq0eq3c87avZs2ep/gllZQTExiLt1/h+THizwzZJ8Htm+ERMpS01eCXaf4tP5zqfwx//AHYTf80vqpqf2jlwIkjaQA6Nn/ab87ctv6r9J6T0yzLb06+691gr9b1o9u31fTDdtdX77lBiwzjMSI0F/k6/xH4ryuflMuLHKRnPhq418uSE/wDuW91//kt//GUf+fqlorO6/wD8lv8A+Mo/8/VLRVp514e93XB0n9UOccg4Wecnd6xcHAv/AGX6O/8AStzfW2egyn/tN6nr/wDaZbPUDkt6FmCh15ubcyHUG8v2+pUT6Lnl2R/M/wA76P6L+eV7rN/UKG47+nlj7vV9+K+B69YY+y2imxxb6WTsZ6mO/wDmfUZ6d/6J/q1Zb/rM8YOPm47xkY7bHX5zywtNeEbrMVr31+19FtP88/1WfzXT87/CpKbHWg7IxnX4rsgmzIxceysC0M9Nl4+0v9Fu39DZTdazKtb7Lqa/+DWdmftMfbDS/L9VvT2fYPR9csOYLsv6Db9zLPd9m9T7V+i+x/zn6qrV2f1KgZ27OB+yZuHiAuZWAG5B6f6tj4j9JtzL/T/62gnrvUXYlGV6zabMu3MotoLGu+ytx2ZT2XncWOc/Efi0sy/Vf6N32n9H6f6ukpMw9VDczHb6zs9uXbdjNe6z0i30fUx/0u7b9g+0/o/S3f8AB7PUU8Rzz0ul9D805uRTXj2i4va9tln8/kWNtY+inKo23P8AYz7P/g/5r0U2N1zPezJx8rZR1ShlNIoa0uqddc65tGdjOcWvycK+uv1/RZZ61NdGTTZ+mqT9O+sL8u7p3r210B2NlnqFJ2jbk4j8XHvZue7dWyl9uR/1r07ElNfAHUr8vpbcwZbba/tFHUDuubW5+MK68fIOz0qfTytv2ivb+jt9VVsZ/WD0+45Ds4PGC53T43+ocv18z1N0+59mz9mfZ6839B6H/A/alrdI6ll5Wfk132zXVlZNFYHpBpFXpenTt3fafWY19j923Z/4EgY3U8/Ixcq05XpupfmhjopLS3Gvtpraxm5136Oqpn2h9rP8IkpepvVq82vebrsbJyWG5rDZGPexjXXemXn1LukZXv8AY72Y2R/paL/1XX6t/wAlZv8A4Xt/6hyH0O7IyOlYuVkXC9+TVXduDQ0D1GMeWt2e3ZvLtiJ1f/krN/8AC9v/AFDklP8A/9H0fof/ACL0/wD8LU/+e2Kn1q7NZl1toxbr6vRe51lVlrAHg/oqttD2tc6z+p/brVzof/IvT/8AwtT/AOe2K8kp56x+Wxtzhg5b9m40BuVfNga41+7/AELneyytn59b1C617WbrMHLIZrL8i+GvD7GN1935lbLfW/mf0v6SytdIkkp52x+WabHUYmWbG1VWVNfkXw59jtltB91bm/Z/zv8AtxRNuYH2Vjp+a5zLLK2EZVoa/YWejZvc72Myv1j0/wDRejV9o9P7R6i6RJJTzvr2GNuJnOduLXt9e4GuWtfT6vu93q7/APAer6H+FV/pFlrn3tsx76NoZBvsfaHEh2/0vV+jsd+7/OLTSSU53X/+S3/8ZR/5+qWis7rwJ6Y8ASfUo0H/AB1S0UlPK5H1qyqMBmdkYlLy+rNsx9rj7bcIXP8ASfvbv2ZOPj2/rDP5mz9D6Vn84tHPz7cfpOXnejVdaxwr2vY+oPbubXttba31Pa6yz/SVqwOgdI9F9H2YGp9VlBaXOP6O93qZVbNzv0bch/8AP7P53+wjXdLwr8e7GurNlOQQ60Oe8lxG3b7y7f7fTb+ckpqdb6jhdJorstpqey2xnrglrNtLSyu7MLXB3qtxN9fsQ+v9Q/Zm22rGpuN9WQbi/QuFFL8musuDXbmv9L0/f9BX3dKwHttbZWbBkVvquD3OfuZZ/OsPqOd9NQs6L024AW0+oBQcUNe57gKiHVuaGudt3ure+t1/8/s/wiSmlT1S6zK6fQ+mpzMh7xuLH1lnp0NvaamXN93ue6r1G+z0/wDttVMjrDaYGXh44OQwuxryP0Zyd1rfsd8jfXZkto3Y13+Ht/Vv5/0ftGy/o+A8M3McXVOD6n+pYHscGGj9FaH+rX+ic+vax/56k/pXTrKXUW0Mspeyut1T/c3bUd9HsfLW+k872u/fSU5DOr3g519WE227FsvrDKanmx7an1Mda2yG13P2W+q/EY/17dnp0erYo0dcxnXYRbVjDH6h+jZmBrhVa51j634brNm/DzW1srf9izWfp8qz7DXZ62PYtf8AY/T4eBWQLLHXOAe8D1XOFrrmgP8AZbvb9Nn0EzOidLY4ObTqHNefc8hz2Pdk123NL9t1rMix13qXb3+r70lNfoHUsjqFDX2VsqYGT6bGvaGkPtp2tfY1tVrP0H+D/m/8xW+rf8lZv/he3/qHJ8TpuHhBoxmFgY0sYC5zgA53qP2tsc7bvf8ASTdW/wCSs3/wvb/1DklP/9KhX/NV/wBRv5ApLzdJJT6QkvN0klPpCS83SSU+kJLzdJJT6JkfzD/7P/VsRXcn4rzZJJT6QkvN0klPpCS83SSU+kJLzdJJT6QkvN0klPpCZ/8ANv8A6jvyFecJJKf/2ThCSU0EIQAAAAAAVQAAAAEBAAAADwBBAGQAbwBiAGUAIABQAGgAbwB0AG8AcwBoAG8AcAAAABMAQQBkAG8AYgBlACAAUABoAG8AdABvAHMAaABvAHAAIABDAFMANAAAAAEAOEJJTQQGAAAAAAAHAAgBAQABAQD/4RJaaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA0LjIuMi1jMDYzIDUzLjM1MjYyNCwgMjAwOC8wNy8zMC0xODoxMjoxOCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0idXVpZDo1RDIwODkyNDkzQkZEQjExOTE0QTg1OTBEMzE1MDhDOCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpDNTlGNkZGQ0QxMzkxMUU4OTFDNUJBQzk5MjMyMUFBRiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowREJDQzI4NDY5MUJFQTExQjE3RjgzRDc2RjJEQTJCMSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBJbGx1c3RyYXRvciBDQyAyMi4xIChNYWNpbnRvc2gpIiB4bXA6Q3JlYXRlRGF0ZT0iMjAxOS0xMi0wM1QwMToxMDo1NyswMTowMCIgeG1wOk1vZGlmeURhdGU9IjIwMTktMTItMTBUMTc6MjQ6MjArMDE6MDAiIHhtcDpNZXRhZGF0YURhdGU9IjIwMTktMTItMTBUMTc6MjQ6MjArMDE6MDAiIGRjOmZvcm1hdD0iaW1hZ2UvanBlZyIgcGhvdG9zaG9wOkNvbG9yTW9kZT0iMyIgdGlmZjpPcmllbnRhdGlvbj0iMSIgdGlmZjpYUmVzb2x1dGlvbj0iNzIwMDAwLzEwMDAwIiB0aWZmOllSZXNvbHV0aW9uPSI3MjAwMDAvMTAwMDAiIHRpZmY6UmVzb2x1dGlvblVuaXQ9IjIiIHRpZmY6TmF0aXZlRGlnZXN0PSIyNTYsMjU3LDI1OCwyNTksMjYyLDI3NCwyNzcsMjg0LDUzMCw1MzEsMjgyLDI4MywyOTYsMzAxLDMxOCwzMTksNTI5LDUzMiwzMDYsMjcwLDI3MSwyNzIsMzA1LDMxNSwzMzQzMjtDNENFOTFCMUJEMzYxQkUyRUY3MkZGQjlGRjU2NTFGNyIgZXhpZjpQaXhlbFhEaW1lbnNpb249IjIwMCIgZXhpZjpQaXhlbFlEaW1lbnNpb249IjYxIiBleGlmOkNvbG9yU3BhY2U9IjY1NTM1IiBleGlmOk5hdGl2ZURpZ2VzdD0iMzY4NjQsNDA5NjAsNDA5NjEsMzcxMjEsMzcxMjIsNDA5NjIsNDA5NjMsMzc1MTAsNDA5NjQsMzY4NjcsMzY4NjgsMzM0MzQsMzM0MzcsMzQ4NTAsMzQ4NTIsMzQ4NTUsMzQ4NTYsMzczNzcsMzczNzgsMzczNzksMzczODAsMzczODEsMzczODIsMzczODMsMzczODQsMzczODUsMzczODYsMzczOTYsNDE0ODMsNDE0ODQsNDE0ODYsNDE0ODcsNDE0ODgsNDE0OTIsNDE0OTMsNDE0OTUsNDE3MjgsNDE3MjksNDE3MzAsNDE5ODUsNDE5ODYsNDE5ODcsNDE5ODgsNDE5ODksNDE5OTAsNDE5OTEsNDE5OTIsNDE5OTMsNDE5OTQsNDE5OTUsNDE5OTYsNDIwMTYsMCwyLDQsNSw2LDcsOCw5LDEwLDExLDEyLDEzLDE0LDE1LDE2LDE3LDE4LDIwLDIyLDIzLDI0LDI1LDI2LDI3LDI4LDMwOzgzQkQ0MUM2QkZFQ0IyRjIxQTVGNEE0MDE1NjlGMTk0Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6ODZhOTIyMTAtODExNi00MjMxLWJjZjItYjk0MDIzZmU4OTkxIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjg2YTkyMjEwLTgxMTYtNDIzMS1iY2YyLWI5NDAyM2ZlODk5MSIvPiA8eG1wTU06SGlzdG9yeT4gPHJkZjpTZXE+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDowQ0JDQzI4NDY5MUJFQTExQjE3RjgzRDc2RjJEQTJCMSIgc3RFdnQ6d2hlbj0iMjAxOS0xMi0xMFQxNzoyNDoyMCswMTowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIENTNCBXaW5kb3dzIiBzdEV2dDpjaGFuZ2VkPSIvIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDowREJDQzI4NDY5MUJFQTExQjE3RjgzRDc2RjJEQTJCMSIgc3RFdnQ6d2hlbj0iMjAxOS0xMi0xMFQxNzoyNDoyMCswMTowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIENTNCBXaW5kb3dzIiBzdEV2dDpjaGFuZ2VkPSIvIi8+IDwvcmRmOlNlcT4gPC94bXBNTTpIaXN0b3J5PiA8ZGM6dGl0bGU+IDxyZGY6QWx0PiA8cmRmOmxpIHhtbDpsYW5nPSJ4LWRlZmF1bHQiPjIwMTRfTUVObG9nb19ob3Jpem9udGFsPC9yZGY6bGk+IDwvcmRmOkFsdD4gPC9kYzp0aXRsZT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPD94cGFja2V0IGVuZD0idyI/Pv/uACFBZG9iZQBkQAAAAAEDABADAgMGAAAAAAAAAAAAAAAA/9sAhAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAgICAgICAgICAgIDAwMDAwMDAwMDAQEBAQEBAQEBAQECAgECAgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwP/wgARCAA9AMgDAREAAhEBAxEB/8QA5AAAAgICAgMBAAAAAAAAAAAAAAgGBwUJAwQBCgsCAQEBAAEFAQEBAAAAAAAAAAAAAQcCBQYICQQDChAAAAQEBAUBBwUBAQAAAAAAAAYHCAECBAURIRIDMRYYOAkQMEBBIhc3GjITNhkKIDkRAAEEAgEBBAgEBAUFAQAAAAQCAwUGAQcIABESE5gUFdY3tzh42BAhFrYxIpcJMiM0NRdBUYE2dhgSAAIBAwMBAwQOCAcAAAAAAAECAwARBCExBRIQQQZRE5PTMEBhcSIyQjNzsxSUtAcg8IE0dNQVNaHBYpU2djf/2gAMAwEBAhEDEQAAAPbAupjpAAAAAAFdVokAAAAxxkQACjS/bJRyHZtNedMShz6de+jrnmqoOPZV1c8B7oBsS5p1Qa/keD1MVs0DW01JHbN5P1UuO+U3K0CbT2kF/MDSiZixn82X1V87A3I4KzD9GLy87/K7s+SfnB9Hv6/eW/n7jvZXwC3+Zj8ulMWcFNEnI+U6vRLsTkKhOwtpoxiQ9cBYo+YcafNi9VvOvcPgvNO3LCmV/bj6W9moFs3O/m3dIv664Z83Ifcd7K+AW/zMfl0pi9kSxWbS1RG2qVpKkvmk9lkBYtkni2TA2cm7bfp6ybwS3Pj+ma7Hu7S8M5Ku3BO1FL/hvvg2I8iwU5W741UxWzTSI1SYypQ9sWlty6b3iqKypII24NK/mArIS6v7csd8soXonp2h8ZGtRTFzQqa3alrn6E2W2rKrlmaVKttjstNaGBplYxZ5MGZg5THncMid4UxZGLAt4JnCDEDWZp0zJFcLHK2JTTWyrDTHwAAAAAAratIgAAAAAABRh//aAAgBAgABBQCPH3iPEpli5HMw9KSojpSVETtVU7akq9iWlqb9faEuW36yFIfWQpAtGi2muj/4+HxEfYR4t/jgsAygHIb11p0lBgt8lzscscZQiv8AHvbx4oB94Aq0DfPSnKvMtvKVTS1NHvVV4tdHNV1M9bVhFf497ePGxX27Fq7dQCwipXJWavclUw7wuFXVVVfVVqfE+41f00JA+mhHFmsNpL9P7ePH3iPH3iPH3j//2gAIAQMAAQUA1TDVMNURqmGqYaphqmGqYaphqmGqYRmmx1TDVMNUw1TDVMNUw1TDVMNUw1TDVMNUwhGOIMF9oi1Z+oVPx1Cp+NtwBE3tyn3Y7+wj6Rm5cD5/Vo5wf1aOcC8t+PrdDSJuPpCGIwhhhlkOAjwmhDCbCEfSHGPFYvtsIQjEITt23eUUI6baoiqru6f3B5YPvwJuMIYjTEQxxhjEYRxhCIz9MxhEQhj6Q4x4rD9tgm3LEm6V6KyVph2d/ZqNuwpwfDJslEubBOKg8sH35E3GEctQhHOGUdXzQjgIRwGQxzhNhDHKMcRDiLrarffLf9HE2FOlCeU0k5IK89FT02xSbBSei50iFnr2d0OvZ3QVBYFIWi9iPEQwiIQEeE2QjgIccPljwh+nH5RDjHjDjhEZj4cBnj6R9Jv1QhiNIhnGGcfjpGAwiMMsI4whj6x4+yjxhHCGoQjhERjjHViMRCOAxGOWrH0hxjhjkMhkMhkMhkMhkMhHDHIZDIZDIZDIZDIZDIZDIf/aAAgBAQABBQBnTKmbmBo3QoyEdCjIh0KMhHQoyEdCjIR0JshHQoyEdCjIR0JshHQoyEMjZYzgws96E2QjoUZCOhNkI6FGQjoUZCOhRkI6FGQiVlbCp7v0JshHQoyEdCjIR0JshDn2TMzszaWR9mLmnEp+01C/yW/HKPyW/HKKT/Sh48K+rLN53zEXnLuQTdqCQ/kDMMH5AzCw0F5SQPaT4ML7KPR86yqO21RDA5FxJvMh2cOvKImKvU91VZu0hsMSsW1MJlJubwWHr+4ZT1U8Y52V9UUP9HY9rDI+zHzgSxm8VwhCMY+A60pte/J4HkWwvGhvOxq/ZH+djtCDDOyhX3A2NHzfa39I6ZK9aVQSMqpGtszbiDe6Vx6eE1Bj4sLJrBvqcprZElvm9UNysm7fFbZ0TSOTnAs7RS7qa/VIUWsxWVosnQ5Oy7WGR9mHm8/8sB42dxrdGZWokxv57c/YTDYDVazet6QkapUc71amKGP87HaEGF9lC8o+oR9WDb8digbx7WdvSnqI0g9E1YVOR++MLUzcbgs7G1QXE3ri0tWlvvCipysaxW6wMQWQpJmuDET8rS2mprykH1b2uNBlawozse1hkfZi8WxpQaG57rFPC7RmMjMH8TVPbD6ljE08Mxedwg5AKy9Mq8fhpuO6zzxK2SSLRvEPHdZMRW2kFOQwzsoDuDwsDfDQ6xyCgpQbSaTiXtOYZMeIq7RImqryrcXlmW5W4tgJLlUkMD4kYPU9+dm5My3PdfvMQyvdPIuHY9rDI+zF3J+pkubmU3HFA0Wu+OURixUBuVNvsxhTE6poqh7JjrU6ulotrikJvt1vjgUKtFxaOfCqfSUGGdlC8L6YEhPUnkBJcppWFdLSlLW1pNJGQFHLLfEnU1BiQ/fbOd3o3H0tQVN106PSGMiuFLpwWyV/KKHRBzK7OYsGtODVXngiux7WGR9mNZRUdwptgrlmmq4lgtRmvKZJyYrNQlIrWyHLRc03cikq/F7cKhW3YUNrtlsiGGdlC3IXe1VUHZ8dexTnFXmw3xWGxmhBDmpt/Stqh3Qdu1gYJtEq+ytIN1DfVvYoV18s5VaNeigpJaYgbC4pZB8almTmrTgr3MlEp2Pawzkxun2Wi80O7HNDuxzQ7sc0O7HNDuxzQ7sc0O7HNDuxzQ7sc0O7DITG6fZZ3zQ7sc0O7HNDuxzQ7sc0O7HNDuxzQ7sc0O7HNDuxzQ7sc0O7HNDuw6AyOr3W0f/aAAgBAgIGPwA+2TXG+GeHMQ5LLZlTzjFUuqM56mAYj4KnuOtq+d4v7w3qa+d4v7w3qaeWXI4lYlBJY5LAAAXJJMVgANSe4VPjpkxzKjleuPqKPY26kLKrFT3EqCR3VLynIFvs6EAhenqNyB8EMy9R12Bva5tYGvms30S+sr5nN9EvrKnzeMWUQxydB84oU9QUNoAW0sw9h0q/6RrwT9NL+Gm7Lk6Vz8nFzmNTJAs1tzA8gR1B7gzMgbyp1KdCezlsKRQevHktcBrMFJUgEHUEAjS99taB9zs5P+NP1cftA14J+nl/Dzdiz8JiTZvILKPs+BErdDRKV87lZUysvTIoDDGHWqxsysqSTANFntzniXmOP5DkcVgOHyJcbkvOoRYTHIaMHDxhr50TL5xukqr9VrNj5eO8U4AJV1KsAwDAkEAi6kEaagg7Gp45+QgXIjQuUMiBwoF7lSbgEbG1ZWZIqh5ZGchQFUFiToo0A12HZyf8afq4/aBrD5zg8w4/K47ExyAKxUlSpNnDKbqxGoO9f82m9FjeprEln8bZRMMnWoVYkXq7utUjVZANwsgZQdbX1puXl5szcmZfOedmihndX7ihmjk6On5ATpCfJAtWRm5uQ8uZM5d3clmdmN2ZmNySSbknWsjOzuFWTLlcs7F5blj36OAPIALADQaV/YU9JN6yv7CnpJvWVJi8PhiGB36yAWa7WAv8JmOwHfb9AeyH2Db2b3O0+2T7Z//aAAgBAwIGPwDc1ua3NbmtzW5rc1ua3NbmtzR1O9fGNbmtzW5rc1ua3NfGNfGNbmtzXxjW/Zm85yIf7FjgFugAt8JlQWBKjdhuRpW2d6JPW1tneiT1tJFDFntKxsAIkJJOwA87qTUMzQvGzqD0vbqW4vZgCwBHeATr31xP5deCI4Tz+YsjIZjIsCCKNpGaWSOKXzS2UgO6hOsqpYFhX714Y/3B/wCVr958Mf7g/wDK1xfg/wDMKTAbl8vAXMj+yTGePzTyywjqYxx2frhe62OljfWwo9pHfQ07jVxvQv5KYW2oVt+tqI/QNeKPo4/r4uywGtcUmfGHk83KYb7CVULBrbEhQxXyN0kajs/LvxTizOhxOaw2fpleEPEciNZo3kR42WOSMsknwwpQsGutwZOk3XqNj5R3HTTX3NOzwN/1OD8dn9ho9lga3ret/wBR2AXo69mnYKNeKfoo/r4uxoeRnjx8QxXnzJCvUJCG6IIIyGJj1Hnz0kuoYM8cRIlxP6XwfGZmDhTqf6lBFPghHB1jEKv05ExsOgxN0DqVinSSaWbHlV4jezKQwNiQbEXGhBB8hBFcTm8P4P5Sfic3LXGiyUxMh8dpmcR9AmSMxsysQGUMWHeK8M+EsXImlx+MwIMVXmkaaRhBEsYLyuS8h+D8ZiTa3Z4G/wCpwfjs/sNEUfeq9A1f36A7ta9zsv7lAe//AI1ah5aHZk8VymOJcCYAOhLLcAhhqpVhYgHQjav+Lxeln9bWRHF4Xx+mVeluoyMQP9LO5MZ7iyFWtpe1f05OLEeB0dBjieSFWXvDCJ06+r5Ra5b5RN6hxcWFY8aNQqqoAVVAsAANAANABtXCeDfCH5r5WB4Y46AQ4+PFjYPRFGtyFHViszEklmZ2Z3YszMWJNf8AtOb924/+Ur/2nN+68f8AydYXiP8AM7xTLy3N42KuNHLJHDGVgV3kEYEEcSkB5Ha5Ut8K17AAUeweWrW1NCjbymiO69G/fW2t6Hvf51e3fX7ewdvd2bCjpRGld1d3affomt9K3q1a0de+hrQN9DW9WvrR19mNEURbuq9aVe1ftr3ezard1G/YKOtb1vW9b1vW9b1vW9b0da3ret63ret63ret63ret63r/9oACAEBAQY/AOLU9PcS+M03OTfHPSUvMzMvofVklLS8tJ60rJslKSkiZVXjD5GQMfW6++6tbrrq1KUrKs5z18m/FXy9aj9kOvk44q+XrUfsh18m/FXy9aj9kOvk34q+XrUfsh18m/FXy9aj9kOvk34q+XrUfsh18m/FXy9aj9kOvk34q+XrUfsh18m/FXy86j9kOvk34q+XrUfsh1xhnZ/iZxmnJuX0VrGRlpiX0PqySlJOQMqUW+WdISBlVeLNMKfWpbjri1LWvOc5znOevk34q+XnUfsh18m/FXy9aj9kOvk34q+XrUfsh18m/FXy9aj9kOvk34q+XrUfsh18m/FXy9aj9kOvk34q+XrUfsh07X0cTOIip4eOHmH4ROh9NKl2YgskoISVdjcVXJjccUYE8y2/lGGlusrThWVIVjHyb8VfLzqP2Q6+Tfir5etR+yHXyb8VfL1qP2Q6+Tfir5edR+yHXIeXh+I/GOJlorRm2pKLlI3QmqgZGNkQaDYCQjwDRao0SGaGS0lxp1tSVtrThSc4zjGeuI30xaF+FdU62DyG2m1YXqDrQCMkrG1VYxmZsCx5afia2LiNjHzY5kpzEjNM5XhT7eEt95Xbns7M/wC2cj/6UxHtz1/tnI/+lMR7c9CAR8DyYPkDyhgQAAtRRhJpxxjyBgwgxmbut4kssl1LbTaMZUtasJxjOc9Qs8VATlWfmIwOScrlmajmLDCKMZQ/6tm2ImSmI4eTFwvuvNslPpbcxlPfznGerFuzaz0k3Tqy9FsGsQbcYXPmPS8kNFisQsVJysRmZMw+Vhahx3FkeCla0oVhCuz/AEG+/wCmQHtd1/oN9/0yA9rup/ZemGbgzXK3by6RIpukCzXpHM0HEQ809kYRmSk0uhehzjHY5lac5X3sd38u3PXFH6ftU/syI/HQG/Ii7Gx+haBi3E8tKMW0C/XidIzFh1vRitwYdXHEy8VKaFnb4NYjXRX2mn64PJJeQ5ltjKOZ1hVtu4VCAheQf9sULSNbrnqCNxRdMcidm6/rFkii+9FySpKa2hTLA9JSDxa3yI5+RQwIodQqVZ2vQ9q7Gs5ukdw8jXNd8Yd6xuRg7hpnZwWwarC5407Klm4sgGVgtogOFPUieLZy8stZUGa7ktUQ8Rv96g2C+7nA1t/cB21U53S9X2HU6LvOd490/SNHnRavx9nrKLHV+XndfXe8NTT0TJmBFWAJHoa5ZCcIYI/t4XbXnLbkTK0rlFbZCi2eTyJVtcTR0RTuLO8rWS/IU8mirep+xcbN1wwTOI7uUNyA74rbaA/8nPIUSanNyW6P0zyH1DqSG2k1bNXwsTTNZWDjVpHcNwqVwjyIsay2Cu3nZcgrxmRx1qGJnGchkCpGxhuKo1u3DeS4EnUnMmeuiNoP1BJ+xiqdy4umntP2bjYbW4liVGI0vVqgRG3vBzjCWXpaCeyC66Zg1XHfa23bPt2UmNh8Xde2mWl75b9dS1P2hdbawBLzVnq1YrDKZqryNeFjMOKa7oIihJ3CMi5cYwtv8OS30/7k+HVj64jfTHoX4V1Trl7jHZ/6jSlfn/2TtnX6s/8Ansx+CU4xlSlZ7qUpxnKlK7M57Epx25znsx/060gFsaHFmnGoDZEtrts7DbgIGzIGpGTUDLvDu9rT5UbEgSLgfbjOWT8MvI7HG0Kx1sjXs/EmS7my6tY6TXGgYCMspIdtkq9KkV6WHiZVolhwiENDwchxLLrjORvERjCkpz01hxOUOYbRhxGcLwpC8JxhaFYc/wAzCkqxnGcK/mxn+P5/htn6irB8Pdc/hxR+n7VP7MiOtPUU2lX+6WbeVitFVooFHDqr6HJqo0ef2LLjy5lpt1UDi2v0nVzyGnVLU24sfwu9hxbaV60g6fWNpWy2bL2ls/SDdMCrULBWmjbd07TpS/X+g7HjbvaKoirzEXUoZ45h3LjwMgKph4Qh5koVx+P3/tXTNnnAJRNe1CbWT6nUJy7Axe877W9XZqUzFyNkxXi6zY7ZNRrEm2yeWC+OpshXijt+Im4v7B455s7lm1jL7/vlmjNd0+djpxri/iuH12PtB5UsKQbfKePJMk1XBSMijZCWkUth9DLblp2ht7QFjXrbYV+1ZtCuxtf1pQXArIDyC2xV67o6TmBH9pz4s3tBu2HQJ02cZmLJFNJbIbHw0G4+jYMdduPM3C7Jq279SYv9FVrqtxOyA79y4sgOmNebqDno6yiwVjhtly6cQJlphJw5xCAyAzVowK+y3A1e56qQIXoY3UQ+kB4ulVg9P663iVaNb62pmiosCSzKBXSa9Ryca/3RY0YON8dwoluPy87jee1b/wAeitYzms8Qm6Nn2C20GsvyVokYiBeloC6RM5TJe1xWw7TBA05oUZY5RMiESIMKjCFpZRjjTaqrxnPt2ttmzNEk+P1r19rXXAcBEXblw9MjgAQj1itVRkatY9gYJIdsbo7SBkYOxmTfSt/OM3CKjNFzOi53Seu9FxSITOs6vByoYnJ60GVjUOktdwVVm5Ut6z3K70j1f6mAYaBbJEYccdwP4L2dmyW2KvtCkyWm4zXNu2XVCa9BT9mrurtn2YmnV/cAYtPtVjAuGu4+ygFiSrsCTKSUU4G7kgNCcJUs2pVpo2XDZ13Rtoxl5jia/JUOzVLYpdjEq5lZmYycNLlMm/pUt3v+ioHyPhtxDq0ut5VyX+n/AHL8OrH1xG+mLQvwrqnXL7/46m/Fag/g/Ebhs9W1LRZKtFM7X5RXeWhv1HEXCSDkf0NpbSlDlYuZVLVaUMIHeuL2QHyZcQN4d4oCJVliRpjGnOPvFjeVF0VsuHKO5+aqpO4+IKKVPBnKdOobGqoazFtb83KahA+IRddIxFCYJSQ+N6P3kuMTdYm4ixQpLpjA0vBSQcvGEPxxpEbIMsHgPECPOAyIjrDyUrzlt5paFdik5xiwxdm2XQYqxVavFWmYqh9yrYNnDhRgXpDB70EZJsyTApAzKlNurbS2vH54V2dXvYx4kYAbfbhY7gUFCxQkHFDPWGWKlFtgw4KGw45rtJ7ctNpwnC85z2fn+G2vqKsHw81z+HFH6ftU/syI64pbOo66Y6Jx+2Dsi62CHtc3NwZFgYumkNhamj4+GNiKxZ2xXhDb0k15x9ru5aFy2lOVOd9Gv9l3CV1Zseck+W+8eWW9qvIkWiqVI2U2fxsc410+ia4dEgbLJ4jKLVIuGcfkJLCH5QoIh/wR/SksjQGjKujWFat0BcNFS8THrl7dnX8DUtIbxoWy4WqBzKoKQtMq+mnUAaIwa8G1l4txRSmkIx4Gd/UixM63r09sGk3Sia6YhZyxTkTEgWWjvQTEpb7CbU4KRfKVYZF951gONy2yI00lK3HFLziM0fS4bRFHlmYnhmqz2QOzbBkk3m0cW9s6yvZMial2miNV+NPrlBLBDaZGLfcKlUvEOpQJhBG5tz2K6UOD2rPN8VITS9Zi2bAfRKpT+J3Ikfk3ERd8sZAYE5ZJnad/WQNJGiRYrcLG4GQKwU62+4VGbeVO6+pG4tb7k0Dt3UdbSbYbZr1a9GBbMizK7f7EqArU6SjYcHuyzAqKBi05hM5AKbaNcHcaeqFetJ9XolVTsOs2m6A0G3zhdlahaQM7ZIGPh7PKUcESbfktnBxZJjT0dHMJiQHB8qIUUvw6RpSGudEkdcaZ5+1Lkzp1c9LWZ6xxmioy+EbSltXz77NYyM5ao24zkqxDus5yAxDvCDr7uRO87vDbgFxp8AROzvBPZelFEpmpFcXs3hTsLYewGQdixSI8Vgil7C/XSox1YBijAWUrJShx3uN4s/Imwu0EC4EU/Q2p6dSQp2fka7E661vvmL3tsOTsVkJqIZU9abpKgNggDNxQwQIwTeXHHVEveHux2m29ReiLqHSMaZ1MSIrC9DshT2zLRfKHV5PvZw9q420Xv1hX4zOMYr6SCQB+6A2GyzyW+n/cnw6sfXEb6Y9C/CuqdbBq27qMDsrWNocptcslHkp+Qq0fYFzl9q8ZCMG2GLfGOiBBLCSIS6+hxOENs5yrPc73VggjuFJjrEerKq5K18rfdoFuAosJLT0qXHYh7a82CmPBicqSghxCyUvN5Zwvtz3d1tU3guSeJXKqzEXxtupbTuNzcbkLBORS65QxSZ6eswtgLHg8lPO194c1UcUzhxeErU2mb45WPTAuv9KVmqUuhoi9d3PZdORbZ66iESyamRVNYWGvlTcUDT4502bPk1lOHIeTh5bnYtK2IWs1CVrWsalV4xigDVKqvJjHa7F1ZiRZioirxYDKoUeLab9CHHQleXlIxltPh/njcm7dscQpa4bLbo8Zua2TFgI20CJcbDa0TIcXS4i2InsV1+3sSVebCIjAm8qiGSQsqYbZfYTnIF04jOVq1ABPHWGvNFbmlExIsfZW6nMyY0iuyxvreDi5hsvtJaYSp5gB9xtpWPCw6GOniJPsvyQZB8d6yi93xYxQgRUWGa56UVasNjqHJk8tdxzCVLdFIQnGctK7LTF8W9Xnau14TeHjJCPNTZW8zFtXWa0maPaRaJOWL7YxKWot/LLyhvSwHsIyrGMrV1xR+n7VH7MiPw5l7rpdxvewuPL1Qdou/dTwE/O2G4cdLFLaXBlaNyb02FHHv2WBihLBNoHu0FG5Y8ON8GxAt4fjjmzddblpk5P/AP584S2HW8Ry0XHTVfMq8vX9uwY1c2Zi9KkrUxZDZjj5SrTXLoJ6MIWt9wshDyu8ju55qV8HZ+z5GB0voDjlfaWITyJ2tMAwp93p/IhdrsJw5V+KANHtgEZHFELIbWxlTA5DWG1ttLTrSA5ObStA+tY3+2Xwr2vqOal9t2qAEv1qvdUuRvKHdUvsRiyR8pZNnUy3AQob75Eg8/WxyGiW8Mrk1uL1HydmJ6+7JnqhxT17O8pOL5LhSbNujRs7tLdsFC8gKHr5TjLlS5OQur6bB2P1aEwC3amCz4dxGDsxjg+hJvi/M3y4TfHvSGnebO1GIizxJU5sGkMAx9jjNRbLXsG0A3TEfvHXY1xNyrwn5NmRiY/vI7HcozY9hDbzhkaas/8Abz0LuSpettm+ha/cCt+190OGX0CuHzyK0LKyNSh4pok9A+CfRmGm1L7v5Z5WvS92jpSn1PnXQK5AEzfJHZELY6fBz3FPRVoiKbQNOBKVXLDD2bblpw0RFukNtrXLn5UGpbOMdXykquEWxVQ+CNKuh9ctfJS+6MrVakyt73yBnNhxLdTdWL+rRaWIrCSXFRyspDHQopCM99uoa6B2luIiqWXh1b9/NRTW/dqs4PvTPIvXjkLcmYTFvajkjDw0m/HtCJDTHYi3FCKYyz2o/Dkt9P8AuT4dWPriN9MWhfhXVOtobALashA1XiI6QdYqFqkqVZX0qsEQLhqGskPFzUqCY5kjswgcR94rGcsIRlTuOog8Q7l5LyMyzpQEWpUzkdI2KxP2nc0TKT4kMG5IF14N1EBFgoaMbJSEeGel9ktgbDWVYpMk/cuZhg12g7PMj5A36p9yHdqdNrFvlYebwqwtthSrCbaKE41lWcsl95C+zPcwtqNNtvKi7GVeSqslFmR+82ptxSrIHo1waQo6XZvL9gnomQ3xFNEgBdpqEAlOoQvOBEE63okDsrlawXszXDmyYiUf5CSBcaCAPV6dZDIaTXFSBy2ZyOduTQRDeO1DZIz+MKV3U4VrQ29SHMOpSm1NJ2belYi4PkNYbMwZW4GLkSo2DjzJcanPzdpuctFrj4MUQd3Ms88w4N32vS1Bgw8LsfmO45PtUAunzEtu6ThKnZ4vYsZrAqNl2bSVLuRMWLWpraAsPPsmKZPiZVttlQ7mDo9ZVviBtl8xJU+iylij7DgPd8ooT0CsVeo2SUt8G+3LPv2ikNu2KQCTIRrJWXya3KYZadwy141yMqEzsadjYLZl0qT0hsy7KvMyQdUZcirGkRcmogrDVcNKhFvhoQtSFodyv8lqcQjrij9P2qf2ZEdce6BXNcMX2X5C3+0a7hiSrozUI+tytY1fddsOmzDjldsBBEaZX6CeyjI7a3UlqZTlHhrW43V6nD6PGruxLzyN2Vxb29DbDt1ToONe7V1npeU3kh232aOirVGXCnXTV4rB0FJiOPqKZlBEOMMrUS2M/v03StUtTFondZj2CiQdqq5sRYnNobIq2t4CxC3JmALgrdGKLtAEi2U6O2p6N7Vpxh5KWVbK28brBmyv1ukEOPUeh1yLkLXsQ9sVmPrmtK4woMLE3J2mZWLFRw7+EMqeeawpKEYz3ahtii0+lXmiSdBj9tayjSoyHGhiBZevYtEIRHLdipEavmGMFpwp9sfLjDi1d5PbjOOqhJxWiKVX7RsTiNpjlOCVbtzVWqy8hUNzTNhhqlrViZMpmW5S6iyNcShbCiERnjFjoQTnKs5TzIt7GhoZsrjZsEvUk7HqssGh7ajMFr2gXx8jB7dXWmNih6xscMdgY1L/AGktPtfyNYbdc5HaxnuNlWiN2cbWgJyNocwzVm4PburyH6wNnZWobs7U8Ny0BW5mztxk0M4AOZCS2GmSm0NGBEEbGpo2gtWRll1Vv9zT01L52BT87EmJZOsqtts690ipuUoKfsQIdUuSHXmklMSSsiGZbbcw0nxZ/llYtJ0ib1GJXaaezsZdkqNrDrEtZ9kwmsiqNvg5+rpP0jZtTFT7Mjd2TkHjVeLYLcU6+sR1vGhnJPRlFDsm87Rsqj1bYUhtqosUvELQNcm7OjrdCbKEqciTPa/vlXjyPVjqBhn8P4Sh8ZrClKRV7fJQo1fMsUSPKqiwbBG2yOaZK7yxCYuzRCW46eiZETuEiFNIbw8O8hWUIVnKcclvp/3J8OrH1xG+mPQvwrqnTocgIMcI9hOHhTGGiRncIWlxGHWHkLacwhxGFY7cZ7FYxn+OOlHjV2CHOW4l5RrERHtFqeQ88Ql1RLY6XsuJIIccwrvduFrUr+Ks5ylea9B5Wl6RISvMSBlSSJhOUS76Vej9uHpROewlX+J/H+PKuk16codQlYNsgcxmKNrsS+CMaJ4HoZwg6hO4IeHkZrLL7WEOtZbRlCsZSnsj/V1bggsxLJI8YoWJAZcj2Te/k1oNxDGHB0G5cVl7CM48XKs5V25znoRP6fhO7H4ESAn1UB3QkgOuPg4Ex4HYNgJ95a2u53fDWvOU9mc56l6lNVKuSdXnwjY2brxkNHvQ8qBJIabkAz49Y+RShzUMIw6lac4XhCe3t7uOxKXa1AOJQygdCXIeOXhI7bi3m2E4UNnCWW3nVLSnH8uFKznGO3Oei8xscDH5PKcOOyCIOJk057CUumF5Ybb9IKdwjGFOL7VqxjHbn8vw4o/T9qn9mRHXHLYcFdoypn8eNjWvYwUfK1Em0hWoy0aj2BqLMWaoS2VYiLEBjNhlGYcbU6twgdpOcJR3+9Rdkv7Rj7Rf43k5s7lZtKTvOsw5+A2hfNhaIleOsVXh60Ja4dFNpGu9akgCw4uCJInGYplb77zzpLz2OPK9hQFXLRYtezQdng9aMj1qDi9Z7YrWzqtU69r4W2hJj4COEqQUK0lcq88kJGXFLW7ntxVidt7KirJTqxdv1uxSajULJr5tchFVd2Gp/g2SP2bJz7JEBPSRsu84pxxBZGREJaH9Dwt63cftQ7ZgYeI/5BuM5qB6xa4NsETq3V112A/czdNvRmb+JJ2qKg4uXkoiJk1SAZIQr4+ctOeiYQ7WpOp3mmyIFM4h6V4l1SP2fqEfYL0UFo+Xsk7Wtj5KRd62M/YypSwIedFSM0OlwJlSVYzjPW9o2L2xHuar5K3uubH2nX5qjKLuothBoWuddXUWlWuNs8RCRUTsSC1oG46gmHLXFFklLGypDjDQx6bZc5CCu0VvP/mnV2yKVFKg7TQGDBqtD2nXpjz0xINW2l7FqlddiLGG96OHJhl4X6O0SKI+zuLYsbe6M5Jbb5A43m3MF6eZKvtEZXq+jakNqFRuZF4eZH9ZVOlKackXY5akYlTEoHxhTeW7bu6N2tRoDcF511rbXGyLDUdMNwdU3wzS7rXLRYbnv6hZvZUfeb3ba/EnVtqQYJBIi4eaNQhx5Kh2htWk1S00GFg9c753nvljUjWpnTtKRJu8NYu6zPoGuKQ9exv+PaHB+mFziRGHiGn5w8p5toVh70dMDVpaViZgqEGeCaIgKyPTa+HGILIVCwcBVxj5VELBVuHUxHhsqKJd9HGRlx1bmVKzyW+n/cvw6sfXFlmD03x/koRrjlpFqHkZbkrsWElD4pvWlZTHmyUMHxPnxIiQKEwhx4Vo81sdxWW0kPJThxXuO44eajZ32cde47jh5qNnfZx17juOHmo2d9nHXuO44eajZ32cde47jh5qNnfZx17juOHmo2d9nHXuO44eanZ32cde47jh5qNnfZx17juOHmo2d9nHXuO44eajZ32cdcYGoPTegJGGb0TrFEWfLcldiwsmYAmoxeBST4gTifPixpbzOMKcYbOLQ0rOUpdcxjvZ9x3HDzUbO+zjr3HccPNRs77OOvcdxw81Gzvs469x3HDzUbO+zjr3HccPNRs77OOvcdxw81Gzvs469x3HDzUbO+zjr3HccPNTs77OOvcdxw81Gzvs469x3HDzUbO+zjr3HccPNRs77OOvcdxw81Gzvs465ENS+mePgMU5ovbaJM2O5M7HlZAOPXQLAkwoGLJ4lQw0kYOPlS2mHDBUPLxhCnm8ZytP/9k=\" >\r\n </div>';\r\n $posthtml .= '</footer>';\r\n\r\n return $posthtml;\r\n }", "public function admin_mail(){\n\n\t\t\t/*load model and get all data from tables*/\n\t\t\t$this->loadModel(\"Support\");\n\t\t\t$this->loadModel(\"MailDest\");\n\t\t\t$support=$this->Support->findById(1);\n\t\t\t$support=$support['Support'];\n\t\t\t$this->Paginator->settings = array(\n\t\t\t\t'MailDest' => array(\n\t\t\t\t'limit' => 30\n\t\t\t\t)\n\t\t\t);\n\t\t\t$this->Paginator->settings = $this->paginate;\n\t\t\t$dests = $this->Paginator->paginate('MailDest');\n\n\t\t\t/*set variables of page*/\n\t\t\t$this->set(compact('support','dests'));\n\t\t\t$this->set(\"title\", \"Configuration\");\n\t\t\t$this->set(\"legend\", \"Support email setting\");\n\t\t\t}", "function clsRecordemails()\r\n\r\n {\r\n\r\n\r\n\r\n global $FileName;\r\n\r\n $this->Visible = true;\r\n\r\n $this->Errors = new clsErrors();\r\n\r\n $this->ds = new clsemailsDataSource();\r\n\r\n $this->InsertAllowed = false;\r\n\r\n $this->UpdateAllowed = false;\r\n\r\n if($this->Visible)\r\n\r\n {\r\n\r\n $this->ComponentName = \"emails\";\r\n\r\n $this->HTMLFormAction = $FileName . \"?\" . CCAddParam(CCGetQueryString(\"QueryString\", \"\"), \"ccsForm\", $this->ComponentName);\r\n\r\n $CCSForm = CCGetFromGet(\"ccsForm\", \"\");\r\n\r\n $this->FormSubmitted = ($CCSForm == $this->ComponentName);\r\n\r\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\r\n\r\n $this->from_user_id = new clsControl(ccsLabel, \"from_user_id\", \"From User Id\", ccsText, \"\", CCGetRequestParam(\"from_user_id\", $Method));\r\n\r\n $this->emaildate = new clsControl(ccsLabel, \"emaildate\", \"date\", ccsText, \"\", CCGetRequestParam(\"emaildate\", $Method));\r\n\r\n $this->subject = new clsControl(ccsLabel, \"subject\", \"Subject\", ccsText, \"\", CCGetRequestParam(\"subject\", $Method));\r\n\r\n $this->message = new clsControl(ccsLabel, \"message\", \"Message\", ccsMemo, \"\", CCGetRequestParam(\"message\", $Method));\r\n\r\n $this->message->HTML = true;\r\n\r\n $this->Delete = new clsButton(\"Delete\");\r\n\r\n $this->cancel = new clsButton(\"cancel\");\r\n\r\n }\r\n\r\n }", "function bab_pm_initialize_mail()\n{\n // no need to check radio (checked in eop)\n @session_start();\n\n global $listAdminEmail, $headers, $mime_boundary, $bab_pm_PrefsTable, $bab_pm_SubscribersTable, $row, $rs; // $row (list), $rs (article) are global for bab_pm_data\n\n $bab_pm_radio = (!empty($_REQUEST['bab_pm_radio'])) ? gps('bab_pm_radio') : gps('radio');\n\n $sep = IS_WIN ? \"\\r\\n\" : \"\\n\";\n\n include_once txpath.'/publish.php'; // this line is required\n\n // get list data (this is so we only perform the query once)\n $listToEmail = (!empty($_REQUEST['listToEmail'])) ? gps('listToEmail') : gps('list');\n $row = safe_row('*', 'bab_pm_list_prefs', \"listname = '\".doSlash($listToEmail).\"'\");\n\n extract($row); // go ahead and do it because you need several of the variables in initialize\n\n // get article data here, so we only do query one time\n $artID = gps('artID');\n\n if (!empty($artID)) {\n // bypass if this is called from the send screen\n $rs = safe_row(\n \"*, unix_timestamp(Posted) as sPosted,\n unix_timestamp(LastMod) as sLastMod\",\n \"textpattern\",\n \"ID=\".doSlash($artID)\n );\n\n @populateArticleData($rs); // builds $thisarticle (for article context error)\n\n // if no subject line, use article title\n if (empty($listSubjectLine)) {\n $listSubjectLine = $rs['Title'];\n }\n }\n\n $newSubject = gps('subjectLine');\n $subjectLineSource = (!empty($newSubject)) ? 'newSubject' : 'listSubjectLine';\n\n $sendFrom = gps('sendFrom');\n $email_from = empty($sendFrom) ? $listAdminEmail : $sendFrom;\n\n $subject = parse($$subjectLineSource);\n\n // set TOTAL number of subscribers in list (for progress bar calculation)\n if (isset($listID)) {\n $map_table = safe_pfx('bab_pm_subscribers_list');\n $sub_table = safe_pfx('bab_pm_subscribers');\n\n $q = <<<EOSQL\nSELECT COUNT(*)\nFROM `$sub_table` as S inner join `$map_table` as MAP ON S.subscriberID=MAP.subscriber_id\nWHERE MAP.list_id = $listID\nEOSQL;\n $bab_pm_total = getThing($q);\n $bab_pm_total = $bab_pm_total ? $bab_pm_total : 0;\n } else {\n $bab_pm_total = 0;\n }\n\n // set mime boundary, so that only happens once\n $semi_rand = md5(time());\n $mime_boundary = \"Multipart_Boundary_x{$semi_rand}x\";\n\n $headers = array(\n 'From' => $email_from,\n 'Reply-To' => $email_from,\n 'X-Mailer' => 'Textpattern/Postmaster',\n );\n\n // Additional headers required if using regular mail.\n if (!class_exists('PHPMailer\\PHPMailer\\PHPMailer')) {\n $headers['MIME-Version'] = '1.0';\n $headers['Content-Transfer-Encoding'] = '8bit';\n $headers['Content-Type'] = 'text/plain';\n }\n\n // if use override is selected, then overwrite the listEmailForm variable\n if (gps('use_override')) {\n $listEmailForm = gps('override_form');\n }\n\n // set email template(s), so that only happens once\n $listEmailForm = trim($listEmailForm);\n\n if (!empty($listEmailForm)) {\n $theForm = fetch('Form','txp_form','name',\"$listEmailForm\");\n\n if ($theForm) {\n $template = bab_pm_extract($theForm);\n }\n }\n\n // test to confirm that we actually have a form, otherwise use default\n if (empty($template) || !$template) {\n$template['html'] = $template['text'] = $template['combined'] = <<<eop_form\n<txp:author /> has posted a new article at <txp:site_url />.\nRead article at: <txp:bab_pm_data display=\"link\" />\nUnsubscribe: <txp:bab_pm_unsubscribeLink />\neop_form;\n }\n\n //echo $template;\n\n // send all our initialized to bab_pm_bulk_mail\n bab_pm_bulk_mail($bab_pm_total, $bab_pm_radio, $subject, @$thisarticle, $template); // send all info to mail through function\n}", "function clsRecordemails()\r\n {\r\n\r\n global $FileName;\r\n $this->Visible = true;\r\n $this->Errors = new clsErrors();\r\n $this->ds = new clsemailsDataSource();\r\n $this->ReadAllowed = false;\r\n $this->InsertAllowed = false;\r\n $this->UpdateAllowed = false;\r\n $this->DeleteAllowed = false;\r\n $this->Visible = (CCSecurityAccessCheck(\"1;2\") == \"success\");\r\n if($this->Visible)\r\n {\r\n $this->ReadAllowed = CCUserInGroups(CCGetGroupID(), \"1;2\");\r\n $this->InsertAllowed = CCUserInGroups(CCGetGroupID(), \"1;2\");\r\n $this->ComponentName = \"emails\";\r\n $this->HTMLFormAction = $FileName . \"?\" . CCAddParam(CCGetQueryString(\"QueryString\", \"\"), \"ccsForm\", $this->ComponentName);\r\n $CCSForm = CCGetFromGet(\"ccsForm\", \"\");\r\n $this->FormSubmitted = ($CCSForm == $this->ComponentName);\r\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\r\n $this->message = new clsControl(ccsTextArea, \"message\", \"Message\", ccsMemo, \"\", CCGetRequestParam(\"message\", $Method));\r\n $this->Insert = new clsButton(\"Insert\");\r\n $this->item_id = new clsControl(ccsHidden, \"item_id\", \"Item Id\", ccsInteger, \"\", CCGetRequestParam(\"item_id\", $Method));\r\n $this->to_user_id = new clsControl(ccsHidden, \"to_user_id\", \"To User Id\", ccsInteger, \"\", CCGetRequestParam(\"to_user_id\", $Method));\r\n $this->from_user_id = new clsControl(ccsHidden, \"from_user_id\", \"From User Id\", ccsInteger, \"\", CCGetRequestParam(\"from_user_id\", $Method));\r\n $this->emaildate = new clsControl(ccsHidden, \"emaildate\", \"date\", ccsInteger, \"\", CCGetRequestParam(\"emaildate\", $Method));\r\n $this->subject = new clsControl(ccsHidden, \"subject\", \"Subject\", ccsText, \"\", CCGetRequestParam(\"subject\", $Method));\r\n if(!$this->FormSubmitted) {\r\n if(!strlen($this->from_user_id->GetValue()))\r\n $this->from_user_id->SetValue(CCGetUserID());\r\n if(!strlen($this->emaildate->GetValue()))\r\n $this->emaildate->SetValue(time());\r\n }\r\n }\r\n }", "function displayMailInformation()\n {\n // query saved mails of the account\n $savedMailsQuery = mysql_query(\"SELECT mail_id FROM argus_mails WHERE account_id = '\".$this -> accountId.\"' AND status = 'SAVED'\") or die(mysql_error());\n \n // query deleted mails of the account\n $deletedMailsQuery = mysql_query(\"SELECT mail_id FROM argus_mails WHERE account_id = '\".$this -> accountId.\"' AND status = 'DELETED'\") or die(mysql_error());\n \n // calculate the number of mails\n $savedMailsCount = mysql_num_rows($savedMailsQuery);\n $deletedMailsCount = mysql_num_rows($deletedMailsQuery);\n $totalMailsCount = $savedMailsCount + $deletedMailsCount;\n \n // display the MAIL information\n echo \"\n <p>Mail Information</p>\n <p id='box'>\n Saved Mails: \".$savedMailsCount.\"<br />\n Trash Mails: \".$deletedMailsCount.\"<br /><br>\n Total Mails: \".$totalMailsCount.\"<br />\n </p>\";\n \n return;\n }", "function mailer() {\n\t\tJRequest::checkToken() or die( JText::_( 'Invalid Token' ) );\n\t\t$email = JRequest::getVar('email');\n\t\t$title = JRequest::getVar('title');\n\t\t$from = array($email, $title);\n\t\t// set emailadres from the site\n\t\t$config =&JFactory::getConfig();\n\t\t// Get some variables from the component options\n\t\t$app = JFactory::getApplication('site');\n\t\t$componentParams = $app->getParams('com_mdcontact');\n\t\t$email_to = $componentParams->get('email_to');\n\t\t$subject = $componentParams->get('subject');\n\t\t$to = array($email_to, $email_to );\n\t\t// Set some variables for the email message\n\t\t$copy = JRequest::getVar('copy');;\n\t\t$body = JRequest::getVar('description');;\n\t\n\t\t// Invoke JMail Class\n\t\t$mailer = JFactory::getMailer();\n\t\n\t\t// Set sender array so that my name will show up neatly in your inbox\n\t\t$mailer->setSender($from);\n\t\t$mailer->addRecipient($to);\n\t\t// Set cc if copy is checked\n\t\tif ($copy=='1'){\n\t\t\t$mailer->addCC($from);\n\t\t\t}\n\t\t$mailer->setSubject($subject);\n\t\t$mailer->setBody($body);\n\t\t$send = $mailer->Send();\n\t\t// set the redirect page\n\t\t$redirect = JRoute::_('index.php?option=com_mdcontact&view=contact&task=add');\n\t\tif ( $send !== true ) {\n\t\t\tJFactory::getApplication()->enqueueMessage('Your message is not send, please try again later', 'error');\n\t\t\t$this->setRedirect( $redirect);\n\t\t} else {\n\t\tparent::apply();\n\t}\n\t}", "public function composeAction()\n\t{\n $contrib_obj = new Ep_User_Contributor();\n $mail=new Ep_Message_Ticket();\n \n //language array list\n $language_array=$this->_arrayDb->loadArrayv2(\"EP_LANGUAGES\", $this->_lang);\n natsort($language_array);\n $this->_view->ep_language_list=$language_array;\n \n $categories_array=$this->_arrayDb->loadArrayv2(\"EP_ARTICLE_CATEGORY\", $this->_lang);\n natsort($categories_array);\n $this->_view->ep_categories_list=$categories_array;\n \n $get_contacts=$mail->getContacts('client');\n foreach($get_contacts as $contact)\n {\n $contact['contact_name'] = trim($contact['contact_name']) ;\n $contact['email'] = trim($contact['email']) ;\n if($contact['contact_name']==NULL)\n $eml=explode(\"@\",$contact['email']);\n \n $clients_contacts[$contact['identifier']] = (($contact['contact_name']!=NULL) ? ($contact['contact_name']) : $eml[0]) . \" (\" . $contact['email'] . \")\" ;\n }\n /**Edit-Place Contacts**/\n $get_contrib_contacts=$mail->getContacts('contributor');\n foreach($get_contrib_contacts as $contact)\n {\n $contact['contact_name'] = trim($contact['contact_name']) ;\n $contact['email'] = trim($contact['email']) ;\n if($contact['contact_name']==NULL)\n $eml=explode(\"@\",$contact['email']);\n \n $Contributor_contacts[$contact['identifier']] = (($contact['contact_name']!=NULL) ? ($contact['contact_name']) : $eml[0]) . \" (\" . $contact['email'] . \")\" ;\n }\n /**Ep Contacts**/\n $get_EP_contacts=$mail->getEPContactsMaster('\"salesuser\",\"partner\",\"customercare\",\"facturation\"');\n if($get_EP_contacts!=\"Not Exists\")\n {\n foreach($get_EP_contacts as $contact)\n {\n $contact['contact_name'] = trim($contact['login_name']) ;\n $contact['email'] = trim($contact['email']) ;\n if($contact['contact_name']==NULL)\n $eml=explode(\"@\",$contact['email']);\n \n $EP_contacts[$contact['identifier']] = (($contact['contact_name']!=NULL) ? ($contact['contact_name']) : $eml[0]) . \" (\" . $contact['email'] . \")\" ;\n }\n }\n if($Contributor_contacts!=='Not Exists')\n $this->_view->Contributor_contacts=$Contributor_contacts;\n if($clients_contacts!=='Not Exists')\n $this->_view->Cients_contacts=$clients_contacts;\n if($get_EP_contacts!=='Not Exists')\n $this->_view->EP_contacts=$EP_contacts;\n\n $this->_view->sc_count=$contrib_obj->getContributorcount('senior');\n $this->_view->jc_count=$contrib_obj->getContributorcount('junior');\n $this->_view->jc0_count=$contrib_obj->getContributorcount('sub-junior');\n $this->_view->csc_count=$contrib_obj->getWritercount('senior');\n $this->_view->cjc_count=$contrib_obj->getWritercount('junior');\n \n $this->_view->sender= $this->user_id ;\n $this->_view->render(\"master_composemail\");\n\t}", "function mail()\n {\n\n\n }", "function formulaires_deleguer_traiter_dist() {\n // $mes_saisies = mes_saisies_film();\n \n // Traitement des données reçues du formulaire, \n // par mail par ex ou insertion dans une base\n // ...\n \n // S'il y a des erreurs, elles sont retournées au formulaire\n // return array('message_erreur'=>'Le film n\\'a pas été enregistré');\n \n // Sinon, le message de confirmation est envoyé\n return array('message_ok'=>'Le film a été enregistré');\n}", "public function arMarkupEmailListOnSend() {\n // Invoke javascript:markArListItemSent(updatedString) so that the button in the listing window has the new commId.\n $markArListItemSentText = \"\";\n foreach ($this->referencedWorks as $referencedWork) {\n $markArListItemSentText .= 'markArListItemSent(\"' . $referencedWork['arEmailWidgetId'] \n . '\", arEmailSentWidgetMarkupJS(' . $referencedWork['workId'] . ', ' . $this->commId() . ', ' . $this->recipientId() . ', \"' . $referencedWork['arEmailWidgetId'] . '\"));';\n }\n $script = \"<script type='text/javascript'>eval('\" . $markArListItemSentText . \"');</script>\\r\\n\";\n self::$debugger->bechoTrace('arMarkupEmailListOnSend script','', -1);\n echo $script;\n }", "private function sendEmails()\r\n {\r\n $user_body = \"Hi,<br>A new comment was added to the following article:\\n\";\r\n $user_body .= '<a href=\"http://'.$this->config->getModuleVar('common', 'site_url').'/id_article/'.$this->viewVar['article']['id_article'].'\">'.$this->viewVar['article']['title'].\"</a>\\n\";\r\n\r\n $_tmp_error = array();\r\n $user_text_body = strip_tags($user_body);\r\n\r\n $this->model->action( 'common', 'mailSendTo',\r\n array('charset' => $this->viewVar['charset'],\r\n 'bodyHtml' => & $user_body,\r\n 'bodyText' => & $user_text_body,\r\n 'to' => array(array('email' => '[email protected]',\r\n 'name' => 'Armand Turpel')),\r\n 'subject' => \"Open Publisher Blog Entry\",\r\n 'fromEmail' => '[email protected]',\r\n 'fromName' => '[email protected]',\r\n 'error' => & $_tmp_error\r\n ));\r\n\r\n }", "public function showMailOptions()\n\t{\n\t\t/**\n\t\t * @var $ilTabs ilTabsGUI\n\t\t * @var $lng ilLanguage\n\t\t * @var $rbacsystem ilRbacSystem\n\t\t */\n\t\tglobal $ilTabs, $lng, $rbacsystem;\n\n\t\tinclude_once 'Services/Mail/classes/class.ilMailGlobalServices.php';\n\t\tif(!$rbacsystem->checkAccess('internal_mail', ilMailGlobalServices::getMailObjectRefId()))\n\t\t{\n\t\t\t$this->ilias->raiseError($lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);\n\t\t}\n\t\t\n\t\t$lng->loadLanguageModule('mail');\n\t\t\n\t\t$this->__initSubTabs('showMailOptions');\n\t\t$ilTabs->activateTab('mail_settings');\n\n\t\t$this->setHeader();\n\n\t\t$this->initMailOptionsForm();\n\t\t$this->setMailOptionsValuesByDB();\n\n\t\t$this->tpl->setContent($this->form->getHTML());\n\t\t$this->tpl->show();\n\t}", "abstract protected function _sendMail ( );", "function Newsletters()\n\t{\n\t\t$this->PopupWindows[] = 'sendpreviewdisplay';\n\t\t$this->PopupWindows[] = 'checkspamdisplay';\n\t\t$this->PopupWindows[] = 'viewcompatibility';\n\t\t$this->LoadLanguageFile();\n\t}", "private function fromListSendMail($email_info = array(), $seeker_email_info = array(), $to = 'seeker')\r\t{\r\t\trequire_once 'Project/Code/1_Website/Applications/User_Account/Modules/mail/email.php';\r\t\t\r\t\t$from_email = \"[email protected]\";\r\t\t$from_name\t= \"Raymond\";\r\t\t$subject\t= \"New Lead from Looking for Eldercare\";\r\t\t\r\t\t\r\t\t$images = array(\r\t\t\t'banner'\t=> 'Project/Design/1_Website/Applications/Seeker/images/Eldercare-email-template-banner.png',\r\t\t\t'icon'\t\t=> 'Project/Design/1_Website/Applications/Seeker/images/Eldercare-email-template-icon.png',\r\t\t\t'logo'\t\t=> 'Project/Design/1_Website/Applications/Seeker/images/Eldercare-email-template-logo.png'\r\t\t);\r\t\t\r\t\tif ($to == 'seeker')\r\t\t{\r\t\t\t$view = new seekerView();\r\t\t\t$view->_set('email_to', $to);\r\t\t\t$view->_set('email_info', $seeker_email_info);\r\t\t\t\r\t\t\t$body = $view->displayEmailTemplate();\r\t\t\t\r\t\t\tforeach ($email_info['hcp'] as $hcp)\r\t\t\t{\r\t\t\t\temail::send_email($hcp['email'], $hcp['name'], $from_email, $from_name, $subject, $body, '', '', $images);\r\t\t\t}\r\t\t}\r\t\t\r\t\telse\r\t\t{\r\t\t\t$view = new seekerView();\r\t\t\t$view->_set('email_to', $to);\r\t\t\t\r\t\t\tinclude_once 'Project/Code/System/House_Type/house_types.php';\r\t\t\t$house_types = new house_types();\r\t\t\t//var_dump($house_types->selectHcpHouseTypeArray('17'));die;\r\t\t\t$counter = 0; //Manual looping to get the house types of each hcp\r\t\t\t$house_type_temp = '';\r\t\t\tforeach ($email_info['hcp'] as $hcp_info)\r\t\t\t{\r\t\t\t\tforeach ($house_types->selectHcpHouseTypeArray($hcp_info['hcp_id']) as $house_type)\r\t\t\t\t{\r\t\t\t\t\t$house_type_temp .= $house_type['house_type'].', '; \r\t\t\t\t}\r\t\t\t\t$house_type_temp = rtrim($house_type_temp, ', ');\r\t\t\t\t$email_info['hcp'][$counter]['house_type'] = $house_type_temp;\r\t\t\t\t$counter++;\r\t\t\t}\r\t\t\t\r\t\t\t$house_type_temp = '';\r\t\t\t\r\t\t\t$view->_set('email_info', $email_info['hcp']);\r\t\t\t$body = $view->displayEmailTemplate();\r\t\t\t\r\t\t\t$to_email\t= $seeker_email_info['seeker_email'];\r\t\t\t$to_name\t= $seeker_email_info['seeker_name'];\r\t\t\t\r\t\t\temail::send_email($to_email, $to_name, $from_email, $from_name, $subject, $body, '', '', $images);\r\t\t}\r\t\t\r\t}", "function mail_allothers($db_object,$common,$post_var,$user_id,$error_msg)\n\t{\n\t\twhile(list($kk,$vv)=@each($post_var))\n\t\t{\n\n\t\t$$kk=$vv;\n\t\n\t\t}\n\t\t\n\t$config=$common->prefix_table(\"config\");\n\t$appraisal_table=$common->prefix_table(\"multirater_appraisal\");\n \t$otherraters_table = $common->prefix_table(\"other_raters\");\n\t$user_table=$common->prefix_table(\"user_table\");\n\t$ratergroup_table = $common->prefix_table(\"rater_group\");\n\t$position_table = $common->prefix_table(\"position\");\n \t\n//groups to be sent mail...\n\t\n\t$mysql = \"select rater_group_name from $ratergroup_table\";\n\t$group_arr = $db_object->get_single_column($mysql);\n\n\t\n\t\tfor($i=0;$i<count($group_arr);$i++)\n\t\t{\n\t\t\t$group_var = $group_arr[$i];\n\t\t\n\t\t\t$name=$group_var;\t\n\n\t\t\t$$name=1;\n\t\t}\n\n// emails in OTHERS category will be sent in the multirater_appraisal.php\n\n\t\tfor($x=0;$x<count($user_id_all);$x++)\n\t\t{\n\t\t\t\n\t\t$appraisal_userid = $user_id_all[$x];\n\t \n//OCT 11 MAILS SHOULD BE SENT FROM HERE TO BOSS , BOSS' BOSS , SELF ONLY\n\n//boss id\n\t\t\n\t\t$boss_no = $common->immediate_boss($db_object,$appraisal_userid);\n\t\t\n\n//boss' boss id \n\t\t \n\t\t\n\t\t$boss_boss_no = $common->immediate_boss($db_object,$boss_no);\n\n\t//check with the group names...\n\t\t$current_user_id = \"\";\n\t\t\n\t\t$current_user_id[] = $appraisal_userid; //converting the current userid to array \n\n\t\t\tif($grp_boss == 1)\n\t\t\t{\n\t\t\t\tif($boss_no != 0)\n\t\t\t\t{\n\t\t\t\t$array_users4 = $boss_no;\n\t\t\t\t}\n\t\t\t\t\n\t\t\n\t\t\n\t\t\t}\n\t\t \n\t \t\tif($grp_topboss == 1)\n\t\t\t{\n\t\t\t\tif($boss_boss_no !=0)\n\t\t\t\t{\n\t\t\t\t$array_users7 = $boss_boss_no;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t \n\n\t\t$array_users = @array_merge($array_users4,$array_users7,$current_user_id);\t\n\t\n//all the persons who are supposed to recieve email is obtained...\n\t\n\t\t$array_users = @array_unique($array_users);\n\n\n//codings to send mail...\n\t\t\n\t\t$mysql=\"select masubject,mamessage from $config\";\n\t\n\t\t$rslt_arr=$db_object->get_a_line($mysql);\n\n\t\t\n\n\t\t$masubject=$rslt_arr[\"masubject\"];\n\t\t$mamessage=$rslt_arr[\"mamessage\"];\n\n//sender email details...\n\t\t$mysql = \"select username,email from $user_table where user_id = '$appraisal_userid'\";\n\n\t\t$sender_arr = $db_object->get_a_line($mysql);\n\t\t$user = $sender_arr[\"username\"];\n\t\t$from = $sender_arr[\"email\"];\n\n\t\t\n\t\t$user_idstring=implode(\",\",$array_users);\n\n\t\t$mysql = \"select email,username,user_id from $user_table \n\t\twhere user_id in ($user_idstring)\";\n\t\t\t\t\t\t\n\n\t\t$email_arr1 = $db_object->get_rsltset($mysql);\n\n\t\t$email_arr=array();\n\n\t\tfor($l=0;$l<count($email_arr1);$l++)\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$id=$email_arr1[$l][\"user_id\"];\n\t\t\t\t$email_arr[$id][\"user_id\"] = $email_arr1[$l][\"user_id\"];\n\t\t\t\t$email_arr[$id][\"email\"]=$email_arr1[$l][\"email\"];\n\t\t\t\t$email_arr[$id][\"username\"]=$email_arr1[$l][\"username\"];\n\t\t\t\t\n\t\t\t}\n\n\n\n\n\t\twhile (list($kk,$vv) = @each($array_users))\n\t\t\t{\n\t\t\t$useridToMail = $array_users[$kk];\n\t\t\t\n\t\t\t\n\t\t\t\tif($useridToMail != 0)\n\t\t\t\t{\n\n\t\t\t\n\t\t\t\t$email = $email_arr[$useridToMail][\"email\"];\n\n\t\t\t\t$username = $email_arr[$useridToMail][\"username\"];\t\n\t\t\t\t$rater_user_id = $email_arr[$useridToMail][\"user_id\"];\n\n\t\t\t\t$to = $email;\n\t\t\t\t\n\t\t\t\t$values[\"username\"]\t=$username;\n\t\t\t\t$values[\"user\"] \t= $user;\n\t\t\t\t$values[\"login_username\"] = $username;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$values[\"url\"]=$common->http_path.\"/index.php\";\n\n\t\t\t\t$message=$common->direct_replace($db_object,$mamessage,$values);\n\n\t\t\t\t//echo \"to $to<br> sub $masubject<br> mess $message<br> from $from<br><br>\";\n\n\t\t\t\t$sent=$common->send_mail($to,$masubject,$message,$from);\n \n//store the data of the persons to whom the mail has been sent\n\t\t\n\t\t\t\t$rater_id = $rater_user_id;\n\t\t\t\t$user_to_be_rated = $appraisal_userid;\n\t\t\t\t$rater_email = $email;\n\t\t\n//insert the data regarding the raters into the table...\n\t\t\t\t\n//if the user is the rater, it means that he belong to the self category...\t\t\t\n\t\t\t\t\n\t\t\t\tif($user_to_be_rated == $rater_id)\n\t\t\t\t{\n\t\t\t\t$group_belongingto = 'grp_self';\n\t\t\t\t}\n\t\t\t\telseif($rater_id == $boss_boss_no)\n\t\t\t\t{\n\t\t\t\t$group_belongingto = 'grp_topboss';\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t$group_belongingto = 'grp_boss';\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$mysql = \"insert into $otherraters_table set rater_userid = '$rater_id' , rater_email = '$rater_email' ,cur_userid = '$user_to_be_rated' , group_belonging = '$group_belongingto' ,date_rating_requested=now()\";\n\t\t\t\t\n\t\t\t\t$db_object->insert($mysql);\n\t\t\n\t\t\t\t//user_to_be_rated = \"\"; //from\n\t\t\t\t//rater_id = \"\"; //to\n\t\t\n\t\t\t\t}\n\t\t\n\n\t\t\t}\n\t\t\n\t\n\t\t\n\t}\n\t\tif($sent)\n\t\t{\n\t\t\n\t\t\techo $error_msg[\"cMultiraterAppraisalMail_sent\"];\n\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo $error_msg[\"cMultiraterAppraisalMail_fail\"];\n\t\t}\n\t\t\n\t\n}", "function main($conf, $piVars, $cObj, $pbarray) {\n\n\t\tif ($pbarray['numberOfMails'] == 0) {\n\t\t\treturn '';\n\t\t}\n\n\t\t// Config\n\t\t$this->conf = $conf;\n\t\t$this->piVars = $piVars;\n\t\t$this->cObj = $cObj;\n\t\t$this->pbarray = $pbarray;\n\t\t$this->markerArray = array();\n\t\t$this->pi_loadLL();\n\t\t$this->tmpl = array ('pagebrowser' => $this->cObj->getSubpart($this->cObj->fileResource($this->conf['template.']['pagebrowser']), '###POWERMAILFRONTEND_PAGEBROWSER###')); // Load HTML Template for pagebrowser\n\t\t$this->dynamicMarkers = t3lib_div::makeInstance('tx_powermailfrontend_dynamicmarkers'); // New object: TYPO3 dynamicmarker function\n\t\t$this->div = t3lib_div::makeInstance('tx_powermailfrontend_div'); // Create new instance for div class\n\n\t\t$this->markerArray['###CURRENT_MIN###'] = ($this->pbarray['pointer'] * $this->conf['list.']['perPage']) + 1; // Current page: From\n\t\t$this->markerArray['###CURRENT_MAX###'] = ($this->pbarray['pointer'] * $this->conf['list.']['perPage']) + $this->pbarray['numberOfMails_cur']; // Current page: up to\n\t\t$this->markerArray['###OVERALL###'] = $this->pbarray['numberOfMails']; // Overall addresses\n\n\t\tif (empty($conf['export.']['exportrestrict']) || ((!empty($conf['export.']['exportfeuser']) || !empty($conf['export.']['exportfegroup'])) && !$this->div->feuserHasAccess($row['uid'], $this->conf))) {\n\t\t\t// show export buttons if enabled\n\t\t\tif (!empty($conf['export.']['enableCsvExport'])) {\n\t\t\t\t// Export CSV Link\n\t\t\t\t$this->markerArray['###POWERMAILFE_EXPORTCSVLINKTEXT###'] = $this->pi_getLL('powermailfe_ll_export_csv_label', 'CSV-Export');\n\t\t\t\t$this->wrappedSubpartArray['###POWERMAILFE_EXPORTCSVLINK###'] = array('<a href=\"/index.php?eID=tx_powermailfrontend_export&format=csv&uid=' . $this->cObj->data['uid'] . '\">', '</a>');\n\t\t\t}\n\t\t\tif (!empty($conf['export.']['enableExcelExport'])) {\n\t\t\t\t// Export Excel Link\n\t\t\t\t$this->markerArray['###POWERMAILFE_EXPORTEXCELLINKTEXT###'] = $this->pi_getLL('powermailfe_ll_export_excel_label', 'EXCEL-Export');\n\t\t\t\t$this->wrappedSubpartArray['###POWERMAILFE_EXPORTEXCELLINK###'] = array('<a href=\"/index.php?eID=tx_powermailfrontend_export&format=xls&uid=' . $this->cObj->data['uid'] . '\">', '</a>');\n\t\t\t}\n\t\t}\n\n\t\tif ($this->conf['list.']['perPage'] < $this->pbarray['numberOfMails']) {\n\t\t\tif (t3lib_extMgm::isLoaded('pagebrowse', 0)) {\n\t\t\t\t$numberOfPages = intval($this->pbarray['numberOfMails'] / $this->conf['list.']['perPage']) + (($this->pbarray['numberOfMails'] % $this->conf['list.']['perPage']) == 0 ? 0 : 1);\n\t\t\t\t$pagebrowseConf = array (\n\t\t\t\t\t'includeLibs' => 'EXT:pagebrowse/pi1/class.tx_pagebrowse_pi1.php',\n\t\t\t\t\t'userFunc' => 'tx_pagebrowse_pi1->main',\n\t\t\t\t\t'numberOfPages' => $numberOfPages,\n\t\t\t\t\t'pageParameterName' => $this->prefixId . '|pointer',\n\t\t\t\t\t'templateFile' => $this->conf['pagebrowse.']['templateFile'],\n\t\t\t\t\t'pagesBefore' => $this->conf['pagebrowse.']['pagesBefore'],\n\t\t\t\t\t'pagesAfter' => $this->conf['pagebrowse.']['pagesAfter'],\n\t\t\t\t\t'enableMorePages' => $this->conf['pagebrowse.']['enableMorePages'],\n\t\t\t\t\t'enableLessPages' => $this->conf['pagebrowse.']['enableLessPages'],\n\t\t\t\t\t'numberOfLinks' => $this->conf['pagebrowse.']['numberOfLinks']\n\t\t\t\t);\n\t\t\t\t$pagebrowseCObj = t3lib_div::makeInstance('tslib_cObj');\n\t\t\t\t$pagebrowseCObj->start(array(), '');\n\t\t\t\t$this->markerArray['###PAGELINKS###'] = $pagebrowseCObj->cObjGetSingle('USER', $pagebrowseConf);\n\t\t\t} else {\n\t\t\t\t$this->conf['pagebrowser.']['special.']['userFunc.'] = $this->pbarray; // config for pagebrowser userfunc\n\t\t\t\t$this->markerArray['###PAGELINKS###'] = $this->cObj->cObjGetSingle($this->conf['pagebrowser'], $this->conf['pagebrowser.']);\n\t\t\t}\n\t\t}\n\t\t$this->content = $this->cObj->substituteMarkerArrayCached($this->tmpl['pagebrowser'], $this->markerArray, array(), $this->wrappedSubpartArray); // substitute Marker in Template\n\t\t$this->content = $this->dynamicMarkers->main($this->conf, $this->cObj, $this->content); // Fill dynamic locallang or typoscript markers\n\t\t$this->content = preg_replace(\"|###.*?###|i\",\"\",$this->content); // Finally clear not filled markers\n\t\treturn $this->content;\n }", "function MyApp_Mail_Init()\n {\n if ($this->Mail)\n {\n $this->MailInfo=$this->ReadPHPArray($this->MailSetup);\n $unit=$this->Unit();\n if (!empty($unit[ \"ID\" ]))\n {\n foreach ($this->Unit2MailInfo as $key)\n {\n if (empty($this->MailInfo[ $key ])) { $this->MailInfo[ $key ]=\"\"; }\n \n if (!empty($unit[ $key ]))\n {\n $this->MailInfo[ $key ]=$unit[ $key ];\n }\n }\n }\n $event=array();\n if ($this->CGI_GETint(\"Event\")>0)\n {\n $event=$this->Event();\n }\n\n if (!empty($event[ \"ID\" ]))\n {\n foreach ($this->Event2MailInfo as $key)\n {\n if (empty($this->MailInfo[ $key ])) { $this->MailInfo[ $key ]=\"\"; }\n \n if (!empty($event[ $key ]))\n {\n $this->MailInfo[ $key ]=$event[ $key ];\n }\n }\n }\n }\n }", "private static function mail()\n {\n $files = ['Mail', 'Mailable', 'SMTP'];\n $folder = static::$root.'Mailing'.'/';\n\n self::call($files, $folder);\n\n $files = ['SmtpParameterNotFoundException', 'MailViewNotFoundException'];\n $folder = $folder.'Exceptions/';\n\n self::call($files, $folder);\n }", "public function sendMail()\n {\n $config = JFactory::getConfig();\n $mailer = JFactory::getMailer();\n $mailer->setSender($config->get('mailfrom'));\n\n\n\n $recipient = array('[email protected]', '[email protected]');\n $mailer->addRecipient($recipient);\n\n $mailer->setSubject('Registrazione supporting partner '.$config->get('sitename'));\n $mailer->isHTML(true);\n\n $body = '<h2>Dettagli account</h2>';\n $body .=\"Name: \" . $this->_parametri['name'] . \", <br>\";\n $body .=\"Username: \" . $this->_parametri['username'] . \", <br>\";\n $body .=\"Email: '\" . $this->_parametri['email'] . \", \";\n $body .=\"<br><br>\";\n\n $body .=\"<a \n href='http://framework.project-caress.eu/administrator/index.php?option=com_wizard' \n target='_blank'>Accedi al backend per abilitarlo</a>\";\n\n\n\n http://framework.project-caress.eu/administrator/index.php?option=com_wizard\n\n $mailer->setBody($body);\n\n if (!$mailer->Send())\n throw new RuntimeException('Error sending mail', E_USER_ERROR);\n\n }", "public function sendOrdersOverTime()\n {\n $subject = '[QS-IMS MAILER] DANH SÁCH ĐIỀU ĐỘNG QUÁ HẠN KẾT THÚC ĐIỀU ĐỘNG';\n $mail = array();\n $sMail = '';\n $to = array();\n $i = 0;\n\n $sql = sprintf('\n SELECT\n qsiforms.*,\n ddtb.*,\n qsusers.*,\n ODanhSachNhanVien.Email AS Email2\n FROM OLichThietBi AS ddtb\n INNER JOIN qsiforms ON qsiforms.IFID = ddtb.IFID_M706\n INNER JOIN qsusers ON qsusers.UID = qsiforms.UID\n INNER JOIN ODanhSachNhanVien ON qsusers.UID = ODanhSachNhanVien.Ref_TenTruyCap\n WHERE\n qsiforms.Status = 2\n and qsusers.isActive = 1\n and ddtb.NgayKetThuc <= %1$s\n ', $this->_db->quote(date('Y-m-d'))\n );\n $dataSql = $this->_db->fetchAll($sql);\n\n // $this->setToList($dataSql);\n\n if(count($dataSql) && count($this->to))\n {\n foreach($dataSql as $item)\n {\n if(!isset($to[$item->EMail]))\n {\n $to[$item->EMail] = $item->UserName;\n }\n\n if(!isset($mail[$item->EMail]))\n {\n $mail[$item->EMail] = array();\n }\n\n $mail[$item->EMail][$i]['SoPhieu'] = $item->SoPhieu;\n $mail[$item->EMail][$i]['NgayBatDau'] = $item->NgayBatDau;\n $mail[$item->EMail][$i]['NgayKetThuc'] = $item->NgayKetThuc;\n $mail[$item->EMail][$i]['DeptID'] = $item->DeptID;\n $mail[$item->EMail][$i]['IFID'] = $item->IFID_M706;\n $i++;\n }\n\n if(count($mail))\n {\n foreach($to as $email=>$user)\n {\n if(isset($mail[$email]))\n {\n $sMail = '';\n $sMail .= '<h1>DANH SÁCH ĐIỀU ĐỘNG ĐẾN HẠN KẾT THÚC ĐIỀU ĐỘNG</h1>';\n $sMail .= '<br/>';\n $sMail .= '<table cellpadding=\"0\" cellspacing=\"0\" border=\"1\">';\n $sMail .= '<tr>';\n $sMail .= '<th> SỐ PHIẾU </th>';\n $sMail .= '<th> NGÀY BẮT ĐẦU </th>';\n $sMail .= '<th> NGÀY KẾT THÚC </th>';\n $sMail .= '</tr>';\n\n foreach($mail[$email] as $item)\n {\n $sMail .= '<tr>';\n $sMail .= '<td><a target=\"_blank\" href=\"http://'.$this->domain.'/user/form/edit?ifid='.$item['IFID'].'&deptid='.$item['DeptID'].'\">'.$item['SoPhieu'].'</a></td>';\n $sMail .= '<td>' . Qss_Lib_Date::mysqltodisplay($item->NgayBatDau) . '</td>';\n $sMail .= '<td>' . Qss_Lib_Date::mysqltodisplay($item->NgayKetThuc) . '</td>';\n $sMail .= '</tr>';\n }\n\n $sMail .= '</table>';\n $sMail .= '<br/>';\n $sMail .= '<p style=\"text-align:right\" > <b>QS-IMS Mailer</b> </p>';\n $this->_sendMail($subject, array($email=>$user), $sMail, $this->cc);\n }\n }\n }\n }\n\n }", "function email_print_users_to_send($users, $nosenders=false, $options=NULL) {\n\n\tglobal $CFG;\n\n\t$url = '';\n\tif ( $options ) {\n\t\t$url = email_build_url($options);\n\t}\n\n\n\techo '<tr valign=\"middle\">\n <td class=\"legendmail\">\n <b>'.get_string('for', 'block_email_list'). '\n :\n </b>\n </td>\n <td class=\"inputmail\">';\n\n if ( ! empty ( $users ) ) {\n\n \techo '<div id=\"to\">';\n\n \tforeach ( $users as $userid ) {\n \t\techo '<input type=\"hidden\" value=\"'.$userid.'\" name=\"to[]\" />';\n \t}\n\n \techo '</div>';\n\n \techo '<textarea id=\"textareato\" class=\"textareacontacts\" name=\"to\" cols=\"65\" rows=\"3\" disabled=\"true\" multiple=\"multiple\">';\n\n \tforeach ( $users as $userid ) {\n \t\techo fullname( get_record('user', 'id', $userid) ).', ';\n \t}\n\n \techo '</textarea>';\n }\n\n \techo '</td><td class=\"extrabutton\">';\n\n\tlink_to_popup_window( '/blocks/email_list/email/participants.php?'.$url, 'participants', get_string('participants', 'block_email_list').' ...',\n 470, 520, get_string('participants', 'block_email_list') );\n\n echo '</td></tr>';\n echo '<tr valign=\"middle\">\n \t\t\t<td class=\"legendmail\">\n \t\t\t\t<div id=\"tdcc\"></div>\n \t\t\t</td>\n \t\t\t<td><div id=\"fortextareacc\"></div><div id=\"cc\"></div><div id=\"url\">'.$urltoaddcc.'<span id=\"urltxt\">&#160;|&#160;</span>'.$urltoaddbcc.'</div></td><td><div id=\"buttoncc\"></div></td></tr>';\n echo '<tr valign=\"middle\"><td class=\"legendmail\"><div id=\"tdbcc\"></div></td><td><div id=\"fortextareabcc\"></div><div id=\"bcc\"></div></td><td><div id=\"buttonbcc\"></div></td>';\n\n\n}", "private function mailToevoegenAction()\n {\n $this->model->maakMail();\n $this->model->foutGoedMelding('success', '<strong>Gelukt!</strong> E-mail adres is toegevoed. <span class=\"glyphicon glyphicon-saved\"></span>');\n $this->model->setLog('Mail toevoegen', 'Gelukt');\n $this->forward('klant', 'admin');\n }", "public function actionSendMail()\n {\n\n // trova la videoconferenza e gli utenti collegati\n $videoconfId = Yii::$app->request->get('id');\n\n $videoconference = Videoconf::findOne($videoconfId);\n if ($videoconference) {\n $collegati = $videoconference->getVideoconfUsersMms()->all();\n if (\\is_array($collegati)) {\n foreach ($collegati as $u) {\n $sent = EmailUtil::sendEmailPartecipant($videoconference, $u->user_id);\n }\n }\n }\n }", "public function reservationEmail (){\n$mail = new PHPMailer(true);\n\ntry {\n //Server settings\n // $mail->SMTPDebug = SMTP::DEBUG_SERVER; //Enable verbose debug output\n $mail->isSMTP(); //Send using SMTP\n $mail->Host = 'smtp.mailtrap.io'; //Set the SMTP server to send through\n $mail->SMTPAuth = true; //Enable SMTP authentication\n $mail->Username = '754bcbdddf46fa'; //SMTP username\n $mail->Password = '43f5df2046fcf2'; //SMTP password\n $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; //Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged\n $mail->Port = 2525;\n $mail->CharSet = 'UTF-8';//TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above\n\n //Recipients\n $mail->setFrom('[email protected]', 'Mailer');\n $mail->addAddress('[email protected]', 'Administrateur Annonces Games.com');\n $mail->addReplyTo('[email protected]', 'Annonces Administration');\n\n\n $BD = new PDO(\"mysql:host=localhost;dbname=gites;charset=utf8\",\"root\", \"\");\n //Fonction static de la classe PDO pour debug la connexion en cas d'erreur\n $BD->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n $sql = \"SELECT * FROM type WHERE id_gite = ?\";\n// 3 Creation d'une requète péparée avec la fonction prepare de PDO qui execute la requète SQL\n $requete_insertion = $BD->prepare($sql);\n//Passage du ? à la valeur de $_GET['id_gite']\n $id = $_GET['id_gite'];\n// 4 je bind (lier) les parametres\n $requete_insertion->bindParam(1, $id);\n// 5 j'excute la requete\n $requete_insertion->execute();\n// 6 j'affiche mon element avec fetch (pour charger les resultats)\n\n\n\n //Content\n $mail->isHTML(true); //Set email format to HTML\n $mail->Subject = 'réserver votre gite';\n while ($BD = $requete_insertion->fetch()) {\n //Stock de l'id dans une variable\n $emailId = $BD['id_gite'];\n //Url du liens de validation\n $url = \"http://localhost/Gites3/confirmer_reservation?id_gite=$emailId\";\n $mail->Body = '\n\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset=\"UTF-8\">\n <meta http-equiv=\"Content-Type\" content=\"text/html\">\n <title>Votre reservation chez lebongite.com</title>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n </head>\n <body style=\"color: #6cc3d5;\">\n <div style=\"color: #6cc3d5; padding: 20px;\">\n <h3 style=\"color: #1D2326\">Le bon gite.COM</h3>\n \n <p>Vous avez déposé une demande de reservation (ET C BIEN) avec le liens suivant</p><br />\n <p>Recapitulatif de votre commande</p>\n <p>Nom du gite :<b style=\"color: #2c4f56\">' . $BD['nom'] . '</b></p>\n <p>Description du gite :<b style=\"color: #2c4f56\"> ' . $BD['description'] . '</b></p>\n <p>Image du gite :<img src=\"https://www.leboupere.fr/medias/2016/02/Logo-gite.png\"/></p>\n <p>Prix par semaine du gite :<b style=\"color: #2c4f56\"> ' . $BD['prix'] . ' €</b></p>\n <p>Nombre de chambre :<b style=\"color: #2c4f56\"> ' . $BD['nbr_chambre'] . '</b></p>\n <p>Nombre de salle de bain :<b style=\"color: #2c4f56\"> ' . $BD['nbr_sdb'] . '</b></p>\n <p>Zone géographique :<b style=\"color: #2c4f56\"> ' . $BD['zone'] . '</b></p>\n <p>Date arrivée :<b style=\"color: #2c4f56\"> ' . $BD['date_arrivee'] . '</b></p>\n <p>Date départ :<b style=\"color: #2c4f56\"> ' . $BD['date_depart'] . '</b></p>\n <p>Toutes fois vous avez la possibilité d\\'annuler ou de confirmer votre commande</p>\n <br /><br />\n \n <a href=\"' . $url . '\" style=\"background-color: darkred; color: #F0F1F2; padding: 20px; text-decoration: none;\">Confimer la reservation de votre gite</a><br />\n \n ';\n }\n $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';\n\n $mail->send();\n echo 'Message has been sent';\n} catch (Exception $e) {\n echo \"Message could not be sent. Mailer Error: {$mail->ErrorInfo}\";\n}\n}", "function clsRecordemails1()\r\n {\r\n\r\n global $FileName;\r\n $this->Visible = true;\r\n $this->Errors = new clsErrors();\r\n $this->ds = new clsemails1DataSource();\r\n $this->ReadAllowed = false;\r\n $this->InsertAllowed = false;\r\n $this->UpdateAllowed = false;\r\n $this->DeleteAllowed = false;\r\n $this->Visible = (CCSecurityAccessCheck(\"1;2\") == \"success\");\r\n if($this->Visible)\r\n {\r\n $this->ReadAllowed = CCUserInGroups(CCGetGroupID(), \"1;2\");\r\n $this->InsertAllowed = CCUserInGroups(CCGetGroupID(), \"1;2\");\r\n $this->ComponentName = \"emails1\";\r\n $this->HTMLFormAction = $FileName . \"?\" . CCAddParam(CCGetQueryString(\"QueryString\", \"\"), \"ccsForm\", $this->ComponentName);\r\n $CCSForm = CCGetFromGet(\"ccsForm\", \"\");\r\n $this->FormSubmitted = ($CCSForm == $this->ComponentName);\r\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\r\n $this->subject = new clsControl(ccsTextBox, \"subject\", \"Amount\", ccsText, \"\", CCGetRequestParam(\"subject\", $Method));\r\n $this->subject->Required = true;\r\n $this->message = new clsControl(ccsTextArea, \"message\", \"Message\", ccsMemo, \"\", CCGetRequestParam(\"message\", $Method));\r\n $this->Insert = new clsButton(\"Insert\");\r\n $this->item_id = new clsControl(ccsHidden, \"item_id\", \"Item Id\", ccsInteger, \"\", CCGetRequestParam(\"item_id\", $Method));\r\n $this->to_user_id = new clsControl(ccsHidden, \"to_user_id\", \"To User Id\", ccsInteger, \"\", CCGetRequestParam(\"to_user_id\", $Method));\r\n $this->from_user_id = new clsControl(ccsHidden, \"from_user_id\", \"From User Id\", ccsInteger, \"\", CCGetRequestParam(\"from_user_id\", $Method));\r\n $this->emaildate = new clsControl(ccsHidden, \"emaildate\", \"date\", ccsInteger, \"\", CCGetRequestParam(\"emaildate\", $Method));\r\n if(!$this->FormSubmitted) {\r\n if(!strlen($this->subject->GetValue()))\r\n $this->subject->SetValue(0.00);\r\n }\r\n }\r\n }", "public function emailtemplateAction(){\n\n $this->_helper->layout->setLayout('popup'); \n\n\t $this->view->emailtemplate = $this->ModelObj->fetchemailtemplate(array('notification_id'=>$this->Request['notification_id'])); \n\n\t $this->view->templatename = ($this->Request['notification_name']!='') ? $this->Request['notification_name'] : '';\n\n }", "public function run()\n {\n // Запрос на подтверждение email участника\n Template::create([\n 'name' => Template::PARTICIPANT_EMAIL_CONFIRMATION,\n 'subject' => '«7 шагов к медитации» – подтверждение адреса электронной почты',\n 'sender' => [\n 'email' => '[email protected]',\n 'name' => '7steps',\n ],\n 'body' => trim(file_get_contents(__DIR__ . '/templates/email/' . Template::PARTICIPANT_EMAIL_CONFIRMATION . '.html')),\n ]);\n\n Template::create([\n 'name' => Template::PARTICIPANT_GRADUATE,\n 'subject' => 'Спасибо за участие!',\n 'sender' => [\n 'email' => '[email protected]',\n 'name' => '7steps',\n ],\n 'body' => trim(file_get_contents(__DIR__ . '/templates/email/' . Template::PARTICIPANT_GRADUATE . '.html')),\n ]);\n\n // Оповещение участника об ответе куратора\n Template::create([\n 'name' => Template::PARTICIPANT_CURATOR_REPLIED,\n 'subject' => 'Новый ответ на ваш комментарий',\n 'sender' => [\n 'email' => '[email protected]',\n 'name' => '7steps',\n ],\n 'body' => trim(file_get_contents(__DIR__ . '/templates/email/' . Template::PARTICIPANT_CURATOR_REPLIED . '.html')),\n ]);\n\n // Письмо ремайндер щаг 4\n Template::create([\n 'name' => Template::PARTICIPANT_REMIND_STEP_4,\n 'subject' => 'Нужна помощь?',\n 'sender' => [\n 'email' => '[email protected]',\n 'name' => '7steps',\n ],\n 'body' => trim(file_get_contents(__DIR__ . '/templates/email/' . Template::PARTICIPANT_REMIND_STEP_4 . '.html')),\n ]);\n // Письмо ремайндер щаг 5\n Template::create([\n 'name' => Template::PARTICIPANT_REMIND_STEP_5,\n 'subject' => 'Как проходят ваши «дни осознанности»?',\n 'sender' => [\n 'email' => '[email protected]',\n 'name' => '7steps',\n ],\n 'body' => trim(file_get_contents(__DIR__ . '/templates/email/' . Template::PARTICIPANT_REMIND_STEP_5 . '.html')),\n ]);\n // Письмо ремайндер щаг 5\n Template::create([\n 'name' => Template::PARTICIPANT_REMIND_STEP_6,\n 'subject' => 'Возвращайтесь!',\n 'sender' => [\n 'email' => '[email protected]',\n 'name' => '7steps',\n ],\n 'body' => trim(file_get_contents(__DIR__ . '/templates/email/' . Template::PARTICIPANT_REMIND_STEP_6 . '.html')),\n ]);\n // Письмо ремайндер щаг 5\n Template::create([\n 'name' => Template::PARTICIPANT_REMIND_STEP_7,\n 'subject' => 'Не сдавайтесь! Вы почти у цели.',\n 'sender' => [\n 'email' => '[email protected]',\n 'name' => '7steps',\n ],\n 'body' => trim(file_get_contents(__DIR__ . '/templates/email/' . Template::PARTICIPANT_REMIND_STEP_7 . '.html')),\n ]);\n }", "function offerHtml() {\n\t\t$this->set('title_for_layout', 'Advertiser Offer Email');\n\t\tif(isset($this->data)) {\n\t\t\t$advertisers = array_flip($this->data['Cronemail']['arr']);\n\t\t\tksort($advertisers);\n\t\t\t$this->set('advertiser',$advertisers);\n\t\t} else {\n\t\t\t$this->redirect(array('action'=>'offerEmail'));\n\t\t}\n\t}", "function offerEmail() {\n\t\t$this->set('title_for_layout', 'Advertiser Offer Email');\n\t\t$this->set('advertiserList',$this->common->getAdvertiserProfileAll());\n\t}", "function smtpmailer($para, $de, $de_nome, $assunto, $corpo) { \n\t\t\t\tglobal $error;\n\t\t\t\n\t\t\t\t$nome_completo = $Nome.\"\".$Sobrenome;\n\t\t\t\t$mail = new PHPMailer(true);\n\t\t\t\t$mail->CharSet = 'UTF-8';\n\t\t\t\t$phpmail->Body = utf8_decode($body);\n\t\t\t\t$mail->IsHTML(true);\n\t\t\t\t$mail->IsSMTP();\t\t// Ativar SMTP\n\t\t\t\t$mail->SMTPDebug = 0;\t\t// Debugar: 1 = erros e mensagens, 2 = mensagens apenas\n\t\t\t\t$mail->SMTPAuth = true;\t\t// Autenticação ativada\n\t\t\t\t$mail->SMTPSecure = 'tls';\t// SSL REQUERIDO pelo GMail\n\t\t\t\t$mail->Host = 'smtp.gmail.com';\t// SMTP utilizado\n\t\t\t\t$mail->Port = 587; \t\t// A porta 587 deverá estar aberta em seu servidor\n\t\t\t\t$mail->Username = GUSER;\n\t\t\t\t$mail->Password = GPWD;\n\t\t\t\t$mail->From = \"[email protected]\";\n\t\t\t\t$mail->FromName = \"Kepler\";\n\t\t\t\t$mail->Subject = $assunto;\n\t\t\t\t$mail->Body = $corpo;\n\t\t\t\t$mail->AddEmbeddedImage('imagens/logo.png', 'logoimg');\n\n\t\t\t\t$mail->Body = '\n\t\t\t\t\t\t\t\t\t<style type = \"text/css\">\n\t\t\t\t\t\t\t\t\t#mae{\n\t\t\t\t\t\t\t\t\t\tbackground-color: white;\n\t\t\t\t\t\t\t\t\t\twidth:700px;\n\t\t\t\t\t\t\t\t\t\theight:600px;\n\t\t\t\t\t\t\t\t\t\tborder-style: none;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t#topo{\n\t\t\t\t\t\t\t\t\t\tbackground-color: black;\n\t\t\t\t\t\t\t\t\t\twidth: 700px;\n\t\t\t\t\t\t\t\t\t\theight: 72px;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t#corpo_email{\n\t\t\t\t\t\t\t\t\t\twidth: 700px;\n\t\t\t\t\t\t\t\t\t\tmargin-left: 60px;\n\t\t\t\t\t\t\t\t\t\tmargin-top: 50px;\n\t\t\t\t\t\t\t\t\t\ttext-align: left;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t.botao{\n\t\t\t\t\t\t\t\t\t\tbackground-color: #4CAF50;\n\t\t\t\t\t\t\t\t\t\tborder: none;\n\t\t\t\t\t\t\t\t\t\tcolor: white;\n\t\t\t\t\t\t\t\t\t\tpadding: 15px 32px;\n\t\t\t\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t\t\t\t\ttext-decoration: none;\n\t\t\t\t\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\t\t\t\t\tfont-size: 16px;\n\t\t\t\t\t\t\t\t\t\tmargin: 4px 2px;\n\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t#link{\n\t\t\t\t\t\t\t\t\t\tfloat: center;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t</style>\n\t\t\t\t\t\t\t\t<html lang = \"pt-br\">\n\t\t\t\t\t\t\t\t<head>\n\t\t\t\t\t\t\t\t\t<meta charset = \"utf-8\">\n\t\t\t\t\t\t\t\t</head>\n\t\t\t\t\t\t\t\t<center>\n\t\t\t\t\t\t\t\t\talçfjkaslçdf\n\t\t\t\t\t\t\t\t</center>\n\t\t\t\t\t\t\t\t</html>\n\t\t\t\t\t\t\t\t';\n\t\t\t\t$phpmail->Body = utf8_decode($body);\n\t\t\t\t$mail->AddAddress($para);\n\t\t\t\t$mail->Send();\t\t\t\n\t\t\t}", "public function routeNotificationForMail()\n {\n \t//Por defecto, el email que se utiliza es el atributo llamado 'email' que contiene el modelo, en este caso, Job. Vamos a utilizar el email de Intelix \n return Company::all()->first()->email_jobs;\n }", "public function traveler_cancelation_mail_send($tourwise_id, $traveler_id_arr){\n $sq_tourwise = mysql_fetch_assoc(mysql_query(\"select * from tourwise_traveler_details where id='$tourwise_id'\"));\n $date = $sq_tourwise['form_date'];\n $yr = explode(\"-\", $date);\n $year =$yr[0];\n $sq_personal_info = mysql_fetch_assoc(mysql_query(\"select * from traveler_personal_info where tourwise_traveler_id='$tourwise_id'\"));\n $sq_tour = mysql_fetch_assoc(mysql_query(\"select * from tour_master where tour_id='$sq_tourwise[tour_id]'\"));\n $sq_tour_group = mysql_fetch_assoc(mysql_query(\"select * from tour_groups where group_id='$sq_tourwise[tour_group_id]'\"));\n\n $sq_traveler = mysql_fetch_assoc(mysql_query(\"select * from travelers_details where traveler_group_id='$sq_tourwise[traveler_group_id]'\"));\n\n $tour_group = date('d-m-Y', strtotime($sq_tour_group['from_date'])).' To '.date('d-m-Y', strtotime($sq_tour_group['to_date']));\n\n $content1 = '';\n\n for($i=0; $i<sizeof($traveler_id_arr); $i++){\n $sq_traveler_info = mysql_fetch_assoc(mysql_query(\"select * from travelers_details where traveler_id='$traveler_id_arr[$i]'\"));\n $content1 .= '\n <tr>\n <td style=\"text-align:left;border: 1px solid #888888;\">'.($i+1).'</td> <td style=\"text-align:left;border: 1px solid #888888;\">'.$sq_traveler_info['first_name'].' '.$sq_traveler_info['last_name'].'</td> \n </tr> \n '; \n }\n\n global $mail_em_style, $mail_font_family, $mail_strong_style, $mail_color;\n $content = '\n <tr>\n <table width=\"85%\" cellspacing=\"0\" cellpadding=\"5\" style=\"color: #888888;border: 1px solid #888888;margin: 0px auto;margin-top:20px; min-width: 100%;\" role=\"presentation\">\n <tr>\n <td style=\"text-align:left;border: 1px solid #888888;\">Tour Name</td> <td style=\"text-align:left;border: 1px solid #888888;\">'.$sq_tour[tour_name].'</td> \n <tr>\n <td style=\"text-align:left;border: 1px solid #888888;\">Tour Date</td> <td style=\"text-align:left;border: 1px solid #888888;\">'.$tour_group .'</td> \n </tr> \n </tr> \n </table>\n </tr>\n <tr>\n <table width=\"85%\" cellspacing=\"0\" cellpadding=\"5\" style=\"color: #888888;border: 1px solid #888888;margin: 0px auto;margin-top:20px; min-width: 100%;\" role=\"presentation\">\n <tr>\n <th style=\"border: 1px solid #888888;text-align: left;background: #ddd;color: #888888;\">Sr.No</th>\n <th style=\"border: 1px solid #888888;text-align: left;background: #ddd;color: #888888;\">Guest Name\n </th>\n </tr>\n \n '.$content1.'\n \n </table>\n</tr> \n ';\n $subject = 'Tour Cancellation Confirmation ('.get_group_booking_id($tourwise_id,$year).' ,'.$sq_tour['tour_name'].' )';\n global $model;\n $model->app_email_send('26',$sq_traveler['first_name'],$sq_personal_info['email_id'], $content, $subject);\n \n}", "function smtpmailer($para, $de, $de_nome, $assunto, $corpo) { \n\t\t\t\tglobal $error;\n\t\t\t\ttry{\n\t\t\t\t\trequire_once(\"PHPMailer/src/Exception.php\");\n\t\t\t\t\trequire_once(\"PHPMailer/src/PHPMailer.php\");\n\t\t\t\t\trequire_once(\"PHPMailer/src/SMTP.php\");\n\t\t\t\t\t$mail = new PHPMailer(true);\n\t\t\t\t\t$mail->CharSet = 'UTF-8';\n\t\t\t\t\t$phpmail->Body = utf8_decode($body);\n\t\t\t\t\t$mail->IsHTML(true);\n\t\t\t\t\t$mail->IsSMTP();\t\t// Ativar SMTP\n\t\t\t\t\t$mail->SMTPDebug = 0;\t\t// Debugar: 1 = erros e mensagens, 2 = mensagens apenas\n\t\t\t\t\t$mail->SMTPAuth = true;\t\t// Autenticação ativada\n\t\t\t\t\t$mail->SMTPSecure = 'tls';\t// SSL REQUERIDO pelo GMail\n\t\t\t\t\t$mail->Host = 'smtp.gmail.com';\t// SMTP utilizado\n\t\t\t\t\t$mail->Port = 587; \t\t// A porta 587 deverá estar aberta em seu servidor\n\t\t\t\t\t$mail->Username = GUSER;\n\t\t\t\t\t$mail->Password = GPWD;\n\t\t\t\t\t$mail->From = \"[email protected]\";\n\t\t\t\t\t$mail->FromName = \"Kepler\";\n\t\t\t\t\t$mail->Subject = $assunto;\n\t\t\t\t\t$mail->Body = $corpo;\n\t\t\t\t\t$mail->AddEmbeddedImage('imagens/logo.png', 'logoimg');\n\n\t\t\t\t\t$mail->Body = '\n\t\t\t\t\t\t\t\t\t\t<style type = \"text/css\">\n\t\t\t\t\t\t\t\t\t\t#mae{\n\t\t\t\t\t\t\t\t\t\t\tbackground-color: white;\n\t\t\t\t\t\t\t\t\t\t\twidth:700px;\n\t\t\t\t\t\t\t\t\t\t\theight:600px;\n\t\t\t\t\t\t\t\t\t\t\tborder-style: none;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t#topo{\n\t\t\t\t\t\t\t\t\t\t\tbackground-color: black;\n\t\t\t\t\t\t\t\t\t\t\twidth: 700px;\n\t\t\t\t\t\t\t\t\t\t\theight: 72px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t#corpo_email{\n\t\t\t\t\t\t\t\t\t\t\twidth: 700px;\n\t\t\t\t\t\t\t\t\t\t\tmargin-left: 60px;\n\t\t\t\t\t\t\t\t\t\t\tmargin-top: 50px;\n\t\t\t\t\t\t\t\t\t\t\ttext-align: left;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.botao{\n\t\t\t\t\t\t\t\t\t\t\tbackground-color: #4CAF50;\n\t\t\t\t\t\t\t\t\t\t\tborder: none;\n\t\t\t\t\t\t\t\t\t\t\tcolor: white;\n\t\t\t\t\t\t\t\t\t\t\tpadding: 15px 32px;\n\t\t\t\t\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t\t\t\t\t\ttext-decoration: none;\n\t\t\t\t\t\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\t\t\t\t\t\tfont-size: 16px;\n\t\t\t\t\t\t\t\t\t\t\tmargin: 4px 2px;\n\t\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t#link{\n\t\t\t\t\t\t\t\t\t\t\tfloat: center;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t</style>\n\t\t\t\t\t\t\t\t\t<html lang = \"pt-br\">\n\t\t\t\t\t\t\t\t\t<head>\n\t\t\t\t\t\t\t\t\t\t<meta charset = \"utf-8\">\n\t\t\t\t\t\t\t\t\t</head>\n\t\t\t\t\t\t\t\t\t<center>\n\t\t\t\t\t\t\t\t\t\t<div id = \"mae\"style = \"background-color: white;\n\t\t\t\t\t\t\t\t\t\t\t\twidth:700px;\n\t\t\t\t\t\t\t\t\t\t\t\theight:600px;\n\t\t\t\t\t\t\t\t\t\t\t\tborder-style: none;\">\n\t\t\t\t\t\t\t\t\t\t\t<div id = \"topo\" style = \"background-color: black;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 700px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 72px;\">\n\t\t\t\t\t\t\t\t\t\t\t\t<img src=\"cid:logoimg\" width=\"200px\" style = \"float : left\">\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<div id = \"corpo_email\" style = \"width: 700px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin-left: 60px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: 50px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttext-align: left;\">\n\t\t\t\t\t\t\t\t\t\t\t\tOlá ' . $GLOBALS['nome'] . ' '.$GLOBALS['sobrenome'].'.\n\t\t\t\t\t\t\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\t\t\t\t\t\t\tPara confirmar seu cadastro clique no botão abaixo:\n\t\t\t\t\t\t\t\t\t\t\t\t<br><br><center>\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"http://200.145.153.172/kepler/Kepler/confirma_email_cadastro?codigo='. $GLOBALS['codigo'] .'\" class = \"botao\" \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstyle = \"background-color: #4CAF50; border: none;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: white; padding: 15px 32px; text-align: center;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttext-decoration: none; display: inline-block;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont-size: 16px; margin: 4px 2px; cursor: pointer; margin-left: -30px;\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfirmar cadastro\n\t\t\t\t\t\t\t\t\t\t\t\t</a></center>\n\t\t\t\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t\t\t\tCaso o botão não funcione, utilize o endereço abaixo para confirmar seu cadastro:\n\t\t\t\t\t\t\t\t\t\t\t\t<br><br><br><center>\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"http://200.145.153.172/kepler/Kepler/confirma_email_cadastro.php?codigo='. $GLOBALS['codigo'] .'\" id = \"link\" style = \"float: center; margin-left: -20px;\">\n\t\t\t\t\t\t\t\t\t\t\t\t\thttp://200.145.153.172/kepler/Kepler/confirma_email_cadastro.php?codigo='. $GLOBALS['codigo'] .'\n\t\t\t\t\t\t\t\t\t\t\t\t</a></center>\n\t\t\t\t\t\t\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\t\t\t\t\t\t\tEquipe Kepler.\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t\t\t<div id = \"topo\" style = \"background-color: black;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 700px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 72px;\">\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</center>\n\t\t\t\t\t\t\t\t\t</html>\n\t\t\t\t\t\t\t\t\t';\n\t\t\t\t\t$phpmail->Body = utf8_decode($body);\n\t\t\t\t\t$mail->AddAddress($para);\n\n\t\t\t\t\tif(!$mail->Send()) {\n\t\t\t\t\t\t$_SESSION['msg_email_retorna'] == \"Erro ao enviar o e-mail\";\n\t\t\t\t\t\t$erro3 = 1;\n\t\t\t\t\t\t//return false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$_SESSION['msg_email_retorna'] == \"E-mail enviado com sucesso\";\n\t\t\t\t\t\t//return true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (phpmailerException $e) {\n\t\t\t\t\t$_SESSION['msg_email_retorna'] == \"E-mail inserido não existe\";\n\t\t\t\t\t$erro3 = 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "public function show(mail $mail) {\n //\n }", "function envoi_mail($dest, $titre, $cont) {\n //----------------------------------------------- \n //DECLARE LES VARIABLES \n //----------------------------------------------- \n $email_reply = '[email protected]';\n\n $message_html = '<html> \n <head> \n <title>'.$titre.'</title> \n </head> \n <body>\n <div style=\"padding: 7px; font-size: 1.1em\">\n '.$cont.'\n <br />\n <p>\n Passez une bonne journée sur <a href=\"http://BlogPHP.fr/\">'.Conf::$SITE['TITRE'].'</a>,\n <br />\n <em>L\\'équipe de développement.</em>\n </p>\n </div>\n </body> \n </html>'; \n\n //----------------------------------------------- \n //HEADERS DU MAIL \n //----------------------------------------------- \n\tini_set('SMTP','smtp.sfr.fr');\n\n $entetedate = date(\"D, j M Y H:i:s\"); // avec offset horaire\n $headers = 'From: \"'.Conf::$SITE['TITRE'].'\" <'.$email_reply.'>'.\"\\n\";\n $headers .= 'Return-Path: <'.$email_reply.'>'.\"\\n\"; \n $headers .= 'MIME-Version: 1.0'.\"\\n\"; \n $headers .= 'Content-Type: text/html; charset=\"utf-8\"'.\"\\n\"; \n $headers .= 'Content-Transfer-Encoding: 8bit'.\"\\n\"; \n $headers .= \"X-Mailer: PHP/\" . phpversion() . \"\\n\\n\" ;\n\n return mail($dest, $titre, $message_html, $headers);\n}", "function mailSocks($mail) {\n\t\t//echo 'mail socks <br>';\n\t\t$mail = getSocksMailer();\n\t\t$mail->AddAddress(\"[email protected]\");\n\t\t$mail->Subject = \"Litesprite Survey Completed: \". $_SESSION['client_key'];\n\t\t$mail->Body = 'Tester: ' . $_SESSION['client_key'] . ' has completed the survey: #'.$_SESSION['survey_id'].\" .\";\n\t\t$mail->WordWrap = 80;\n\t\tsendMail($mail);\n}", "function clsRecordemails2()\r\n\r\n {\r\n\r\n\r\n\r\n global $FileName;\r\n\r\n $this->Visible = true;\r\n\r\n $this->Errors = new clsErrors();\r\n\r\n $this->ds = new clsemails2DataSource();\r\n\r\n $this->UpdateAllowed = false;\r\n\r\n $this->DeleteAllowed = false;\r\n\r\n if($this->Visible)\r\n\r\n {\r\n\r\n $this->ComponentName = \"emails2\";\r\n\r\n $this->HTMLFormAction = $FileName . \"?\" . CCAddParam(CCGetQueryString(\"QueryString\", \"\"), \"ccsForm\", $this->ComponentName);\r\n\r\n $CCSForm = CCGetFromGet(\"ccsForm\", \"\");\r\n\r\n $this->FormSubmitted = ($CCSForm == $this->ComponentName);\r\n\r\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\r\n\r\n $this->subject = new clsControl(ccsTextBox, \"subject\", \"Subject\", ccsText, \"\", CCGetRequestParam(\"subject\", $Method));\r\n\r\n $this->subject->Required = true;\r\n\r\n $this->message = new clsControl(ccsTextArea, \"message\", \"Message\", ccsMemo, \"\", CCGetRequestParam(\"message\", $Method));\r\n\r\n $this->Insert = new clsButton(\"Insert\");\r\n\r\n $this->Cancel = new clsButton(\"Cancel\");\r\n\r\n $this->to_user_id = new clsControl(ccsHidden, \"to_user_id\", \"To User Id\", ccsInteger, \"\", CCGetRequestParam(\"to_user_id\", $Method));\r\n\r\n $this->from_user_id = new clsControl(ccsHidden, \"from_user_id\", \"From User Id\", ccsInteger, \"\", CCGetRequestParam(\"from_user_id\", $Method));\r\n\r\n $this->emaildate = new clsControl(ccsHidden, \"emaildate\", \"date\", ccsInteger, \"\", CCGetRequestParam(\"emaildate\", $Method));\r\n\r\n $this->been_read = new clsControl(ccsHidden, \"been_read\", \"Been Read\", ccsInteger, \"\", CCGetRequestParam(\"been_read\", $Method));\r\n\r\n }\r\n\r\n }", "function sendEmailLot(){\n\t\t\n\t\t// fe_user access management can update \n\t\t$rec = $this->model->get_fecruserid($this->rec_id); \n\t\t$access = $this->accessObj->checkAccess($rec,'pageSearch','update');\n\t\tif(!(bindec($access) & bindec('0010'))){\n\t\t\t$this->cmd = 'canNotUpdate';\n\t\t\t// Get the FORM\n\t\t\t$content = $this->get_include_contents('view_canNotAccess.php');\n\t\t\treturn $content; \n\t\t}\t\t\n\t\t// get lot\n\t\t$lotQueryConf['startingPoint'] = $this->startingPoint;\n\t\t$lot = $this->model->select(intVal($this->rec_id),$lotQueryConf);\n\t\t// get response\n\t\t$respID = $this->caller->piVars[resp];\n\t\t$respQueryConf['startingPoint'] = $this->startingPoint;\t\t\n\t\t$responseObj = t3lib_div::makeInstance('tx_vdexcavationexchange_response');\n\t\t$response = $responseObj->select(intVal($respID),$respQueryConf);\n\t\t// get contents\n\t\t$content = $this->readSearchView();\n\t\tif($this->submit['sendEmail']){\n\t\t\t// send the email after confirmation\n\t\t\t$conf = array(\n\t\t\t\t'parameter' => $this->conf['pagesRedirect.']['searchListPage'],\n\t\t\t\t'additionalParams' => '&tx_vdexcavationexchange_pi1[id]=' . $this->lotID,\n\t\t\t\t'useCashHash' => true,\n\t\t\t\t'returnLast' => 'url',\n\t\t\t);\n\t\t\t$url = $this->cObj->typoLink('', $conf);\n\t\t\t$link = t3lib_div::getIndpEnv('TYPO3_SITE_URL').$url;\n\t\t\t$resmail = $this->emailObj->sendDetails($lot[$this->lotID],$response[$respID], $content, $link);\n\t\t\tif($resmail){\n\t\t\t\t// Redirect to the page \"Mon dossier\"\n\t\t\t\tHeader('Location: '.t3lib_div::locationHeaderUrl($this->redirectToMyAds));\n\t\t\t\texit;\n\t\t\t}else{\n\t\t\t\t$this->cmd = 'sendEmailFailed';\n\t\t\t\t$content = $this->get_include_contents('view_sendMailConfirmation.php');\n\t\t\t}\n\t\t}elseif($this->submit['cancel']){\n\t\t\t// Redirect to the page \"Mon dossier\"\n\t\t\tHeader('Location: '.t3lib_div::locationHeaderUrl($this->redirectToMyAds));\n\t\t\texit;\n\t\t}else{\n\t\t\t// display the confirmation page\n\t\t\t$this->recordDetails = $content;\n\t\t\t$content = $this->get_include_contents('view_sendMailConfirmation.php', $response[$respID]);\n\t\t}\n\t\treturn $content;\n\t}", "public function emails($boletoID, $post);", "public function createMailMessage();", "public function run(){\n if(isset($_POST['mail'])){\n \n $area_val = $_POST['area'];\n $mail = $_POST['mail'];\n \n $model1 = Islemler::model()->findByPK(Yii::app()->session['table_id']);\n $model2 = $model1->cihaz;\n \n $mail = new YiiMailer();\n $mail->setLayout('');\n $mail->setFrom(Yii::app()->params['adminEmail']);\n $mail->setTo('[email protected]');\n $mail->setSubject('Form');\n $mail->SMTPDebug = 1;\n $mail->Body = $mail->renderView('mail/page',array('model1'=>$model1,'model2'=>$model2,'area_val'=>$area_val));\n \n if ($mail->send()) {\n $finished_i = new BitenIslemler; \n $finished_c = new BitenCihazlar;\n $finished_i->setAttributes($model1->getAttributes(), false);// Copy row between idetical rows\n $finished_i->bitis=date('Y-m-d H:i:s');\n $finished_i->sonlandiran_kullanici = Yii::app()->user->id;\n $finished_c->setAttributes($model2->getAttributes(), false);\n $finished_c->cihaz_durum = '6';\n \n if($finished_i->save(false) && $finished_c->save(false)) {\n $model1->delete();\n $model2->delete();\n $success='success';\n echo $success;\n Notify::model()->setNotify(Yii::app()->user->id, 'BitenIslemler', '6', $finished_i->islem_no,'');\n Yii::app()->end();}\n } else {\n echo CJavaScript::encode('error');\n \n }\n \n }\n }", "public function load() {\n\t\techo \"<h3 style=\\\"margin-left:20px;\\\">Your Message Centre</h3>\";\n\t\techo \"<div class=\\\"message-centre\\\">\";\n\t\t$this -> configure();\n\t\t$this -> template = TemplateManager::load(\"MessageCentre\");\n\t\t$messageTemplate = TemplateManager::load(\"Messages\");\n\t\t\n\t\t$messageTemplate -> insert(\"first\", \"From\");\n\t\t$messageTemplate -> insert(\"messages\", $this -> getMessages(\"received\"));\n\t\t$this -> template -> insert(\"received\", $messageTemplate -> getContents());\n\t\t\n\t\t$messageTemplate -> reset();\n\t\t$messageTemplate -> insert(\"first\", \"To\");\n\t\t$messageTemplate -> insert(\"messages\", $this -> getMessages(\"sent\"));\n\t\t$this -> template -> insert(\"sent\", $messageTemplate -> getContents());\n\t\t\n\t\t$messageTemplate -> reset();\n\t\t$messageTemplate -> insert(\"first\", \"From\");\n\t\t$messageTemplate -> insert(\"messages\", $this -> getMessages(\"read\"));\n\t\t$this -> template -> insert(\"read\", $messageTemplate -> getContents());\n\t\t$this -> display();\n\t\techo \"</div>\";\n\t}", "public function index() {\n try {\n $users = $this->grpMailist->gets();\n $contentG = \"\";\n\n $replacements = array();\n foreach ($users as $user):\n $replacements[$user->email] = array(\n \"{name}\" => $user->name,\n \"{title}\" => $user->ld_title,\n \"{content}\" => $user->ld_content\n );\n endforeach;\n\n $transport = Swift_SmtpTransport::newInstance($this->smtpUrl, 587)\n ->setUsername($this->manUser)\n ->setPassword($this->manPassword);\n\n $plugin = new Swift_Plugins_DecoratorPlugin($replacements);\n\n $mailer = Swift_Mailer::newInstance($transport);\n $mailer->registerPlugin($plugin);\n $mailer->registerPlugin(new Swift_Plugins_AntiFloodPlugin(150, 60));\n\n $mssg = Swift_Message::newInstance();\n $headers = $mssg->getHeaders();\n $headers->addTextHeader('X-MC-Track', 'opens, clicks_all');\n $headers->addTextHeader('X-MC-Tags', 'mailist');\n $headers->addTextHeader('X-MC-GoogleAnalytics', 'k-link.co.id');\n\n $mssg->setSubject(\"{title}\");\n $contentG .=\"Hello {name},\" . \"\\n\";\n $contentG .=\"{content}\" . \"\\n\";\n $mssg->setBody($contentG, 'text/html');\n $mssg->setFrom(\"[email protected]\", \"Newsletters\");\n $mssg->setPriority(2);\n\n $failures = array();\n foreach ($users as $user):\n $mssg->setTo($user->email, $user->name);\n $this->addRunNo($user->id);\n if (!$mailer->send($mssg, $failures)):\n $this->failedReciept($failures);\n endif;\n endforeach;\n } catch (Exception $exc) {\n echo $exc->getMessage();\n }\n }", "function CursosParaMail($usersCours, $term)\n{\n\tglobal $con;\n\t\n\t$query_ConsultaFuncion = sprintf(\"SELECT * FROM cart WHERE id_student=%s AND id_term=%s AND discountcode IS NULL AND transaction_made!=0 ORDER BY id_counter DESC\",\n\t\t\t\t\t\t\t\t\t\tGetSQLValueString($usersCours, \"int\"),\n\t\t\t\t\t\t\t\t\t\tGetSQLValueString($term, \"int\"));\n\t$ConsultaFuncion = mysqli_query($con, $query_ConsultaFuncion) or die(mysqli_error($con));\n\t$row_ConsultaFuncion = mysqli_fetch_assoc($ConsultaFuncion);\n\t$totalRows_ConsultaFuncion = mysqli_num_rows($ConsultaFuncion);\n\n\t?>\n\t<div style=\"position:absolute; margin:150px 0 0 5px;\">\n\t\t<ul style=\"width:200px; list-style-type: none; margin:0; padding:0;\">\n\t\t\t<?php\n\t\t\tif ($totalRows_ConsultaFuncion > 0) { \n\t\t\t\tdo { \n\t\t\t?> \n\t\t\t\t<li style=\"width:90%; padding:0 0 5px 10%; font-size:14px;\"><?php echo ObtenerNombreCurso($row_ConsultaFuncion['id_course']); ?></li>\n\t\t\t<?php\n\t\t\t\t} while ($row_ConsultaFuncion = mysqli_fetch_assoc($ConsultaFuncion));\n\t\t\t}\n\t\t\t?>\n\t\t</ul>\n\t</div>\n\t<?php\n\t\t \n\tmysqli_free_result($ConsultaFuncion);\n}", "function enviar_mail_mov($datos)\r\n{\r\n\tglobal $db,$titulo_pagina;\r\n\t//ver el origen y destino\r\n\t$sql = \"select temp1.nombre as origen, temp1.id_deposito as id_origen,temp2.nombre as destino, temp2.id_deposito as id_destino from movimiento_material join depositos as temp1 on (temp1.id_deposito = deposito_origen) join depositos as temp2 on (temp2.id_deposito = deposito_destino) where id_movimiento_material = \".$datos['Id'];\r\n $result = $db->Execute($sql) or die($db->ErrorMsg().\"<br>Error Enviando mail\");\r\n\r\n $origen = $result->fields['origen'];\r\n\t$destino = $result->fields['destino'];\r\n $id_origen = $result->fields['id_origen'];\r\n $id_destino = $result->fields['id_destino'];\r\n\r\n\t//buscar el responsable del deposito origen\r\n\t$sql = \"select usuarios.mail from depositos join responsable_deposito using (id_deposito) join usuarios using (id_usuario) where id_deposito = \".$id_origen;\r\n\t$result = $db->Execute($sql) or die($db->ErrorMsg().\"<br>Error Enviando mail\");\r\n\t$responsable_origen = array();\r\n\twhile (!$result->EOF) {\r\n\t\t$responsable_origen[] = $result->fields['mail'];\r\n\t\t$result->MoveNext();\r\n\t}\r\n\r\n\t//buscar el responsable del deposito origen\r\n\t$sql = \"select usuarios.mail from depositos join responsable_deposito using (id_deposito) join usuarios using (id_usuario) where id_deposito = \".$id_destino;\r\n $result = $db->Execute($sql) or die($db->ErrorMsg().\"<br>Error Enviando mail\");\r\n\t$responsable_destino = array();\r\n\twhile (!$result->EOF) {\r\n\t\t$responsable_destino[] = $result->fields['mail'];\r\n\t\t$result->MoveNext();\r\n\t}\r\n\r\n\t//tengo que prepara el \"para\" para enviar el mail\r\n\t//el problema es que se pueden repetir los mail\r\n\t//armo un arreglo con los mail\r\n\t$mail_para = array ();\r\n //la variable \"$responsable_origen\" es arreglo por eso hago un merge para que me quede solo un arreglo\r\n $mail_para= array_merge($mail_para,$responsable_origen);\r\n //la variable \"$responsable_destino\" es arreglo por eso hago un merge para que me quede solo un arreglo\r\n $mail_para= array_merge($mail_para,$responsable_destino);\r\n //saco el tamaño del arreglo por que no se como me quedo despues de los merge\r\n $i=sizeof($mail_para);\r\n\t//$para = \"[email protected],\".join(\",\",$responsable_origen).\",\".join(\",\",$responsable_destino);\r\n\tif($origen==\"New Tree\" || $destino==\"New Tree\"){\r\n\t $mail_para[$i]=\"[email protected]\";\r\n\t $i++;\r\n\t $mail_para[$i]=\"[email protected]\";\r\n\t $i++;\r\n\t //$para.=\",[email protected],[email protected]\";\r\n\t}\r\n\t//agregar responsables\r\n\r\n\t$asunto = \"$titulo_pagina Nº: \".$datos['Id'];\r\n\t$contenido = \"$titulo_pagina Nº \".$datos['Id'].\".\\n\";\r\n\t$contenido.= \"Depósito de Origen: \".$origen.\".\\n\";\r\n\t$contenido.= \"Depósito de Destino: \".$destino.\".\\n\";\r\n\t$contenido.= \"Autorizado por \".$datos['Usuario'].\" el día \".fecha($datos[\"Fecha\"]).\".\\n\";\r\n\t$contenido.= \"\\nDetalle del movimiento: \\n\";\r\n\r\n\r\n\t//obtener el detalle del movimiento\r\n\t$sql = \"select cantidad,descripcion from detalle_movimiento where id_movimiento_material = \".$datos['Id'];\r\n $result = $db->Execute($sql) or die($db->ErrorMsg().\"<br>Error Enviando mail\");\r\n\r\n $contenido.= \"Cantidad | Descripción \\n\";\r\n $contenido.= \"--------------------------------------------------------------\\n\";\r\n\r\n while (!$result->EOF) {\r\n \t$contenido.=\" \".$result->fields['cantidad'].\" \".$result->fields['descripcion'].\"\\n\";\r\n \t$result->MoveNext();\r\n }\r\n\r\n\t//agrego datos si tiene logistica integrada\r\n\tif ($datos['id_logistica_integrada']!=''){\r\n\t\t//todo lo que sigue es para el para\r\n\r\n\t\t$mail_para[$i]=\"[email protected]\";\r\n\t\t$i++;\r\n\t\t$mail_para[$i]=\"[email protected]\";\r\n\t\t$i++;\r\n\t\t//$para = $para. \" [email protected]\";\r\n\t\t//$para = $para. \", [email protected]\";\r\n\t\t$sql = \"select * from\r\n\t\t\t\t (select (nombre|| ' ' ||apellido) as usuario, mail from sistema.usuarios)as lado_a\r\n\t\t\t\tjoin\r\n\t\t\t\t (select usuario from mov_material.log_movimiento where id_movimiento_material = \".$datos['Id'].\"\r\n\t\t\t\t group by usuario\r\n\t\t\t\t )as lado_b\r\n\t\t\t\tusing (usuario)\";\r\n \t$result_mail = $db->Execute($sql) or die($db->ErrorMsg().\"<br>Error Enviando mail (consulta trae mail a partir de log)\");\r\n\r\n \twhile (!$result_mail->EOF){\r\n \t\t//$para = $para. \", \" . $result_mail->fields['mail'];\r\n \t\t$mail_para[$i]=$result_mail->fields['mail'];\r\n \t\t$i++;\r\n \t\t$result_mail->MoveNext();\r\n \t}\r\n\r\n \t//saco el tamaño del arreglo para asegurarme que esta en la posicion correcta para seguir\r\n\t\t$i=sizeof($mail_para);\r\n\r\n \t//si esta asociado a una licitacion\r\n\t\tif ($datos['asociado_a']=='lic') {\r\n\t\t\t$sql = \"select mail as mail_patrocinador, mail_lider from (\r\n\t\t\t\t\tselect mail as mail_lider, patrocinador from\r\n\t\t\t\t\t(\r\n\t\t\t\t\tselect id_licitacion, lider, patrocinador from\r\n\t\t\t\t\t (select id_licitacion from mov_material.movimiento_material where id_movimiento_material = \".$datos['Id'].\") as a\r\n\t\t\t\t\tjoin\r\n\t\t\t\t\t licitaciones.licitacion\r\n\t\t\t\t\tusing (id_licitacion)\r\n\t\t\t\t\t)as b\r\n\t\t\t\t\tleft join sistema.usuarios\r\n\t\t\t\t\ton id_usuario = lider\r\n\t\t\t\t\t)as c\r\n\t\t\t\t\tleft join sistema.usuarios\r\n\t\t\t\t\ton id_usuario = patrocinador\";\r\n\t\t $result_mail = $db->Execute($sql) or die($db->ErrorMsg().\"<br>Error Enviando mail (consulta trae mail a partir de log)\");\r\n\t\t if ($result_mail->fields['mail_lider']!=''){\r\n\t\t \t$mail_para[$i]=$result_mail->fields['mail_lider'];\r\n\t\t\t\t$i++;\r\n\t\t \t//$para = $para. \", \".$result_mail->fields['mail_lider'];\r\n\t\t }\r\n\t\t if ($result_mail->fields['mail_patrocinador']!=''){\r\n\t\t \t$mail_para[$i]=$result_mail->fields['mail_patrocinador'];\r\n\t\t\t\t$i++;\r\n\t\t \t//$para = $para. \", \".$result_mail->fields['mail_patrocinador'];\r\n\t\t }\r\n\t\t}\r\n\r\n\t\t//si esta asociado a un caso\r\n\t\tif ($datos['asociado_a']=='caso'){\r\n\t\t\t$mail_para[$i]=\"[email protected]\";\r\n\t\t\t$i++;\r\n\t\t\t$mail_para[$i]=\"[email protected]\";\r\n\t\t\t$i++;\r\n\t\t\t//$para = $para. \", [email protected], [email protected] \";\r\n\t\t}\r\n\r\n\t\t//todo lo que sigue es para el contenido\r\n\t\t$sql = \"select * from mov_material.logistica_integrada where id_logistica_integrada = \". $datos['id_logistica_integrada'];\r\n\t\t$result = $db->Execute($sql) or die($db->ErrorMsg().\"<br>Error Enviando mail (consulta trae mail a partir de log)\");\r\n\t\t$contenido.=\"\\n\\n\\n\";\r\n\t\t$contenido.=\"----------------------- Logistica Integrada -------------------\\n\\n\";\r\n\t\t$contenido.=\"Dirección: \". $result->fields['direccion'] .\"\\n\";\r\n\t\t$contenido.=\"Fecha de envio: \". fecha ($result->fields['fecha_envio_logis']) .\"\\n\";\r\n\t\t$contenido.=\"Contacto: \". $result->fields['contacto'] .\"\\n\";\r\n\t\t$contenido.=\"Telefono: \". $result->fields['telefono'] .\"\\n\";\r\n\t\t$contenido.=\"Código Postal: \". $result->fields['cod_pos'] .\"\\n\\n\";\r\n\t\t$contenido.= \"--------------------------------------------------------------\\n\";\r\n\t}\r\n\t//fin de agrego datos si tiene logistica integrada\r\n\t//print_r ($mail_para);\r\n\t$para=elimina_repetidos($mail_para,0);\r\n\t//no envia el mail a juan manuel lo saco del string, en caso que se encuentre ultimo el mail\r\n\t$para=ereg_replace(\"[email protected]\",\"\",$para);\r\n\t//no envia el mail a juan manuel lo saco del string, en caso que se encuentre distinto del ultimo el mail\r\n\t$para=ereg_replace(\"[email protected],\",\"\",$para);\r\n/*\techo \"<br> los ok: \".$para;\r\n\tdie();*/\r\n\tenviar_mail($para, $asunto, $contenido,'','','',0);\r\n}", "private function verzendmailAction()\n {\n $factuur_id = $_POST['Factuur_id'];\n $factuur = $this->model->geefFactuur();\n $this->model->stuurMail($factuur);\n $productenOud = $_SESSION['geselecteerdeProducten'];\n $productenNieuw = $_SESSION['producten'];\n $this->model->wijzigMagazijn($productenNieuw, $productenOud);\n $this->forward('klant', 'admin');\n }", "public function action_order() {\n $field = $this->field($_POST[\"fieldid\"]);\n // Load pre-set emailaddress\n $address = Wi3::inst()->model->factory(\"site_data\")->setref($field)->setname(\"emailaddress\")->load()->data;\n if (empty($address)) {\n echo json_encode(\n Array(\n \"scriptsbefore\" => Array(\n \"0\" => \"$(wi3.popup.getDOM()).fadeOut(100,function() { $(this).html('Bestelling kon <strong>niet</strong> geplaatst worden! Stel de eigenaar van de site hiervan op de hoogte.').fadeIn(); } );\"\n )\n )\n );\n } else {\n // Send an email to client and to the pre-set emailaddress\n $presetemailaddress = $address;\n // Set folder to $_POST to store\n $folderid = Wi3::inst()->model->factory(\"site_data\")->setref($field)->setname(\"folder\")->load()->data;\n $_POST[\"folderid\"] = $folderid;\n // Store order\n $orders = Wi3::inst()->model->factory(\"site_data\")->setref($field)->setname(\"orders\")->load();\n if (!$orders->loaded())\n {\n $orders->create();\n }\n $ordersdata = unserialize($orders->data);\n $ordersdata[] = $_POST;\n $orders->data = serialize($ordersdata);\n $orders->update();\n // Create mail\n $message = $this->view(\"mail\")->set(\"post\", $_POST)->render();\n $clientmessage = $this->view(\"clientmail\")->set(\"post\", $_POST)->render();\n $subject = \"Bestelling foto's\";\n // Send mail to 'us' and to client\n mail($presetemailaddress, $subject, $message);\n mail($_POST[\"emailaddress\"], $subject, $clientmessage);\n echo json_encode(\n Array(\n \"scriptsbefore\" => Array(\n \"0\" => \"$(wi3.popup.getDOM()).fadeOut(100,function() { $(this).html('Bestelling succesvol geplaatst!').fadeIn(); } );\"\n )\n )\n );\n }\n }", "public function appointments()\n\t{\n\t\tif (!is_cli())\n\t\t{\n\t\t\techo \"This script can only be accessed via the command line\" . PHP_EOL;\n\t\t\treturn;\n\t\t}\n\n\t\t$participations = $this->participationModel->get_confirmed_participations();\n\t\tforeach ($participations as $participation)\n\t\t{\n\t\t\t$appointment = strtotime($participation->appointment); \n\t\t\tif ($appointment > strtotime('tomorrow') && $appointment <= strtotime('tomorrow + 1 day')) \n\t\t\t{\t\t\t\t\t\n\t\t\t\treset_language(L::DUTCH);\n\t\t\t\t\n\t\t\t\t$participant = $this->participationModel->get_participant_by_participation($participation->id);\n\t\t\t\t$experiment = $this->participationModel->get_experiment_by_participation($participation->id);\n\t\t\t\t$message = email_replace('mail/reminder', $participant, $participation, $experiment);\n\t\t\n\t\t\t\t$this->email->clear();\n\t\t\t\t$this->email->from(FROM_EMAIL, FROM_EMAIL_NAME);\n\t\t\t\t$this->email->to(in_development() ? TO_EMAIL_DEV_MODE : $participant->email);\n\t\t\t\t$this->email->subject('Babylab Utrecht: Herinnering deelname');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t\t\t// DEBUG: $this->email->print_debugger();\n\t\t\t}\n\t\t}\n\t}", "public function sendOrdersInComming()\n {\n $subject = '[QS-IMS MAILER] DANH SÁCH ĐIỀU ĐỘNG QUÁ HẠN ÁP DỤNG ĐIỀU ĐỘNG';\n $mail = array();\n $sMail = '';\n $to = array();\n $i = 0;\n\n $sql = sprintf('\n\t\t\t\t SELECT\n\t\t\t\t qsiforms.*,\n\t\t\t\t ddtb.*,\n\t\t\t\t qsusers.*,\n \t\t ODanhSachNhanVien.Email AS Email2\n\t\t\t\t FROM OLichThietBi AS ddtb\n\t\t INNER JOIN qsiforms ON qsiforms.IFID = ddtb.IFID_M706\n\t\t\t\t INNER JOIN qsusers ON qsusers.UID = qsiforms.UID\n\t\t INNER JOIN ODanhSachNhanVien ON qsusers.UID = ODanhSachNhanVien.Ref_TenTruyCap\n\t\t\t\t WHERE qsiforms.Status = 1 and qsusers.isActive = 1\n\t\t and ddtb.NgayBatDau <= %1$s\n\t\t\t\t ', $this->_db->quote(date('Y-m-d')));\n $dataSql = $this->_db->fetchAll($sql);\n\n if(count($dataSql) && count($this->to))\n {\n foreach($dataSql as $item)\n {\n if(!isset($to[$item->EMail]))\n {\n $to[$item->EMail] = $item->UserName;\n }\n\n if(!isset($mail[$item->EMail]))\n {\n $mail[$item->EMail] = array();\n }\n\n $mail[$item->EMail][$i]['SoPhieu'] = $item->SoPhieu;\n $mail[$item->EMail][$i]['NgayBatDau'] = $item->NgayBatDau;\n $mail[$item->EMail][$i]['NgayKetThuc'] = $item->NgayKetThuc;\n $mail[$item->EMail][$i]['DeptID'] = $item->DeptID;\n $mail[$item->EMail][$i]['IFID'] = $item->IFID_M706;\n $i++;\n }\n\n if(count($mail))\n {\n foreach($to as $email=>$user)\n {\n if(isset($mail[$email]))\n {\n $sMail = '';\n $sMail .= '<h1>DANH SÁCH ĐIỀU ĐỘNG QUÁ HẠN ÁP DỤNG ĐIỀU ĐỘNG</h1>';\n $sMail .= '<br/>';\n $sMail .= '<table cellpadding=\"0\" cellspacing=\"0\" border=\"1\">';\n $sMail .= '<tr>';\n $sMail .= '<th> SỐ PHIẾU </th>';\n $sMail .= '<th> NGÀY BẮT ĐẦU </th>';\n $sMail .= '<th> NGÀY KẾT THÚC </th>';\n $sMail .= '</tr>';\n\n foreach($mail[$email] as $item)\n {\n $sMail .= '<tr>';\n $sMail .= '<td><a target=\"_blank\" href=\"http://'.$this->domain.'/user/form/edit?ifid='.$item['IFID'].'&deptid='.$item['DeptID'].'\">'.$item['SoPhieu'].'</a></td>';\n $sMail .= '<td>' . Qss_Lib_Date::mysqltodisplay($item->NgayBatDau) . '</td>';\n $sMail .= '<td>' . Qss_Lib_Date::mysqltodisplay($item->NgayKetThuc) . '</td>';\n $sMail .= '</tr>';\n }\n\n $sMail .= '</table>';\n $sMail .= '<br/>';\n $sMail .= '<p style=\"text-align:right\" > <b>QS-IMS Mailer</b> </p>';\n $this->_sendMail($subject, array($email=>$user), $sMail, $this->cc);\n }\n }\n }\n }\n }", "public function listSend_a() {\n //\n return view('perfils.aprendiz.aprendiz_mensajes_enviados');\n }", "public function emailAction() {\n\n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('sitestore_admin_main', array(), 'sitestore_admin_main_email');\n $this->view->form = $form = new Sitestore_Form_Admin_Settings_Email();\n\n //check if comments should be displayed or not\n $show_comments = Engine_Api::_()->sitestore()->displayCommentInsights();\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n\n $taskstable = Engine_Api::_()->getDbtable('tasks', 'core');\n $rtasksName = $taskstable->info('name');\n $taskstable_result = $taskstable->select()\n ->from($rtasksName, array('processes', 'timeout'))\n ->where('title = ?', 'Sitestore Insight Mail')\n ->where('plugin = ?', 'Sitestore_Plugin_Task_InsightNotification')\n ->limit(1);\n $prefields = $taskstable->fetchRow($taskstable_result);\n\n //populate form\n// $form->populate(array(\n// 'sitestore_insightemail' => $prefields->processes,\n// ));\n\n if ($this->getRequest()->isPost() && $form->isValid($this->_getAllParams())) {\n $values = $form->getValues();\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitestore_insightemail', $values['sitestore_insightemail']);\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n\n if(empty($sitemailtemplates)) {\n\t\t\t\tEngine_Api::_()->getApi('settings', 'core')->setSetting('sitestore_bg_color', $values['sitestore_bg_color']);\n }\n include APPLICATION_PATH . '/application/modules/Sitestore/controllers/license/license2.php';\n if ($values['sitestore_demo'] == 1 && $values['sitestore_insightemail'] == 1) {\n\n $view = Zend_Registry::isRegistered('Zend_View') ? Zend_Registry::get('Zend_View') : null;\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n $site_title = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.site.title', Engine_Api::_()->getApi('settings', 'core')->getSetting('core.general.site.title', 1));\n\n $insights_string = '';\n\t\t\t\t$template_header = \"\";\n\t\t\t\t$template_footer = \"\";\n if(!$sitemailtemplates) {\n\t\t\t\t\t$site_title_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.title.color', \"#ffffff\");\n\t\t\t\t\t$site_header_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.header.color', \"#79b4d4\");\n\n\t\t\t\t\t//GET SITE \"Email Body Outer Background\" COLOR\n\t\t\t\t\t$site_bg_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.bg.color', \"#f7f7f7\");\n\t\t\t\t\t$insights_string.= \"<table cellpadding='2'><tr><td><table cellpadding='2'><tr><td><span style='font-size: 14px; font-weight: bold;'>\" . $view->translate(\"Sample Store\") . \"</span></td></tr>\";\n\n\t\t\t\t\t$template_header.= \"<table width='98%' cellspacing='0' border='0'><tr><td width='100%' bgcolor='$site_bg_color' style='font-family:arial,tahoma,verdana,sans-serif;padding:40px;'><table width='620' cellspacing='0' cellpadding='0' border='0'>\";\n\t\t\t\t\t$template_header.= \"<tr><td style='background:\" . $site_header_color . \"; color:$site_title_color;font-weight:bold;font-family:arial,tahoma,verdana,sans-serif; padding: 4px 8px;vertical-align:middle;font-size:16px;text-align: left;' nowrap='nowrap'>\" . $site_title . \"</td></tr><tr><td valign='top' style='background-color:#fff; border-bottom: 1px solid #ccc; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-family:arial,tahoma,verdana,sans-serif; padding: 15px;padding-top:0;' colspan='2'><table width='100%'><tr><td colspan='2'>\";\n\n $template_footer.= \"</td></tr></table></td></tr></td></table></td></tr></table>\";\n }\n\n if ($values['sitestore_insightmail_options'] == 1) {\n $vals['days_string'] = $view->translate('week');\n } elseif ($values['sitestore_insightmail_options'] == 2) {\n $vals['days_string'] = $view->translate('month');\n }\n $path = 'http://' . $_SERVER['HTTP_HOST'] . $view->baseUrl();\n $insight_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Visit your Insights Store') . \"</a>\";\n $update_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Send an update to people who like this') . \"</a>\";\n\n //check if Communityad Plugin is enabled\n $sitestorecommunityadEnabled = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('communityad');\n $adversion = null;\n if ($sitestorecommunityadEnabled) {\n $communityadmodulemodule = Engine_Api::_()->getDbtable('modules', 'core')->getModule('communityad');\n $adversion = $communityadmodulemodule->version;\n if ($adversion >= '4.1.5') {\n $promote_Ad_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Promote with %s Ads', $site_title) . \"</a>\";\n }\n }\n\n $insights_string.= \"<table><tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $vals['days_string'] . $view->translate(array('ly active user', 'ly active users', 2), 2) . \"</span></td></tr><tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('person likes this', 'people like this', 2), 2) . \"</span>&nbsp;<span style='font-size: 18px; font-family: arial;' >\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr>\";\n if (!empty($show_comments)) {\n $insights_string.= \"<tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('comment', 'comments', 2), 2) . \"</span>&nbsp;<span style='font-size: 18px; font-family: arial;' >\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr>\";\n }\n $insights_string.= \"<tr><td><span style='font-size: 24px; font-family: arial;'>\" . '10' . \"</span>\\t <span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('visit', 'visits', 2), 2) . \"</span>&nbsp;<span style='font-size: 18px; font-family: arial;' >\" . '5' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr></table><table><tr><td>\" . \"<ul style=' padding-left: 5px;'><li>\" . $insight_link . \"</li><li>\" . $update_link;\n\n //check if Communityad Plugin is enabled\n if ($sitestorecommunityadEnabled && $adversion >= '4.1.5') {\n $insights_string.= \"</li><li>\" . $promote_Ad_link;\n }\n $insights_string.= \"</li></ul></td></tr></table>\";\n $days_string = ucfirst($vals['days_string']);\n $owner_name = Engine_Api::_()->user()->getViewer()->getTitle();\n $email = Engine_Api::_()->getApi('settings', 'core')->core_mail_from;\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($values['sitestore_admin'], 'SITESTORE_INSIGHTS_EMAIL_NOTIFICATION', array(\n 'recipient_title' => $owner_name,\n 'template_header' => $template_header,\n 'message' => $insights_string,\n 'template_footer' => $template_footer,\n 'site_title' => $site_title,\n 'days' => $days_string,\n 'email' => $email,\n 'queue' => true));\n }\n }\n }", "public function TesEmail()\n\t{\n\t\t// $template = $query_template->row();\n\n\t\t$data = array(\n\t\t\t'judul' => \"EMAIL TELAH TERDAFTAR\",\n\t\t\t'tanggal' => date(\"d-M-Y\"),\n\t\t\t'description' => \"Selamat Email anda telah Terdaftar di Mitrarenov.com\",\n\t\t\t'nama' => \"Fajar Nugraha\",\n\t\t\t'project_id' => '124324ffsd',\n\t\t\t'password' => 'Fajaroentyil', 'email' => '[email protected]',\n\t\t\t'reg_no' => base64_encode(\"@#$@#$\")\n\t\t);\n\t\t$emailData = array(\n\t\t\t'from' => '[email protected]',\n\t\t\t'name' => 'SIMPRO',\n\t\t\t'to' => array('[email protected]'),\n\t\t\t'cc' => \"\",\n\t\t\t'bcc' => \"\",\n\t\t\t'subject' => \"Aktivasi SIMPRO\",\n\t\t\t'template' => $this->load->view('v_email', $data, true),\n\t\t\t'attach' => 'pantotukang/attachment/syarat.pdf'\n\t\t);\t\t\n\t\t\n\t\t// $this->load->view('v_email', $data);\n\t\t\t\t\t\t\t\t\t\n\t\t$this->sendEmailAktifasi($emailData);\n\t\t// print_r($this->sendEmailAktifasi($emailData));\n\t}", "function notification()\n{\n\n $correo = isset($_POST['correo'])?$_POST['correo']:'';\n $name = isset($_POST['fullname'])?$_POST['fullname']:'';\n $usuario = isset($_POST['usuario'])?$_POST['usuario']:'';\n $clave = isset($_POST['clave'])?$_POST['clave']:'';\n $sendmail= isset($_POST['sendmail'])?$_POST['sendmail']:'';\n if(false == empty($clave) && ($sendmail == 'Y')){\n \n $mail = new Zend_Mail('UTF-8');\n $mail->setBodyText(\"Sr(a) {$name}, esta es su información de ingreso para el sistema Enlazamundos\\r\\n\\r\\nUsuario:{$usuario}\\r\\nClave:{$clave}\");\n $mail->setFrom('[email protected] ', 'Programa Enlazamundos');\n $mail->addTo($correo);\n $mail->setSubject('Confirmación de registro Enlazamundos');\n $mail->send();\n return;\n }\n}", "private function renderMAIL_9_HTML($mod) {\r\n\t\t$aff = '<div id=\"search-wrap\">';\r\n\r\n\t\t$aff .= '<div class=\"slide\">';\r\n\t\t$aff .= '<img src=\"../../include/images/1.png\" border=\"0\"/> <a class=\"btn-slide-mail-9\" href=\"#\">Notification Envoyer les identifiants</a>';\r\n\t\t$aff .= '</div>';\r\n\r\n\t\t$aff .= '<div id=\"mail-9-panel\" style=\"display: none;\">';\r\n\r\n\t\t$aff .= '\t<table width=\"100%\" border=\"1\">';\r\n\r\n\t\t$aff .= '\t\t<tr>';\r\n\t\t$aff .= '\t\t\t<td width=\"120\" valign=\"top\">Adresse emetteur</td>';\r\n\t\t$aff .= '\t\t\t<td><input type=\"text\" style=\"width: 100%\" name=\"MailFrom_9\" value=\"' . stripslashes ( $this->myMail_9->getMailFrom () ) . '\"/></td>';\r\n\t\t$aff .= '\t\t</tr>';\r\n\r\n\t\t$aff .= '\t\t<tr>';\r\n\t\t$aff .= '\t\t\t<td width=\"120\" valign=\"top\">Sujet / Objet</td>';\r\n\t\t$aff .= '\t\t\t<td><input type=\"text\" style=\"width: 100%\" name=\"MailSubject_9\" value=\"' . stripslashes ( $this->myMail_9->getMailSubject () ) . '\" /></td>';\r\n\t\t$aff .= '\t\t</tr>';\r\n\r\n\t\t$aff .= '\t\t<tr>';\r\n\t\t$aff .= '\t\t\t<td width=\"120\" valign=\"top\">Entete</td>';\r\n\t\t$aff .= '\t\t\t<td>';\r\n\t\tinclude_once (\"../../../../include/js/fckeditor/fckeditor.php\");\r\n\t\t$oFCKeditor = new FCKeditor ( 'MailHeader_9' );\r\n\t\t$oFCKeditor->BasePath = \"../../../../include/js/fckeditor/\";\r\n\t\t$oFCKeditor->Width = \"100%\";\r\n\t\t$oFCKeditor->Height = \"200\";\r\n\t\t// $oFCKeditor->ToolbarSet = \"Basic\";\r\n\t\t$oFCKeditor->Value = stripslashes ( $this->myMail_9->getMailHeader () );\r\n\t\t$aff .= $oFCKeditor->CreateHtml ();\r\n\t\t$aff .= '</td>';\r\n\t\t$aff .= '\t\t</tr>';\r\n\r\n\t\t$aff .= '\t\t<tr>';\r\n\t\t$aff .= '\t\t\t<td width=\"120\" valign=\"top\">Pied</td>';\r\n\t\t$aff .= '\t\t\t<td>';\r\n\t\tinclude_once (\"../../../../include/js/fckeditor/fckeditor.php\");\r\n\t\t$oFCKeditor = new FCKeditor ( 'MailFooter_9' );\r\n\t\t$oFCKeditor->BasePath = \"../../../../include/js/fckeditor/\";\r\n\t\t$oFCKeditor->Width = \"100%\";\r\n\t\t$oFCKeditor->Height = \"200\";\r\n\t\t// $oFCKeditor->ToolbarSet = \"Basic\";\r\n\t\t$oFCKeditor->Value = stripslashes ( $this->myMail_9->getMailFooter () );\r\n\t\t$aff .= $oFCKeditor->CreateHtml ();\r\n\t\t$aff .= '</td>';\r\n\t\t$aff .= '</tr>';\r\n\r\n\t\t$aff .= '\t</table>';\r\n\r\n\t\t$aff .= '</div>';\r\n\t\t$aff .= '</div>';\r\n\t\treturn $aff;\r\n\t}", "function sendOrderMail(&$do){\n if (isset($do['oCUSTOMERLANG']->raw) && $do['oCUSTOMERLANG']->raw != TZR_DEFAULT_LANG){\n $lang_save = XShell::getLangUser();\n $_REQUEST['LANG_USER']=$do['oCUSTOMERLANG']->raw;\n $_REQUEST['LANG_DATA']=$do['oCUSTOMERLANG']->raw;\n $foo = XShell::getLangUser();\n $foo = XShell::getLangData(NULL, true);\n }\n\n $r = $this->displayOrder($do['oid']);\n\n $xt = new XTemplate('file:'.$GLOBALS['USER_TEMPLATES_DIR'].$this->defaultStepTemplates['recepisse']);\n $labels=&$GLOBALS['XSHELL']->labels->get_labels(array('selectors'=>array('global'),'local'=>true));\n $xt->set_glob(array('labels'=>&$labels));\n $r3=array();\n if (isset($GLOBALS['eplmailscolors'])){\n $colors = $GLOBALS['eplmailscolors'];\n } else {\n $colors = array();\n }\n $tpldata = array('br'=>$r, 'colors'=>$colors);\n\n $content=$xt->parse($tpldata,$r3,NULL);\n\n $subject = $GLOBALS['XSHELL']->labels->getCustomSysLabel('titre_mail_commande');\n if (empty($subject))\n $subject = '[Votre commande]';\n\n $subject = XIni::get('societe').' '.$subject;\n\n // mail et nom du client commande\n $to = array('email'=>$do['oCUSTOMEREMAIL']->raw, 'name'=>$do['oCUSTOMERNOM']->raw. ' '. $do['oCUSTOMERPRENOM']->raw);\n\n $this->modcustomer->sendMailTo($content, $subject, NULL, $to);\n\n if (isset($do['CUSTOMERLANG']->raw) && $do['oCUSTOMERLANG']->raw != TZR_DEFAULT_LANG){\n $_REQUEST['LANG_USER'] = $lang_save;\n $_REQUEST['LANG_DATA'] = $lang_save;\n $foo = XShell::getLangUser(NULL, true);\n $foo = XShell::getLangData(NULL, true);\n }\n }", "private function stuurMail($email){\n $to = $email;\n $subject = \"U bent overboden!\";\n\n $message = \"\n<html>\n<head>\n<title>U bent overboden!</title>\n</head>\n<body>\n<p>Klik \n<a href='iproject12.icasites.nl/Veiling.php?id=$this->voorwerpnummer'>\nhier\n</a> om naar de veiling te gaan.</p>\n</body>\n</html>\n\";\n\n// informatie email\n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\n $headers .= \"Content-type:text/html;charset=UTF-8\" . \"\\r\\n\";\n $headers .= 'From: <[email protected]>' . \"\\r\\n\";\n\n//deze functionaliteit werkt alleen op de webserver, want daar zit ook een email-server op.\n mail($to,$subject,$message,$headers);\n }", "function mail() {\n try {\n Mailer::setConfig(\n array(\n \"mailServer\" => \"simka.websitewelcome.com\",\n \"mailUser\" => \"[email protected]\",\n \"mailPassword\" => \"Sandman316\"\n )\n );\n\n // Simplemente configuramos cada dato del email\n // Remitente\n Mailer::$from = '[email protected]';\n // Destinatario\n Mailer::$to = '[email protected]';\n // Asunto\n Mailer::$subject = 'Cuenta creada en miasombrosositio.com';\n // Mensaje\n Mailer::$message = 'Tu cuenta ha sido creada!';\n // Indicamos si el mensaje es php ( true or false )\n Mailer::$html = true;\n\n // Mandamos el mensaje con send\n Mailer::send();\n } catch ( Exception $ex ) {\n print_r( $ex );\n } // end try catch\n }", "private function notification_make_mail_text($userto, $courses, $publicids){\r\n global $CFG;\r\n\r\n $courses_list = '';\r\n foreach($courses as $course){\r\n if($this->tab == \"course\"){\r\n if($course->course_demourl){\r\n $courses_list .= '- '.$course->fullname.' ('.$course->course_demourl.') (Parcours en démonstration) '.\"\\n\".'';\r\n } else {\r\n $courses_list .= '- '.$course->fullname.' ('.$course->course_url.') '.\"\\n\".'';\r\n }\r\n } else {\r\n if($course->source == 'local'){\r\n $courses_list .= '- '.$course->fullname.' ('.$course->course_url.'?id='.$course->courseid.') '.\"\\n\".'';\r\n } else {\r\n $courses_list .= '- '.$course->fullname.' ('.$course->course_url.') '.\"\\n\".'';\r\n }\r\n }\r\n }\r\n $courses_list .= \"\\n\";\r\n\r\n $data = new stdClass();\r\n $data->username = $userto->firstname .\" \". $userto->lastname;\r\n $data->courses_list = $courses_list;\r\n\r\n $message_intro = get_string('email_message_intro_parcours','local_magistere_offers', $data);\r\n if($this->tab == 'formation'){\r\n $message_intro = get_string('email_message_intro_formation','local_magistere_offers', $data);\r\n }\r\n $message_intro .= \"\\n\";\r\n\r\n $publics_list = '';\r\n foreach($this->get_publics_by_stringids($publicids) as $public){\r\n $publics_list .= '- '.$public->name.''.\"\\n\".'';\r\n }\r\n $publics_list .= \"\\n\";\r\n $publics_message = get_string('email_message_publics','local_magistere_offers', $publics_list).\"\\n\";\r\n\r\n $link_preference = get_string('email_message_preference_link', 'local_magistere_offers').'('.$CFG->wwwroot.'/local/magistere_offers/index.php?v=parcours&action=changepref)'.\"\\n\";\r\n if($this->tab == 'formation'){\r\n $link_preference = get_string('email_message_preference_link', 'local_magistere_offers').'('.$CFG->wwwroot.'/local/magistere_offers/index.php?v=formation&action=changepref)'.\"\\n\";\r\n }\r\n\r\n $message_outro = get_string('email_message_outro', 'local_magistere_offers');\r\n\r\n $posttext = \"\\n---------------------------------------------------------------------\\n\";\r\n $posttext .= $message_intro;\r\n $posttext .= \"---------------------------------------------------------------------\\n\";\r\n $posttext .= $publics_message;\r\n $posttext .= \"---------------------------------------------------------------------\\n\";\r\n $posttext .= $link_preference;\r\n $posttext .= \"---------------------------------------------------------------------\\n\";\r\n $posttext .= $message_outro;\r\n $posttext .= \"\\n\\n\";\r\n\r\n return $posttext;\r\n }", "function afficher()\r\n\t{\r\n\t\t\r\n\t\tif (!empty($this->zones) || !empty($this->blocs) )\r\n\t\t{\r\n\t\t\t//:: On configure les zones obligatoires\r\n\t\t\t\tif (empty($this->zones['Menu_Log'])) $this->zone('Menu_Log', menu('membre'));\r\n\r\n\t\t\t\tif (empty($this->zones['description'])) $this->zone('description', DESCRIPTION);\r\n\t\t\t\tif (empty($this->zones['keywords'])) $this->zone('keywords', KEYWORDS);\r\n\t\t\t\t$this->zone('nom', NOM);\r\n\t\t\t\t\r\n\t\t\t\t// On s'occupe du chemin des fichiers\r\n\t\t\t\t$this->zone( 'baseUrl', URL ); $this->zone( 'design', $this->style );\r\n\t\t\t\t\r\n\t\t\t\tif (is_admin()) $this->zone('jvs-admin', '<script type=\"text/javascript\" src=\"javascript/-admin.js\"></script>');\r\n\t\t\t\t\r\n\t\t\t\t// Nouveaux messages \r\n\t\t\t\r\n\t\t\t\t// Antibug\r\n\t\t\t\tif ($this->zones['img_titre']!=\"<!-- rien -->\") $this->zone('img_titre', '<img src=\"theme/images/content.png\" class=\"title\" alt=\"\" />');\r\n\t\t\t\t\t\t\t\r\n\t\t\t// Ouverture du template //\r\n\t\t\t$fichier=$this->chemin.$this->template.'.tpl.php';\r\n\t\t\t$source = fopen($fichier, 'r');\r\n\t\t\t$this->design = fread($source, filesize ($fichier));\r\n\t\t\tfclose($source);\r\n\t\t\t\r\n\t\t\t// Parsage du template\r\n\t\t\tforeach ($this->zones as $zone => $contenu)\r\n\t\t\t{\r\n\t\t\t\t$this->design = preg_replace ('/{::'.$zone.'::}/', $contenu, $this->design);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Suppresion des {::xxxx::} inutilisées\r\n\t\t\t$this->design = preg_replace ('/{::[-_\\w]+::}/', '', $this->design);\r\n\r\n\t\t\t// On remplace les blocs par leurs contenus //\r\n\t\t\tforeach($this->blocs as $nomBloc => $occurences)\r\n\t\t\t{\r\n\t\t\t\tpreg_match( '#{--'.$nomBloc.'--}(.*){--/'.$nomBloc.'/--}#ms', $this->design, $contenuBloc );\r\n\t\t\t\t$contenuBloc=$contenuBloc[1];\r\n\t\t\t\t\r\n\t\t\t\t$idNewTab=0; unset($nomZones);\r\n\t\t\t\tforeach($occurences as $occurence => $zones)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (!isset($nomZones))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$nomZones=$zones;\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$i=0;\r\n\t\t\t\t\t\t$newBloc[$idNewTab]=$contenuBloc;\r\n\t\t\t\t\t\tforeach($zones as $remplacement)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$newBloc[$idNewTab]=preg_replace ('/{:'.$nomZones[$i].':}/', $remplacement, $newBloc[$idNewTab]);\r\n\t\t\t\t\t\t\t$i++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$idNewTab++;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\t$newContenuBloc=implode(\"\", $newBloc);\r\n\t\t\t\t$this->design = preg_replace ('#{--'.$nomBloc.'--}(.*){--/'.$nomBloc.'/--}#ms', $newContenuBloc, $this->design);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Suppression des blocs inutilisés\r\n\t\t\t$this->design = preg_replace ('#{--(.*)--}(.*){--/(.*)/--}#ms', '', $this->design);\r\n\r\n\t\t\t\r\n\t\t\t// Affichage du résultat final\r\n\t\t\t//$this->design = preg_replace ('/('.CHR(9).'|'.CHR(13).'|'.CHR(10).')/', \"\", $this->design);\r\n\r\n\t\t\t// Affichage du résultat final\r\n\t\t\techo $this->design;\r\n\t\t}\r\n\t}", "private function renderMAIL_10_HTML($mod) {\r\n\t\t$aff = '<div id=\"search-wrap\">';\r\n\r\n\t\t$aff .= '<div class=\"slide\">';\r\n\t\t$aff .= '<img src=\"../../include/images/1.png\" border=\"0\"/> <a class=\"btn-slide-mail-10\" href=\"#\">Phase Satisfaction - Relance Questionnaire</a>';\r\n\t\t$aff .= '</div>';\r\n\r\n\t\t$aff .= '<div id=\"mail-10-panel\" style=\"display: none;\">';\r\n\r\n\t\t$aff .= '\t<table width=\"100%\" border=\"1\">';\r\n\r\n\t\t$aff .= '\t\t<tr>';\r\n\t\t$aff .= '\t\t\t<td width=\"120\" valign=\"top\">Adresse emetteur</td>';\r\n\t\t$aff .= '\t\t\t<td><input type=\"text\" style=\"width: 100%\" name=\"MailFrom_10\" value=\"' . stripslashes ( $this->myMail_10->getMailFrom () ) . '\"/></td>';\r\n\t\t$aff .= '\t\t</tr>';\r\n\r\n\t\t$aff .= '\t\t<tr>';\r\n\t\t$aff .= '\t\t\t<td width=\"120\" valign=\"top\">Sujet / Objet</td>';\r\n\t\t$aff .= '\t\t\t<td><input type=\"text\" style=\"width: 100%\" name=\"MailSubject_10\" value=\"' . stripslashes ( $this->myMail_10->getMailSubject () ) . '\" /></td>';\r\n\t\t$aff .= '\t\t</tr>';\r\n\r\n\t\t$aff .= '\t\t<tr>';\r\n\t\t$aff .= '\t\t\t<td width=\"120\" valign=\"top\">Entete</td>';\r\n\t\t$aff .= '\t\t\t<td>';\r\n\t\tinclude_once (\"../../../../include/js/fckeditor/fckeditor.php\");\r\n\t\t$oFCKeditor = new FCKeditor ( 'MailHeader_10' );\r\n\t\t$oFCKeditor->BasePath = \"../../../../include/js/fckeditor/\";\r\n\t\t$oFCKeditor->Width = \"100%\";\r\n\t\t$oFCKeditor->Height = \"200\";\r\n\t\t// $oFCKeditor->ToolbarSet = \"Basic\";\r\n\t\t$oFCKeditor->Value = stripslashes ( $this->myMail_10->getMailHeader () );\r\n\t\t$aff .= $oFCKeditor->CreateHtml ();\r\n\t\t$aff .= '</td>';\r\n\t\t$aff .= '\t\t</tr>';\r\n\r\n\t\t$aff .= '\t\t<tr>';\r\n\t\t$aff .= '\t\t\t<td width=\"120\" valign=\"top\">Pied</td>';\r\n\t\t$aff .= '\t\t\t<td>';\r\n\t\tinclude_once (\"../../../../include/js/fckeditor/fckeditor.php\");\r\n\t\t$oFCKeditor = new FCKeditor ( 'MailFooter_10' );\r\n\t\t$oFCKeditor->BasePath = \"../../../../include/js/fckeditor/\";\r\n\t\t$oFCKeditor->Width = \"100%\";\r\n\t\t$oFCKeditor->Height = \"200\";\r\n\t\t// $oFCKeditor->ToolbarSet = \"Basic\";\r\n\t\t$oFCKeditor->Value = stripslashes ( $this->myMail_10->getMailFooter () );\r\n\t\t$aff .= $oFCKeditor->CreateHtml ();\r\n\t\t$aff .= '</td>';\r\n\t\t$aff .= '</tr>';\r\n\r\n\t\t$aff .= '\t</table>';\r\n\r\n\t\t$aff .= '</div>';\r\n\t\t$aff .= '</div>';\r\n\t\treturn $aff;\r\n\t}", "public function sendmailgestannuaire($id){\n $utilisateur = $this->Utilisateur->find('first',array('conditions'=>array('Utilisateur.id'=>$id),'recursive'=>0));\n $ObjSections = new SectionsController(); \n $mailtoGestannuaire = $ObjSections->get_gestionnaire_annuaire($utilisateur['Utilisateur']['section_id']);\n $mailto = explode(';',$mailtoGestannuaire);\n $i = date('m') > 10 ? 2 : 1;\n $finmission = $utilisateur['Utilisateur']['FINMISSION'] = '' ? \"05/01\".(date('Y')+$i) : $utilisateur['Utilisateur']['FINMISSION'];\n $debutmission = $utilisateur['Utilisateur']['DATEDEBUTACTIF'] ;\n $to=$mailto;\n $from = Configure::read('mailapp');\n $objet = \"SAILL : Ajout d'un nouvel utilisateur [\".$utilisateur['Utilisateur']['NOM'].' '.$utilisateur['Utilisateur']['PRENOM'].']';\n $message = \"Merci de traiter cette demande concernant l'arrivée de \".$utilisateur['Utilisateur']['NOM'].' '.$utilisateur['Utilisateur']['PRENOM'].\n '<ul>\n <li>Identifiant :'.$utilisateur['Utilisateur']['username'].'</li>\n <li>Date de naissance :'.$utilisateur['Utilisateur']['NAISSANCE'].'</li>\n <li>Société :'.$utilisateur['Societe']['NOM'].'</li>\n <li>Début de mission :'.$debutmission.'</li> \n <li>Fin de mission :'.$finmission.'</li>\n <li>Section :'.$utilisateur['Section']['NOM'].'</li>\n <li>Localité :'.$utilisateur['Site']['NOM'].'</li>\n </ul>';\n if($to!=''):\n try{\n $email = new CakeEmail();\n $email->config('smtp')\n ->emailFormat('html')\n ->from($from)\n ->to($to)\n ->subject($objet)\n ->send($message);\n $this->Session->setFlash(__('Mail envoyé avec succès',true),'flash_success');\n }\n catch(Exception $e){\n $this->Session->setFlash(__('Erreur lors de l\\'envois du mail - '.translateMailException($e->getMessage()),true),'flash_warning');\n } \n endif;\n $this->History->goBack(1);\n }", "function cmdMailTo($name, $caption) {\n $optpostaddr = array\n (\n array(\"\", \"\"),\n array(\"Office\", \"1\"),\n array(\"Home\", \"2\"),\n array(\"Do not send\", \"3\"),\n );\n ?>\n <tr>\n <td><?php getCaption($caption); ?> :</td>\n <td>\n <select class=\"easyui-combobox\"\n id=\"<?php echo $name; ?>\"\n name=\"<?php echo $name; ?>\"\n style=\"width:120;\"\n data-options=\"panelHeight:100,editable:false,width:120\"\n disabled=true\n >\n <?php\n foreach ($optpostaddr as $val) {\n echo '<option value=\"' . $val[1] . '\">' . $val[0] . '</option>';\n }\n ?>\n </select>\n </td>\n </tr>\n <?php\n}", "public function sendMailRenovacionPlan( $sendparams = array() ){\r\t\t\r\t\t$uri = JFactory::getURI();\r\t\t\r\t\t//parametros para el metodo que obtiene el formulario de pago\r\t\t$params_pay = array(\r\t\t\t\t'btn_input' => '<input type=\"image\" src=\"'.$uri->root().'components/com_referidos/assets/images/img-pay.png\" alt=\"Pagar desde Payu Latam\" title=\"Pagar desde Payu Latam\" />'\r\t\t\t,\t'planuser' => $sendparams[ 'planuser' ]\r\t\t\t,\t'userid' => $sendparams[ 'userid' ]\r\t\t\t,\t'nomplan' => $this->nom_plan\r\t\t\t,\t'valorpesos' => number_format( $this->valor_pesos , 2 , '.' , '')\r\t\t\t,\t'valordolar' => number_format( $this->valor_dolares , 2 , '.' , '')\r\t\t\t,\t'emailuser' => $sendparams[ 'emailuser' ]\r\t\t\t,\t'nameuser' => $sendparams[ 'nameuser' ]\r\t\t);\r\t\t\r\t\t//destinatari\r\t\t$para = $sendparams[ 'emailuser' ];\r\t\t\r\t\t// subject\r\t\t$titulo = ucfirst( $sendparams[ 'nameuser' ] ).', necesitas renovar tu plan';\r\t\t\r\t\t// message\r\t\t$mensaje = '\r\t\t\t<html>\r\t\t\t\t<head>\r\t\t\t\t <title>Renovaci&oacute;n Plan JooinWorld</title>\r\t\t\t\t</head>\r\t\t\t\t<body>\r\t\t\t\t\t<div class=\"content-mail\" style=\"font-family: \\'Calibri\\', \\'Helvetica Neue\\'; width: 80%; height:auto; margin:0 auto; padding:0;\">\r\t\t\t\t\t\t<div class=\"titulo\" style=\"width:100%; height:61px; background-color:#566EAC; color:#ffffff; padding: 2px 37px;\">\r\t\t\t\t\t\t\t<img src=\"'.$uri->root().'templates/jooinworld-home/images/logo.png\">\r\t\t\t\t\t\t\t<!--<span style=\"color:#CDCBE3; font-size:12px; padding: 5px 10px;\">uniendo al mundo</span>-->\r\t\t\t\t\t\t</div>\r\t\t\t\t\t\t<div class=\"cuerpo\" style=\"width:100%; padding: 25px; font-size:14px;\">\r\t\t\t\t\t\t\t<h3 style=\"color:#000000\">Hola <span style=\"color: #566EAC;\" class=\"text-blue\">'.ucfirst( $sendparams[ 'nameuser' ] ).'</span></h3>\r\t\t\t\t\t\t\t<p style=\"margin: 20px 0px; text-align:justify;\" >\r\t\t\t\t\t\t\tNesecitas renovar tu plan '.strtoupper($this->nom_plan).', para que no pierdas las comisiones por las personas que has referido, y puedas seguir utilizando este plan para obtener mas personas que pueden llegar a ser referidos tuyos.\r\t\t\t\t\t\t\t</p>\r\t\t\t\t\t\t\t<div class=\"content-img\" style=\"width:100%; text-align:left;\">\r\t\t\t\t\t\t\t\t<img style=\"display:inline-block; border: 1px solid #B2B2B2; border-radius:5px; padding: 2px; margin-right: 5px;\" src=\"'. $uri->root() . ( ( !empty($sendparams[ 'thumb' ]) ) ? $sendparams[ 'thumb' ] : 'images/user-Male-thumb.png').'\" alt=\"'.$sendparams[ 'nameuser' ].'\" />\r\t\t\t\t\t\t\t\t<span style=\"display:inline-block; vertical-align:top; color: #566EAC;\" class=\"text-blue\">'.$sendparams[ 'nameuser' ].'</span>\r\t\t\t\t\t\t\t</div> \r\t\t\t\t\t\t\t<div class=\"agradecimiento\" style=\"width:100%; text-align:left; margin: 0px 0px 10px 0px;\">\r\t\t\t\t\t\t\t\t<h2 style=\"color:#000000\">Gracias</h2>\t\t\t\t\t\t\t\t\r\t\t\t\t\t\t\t</div>\r\t\t\t\t\t\t\t<di style=\"text-align:center; width:100%;\">\r\t\t\t\t\t\t\t\t\t'.$this->formPay( $params_pay ).'\r\t\t\t\t\t\t\t</div>\r\t\t\t\t\t\t</div>\r\t\t\t\t\t</div>\r\t\t\t\t</body>\r\t\t\t</html>\r\t\t';\r\t\t\r\t\t// Para enviar un correo HTML mail, la cabecera Content-type debe fijarse\r\t\t$cabeceras = \"MIME-Version: 1.0 \\r\\n\";\r\t\t$cabeceras .= \"Content-type: text/html; charset=UTF-8 \\r\\n\";\r\t\t\r\t\t// Cabeceras adicionales\r\t\t$cabeceras .= \"To: \" . $para .\" \\r\\n\";\r\t\t$cabeceras .= \"From: [email protected] \\r\\n\";\r\t\t\r\t\t// Mail it\r\t\tmail( $para, $titulo, $mensaje, $cabeceras);\r\t\r\t}", "function conversation()\n {\n $data['scripts'] = array('jquery', 'bootstrap', 'lte', 'datepicker','cssMessagerie','tinyMCE' );\n\n // Creation du bandeau\n $data['titre'] = array(\"Messagerie\", \"fas fa-envelope\");\n \n // si la session est null c'est que l'utilisateur n'est pas connecté donc retour à la page de login\n if($_SESSION['dataUser'] == null)\n {\n redirect($this->dir_login);\n }\n else\n {\n //Permet de récupérer l'id de l'utilisateur de session\n $data['userId']=$_SESSION['dataUser'][0]->user_id;\n //Permet de créer les boutons dans le menu en header\n $data['boutons'] = array(\n array(\"Rafraichir\", \"fas fa-sync\", $this->dir_controlleur, null),\n array(\"Déconnexion\", \"fas fa-sign-out-alt\", $this->dir_login, null),\n array(\"Retour\", \"fa fa-arrow-left\", $this->dir_retour, null),\n );\n }\n\n //permet de savoir si une conversation est en cours\n $data['ActiveConv'] = true;\n\n //Permet de trier tous les utilisateurs à qui on a parler du plus récent au plus ancien\n $data['profils_envoyeur'] = $this->m_messagerie->get_id_profil_envoyeur($data['userId']);\n $x = 0;\n foreach ( $data['profils_envoyeur'] as $value) \n {\n $data['last_message'][$x] = $this->m_messagerie->get_last_message_profil($data['userId'],$data['profils_envoyeur'][$x]->message_id_envoyeur);\n $data['profils_envoyeur_name'][$x] = $this->m_messagerie->get_name_user($data['profils_envoyeur'][$x]->message_id_envoyeur);\n $x = $x + 1;\n }\n\n //on récupère l'id de la personne qui recoit\n $data['personne'] = $this->input->post('id_personne');\n\n \n if($data['personne'] == NULL )\n {\n $data['personne'] = $_SESSION['personne'];\n } else{\n $_SESSION['personne'] = $data['personne'];\n }\n \n //permet de récupérer tout les messages entre deux personnes et de les ajouter dans un tableau\n $data['conv'] = $this->m_messagerie->get_message_profil_envoyeur($data['userId'],$data['personne']);\n\n //Permet de récupérer les noms prénoms des deux utilisateurs\n $data['conv_name'] = $this->m_messagerie->get_name_user($data['userId']) ;\n $data['conv_name'] = $data['conv_name']->user_nom . \" \" . $data['conv_name']->user_prenom;\n if($data['conv'][0]->message_id_receveur == $data['userId'])\n {\n $data['conv_name1'] = $this->m_messagerie->get_name_user($data['conv'][0]->message_id_envoyeur);\n $data['conv_name1'] = $data['conv_name1']->user_nom . \" \" . $data['conv_name1']->user_prenom;\n } else\n {\n $data['conv_name1'] = $this->m_messagerie->get_name_user($data['conv'][0]->message_id_receveur);\n $data['conv_name1'] = $data['conv_name1']->user_nom . \" \" . $data['conv_name1']->user_prenom;\n }\n\n \n \n // On charge les differents modules neccessaires a l'affichage d'une page\n //$this->load->view('template/header_html_base', $data);\n $this->load->view('template/header_scripts', $data); \n $this->load->view('template/bandeau', $data);\n $this->load->view('template/footer_scripts', $data);\n $this->load->view('template/footer_html_base');\n $this->load->view('messagerie/editeur',$data);\n }", "public function sendmailprolongation($utilisateur){\n $ObjParameters = new ParametersController();\n $mailtoGestannuaire = $ObjParameters->get_gestionnaireannuaire();\n $mailto[] = $mailtoGestannuaire['Parameter']['param'];\n $to=$mailto;\n $from = Configure::read('mailapp');\n $objet = \"SAILL : Prolongation d'un utilisateur [\".$utilisateur['Utilisateur']['NOM'].' '.$utilisateur['Utilisateur']['PRENOM'].']';\n $message = \"Merci de traiter cette demande concernant la prolongation de \".$utilisateur['Utilisateur']['NOM'].' '.$utilisateur['Utilisateur']['PRENOM'].\n '<ul>\n <li>Date de naissance :'.$utilisateur['Utilisateur']['NAISSANCE'].'</li>\n <li>Société :'.$utilisateur['Societe']['NOM'].'</li>\n <li>Fin de mission :'.$utilisateur['Utilisateur']['FINMISSION'].'</li>\n <li>Commentaire :'.$utilisateur['Utilisateur']['COMMENTAIRE'].'</li> \n </ul>';\n if($to!=''):\n try{\n $email = new CakeEmail();\n $email->config('smtp')\n ->emailFormat('html')\n ->from($from)\n ->to($to)\n ->subject($objet)\n ->send($message);\n }\n catch(Exception $e){\n $this->Session->setFlash(__('Erreur lors de l\\'envois du mail - '.translateMailException($e->getMessage()),true),'flash_warning');\n } \n endif;\n }", "public function __construct(){\n\t\tsendMail();\n\t}", "public function join()\n\t{\n\t\tif(!S::may())\n\t\t{\n\t\t\t$dia = new XhrDialog();\n\t\t\t\n\t\t\t$dia->setTitle(s('join'));\n\t\t\t\n\t\t\t$email = '';\n\t\t\t$pass = '';\n\t\t\tif(isset($_GET['p']) && isset($_GET['e']))\n\t\t\t{\n\t\t\t\tif(validEmail($_GET['e']))\n\t\t\t\t{\n\t\t\t\t\t$email = strip_tags($_GET['e']);\n\t\t\t\t}\n\t\t\t\t$pass = strip_tags($_GET['p']);\n\t\t\t}\n\t\t\t\n\t\t\t$datenschutz = $this->model->getContent(28);\n\t\t\t$rechtsvereinbarung = $this->model->getContent(29);\n\t\t\t\n\t\t\t$rechtsvereinbarung['body'] = strip_tags(str_replace(array('<br>','<br />','<p>','</p>'),\"\\n\",$rechtsvereinbarung['body']));\n\t\t\t$datenschutz['body'] = strip_tags(str_replace(array('<br>','<br />','<p>','</p>'),\"\\n\",$datenschutz['body']));\n\t\t\t\n\t\t\t$dia->addContent($this->view->join($email,$pass,$datenschutz,$rechtsvereinbarung));\n\t\t\t$dia->addOpt('height', 420);\n\t\t\t$dia->addOpt('width', 700);\n\t\t\t\n\t\t\t$dia->setResizeable(false);\n\t\t\t\n\t\t\t$dia->addJsBefore('\n\t\t\t\t\n\t\t\t\tvar date = new Date();\n\t\t\t\t$(\"<link>\").attr(\"rel\",\"stylesheet\").attr(\"type\",\"text/css\").attr(\"href\",\"/fonts/octicons/octicons.css\").appendTo(\"head\");\n\t\t\t\t$(\"<link>\").attr(\"rel\",\"stylesheet\").attr(\"type\",\"text/css\").attr(\"href\",\"/css/join.css?\" + date.getTime()).appendTo(\"head\");\t\n\t\t\t');\n\t\t\t\n\t\t\t$dia->addJsAfter('\n\t\t\t\t( typeof L !== \"undefined\" ? $.Deferred().resolve() : $.getScript( \"/js/leaflet/leaflet.js\" ) )\n\t\t\t\t.then( function() {\n\t\t\t\t\treturn typeof join !== \"undefined\" ? $.Deferred().resolve() : $.getScript( \"/js/join.js\" );\n\t\t\t\t} ).then( function() {\n\t\t\t\t\tjoin.init( \"' . GOOGLE_API_KEY . '\" );\n\t\t\t\t} );\n\t\t\t');\n\t\t\t\n\t\t\treturn $dia->xhrout();\n\t\t}\n\t}", "public function index()\n\t{\n\n $sender_id = 2;\n $recipients = 1;\n $subject = 'Test message '.uniqid();\n $body = 'hellow world, Welcome';\n //$this->message->send_new_message($sender_id,$recipients,$subject,$body,PRIORITY_NORMAL);\n $this->global['message_threads'] = $this->message->get_all_threads($this->userId);\n $this->global['pageTitle'] = 'Mail';\n \n $this->loadViews(\"mailbox/inbox\", $this->global, NULL , NULL);\n\n\t}", "public function configMail() {\n add_filter('wp_mail_content_type', function($type) {return 'text/html';});\n add_filter('wp_mail_from_name', function() {return 'Portfolio Site';});\n add_filter('wp_mail_from', function() {return 'wordpress@' . $_SERVER['HTTP_HOST'];});\n }", "function send_mail($item){\n $mail = new PHPMailer;\n $mail->setFrom('[email protected]', 'Website administrator');\n //Set an alternative reply-to address\n $mail->addReplyTo($item['email'], $item['name']);\n //Set who the message is to be sent to\n $mail->addAddress('[email protected]');\n //Set the subject line\n $mail->isHTML(true);\n $mail->CharSet = 'UTF-8';\n $mail->Subject = 'Contact sent from website';\n //Read an HTML message body from an external file, convert referenced images to embedded,\n //convert HTML into a basic plain-text alternative body\n //$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));\n //Replace the plain text body with one created manually\n $mail->Body = '\n <html>\n <head>\n \t<title>'.$mail->Subject.'</title>\n </head>\n <body>\n \t<p>Full Name: '.$item['name'].'</p>\n \t\n \t<p>Address: '.$item['adds'].'</p>\n \t<p>Phone: '.$item['phone'].'</p>\n \t\n \t<p>Email: '.$item['email'].'</p>\n <p>Tiêu Đề: '.$item['fax'].'</p>\n \t<p>Content: '.nl2br($item['content']).'</p>\n </body>\n </html>\n ';\n //Attach an image file\n //$mail->addAttachment('images/phpmailer_mini.png');\n \n //send the message, check for errors\n //$mail->send();\n if ($mail->send()) {\n echo \"Message sent!\";\n } else {\n echo \"Mailer Error: \" . $mail->ErrorInfo;\n }\n }", "function maplesyrupweb_email_template()\n{\n\t$info = '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n <html xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n <title>Maple Syrup Web</title>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"/>\n </head>';\n\n $info .= '<body style=\"margin: 0; padding: 0px 0px 150px 0px; background-color:#e7e7e7;\">';\n\n $info .= '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color:#e7e7e7; width:775px; max-width:90%; margin:0 auto;\" >';\n\n $info .= '<tr><td style=\"padding: 20px 0px 20px 0px;\">';\n \n //your logo here\n $info .= 'Maple Syryp Web <img src=\"\" width=\"100px\" height=\"100px\" />';\n $info .= '</td></tr>';\n\n $info .= '<tr><td style=\"padding: 60px 30px 60px 30px; background-color:#FFFFFF; text-align:left; font-size:14px; color:#656565;\">';\n //email message is here\n $info .= '[message]';\n $info .= '</td></tr>';\n\n $info .= '<tr><td style=\"text-align:center; font-size:10px; padding:30px 0px 0px 0px; color:#656565;\">';\n\n\n $info .= '&copy; '.date(\"Y\").' Maple Syrup Web';\n \n $info .= '</td></tr>';\n $info .= '<tr><td style=\"text-align:center; font-size:10px; padding:10px 0px 0px 0px; color:#656565;\">';\n \n // If you have social media links, include them below\n // $info .= 'Social media links';\n\n $info .= '</td></tr>';\n\n $info .= '</table>';\n\n\n $info .= '</body></html>';\n\n return $info;\n}", "function send_mails() {\n\t //$myactivebatch = $this->load_saved_batch();//load direct from file\n\t $myactivebatch = GetParam('batchrestore');//load in html form field and save as param\n\t //echo '>',$myactivebatch;\n\t \n\t $batch = GetReq('batchid');\n\t $bid = GetParam('bid')?GetParam('bid'):0; \n\t \t \n\t $include_subs = GetParam('includesubs');\n\t $include_all = GetParam('includeall');\t \n\t $subscribers = $include_subs?$include_subs:$include_all;//one or another\n\t\n\t $from = GetParam('from');\n\t $to = GetParam('to');\t \n\t $subject = GetParam('subject');\n\t \n\t if ($this->template) {\n\t if ($this->dirdepth) {\n\t\t for($i=0;$i<$this->dirdepth;$i++)\n\t\t\t $backdir .= \"../\";\n\t\t }\n\t\t else\n\t\t $backdir = \"../\";\n\t\t //repalce viewable data to send data (absolute dir)\t \n\t\t //echo $backdir;\n\t\t if ($this->mailbody)//get session text with headers\n\t\t $body = $this->mailbody;\n\t\t else //get text area\n\t $body = str_replace($backdir,$this->url.$this->infolder.'/',GetParam('mail_text')); \t \n\t }\t \n\t else\t{ //text area or session text with headers\n\t \n\t if (GetReq('editmode')) {\n\t\t $mytext = $this->mailbody?$this->mailbody:GetParam('mail_text');\n\t\t $body = $this->unload_spath($mytext);\n\t\t }\n\t\t else\n\t $body = $this->mailbody?$this->mailbody:GetParam('mail_text'); \n\t }\t \t \n\t \t \n\t\t \n\t if ($subscribers) {// || ($batch)) {//if sybs checked or batch in process..\n\t \n\t //save the current mail campaign state\n\t $this->save_current_batch($batch);\t\n\t \t \t \n\t //$subs = $this->subs_mail;\n\t\t \n\t\t //workinh batch tosend\n\t\t $subs = $this->getmails($include_all,$this->batch,$bid);\n\t\t \n\t if (($batch>=0) && ($batch>=$myactivebatch)) {\n\n\t //if ($res = GetGlobal('controller')->calldpc_method('rcshmail.sendit use '.$from.'+'.$to.'+'.$subject.'+'.$body.'+'.$subs)) {\n if ($res = $this->sendit($from,$to,$subject,$body,$subs,$this->ishtml)) {\n\t $this->mailmsg = $res . \" mail(s) send!\";\n\t }\t \n\t else \n\t $this->mailmsg = \"Send failed\";\n\t\t }\n\t\t else \t\n\t\t $this->mailmsg = \"Send bypassed\"; \n\t }\t \n\t else {//one receipent\n\t //if ($res = GetGlobal('controller')->calldpc_method('rcshmail.sendit use '.$from.'+'.$to.'+'.$subject.'+'.$body))\n\t\t if ($res = $this->sendit($from,$to,$subject,$body,null,$this->ishtml)) \n\t\t $this->mailmsg = $res . \" mail(s) send!\";\n\t\t else\n\t\t $this->mailmsg = \"Send failed\";\t\n\t }\t \n\t\t \n\t //auto refresh\n\t $refresh = GetParam('refresh')?GetParam('refresh'):$this->auto_refresh;\n\t if (($refresh>0) && ($res==$this->batch)) {\n $this->refresh_bulk_js(seturl('t=cpsubsend&batchid='.($bid+1).'&batch='.$this->batch.'&refresh='.$refresh),$refresh);\t\t\t \n\t $this->mailmsg .= \"Wait for next batch \" . $this->timeout;\t\t \n\t }\t \n\t \n\t //test\n\t //return $this->batch;\n //return (400);\t \t //??????????????????????????????????????????????????\n\t //echo '---------------------',$res,'---------------------------<br>';\n\t \n\t if ($res<$this->batch) //means end of campaign\n\t $this->reset_batch_state();\n\t \n\t return ($res);//how many mails tried to send (batch...)\t \n\t}", "public function index()\n {\n // Busco todos los mails\n $mails = Mail::all();\n \n // Retorno vista\n return view('panel.mails.index', compact('mails'));\n }", "function wpsp_send_tour_design() {\n\t\n\tparse_str ($_POST['tours'], $inquiry_info);\n\t\n\twpsp_email_notify( $inquiry_info, true, true );//confirm to operator\n\twpsp_email_notify( $inquiry_info, false, true ); //confirm to traveller\n\t\n\tdie();\n}", "function messager($m){\r\n\t\tif($m['immediacy']){\r\n\t\t\t$this->boinkIt($m['url']);\r\n\t\t}else {\r\n\t\t\tif($m['goon']){\r\n\t\t\t\tif($m['hl'] == '')$m['hl'] = 'hlRed';\r\n\t\t\t\treturn array($m['title'], $m['text'], $m['hl']);\r\n\t\t\t}else {\r\n\t\t\t\t$w = str_replace(\"<%TITLE%>\", $m['title'], $this->skin->wrapMsg);\r\n\t\t\t\t$w = str_replace(\"<%TEXT%>\", $m['text'], $w);\r\n\t\t\t\t$w = str_replace(\"<%URL%>\", $m['url'], $w);\r\n\t\t\t\t$w = str_replace(\"<%SEC%>\", $m['sec'], $w);\r\n\t\t\t\t$this->export($w);\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private function emailTemplate($data) {\n $body = array_reduce($data, function($prevInput, $curInput) {\n return $prevInput . '<p style=\"font-family:sans-serif;font-size:14px;font-weight:normal;margin:0;Margin-bottom:2px;\">' . $curInput['name'] . ': ' . $curInput['value'] . '</p>' . PHP_EOL;\n });\n\n $email = '<!DOCTYPE html>\n <html>\n <head>\n <meta name=\"viewport\" content=\"width=device-width\">\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n <title>New Online Donation</title>\n <style type=\"text/css\">\n @media only screen and (max-width: 620px) {\n table[class=body] h1 {\n font-size: 28px !important;\n margin-bottom: 10px !important; }\n table[class=body] p,\n table[class=body] ul,\n table[class=body] ol,\n table[class=body] td,\n table[class=body] span,\n table[class=body] a {\n font-size: 16px !important; }\n table[class=body] .wrapper,\n table[class=body] .article {\n padding: 10px !important; }\n table[class=body] .content {\n padding: 0 !important; }\n table[class=body] .container {\n padding: 0 !important;\n width: 100% !important; }\n table[class=body] .main {\n border-left-width: 0 !important;\n border-radius: 0 !important;\n border-right-width: 0 !important; }\n table[class=body] .btn table {\n width: 100% !important; }\n table[class=body] .btn a {\n width: 100% !important; }\n table[class=body] .img-responsive {\n height: auto !important;\n max-width: 100% !important;\n width: auto !important; }}\n @media all {\n .ExternalClass {\n width: 100%; }\n .ExternalClass,\n .ExternalClass p,\n .ExternalClass span,\n .ExternalClass font,\n .ExternalClass td,\n .ExternalClass div {\n line-height: 100%; }\n .apple-link a {\n color: inherit !important;\n font-family: inherit !important;\n font-size: inherit !important;\n font-weight: inherit !important;\n line-height: inherit !important;\n text-decoration: none !important; }\n .btn-primary table td:hover {\n background-color: #34495e !important; }\n .btn-primary a:hover {\n background-color: #34495e !important;\n border-color: #34495e !important; } }\n </style>\n </head>\n <body class=\"\" style=\"background-color:#f6f6f6;font-family:sans-serif;-webkit-font-smoothing:antialiased;font-size:14px;line-height:1.4;margin:0;padding:0;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"body\" style=\"border-collapse:separate;mso-table-lspace:0pt;mso-table-rspace:0pt;background-color:#f6f6f6;width:100%;\">\n <tr>\n <td style=\"font-family:sans-serif;font-size:14px;vertical-align:top;\">&nbsp;</td>\n <td class=\"container\" style=\"font-family:sans-serif;font-size:14px;vertical-align:top;display:block;max-width:960px;padding:10px;width:100%;Margin:0 auto !important;\">\n <div class=\"content\" style=\"box-sizing:border-box;display:block;Margin:0 auto;max-width:100%;padding:10px;\">\n <span class=\"preheader\" style=\"color:transparent;display:none;height:0;max-height:0;max-width:0;opacity:0;overflow:hidden;mso-hide:all;visibility:hidden;width:0;\">New Form Submission</span>\n <table class=\"main\" style=\"border-collapse:separate;mso-table-lspace:0pt;mso-table-rspace:0pt;background:#fff;border-radius:3px;width:100%;\">\n <tr>\n <td class=\"wrapper\" style=\"font-family:sans-serif;font-size:14px;vertical-align:top;box-sizing:border-box;padding:20px;\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:separate;mso-table-lspace:0pt;mso-table-rspace:0pt;width:100%;\">\n <tr>\n <td style=\"font-family:sans-serif;font-size:14px;vertical-align:top;\">\n <p style=\"font-family:sans-serif;font-size:24px;font-weight:normal;margin:0;Margin-bottom:24px;\">Here are the details:</p>\n ' . $body . '\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </div>\n </td>\n <td style=\"font-family:sans-serif;font-size:14px;vertical-align:top;\">&nbsp;</td>\n </tr>\n </table>\n </body>\n </html>';\n \n return $email;\n }", "function sendNewsletter($receiver, $content, $header, $token) {\n $mail = new PHPMailer(true);\n try {\n //Server settings\n // $mail->SMTPDebug = 2;\n $mail->isSMTP(); // Send using SMTP\n $mail->Host = '*******'; // Set the SMTP server to send through\n $mail->SMTPAuth = true; // Enable SMTP authentication\n $mail->Username = '******'; // SMTP username\n $mail->Password = '******'; // SMTP password\n $mail->SMTPSecure = 'ssl'; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged\n $mail->Port = 000; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above\n\n //Recipients\n $mail->setFrom('******', 'Mate App Newsletter');\n $mail->addAddress($receiver); // Name is optional\n $mail->addReplyTo('******', 'Mate App Support');\n\n // Unsubscribe Informationen\n $mail->addCustomHeader('List-Unsubscribe: <mailto: ******?subject=unsubscribe>, <http://newsletter.mate-app.de/sites/unsubscribe.php?mail='.$receiver.'&token='.$token.'>');\n\n // Content\n $mail->isHTML(true); // Set email format to HTML\n $mail->Subject = $header;\n $mail->CharSet = 'UTF-8';\n\n // Attachements\n $mail->AddEmbeddedImage('../images/header.jpg', 'header');\n $mail->AddEmbeddedImage('../images/instagram.png', 'instagram');\n $mail->AddEmbeddedImage('../images/twitter.png', 'twitter');\n\n\n // Place HTML Template here\n $mail->Body = '<body>\n <!-- Roboto einbinden -->\n <link href=\"https://fonts.googleapis.com/css?family=Roboto:100,300\" rel=\"stylesheet\">\n <style type=\"text/css\">\n * {\n font-family: Roboto, sans-serif;\n font-weight: 100;\n color: black;\n font-size: 16px;\n }\n </style>\n\n <!-- Table für Positionierung -->\n <table style=\"table-layout: fixed; width: 900px;\">\n <tr>\n <td colspan=\"8\" style=\"text-align: center;\">\n <img style=\"border-radius: 5px;\" src=\"cid:header\" alt=\"Logo Header\">\n </td>\n </tr>\n <tr style=\"height: 20px;\">\n <td colspan=\"8\"></td>\n </tr>\n <tr>\n <td></td>\n <td colspan=\"6\" style=\"padding-left: 60px\">'.$content.'</td>\n <td></td>\n </tr>\n <tr style=\"height: 40px\">\n <td colspan=\"8\"></td>\n </tr>\n <tr>\n <td></td>\n <td></td>\n <td></td>\n <td colspan=\"2\" style=\"text-align: center;\">\n <a href=\"https://www.instagram.com/officialmateapp/\"><img style=\"width: 30px; margin-right: 10px\" src=\"cid:instagram\" alt=\"Instagram Logo\"></a>\n <a href=\"https://twitter.com/officialmateapp\"><img style=\"width: 30px; margin-left: 10px;\" src=\"cid:twitter\"></a>\n </td>\n <td></td>\n <td></td>\n <td></td>\n </tr>\n <tr style=\"height: 20px;\">\n <td colspan=\"8\"></td>\n </tr>\n <tr>\n <td colspan=\"8\" style=\"text-align: center;\">\n <p style=\"font-size: 22px; color: black !important;\">Du willst immer auf dem Laufenden bleiben?</p>\n </td>\n </tr>\n <tr style=\"height: 20px;\">\n <td colspan=\"8\"></td>\n </tr>\n <tr>\n <td></td>\n <td></td>\n <td colspan=\"4\" style=\"text-align: center; \">\n <a style=\" color: white; font-size: 22px; font-weight: 300; background-color: #FF9933; padding: 8px 100px; text-decoration: none; border-radius: 5px;\" href=\"\">Anmeldung bestätigen</a></td>\n <td></td>\n <td></td>\n </tr>\n <tr style=\"height: 50px;\">\n <td colspan=\"8\"></td>\n </tr>\n <tr>\n <td></td>\n <td style=\"background-color: #FF9933;\" colspan=\"6\"></td>\n <td></td>\n </tr>\n <tr style=\"height: 20px;\">\n <td colspan=\"8\"></td>\n </tr>\n <tr>\n <td style=\"text-align: center; color: #FF9933; font-size: 12px;\" colspan=\"8\">Tobias Pörtner &middot; Beispielstraße 1, 12345 Stadt &middot; <a style=\"text-decoration: none; color: #FF9933; font-size: 12px;\" href=\"tel:+491708275715\">+49 170 8275715</a> &middot; <a style=\"text-decoration: none; color: #FF9933; font-size: 12px;\" href=\"mailto: [email protected]\">[email protected]</a>&middot;\n <a style=\"text-decoration: none; color: #FF9933; font-size: 12px;\" href=\"https://mate-app.de/datenschutz\">Datenschutz</a></td>\n </tr>\n <tr style=\"height: 5px;\">\n <td colspan=\"8\"></td>\n </tr>\n <tr>\n <td style=\"text-align: center; color: #FF9933; font-size: 12px;\" colspan=\"8\">\n <a \n style=\"text-decoration: none; color: #FF9933; font-size: 12px;\" \n href=\"http://newsletter.mate-app.de/sites/unsubscribe.php?mail='.$receiver.'&token='.$token.'\"\n >\n abbestellen\n </a>\n </td>\n </tr>\n </table> \n</body>';\n $mail->AltBody = strip_tags($content);\n $mail->send();\n $mail->clearAllRecipients();\n return '';\n } catch (Exception $e) {\n error_log($mail->ErrorInfo, 3, '../logs/mail_errors.log');\n return $receiver;\n }\n}", "public function show(Mail $mail)\n {\n //\n }", "public function show(Mail $mail)\n {\n //\n }", "function email_settings()\r\n\t{\r\n\t\tglobal $ibforums, $std, $print;\r\n\r\n\t\tif ($ibforums->member['disable_mail'])\r\n\t\t{\r\n\t\t\t$ibforums->lang['no_mail'] = sprintf($ibforums->lang['no_mail'], $ibforums->member['disable_mail_reason']);\r\n\r\n\t\t\t$this->output .= View::make(\"global.warn_window\", ['message' => $ibforums->lang['no_mail']]);\r\n\t\t} else\r\n\t\t{\r\n\r\n\t\t\t// PM_REMINDER: First byte = Email PM when received new\r\n\t\t\t// \t\t\tSecond byte= Show pop-up when new PM received\r\n\r\n\t\t\t$info = array();\r\n\r\n\t\t\tforeach (array('hide_email', 'allow_admin_mails', 'email_full', 'email_pm', 'auto_track') as $k)\r\n\t\t\t{\r\n\t\t\t\tif (!empty($this->member[$k]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$info[$k] = 'checked';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$info['key'] = $this->md5_check;\r\n\r\n\t\t\t$this->output .= View::make(\"ucp.email\", ['Profile' => $info]);\r\n\t\t}\r\n\r\n\t\t$this->page_title = $ibforums->lang['t_welcome'];\r\n\t\t$this->nav = array(\"<a href='\" . $this->base_url . \"act=UserCP&amp;CODE=00'>\" . $ibforums->lang['t_title'] . \"</a>\");\r\n\r\n\t}", "public function sendMail($nodes) {\n\n\t\t$sender = $this->request->getInternalArgument('__sender');\n\t\t$receiver = $this->request->getInternalArgument('__receiver');\n\t\t$copytouser = $this->request->getInternalArgument('__copytouser');\n\n\t\t$emailBody = \"neue Nachricht\\n\\n\";\n\n\t\tfor($i = 0; $i < count ($nodes); $i++){\n\t\t\t$emailBody .= $nodes[$i][0] . ': '. $nodes[$i][1] . \"\\n\";\n\t\t}\n\t\t$template = new \\TYPO3\\Fluid\\View\\StandaloneView();\n\t\t$template->setTemplatePathAndFilename('resource://CRON.FormBuilder/Private/Templates/EMails/Form.html');\n\t\t$template->assign('email', $emailBody);\n\n\t\t// create instance of \\TYPO3\\SwiftMailer\\Message() and set mail details\n\t\t$mail = new \\TYPO3\\SwiftMailer\\Message();\n\t\t$mail->setFrom($sender, 'Absender')\n\t\t ->setTo($receiver, 'Empfänger')\n\t\t ->setSubject('Your Subject')\n\t\t\t ->addPart($emailBody,'text/plain','utf-8');\n\n\t\tif($copytouser == 1){\n\t\t\t//todo\n\t\t\t//$mail->addBcc()\n\t\t}\n\n\t\t$mail->send();\n\t}", "function notifications_instituerarticle($quoi, $id_article, $options) {\n\t$type = 'article';\n\t// ne devrait jamais se produire\n\tif ($options['statut'] == $options['statut_ancien']) {\n\t\tspip_log(\"statut inchange\",'notifications');\n\t\treturn;\n\t}\n\n\tinclude_spip('inc/texte');\n\n\t$modele = \"\";\n\t$id_secteur = sql_getfetsel('id_secteur','spip_articles','id_article='.intval($id_article));\n\t$diogene = sql_fetsel('*','spip_diogenes','id_secteur='.intval($id_secteur).' AND objet IN (\"article\",\"emballe_media\")');\n\t\n\tif(isset($diogene['id_diogene']) && $diogene['objet'] == 'emballe_media'){\n\t\t$type = 'media';\n\t}\n\tspip_log($type,'test');\n\tif ($options['statut'] == 'publie') {\n\t\tif ($GLOBALS['meta'][\"post_dates\"]=='non'\n\t\t\tAND strtotime($options['date'])>time())\n\t\t\t$modele = \"notifications/\".$type.\"_valide\";\n\t\telse\n\t\t\t$modele = \"notifications/\".$type.\"_publie\";\n\t}\n\tif ($options['statut'] == 'prop' AND $options['statut_ancien'] != 'publie')\n\t\t$modele = \"notifications/\".$type.\"_propose\";\n\tspip_log(test_espace_prive());\n\tspip_log($modele,'test');\n\tif ($modele){\n\t\t$destinataires = array();\n\t\tif ($GLOBALS['meta'][\"suivi_edito\"] == \"oui\")\n\t\t\t$destinataires = explode(',',$GLOBALS['meta'][\"adresse_suivi\"]);\n\n\n\t\t$destinataires = pipeline('notifications_destinataires',\n\t\t\tarray(\n\t\t\t\t'args'=>array('quoi'=>$quoi,'id'=>$id_article,'options'=>$options)\n\t\t\t,\n\t\t\t\t'data'=>$destinataires)\n\t\t);\n\n\t\t$texte = email_notification_objet($id_article, \"article\", $modele);\n\t\tspip_log($texte,'test');\n\t\tnotifications_envoyer_mails($destinataires, $texte);\n\t}\n}", "function insert_pm($id_auteur)\n{\n\tif ( $GLOBALS['spipbb']['sw_send_pm_warning'] == \"oui\" ) {\n\t\t$from_id = $GLOBALS['spipbb']['sw_warning_from_admin'] ;\n\t\t$message = $GLOBALS['spipbb']['sw_warning_pm_message'] ;\n\t\t$to_auteur = sql_fetsel('email', 'spip_auteurs', \"id_auteur=$id_auteur\");\n\t\t$from_auteur = sql_fetsel('email', 'spip_auteurs', \"id_auteur=$from_id\");\n\n\t\t// action !!!\n\t\t$envoyer_mail = charger_fonction('envoyer_mail','inc');\n\t\t$titre = nettoyer_titre_email($GLOBALS['spipbb']['sw_warning_pm_titre']);\n\t\t$envoyer_mail($to_auteur['email'],$titre,$message,$from_auteur['email']);\n\t}\n\n}", "public function saveMailOptions()\n\t{\n\t\t/**\n\t\t * @var $ilTabs ilTabsGUI\n\t\t * @var $lng ilLanguage\n\t\t * @var $rbacsystem ilRbacSystem\n\t\t * @var $ilUser ilObjUser\n\t\t * @var $ilSetting ilSetting\n\t\t */\n\t\tglobal $ilUser, $lng, $ilTabs, $ilSetting, $rbacsystem;\n\n\t\tinclude_once 'Services/Mail/classes/class.ilMailGlobalServices.php';\n\t\tif(!$rbacsystem->checkAccess('internal_mail', ilMailGlobalServices::getMailObjectRefId()))\n\t\t{\n\t\t\t$this->ilias->raiseError($lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);\n\t\t}\n\t\t\n\t\t$lng->loadLanguageModule('mail');\n\t\t\n\t\t$this->__initSubTabs('showMailOptions');\n\t\t$ilTabs->activateTab('mail_settings');\n\t\t\n\t\t$this->setHeader();\n\t\t\n\t\trequire_once 'Services/Mail/classes/class.ilMailOptions.php';\n\t\t$mailOptions = new ilMailOptions($ilUser->getId());\n\t\tif($ilSetting->get('usr_settings_hide_mail_incoming_mail') != '1' && \n\t\t $ilSetting->get('usr_settings_disable_mail_incoming_mail') != '1')\n\t\t{\n\t\t\t$incoming_type = (int)$_POST['incoming_type'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$incoming_type = $mailOptions->getIncomingType();\n\t\t}\t\t\t\n\t\t\n\t\t$this->initMailOptionsForm();\n\t\tif($this->form->checkInput())\n\t\t{\t\t\n\t\t\t$mailOptions->updateOptions(\n\t\t\t\tilUtil::stripSlashes($_POST['signature']),\n\t\t\t\t(int)$_POST['linebreak'],\n\t\t\t\t$incoming_type,\n\t\t\t\t(int)$_POST['cronjob_notification']\n\t\t\t);\n\t\t\t\n\t\t\tilUtil::sendSuccess($lng->txt('mail_options_saved'));\t\t\t\n\t\t}\n\t\t\n\t\tif(!isset($_POST['incoming_type']))\n\t\t{\n\t\t\t$_POST['incoming_type'] = $mailOptions->getIncomingType();\n\t\t}\n\t\t\n\t\t$this->form->setValuesByPost();\n\t\t\n\t\t$this->tpl->setContent($this->form->getHTML());\n\t\t$this->tpl->show();\n\t}", "function pntresmailer_init(){\n $dbconn =& pnDBGetConn(true);\n $pntable = pnDBGetTables();\n\n// nl_arch_subscriber\n $nl_arch_subscribertable = $pntable['nl_arch_subscriber'];\n $nl_arch_subscribercolumn = &$pntable['nl_arch_subscriber_column'];\n\n $sql = \"CREATE TABLE $nl_arch_subscribertable (\n $nl_arch_subscribercolumn[arch_mid] int(11) NOT NULL default '0',\n $nl_arch_subscribercolumn[sub_reg_id] int(11) NOT NULL default '0',\n $nl_arch_subscribercolumn[arch_date] int(25) NOT NULL default '0',\n $nl_arch_subscribercolumn[arch_read] int(25) NOT NULL default '0')\";\n $dbconn->Execute($sql);\n\n if ($dbconn->ErrorNo() != 0) {\n pnSessionSetVar('errormsg', _CREATETABLEFAILED);\n return false;\n }\n\n// nl_archive\n $nl_archivetable = $pntable['nl_archive'];\n $nl_archivecolumn = &$pntable['nl_archive_column'];\n\n $sql = \"CREATE TABLE $nl_archivetable (\n $nl_archivecolumn[arch_mid] int(11) NOT NULL auto_increment,\n $nl_archivecolumn[arch_issue] tinytext NOT NULL,\n $nl_archivecolumn[arch_message] longtext NOT NULL,\n $nl_archivecolumn[arch_date] int(25) NOT NULL default '0',\n PRIMARY KEY(arch_mid))\";\n $dbconn->Execute($sql);\n\n if ($dbconn->ErrorNo() != 0) {\n pnSessionSetVar('errormsg', _CREATETABLEFAILED);\n return false;\n }\n\n// nl_archive_txt\n $nl_archive_txttable = $pntable['nl_archive_txt'];\n $nl_archive_txtcolumn = &$pntable['nl_archive_txt_column'];\n\n $sql = \"CREATE TABLE $nl_archive_txttable (\n $nl_archive_txtcolumn[arch_mid] int(11) NOT NULL,\n $nl_archive_txtcolumn[arch_issue] tinytext NOT NULL,\n $nl_archive_txtcolumn[arch_message] longtext NOT NULL,\n $nl_archive_txtcolumn[arch_date] int(25) NOT NULL default '0',\n PRIMARY KEY(arch_mid))\";\n $dbconn->Execute($sql);\n\n if ($dbconn->ErrorNo() != 0) {\n pnSessionSetVar('errormsg', _CREATETABLEFAILED);\n return false;\n }\n\n// nl_modules\n $nl_modulestable = $pntable['nl_modules'];\n $nl_modulescolumn = &$pntable['nl_modules_column'];\n\n $sql = \"CREATE TABLE $nl_modulestable (\n $nl_modulescolumn[mod_id] int(11) NOT NULL auto_increment,\n $nl_modulescolumn[mod_pos] int(11) NOT NULL default '0',\n $nl_modulescolumn[mod_file] tinytext NOT NULL,\n $nl_modulescolumn[mod_name] tinytext NOT NULL,\n $nl_modulescolumn[mod_function] tinytext NOT NULL,\n $nl_modulescolumn[mod_descr] tinytext NOT NULL,\n $nl_modulescolumn[mod_version] tinytext NOT NULL,\n $nl_modulescolumn[mod_multi_output] int(5) NOT NULL default '0',\n $nl_modulescolumn[mod_qty] int(5) NOT NULL default '1',\n $nl_modulescolumn[mod_edit] int(5) NOT NULL default '0',\n $nl_modulescolumn[mod_data] mediumtext NOT NULL,\n PRIMARY KEY(mod_id))\";\n $dbconn->Execute($sql);\n\n if ($dbconn->ErrorNo() != 0) {\n pnSessionSetVar('errormsg', _CREATETABLEFAILED);\n return false;\n }\n\n// nl_subscriber\n $nl_subscribertable = $pntable['nl_subscriber'];\n $nl_subscribercolumn = &$pntable['nl_subscriber_column'];\n\n $sql = \"CREATE TABLE $nl_subscribertable (\n $nl_subscribercolumn[sub_reg_id] int(11) NOT NULL auto_increment,\n $nl_subscribercolumn[sub_uid] int(11) NOT NULL default '0',\n $nl_subscribercolumn[sub_name] tinytext NOT NULL,\n $nl_subscribercolumn[sub_email] tinytext NOT NULL,\n $nl_subscribercolumn[sub_last_date] int(25) NOT NULL default '0',\n PRIMARY KEY(sub_reg_id))\";\n $dbconn->Execute($sql);\n\n if ($dbconn->ErrorNo() != 0) {\n pnSessionSetVar('errormsg', _CREATETABLEFAILED);\n return false;\n }\n\n// nl_unsubscribe\n $nl_unsubscribetable = $pntable['nl_unsubscribe'];\n $nl_unsubscribecolumn = &$pntable['nl_unsubscribe_column'];\n\n $sql = \"CREATE TABLE $nl_unsubscribetable (\n $nl_unsubscribecolumn[unsub_reg_id] int(11) NOT NULL default '0',\n $nl_unsubscribecolumn[unsub_uid] int(11) NOT NULL default '0',\n $nl_unsubscribecolumn[unsub_name] tinytext NOT NULL,\n $nl_unsubscribecolumn[unsub_email] tinytext NOT NULL,\n $nl_unsubscribecolumn[unsub_last_date] int(25) NOT NULL default '0',\n $nl_unsubscribecolumn[unsub_date] int(25) NOT NULL default '0',\n $nl_unsubscribecolumn[unsub_received] int(5) NOT NULL default '0',\n $nl_unsubscribecolumn[unsub_remote_addr] tinytext NOT NULL,\n $nl_unsubscribecolumn[unsub_user_agent] tinytext NOT NULL,\n $nl_unsubscribecolumn[unsub_who] int(11) NOT NULL default '0')\";\n $dbconn->Execute($sql);\n\n if ($dbconn->ErrorNo() != 0) {\n pnSessionSetVar('errormsg', _CREATETABLEFAILED);\n return false;\n }\n\n// nl_var\n $nl_vartable = $pntable['nl_var'];\n $nl_varcolumn = &$pntable['nl_var_column'];\n\n $sql = \"CREATE TABLE $nl_vartable (\n $nl_varcolumn[nl_var_id] int(11) NOT NULL default '0',\n $nl_varcolumn[nl_header] mediumtext NOT NULL,\n $nl_varcolumn[nl_footer] mediumtext NOT NULL,\n $nl_varcolumn[nl_subject] tinytext NOT NULL,\n $nl_varcolumn[nl_name] tinytext NOT NULL,\n $nl_varcolumn[nl_email] tinytext NOT NULL,\n $nl_varcolumn[nl_url] tinytext NOT NULL,\n $nl_varcolumn[nl_tpl_html] tinytext NOT NULL,\n $nl_varcolumn[nl_tpl_text] tinytext NOT NULL,\n $nl_varcolumn[nl_issue] int(11) NOT NULL default '0',\n $nl_varcolumn[nl_bulk_count] int(5) NOT NULL default '500',\n $nl_varcolumn[nl_loop_count] int(5) NOT NULL default '5',\n $nl_varcolumn[nl_mail_server] tinytext NOT NULL,\n $nl_varcolumn[nl_unreg] int(5) NOT NULL default '0',\n $nl_varcolumn[nl_system] int(5) NOT NULL default '0',\n $nl_varcolumn[nl_popup] int(5) NOT NULL default '0',\n $nl_varcolumn[nl_popup_days] int(5) NOT NULL default '10',\n $nl_varcolumn[nl_sample] int(5) NOT NULL default '0',\n $nl_varcolumn[nl_personal] int(5) NOT NULL default '0',\n $nl_varcolumn[nl_resub] int(5) NOT NULL default '1',\n PRIMARY KEY(nl_var_id))\";\n $dbconn->Execute($sql);\n\n if ($dbconn->ErrorNo() != 0) {\n pnSessionSetVar('errormsg', _CREATETABLEFAILED);\n return false;\n }\n\n $sql = \"INSERT INTO $nl_vartable VALUES (1,'Here is this weeks newsletter.','Thanks for checking out our news.\\r\\n\\r\\nsincerely,\\r\\nme','Our Newsletter','Your Site Name','[email protected]','http://www.yoursite.com','default/html.tpl','default/text.tpl',1,500,5,'localhost',0,0,0,10,0,0,1)\";\n $dbconn->Execute($sql);\n\n if ($dbconn->ErrorNo() != 0) {\n pnSessionSetVar('errormsg', _CREATETABLEFAILED);\n return false;\n }\n\n return true;\n}", "function Footer()\n {\n\n $niveau_etab = \"\";\n $nom_etab = getSettingValue(\"gepiSchoolName\");\n $adresse1_etab = getSettingValue(\"gepiSchoolAdress1\");\n $adresse2_etab = getSettingValue(\"gepiSchoolAdress2\");\n $cp_etab = getSettingValue(\"gepiSchoolZipCode\");\n $ville_etab = getSettingValue(\"gepiSchoolCity\");\n $cedex_etab = \"\";\n $telephone_etab = getSettingValue(\"gepiSchoolTel\");\n $fax_etab = getSettingValue(\"gepiSchoolFax\");\n $mel_etab = getSettingValue(\"gepiSchoolEmail\");\n\n //Positionnement à 1 cm du bas et 0,5cm + 0,5cm du coté gauche\n \t$this->SetXY(5,-10);\n //Police DejaVu Gras 6\n $this->SetFont('DejaVu','B',8);\n\t$this->SetLineWidth(0,2);\n\t$this->SetDrawColor(0, 0, 0);\n\t$this->Line(10, 280, 200, 280);\n\t$this->SetFont('DejaVu','',10);\n\t$this->SetY(280);\n\t$adresse = $niveau_etab.\" \".$nom_etab.\" - \".$adresse1_etab.\" - \".$cp_etab.\" \".$ville_etab.\" \".$cedex_etab;\n\tif($adresse2_etab!=\"\")\n\t{\n\t $niveau_etab.\" \".$nom_etab.\" - \".$adresse1_etab.\" \".$adresse2_etab.\" - \".$cp_etab.\" \".$ville_etab.\" \".$cedex_etab;\n\t}\n\tif($telephone_etab!=\"\" and $fax_etab!=\"\" and $mel_etab!=\"\")\n\t{\n\t $adresse2 = \"Tél : \".$telephone_etab.\" - Fax : \".$fax_etab.\" - Mèl : \".$mel_etab;\n\t}\n\tif($telephone_etab==\"\" and $fax_etab!=\"\" and $mel_etab!=\"\")\n\t{\n\t $adresse2 = \"Fax : \".$fax_etab.\" - Mèl : \".$mel_etab;\n\t}\n\tif($telephone_etab!=\"\" and $fax_etab==\"\" and $mel_etab!=\"\")\n\t{\n\t $adresse2 = \"Tél : \".$telephone_etab.\" - Mèl : \".$mel_etab;\n\t}\n\tif($telephone_etab!=\"\" and $fax_etab!=\"\" and $mel_etab==\"\")\n\t{\n\t $adresse2 = \"Tél : \".$telephone_etab.\" - Fax : \".$fax_etab;\n\t}\n\n\t$this->Cell(0, 4.5, ($adresse), 0, 1, 'C', '');\n\t$this->Cell(0, 4.5, ($adresse2), 0, 1, 'C', '');\n }", "public function mrMarkupEmailListOnSend() {\n // Invoke javascript:markMrListItemSent(updatedString) so that the button in the listing window has the new commId.\n $markMrListItemSentText = 'markMrListItemSent(\"' . $this->mrEmailWidgetId() \n . '\", mrEmailSentWidgetMarkupJS(' . $this->commId() . ', ' . $this->recipientId() . ', \"' . $this->mrEmailWidgetId() . '\"))';\n $script = \"<script type='text/javascript'>eval('\" . $markMrListItemSentText . \"');</script>\\r\\n\";\n self::$debugger->becho('mrMarkupEmailListOnSend script', $script, 0);\n echo $script;\n }", "public function actionMail() {\n\t\t$content = ModelBase::factory('Setting')->handleMail($this->data);\n\n\t\tif ($content->get('updated')) $this->setAlert('info', 'Email terupdate!');\n\n\t\t// Template configuration\n\t\t$this->layout = 'modules/setting/index.tpl';\n\t\t$data = ModelBase::factory('Template')->getSettingData(compact('content'));\n\n\t\t// Render\n\t\treturn $this->render($data);\n\t}", "public function admin_edit_mainmail(){\n\t\t\t$this->loadModel(\"Support\");\n\t\t\t$mail=$this->Support->findById(1);\n\t\t\t\n\t\t\t/*if data sended by form*/\n\t\t\tif ($this->request->is('post')) {\n\n\t\t\t\t/*get new parameters from form*/\n\t\t\t\t$new=array(\t'mail_from'=>$this->data['Module']['adress'],\n\t\t\t\t\t\t\t'host'=>$this->data['Module']['host'],\n\t\t\t\t\t\t\t'password'=>$this->data['Module']['password'],\n\t\t\t\t\t\t\t'port'=>$this->data['Module']['port'],\n\t\t\t\t\t\t\t);\n\n\t\t\t\t/*save new adress to table \"mail_dests\"*/\n\t\t\t\t$this->Support->id=1;\n\t\t\t\t$this->Support->save($new);\n\n\t\t\t\t/*back*/\n\t\t\t\t$this->redirect(array('action'=>'admin_mail'));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t/*set variables of page*/\n\t\t\t$this->set(\"title\", \"Configuration\");\n\t\t\t$this->set(\"legend\", \"Edit adress\");\n\t\t\t$this->set(compact('mail'));\n\t\t\t}", "function mymail($to, $title, $body, $from = '') {\n\n $controlquery = doquery(\"SELECT * FROM {{table}} WHERE id='1' LIMIT 1\", \"control\");\n $controlrow = mysql_fetch_array($controlquery);\n extract($controlrow);\n \n\n $from = trim($from);\n\n if (!$from) {\n $from = '<'.$controlrow[\"adminemail\"].'>';\n }\n\n $rp = $controlrow[\"adminemail\"];\n $org = '$gameurl';\n $mailer = 'PHP';\n\n $head = '';\n $head .= \"Content-Type: text/plain \\r\\n\";\n $head .= \"Date: \". date('r'). \" \\r\\n\";\n $head .= \"Return-Path: $rp \\r\\n\";\n $head .= \"From: $from \\r\\n\";\n $head .= \"Sender: $from \\r\\n\";\n $head .= \"Reply-To: $from \\r\\n\";\n $head .= \"Organization: $org \\r\\n\";\n $head .= \"X-Sender: $from \\r\\n\";\n $head .= \"X-Priority: 3 \\r\\n\";\n $head .= \"X-Mailer: $mailer \\r\\n\";\n\n $body = str_replace(\"\\r\\n\", \"\\n\", $body);\n $body = str_replace(\"\\n\", \"\\r\\n\", $body);\n\n return mail($to, $title, $body, $head);\n \n}" ]
[ "0.6490101", "0.6184721", "0.61243", "0.60292226", "0.60062337", "0.5996507", "0.5986808", "0.5965648", "0.5888242", "0.58308923", "0.5782423", "0.57776356", "0.57763666", "0.5753894", "0.57513946", "0.573998", "0.57354623", "0.57199585", "0.57161903", "0.5694261", "0.56671506", "0.5657666", "0.5655613", "0.56536996", "0.56497777", "0.5642866", "0.5636479", "0.5635588", "0.5622538", "0.56104755", "0.5609688", "0.5607498", "0.55993205", "0.5599318", "0.55861306", "0.5586125", "0.55814075", "0.55762833", "0.5576017", "0.5570573", "0.555537", "0.55497175", "0.5542193", "0.5536737", "0.5535329", "0.5535051", "0.5524617", "0.5523887", "0.5507738", "0.5507593", "0.5507553", "0.550709", "0.5500499", "0.5494687", "0.5494229", "0.5494007", "0.54929596", "0.5487898", "0.5487568", "0.5483575", "0.5482217", "0.54758424", "0.54755175", "0.54699326", "0.5468822", "0.5462323", "0.54525125", "0.5449139", "0.5445671", "0.54432356", "0.5440688", "0.5436108", "0.54354286", "0.5435387", "0.5428433", "0.54166687", "0.5415679", "0.5414725", "0.5410584", "0.5410318", "0.54091007", "0.53967947", "0.5393213", "0.5388402", "0.5382138", "0.5373249", "0.537284", "0.5369627", "0.53654927", "0.53654927", "0.53623617", "0.53606546", "0.53598857", "0.5354476", "0.5353304", "0.5346798", "0.53463", "0.533347", "0.5327052", "0.53228545", "0.5321119" ]
0.0
-1
/ Gestion des Equipes
function insertEquipe ($tab) { $con = connexion (); if($con != null) { $requete = "insert into equipe values (null,'".$tab['nomE']."','".$tab['nomC']."','".$tab['prenomC']."','".$tab['numeroC']."','".$tab['idcoach']."');"; mysqli_query($con, $requete); deconnexion($con); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 contarInventario(){\n\t}", "public function linea_colectivo();", "function apropos(){\n\t\t\t$this->data->content=\"aProposView.php\";\n\t\t\t$this->prepView();\n\t\t\t// Selectionne et charge la vue\n\t\t\trequire_once(\"view/mainView.php\");\n\t\t}", "public function hacer(){\n // renderizamos vista\n require_once 'views/pedido/hacer.php';\n }", "function formulaires_editer_composition_objet_charger($type,$id){\n\t$valeurs = array();\n\t$table_objet_sql = table_objet_sql($type);\n\t$id_table_objet = id_table_objet($type);\n\t$valeurs[$id_table_objet] = intval($id);\n\n\t$row = sql_fetsel('composition,composition_lock',$table_objet_sql,\"$id_table_objet=\".intval($id));\n\tif (!autoriser('styliser',$type,$id,NULL,array('row'=>$row))){\n\t\t$valeurs['editable'] = false;\n\t}\n\telse {\n\n\t\tif ($type=='rubrique'){\n\t\t\t$config_accueil = true;\n\t\t\tif (isset($GLOBALS['meta']['compositions'])){\n\t\t\t\t$config = unserialize($GLOBALS['meta']['compositions']);\n\t\t\t\t$config_accueil = $config['utiliser_article_accueil'] != 'non';\n\t\t\t}\n\t\t\tif ($config_accueil){\n\t\t\t\t$valeurs['id_article_accueil'] = sql_getfetsel('id_article_accueil',$table_objet_sql,\"$id_table_objet=\".intval($id));\n\t\t\t\t$valeurs['id_article_accueil'] = $valeurs['id_article_accueil'] ? $valeurs['id_article_accueil'] : '0';\n\t\t\t}\n\t\t}\n\t\t$valeurs['composition'] = $row['composition'];\n\t\t$valeurs['composition_lock'] = $row['composition_lock'];\n\n\t\t$valeurs['compositions'] = compositions_lister_disponibles($type);\n\t\t$valeurs['compositions'] = reset($valeurs['compositions']); // on ne regarde qu'un seul type\n\t\tif (is_array($valeurs['compositions']) AND !isset($valeurs['compositions'][''])){\n\t\t\t$valeurs['compositions'] = array_merge(\n\t\t\t\tarray(''=>array('nom'=>_T('compositions:label_pas_de_composition'),'description'=>'','icon'=>'','configuration'=>'')),\n\t\t\t\t$valeurs['compositions']\n\t\t\t);\n\t\t}\n\t\t$valeurs['_hidden'] = \"<input type='hidden' name='$id_table_objet' value='$id' />\";\n\n\t\tif (!is_array($valeurs['compositions']) AND !isset($valeurs['id_article_accueil']))\n\t\t\t$valeurs['editable'] = false;\n\t}\n\n\treturn $valeurs;\n}", "public function geraInterface(){\n # Abre o template da classe basica e armazena conteudo do modelo\n $modeloAdm = Util::getConteudoTemplate($this->gui.'/Modelo.adm.tpl');\n $modeloCad = Util::getConteudoTemplate($this->gui.'/Modelo.cad.tpl');\n $modeloEdit = Util::getConteudoTemplate($this->gui.'/Modelo.edit.tpl');\n\n $dir = '';\n\n # Abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n\n # Varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n // === Nao gerar interface de tabelas n:m\n if((string)$aTabela['TIPO_TABELA'] == 'N:M')\n continue;\n\n $copiaModeloAdm = $modeloAdm;\n $copiaModeloCad = $modeloCad;\n $copiaModeloEdit = $modeloEdit;\n\n $nomeClasse\t = ucfirst($this->getCamelMode((string)$aTabela['NOME']));\n $objetoClasse = \"\\$o$nomeClasse\";\n\n # Varre a estrutura dos campos da tabela em questao\n $aPKRequest = $aCampoPK = $aCampoCad = $aCampoEdit = $aTituloAdm = $aCampoAdm = $aGetAll = array();\n $PK = $ID_PK = $label = $campoAdm = $componenteCad = $componenteEdit = NULL;\n\n foreach($aTabela as $oCampo){\n $nomeFKClasse = ucfirst($this->getCamelMode((string)$oCampo->FKTABELA));\n //$label = ((string)$oCampo->FKCAMPO != '') ? ucfirst(preg_replace(\"#^(?:id_?|cd_?)(.*?)#is\", \"$1\", (string)$oCampo->NOME)) : \n $label = ((string)$oCampo->FKCAMPO != '') ? $nomeFKClasse :\n ucfirst(str_replace((string)$aTabela['NOME'], \"\", (string)$oCampo->NOME));\n\n $campoAdm = ((string)$oCampo->FKCAMPO != '') ? $objetoClasse.\"->o$label\".\"->\".$this->getTituloCombo((string)$oCampo->FKTABELA) :\n $objetoClasse.\"->$oCampo->NOME\";\n\n if((int)$oCampo->CHAVE == 1){\n $aPKRequest[] = \"\\$_REQUEST['{$oCampo->NOME}']\";\n $aCampoPK[] = Form::geraHidden((string)$oCampo->NOME);\n\n if((string)$oCampo->FKTABELA != ''){ // Tabela cuja PK = FK => Relacao 1:1\n $PK = \"o$nomeFKClasse\".\"->\".$oCampo->FKCAMPO;\n $ID_PK = $oCampo->FKCAMPO;\n\n //print \"($objetoClasse, {$oCampo->NOME}, $label, $nomeFKClasse, \".$this->getTituloCombo((string)$oCampo->FKTABELA).\", 'CAD')\\n\";\n $componenteCad = Form::geraSelect($objetoClasse, (string)$oCampo->NOME, $label, $oCampo->FKCAMPO, $this->getTituloCombo((string)$oCampo->FKTABELA), 'CAD', $this->gui);\n $componenteEdit = Form::geraSelect($objetoClasse, (string)$oCampo->NOME, $label, $oCampo->FKCAMPO, $this->getTituloCombo((string)$oCampo->FKTABELA), 'EDIT', $this->gui);\n\n } else {\n $PK = (string)$oCampo->NOME;\n $ID_PK = (string)$oCampo->NOME;\n }\n } else {\n switch((string)$oCampo->TIPO){\n case \"date\":\n $componenteCad = Form::geraCalendario($objetoClasse, (string)$oCampo->NOME, $label, 'CAD');\n $componenteEdit = Form::geraCalendario($objetoClasse, (string)$oCampo->NOME, $label, 'EDIT');\n $campoAdm = Form::geraCalendario($objetoClasse, (string)$oCampo->NOME, $label, 'ADM');\n break;\n\n case \"datetime\":\n case \"timestamp\":\n $componenteCad = Form::geraCalendarioDataHora($objetoClasse, (string)$oCampo->NOME, $label, 'CAD');\n $componenteEdit = Form::geraCalendarioDataHora($objetoClasse, (string)$oCampo->NOME, $label, 'EDIT');\n $campoAdm = Form::geraCalendarioDataHora($objetoClasse, (string)$oCampo->NOME, $label, 'ADM');\n break;\n\n case \"text\": \n $componenteCad = Form::geraTextArea($objetoClasse, (string)$oCampo->NOME, $label, 'CAD', $this->gui);\n $componenteEdit = Form::geraTextArea($objetoClasse, (string)$oCampo->NOME, $label, 'EDIT', $this->gui);\n break;\n\n case \"tinyint(1)\": \n $componenteCad = Form::geraCheckBox($objetoClasse, (string)$oCampo->NOME, $label, 'CAD', $this->gui);\n $componenteEdit = Form::geraCheckBox($objetoClasse, (string)$oCampo->NOME, $label, 'EDIT', $this->gui);\n break;\n\n default:\n if($oCampo->FKCAMPO != ''){\n $componenteCad = Form::geraSelect($objetoClasse, (string)$oCampo->NOME, $label, $oCampo->FKCAMPO, $this->getTituloCombo((string)$oCampo->FKTABELA), 'CAD', $this->gui);\n $componenteEdit = Form::geraSelect($objetoClasse, (string)$oCampo->NOME, $label, $oCampo->FKCAMPO, $this->getTituloCombo((string)$oCampo->FKTABELA), 'EDIT', $this->gui);\n }\n else{\n $componenteCad = (preg_match(\"#(?:senha|password)#is\", $oCampo->NOME)) ? \n Form::geraPassword($objetoClasse, (string)$oCampo->NOME, $label, 'CAD', $this->gui) :\n Form::geraInput($objetoClasse, (string)$oCampo->NOME, $label, 'CAD', (string)$oCampo->TIPO, $this->gui);\n\n $componenteEdit = (preg_match(\"#(?:senha|password)#is\", $oCampo->NOME)) ? \n Form::geraPassword($objetoClasse, (string)$oCampo->NOME, $label, 'EDIT', $this->gui) :\n Form::geraInput($objetoClasse, (string)$oCampo->NOME, $label, 'EDIT', (string)$oCampo->TIPO, $this->gui);\n }\n # ============ Campo Enum =============\n if(preg_match(\"#enum#i\", (string)$oCampo->TIPO)){\n $componenteCad = Form::geraEnum($objetoClasse, (string)$oCampo->NOME, (string)$oCampo->TIPO, $label, 'CAD', $this->gui);\n $componenteEdit = Form::geraEnum($objetoClasse, (string)$oCampo->NOME, (string)$oCampo->TIPO, $label, 'EDIT', $this->gui);\t\n } \n break;\n }\n }\n $aCampoCad[] = $componenteCad;\n $aCampoEdit[] = $componenteEdit;\n $aTituloAdm[] = \"<th>$label</th>\";\n $aCampoAdm[] = \"<td><?=$campoAdm?></td>\";\n }\n\n # ===== Montar lista dos metodos Carregar Colecao =======\n $aTabelaFK = $this->retornaTabelasFK((string)$aTabela['NOME']);\n\n foreach($aTabelaFK as $oCampoFK => $oDadosTabelaFK){\n $nomeClasseFK\t = ucfirst($this->getCamelMode($oDadosTabelaFK['FKTABELA']));\n $nomeObjetoFK\t = ucfirst(preg_replace(\"#^(?:id_?|cd_?)(.*?)#is\", \"$1\", $oCampoFK));\n $aGetAll[] = \"\\$a$nomeClasseFK = \\$oControle->getAll$nomeClasseFK();\"; \n }\n\n # monta demais valores a serem substituidos\n $sPKRequest = join($aPKRequest, \", \");\n $sTituloAdm = join($aTituloAdm, \"\\n\\t\\t\\t\");\n $sCampoAdm = join($aCampoAdm, \"\\n\\t\\t\\t\");\n $sCampoCad = join($aCampoCad, \"\\n\");\n $sCampoEdit = join($aCampoEdit, \"\\n\");\n $sCampoPK = join($aCampoPK, \"\\n\");\n $sGetAll = (count($aGetAll)>0) ? join($aGetAll,\"\\n\") : \"\";\n\n # substitui todas os parametros pelas variaveis ja processadas\n $copiaModeloAdm = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModeloAdm);\n $copiaModeloAdm = str_replace('%%TITULOATRIBUTOS%%', $sTituloAdm, $copiaModeloAdm);\n $copiaModeloAdm = str_replace('%%VALORATRIBUTOS%%', $sCampoAdm, $copiaModeloAdm);\n $copiaModeloAdm = str_replace('%%ADM_EDIT%%', \t (($PK != '') ? Form::geraAdmEdit($nomeClasse, $ID_PK, $PK, $this->gui) : ''), $copiaModeloAdm);\n $copiaModeloAdm = str_replace('%%ADM_DELETE%%', (($PK != '') ? Form::geraAdmDelete($nomeClasse, $ID_PK, $PK, $this->gui) : ''), $copiaModeloAdm);\n\n /* ========= 2 devido as colunas Editar e Excluir ============= */\n $copiaModeloAdm = str_replace('%%NUMERO_COLUNAS%%', count($aTituloAdm)+2, $copiaModeloAdm);\n $copiaModeloAdm = str_replace('%%PK_REQUEST%%', $sPKRequest, $copiaModeloAdm);\t\t\t\n\n $copiaModeloCad = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModeloCad);\n $copiaModeloCad = str_replace('%%CARREGA_COLECAO%%', $sGetAll, $copiaModeloCad);\n $copiaModeloCad = str_replace('%%ATRIBUICAO%%', $sCampoCad, $copiaModeloCad);\n\n $copiaModeloEdit = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModeloEdit);\n $copiaModeloEdit = str_replace('%%CARREGA_COLECAO%%', $sGetAll, $copiaModeloEdit);\n $copiaModeloEdit = str_replace('%%ATRIBUICAO%%', $sCampoEdit, $copiaModeloEdit);\n $copiaModeloEdit = str_replace('%%CHAVE_PRIMARIA%%', $sCampoPK, $copiaModeloEdit);\n $copiaModeloEdit = str_replace('%%PK%%', $PK, $copiaModeloEdit);\n $copiaModeloEdit = str_replace('%%ID_PK%%', $ID_PK, $copiaModeloEdit);\n\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/\";\n\n if(!file_exists($dir)) mkdir($dir);\n\n $fpAdm = fopen(\"$dir/adm$nomeClasse.php\", \"w\"); fputs($fpAdm, $copiaModeloAdm); fclose($fpAdm);\n $fpCad = fopen(\"$dir/cad$nomeClasse.php\", \"w\"); fputs($fpCad, $copiaModeloCad); fclose($fpCad);\n $fpEdit = fopen(\"$dir/edit$nomeClasse.php\", \"w\"); fputs($fpEdit, $copiaModeloEdit); fclose($fpEdit);\n\n // ======= Limpa arrays ======= \n unset($aGetAll);\n unset($aTituloAdm);\n unset($aCampoAdm);\n unset($aCampoCad);\n unset($aCampoEdit);\n unset($aPKRequest);\n unset($aCampoPK);\n }\n\n # ==== Alterar arquivo index =====\n $modeloIndex = Util::getConteudoTemplate($this->gui.'/index.php');\n $modeloIndex = str_replace('%%PROJETO%%', ucfirst($aBanco['NOME']), $modeloIndex);\n\n $fpIndex = fopen(\"$dir/index.php\", \"w\");\n fputs($fpIndex, $modeloIndex); \n fclose($fpIndex);\n \n # ============== Arquivo de titulo ===================\n $modeloTitulo = Util::getConteudoTemplate($this->gui.'/Modelo.titulo.tpl');\n $modeloTitulo = str_replace('%%DATABASE%%', ucfirst($aBanco['NOME']), $modeloTitulo);\n\n $fpTitulo = fopen($dir.\"includes/titulo.php\", \"w\");\n fputs($fpTitulo, $modeloTitulo); \n fclose($fpTitulo);\n \n // ========= Copiar arquivos adicionais do projeto ========\n copy(dirname(dirname(__FILE__)).\"/templates/{$this->gui}/resIndex.php\", \"$dir/resIndex.php\");\n copy(dirname(dirname(__FILE__)).\"/templates/{$this->gui}/principal.php\", \"$dir/principal.php\");\n copy(dirname(dirname(__FILE__)).\"/templates/{$this->gui}/logoff.php\", \"$dir/logoff.php\");\n\n return true;\t\n }", "function evt__agregar()\n\t{\n\t\t$this->set_pantalla('pant_edicion');\n\t}", "public function videPanier()\n {\n $this->CollProduit->vider();\n }", "function evt__3__salida()\n\t{\n\t\t$this->dependencia('eventos')->limpiar_seleccion();\n\t}", "public function lectureContenu ()\n {\n\n //$metadata = simplexml_load_file(\"xmoddledata/metadata.xml\");\n\n // on Vérifie si le cours existe\n\n /* @TODO Partie à décommenter lorsque le module de navigation sera intégré au reste de l'application */\n\n // $nbrCours = $metadata->attributes()->nbrCours;\n // $isFound = false;\n // $i = 0;\n // for ($i = 0; $i < $nbrCours; $i++) {\n // if ($metadata->cours[$i]->attributes()->title == $title && $metadata->cours[$i]->attributes()->id == $id) {\n // $isFound = true;\n // break;\n // }\n // }\n\n // if ($isFound) {\n //$cours = simplexml_load_file(\"xmoddledata/\" . $metadata->cours[$i]->attributes()->id . \"_\" . $metadata->cours[$i]->attributes()->title . \"/description.xml\"); \n\n $description = simplexml_load_file('xmoddledata/2_ModeleDeSupport2/description.xml');\n $notions = simplexml_load_file('xmoddledata/2_ModeleDeSupport2/descriptionNotions.xml');\n\n // Création d'un tableau associatif de notions avec l'id comme clé\n\n $notionsArray = $this->getNotions($notions);\n\n // Construction de la navigation\n $text_parties = \"\";\n $nav_parties = [];\n for ($i = 0; $i < $description->attributes()->nbrParties; $i++) {\n $text_parties = \"<div style='\";\n $text_parties .= $this->getStyle($description->partie[$i]->attributes());\n $text_parties .= \"'\";\n $text_parties .= \" id='\".$i.\"'>\";\n $nav_chapitres = [];\n $text_parties .= $description->partie[$i]->attributes()->title;\n $text_parties .= \"</div>\";\n $text_parties .= \"<br/><br/>\";\n $text_chapitres = \"\";\n for ($j = 0; $j < $description->partie[$i]->attributes()->nbrChapitres; $j++) {\n $text_chapitres .= \"<div style='\";\n $text_chapitres .= $this->getStyle($description->partie[$i]->chapitre[$j]->attributes());\n $text_chapitres .= \"'\";\n $text_chapitres .= \" id='\".$i.\"_\".$j.\"'>\";\n $nav_paragraphes = [];\n $text_chapitres .= $description->partie[$i]->chapitre[$j]->attributes()->title;\n $text_chapitres .= \"</div>\";\n $text_chapitres .= \"<br/><br/>\";\n $text_paragraphes = \"\";\n for ($k = 0; $k < $description->partie[$i]->chapitre[$j]->attributes()->nbrParagraphes; $k++) {\n // On renseigne le titre du paragraphe\n $text_paragraphes .= \"<div style='\";\n $text_paragraphes .= $this->getStyle($description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes());\n $text_paragraphes .= \"'\";\n // Ajout d'un ancre de navigation\n $text_paragraphes .= \" id='\".$i.\"_\".$j.\"_\".$k.\"'>\";\n $text_paragraphes .= $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->title;\n $text_paragraphes .= \"</div>\";\n $text_paragraphes .= \"<br/>\";\n // Navigation avec paragraphes\n $nav_paragraphes[\"\".$i.\"_\".$j.\"_\".$k] = $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->title;\n // On remplit les notions contenus dans le paragraphe\n for ($l = 0; $l < $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->nbrNotions; $l++) {\n $text_paragraphes .= $notionsArray[\"\".$description->partie[$i]->chapitre[$j]->paragraphe[$k]->notion[$l]->attributes()->id];\n }\n }\n $text_chapitres .= $text_paragraphes;\n $nav_chapitres[\"\".$i.\"_\".$j] = $nav_paragraphes;\n }\n $text_parties .= $text_chapitres;\n $nav_parties[\"\".$i] = $nav_chapitres;\n }\n// dd($nav_parties);\n// dd($navigation);\n// dd($description);\n\n // Construction de la page web\n $titre = $description->attributes()->title;\n// dd($description);\n// forearch( $navigation->partie[] as $partie) {\n// dd($pantie);\n// }\n// dd($titre);\n\n\n // $notions = simplexml_load_file(\"../../../fichiersdestructuration/descriptionNotions.xml\");\n\n\n // $nbrNotions = $cours->attributes()->nbrNotions;\n // $notionsConvertis = array();\n // for ($i = 0; $i < $nbrNotions; $i++) {\n // $attributs = $cours->notion[$i]->attributes();\n // $style = \"\";\n // if ($attributs['font-weight'] != null) {\n // $style .= 'font-weight:' . $attributs['font-weight'] . \";\";\n // }\n // if ($attributs['font-size'] != null) {\n // $style .= 'font-size:' . $attributs['font-size'] . \";\";\n // }\n\n // if ($attributs['font-family'] != null) {\n // $style .= 'font-family:' . $attributs['font-family'] . \";\";\n // }\n\n // if ($attributs['color'] != null) {\n // $style .= 'color:' . $attributs['color'] . \";\";\n // }\n\n // if ($attributs['text-decoration'] != null) {\n // $style .= 'text-decoration:' . $attributs['text-decoration'] . \";\";\n // }\n\n // $text = \"\";\n // foreach ($cours->notion[$i]->children() as $child) {\n // $text .= $child->asXML();\n // }\n // $notionHtml = \"<div style='\";\n // $notionHtml .= $style;\n // $notionHtml .= \"'>\";\n // $notionHtml .= $text;\n // $notionHtml .= \"</div>\";\n\n\n // //dd(strval($text));\n // array_push($notionsConvertis, $notionHtml);\n\n // }\n // }else{\n // return view(\"/\");\n // }\n //$notions = $notionsConvertis;\n // return response()->json($notions,200);\n\n // return \"lecture cours\";\n return 0;\n }", "function eventclass_TambahPergerakan()\n\t{\n\t\t$this->events[\"BeforeShowEdit\"]=true;\n\n\n//\tonscreen events\n\n\n\t}", "public function run()\n {\n //\n \t$componentes = array (\n // seguridad\n array('nombre' => 'indice perfiles', 'modulo_id' => 1),\n array('nombre' => 'ver perfil', 'modulo_id' => 1),\n array('nombre' => 'crear perfil', 'modulo_id' => 1),\n array('nombre' => 'editar perfil', 'modulo_id' => 1),\n array('nombre' => 'eliminar perfil', 'modulo_id' => 1),\n array('nombre' => 'indice usuarios', 'modulo_id' => 1),\n array('nombre' => 'ver usuario', 'modulo_id' => 1),\n array('nombre' => 'crear usuario', 'modulo_id' => 1),\n array('nombre' => 'editar usuario', 'modulo_id' => 1),\n array('nombre' => 'eliminar usuario', 'modulo_id' => 1),\n // empleado\n array('nombre' => 'indice empleados', 'modulo_id' => 2),\n array('nombre' => 'ver empleado', 'modulo_id' => 2),\n array('nombre' => 'crear empleado', 'modulo_id' => 2),\n array('nombre' => 'editar empleado', 'modulo_id' => 2),\n array('nombre' => 'indice datos empleado', 'modulo_id' => 2),\n array('nombre' => 'ver datos empleado', 'modulo_id' => 2),\n array('nombre' => 'crear datos empleado', 'modulo_id' => 2),\n array('nombre' => 'editar datos empleado', 'modulo_id' => 2),\n array('nombre' => 'indice grupos', 'modulo_id' => 2),\n array('nombre' => 'ver grupo', 'modulo_id' => 2),\n array('nombre' => 'crear grupo', 'modulo_id' => 2),\n array('nombre' => 'editar grupo', 'modulo_id' => 2),\n // clientes\n array('nombre' => 'indice clientes', 'modulo_id' => 3),\n array('nombre' => 'ver cliente', 'modulo_id' => 3),\n array('nombre' => 'crear cliente', 'modulo_id' => 3),\n array('nombre' => 'editar cliente', 'modulo_id' => 3),\n array('nombre' => 'pagos cliente', 'modulo_id' => 3),\n array('nombre' => 'cotizacion cliente', 'modulo_id' => 3),\n // crm\n array('nombre' => 'indice crm', 'modulo_id' => 4),\n array('nombre' => 'ver crm', 'modulo_id' => 4),\n array('nombre' => 'crear crm', 'modulo_id' => 4),\n array('nombre' => 'editar crm', 'modulo_id' => 4),\n // solicitantes\n array('nombre' => 'indice solicitantes', 'modulo_id' => 5),\n array('nombre' => 'ver solicitante', 'modulo_id' => 5),\n array('nombre' => 'crear solicitante', 'modulo_id' => 5),\n array('nombre' => 'editar solicitante', 'modulo_id' => 5),\n array('nombre' => 'cotizacion solicitante', 'modulo_id' => 5),\n // proveedores\n array('nombre' => 'indice proveedores', 'modulo_id' => 6),\n array('nombre' => 'ver proveedor', 'modulo_id' => 6),\n array('nombre' => 'crear proveedor', 'modulo_id' => 6),\n array('nombre' => 'editar proveedor', 'modulo_id' => 6),\n array('nombre' => 'indice datos proveedor', 'modulo_id' => 6),\n array('nombre' => 'ver datos proveedor', 'modulo_id' => 6),\n array('nombre' => 'crear datos proveedor', 'modulo_id' => 6),\n array('nombre' => 'editar datos proveedor', 'modulo_id' => 6),\n array('nombre' => 'indice filtros', 'modulo_id' => 6),\n array('nombre' => 'ver filtros', 'modulo_id' => 6),\n array('nombre' => 'crear filtros', 'modulo_id' => 6),\n array('nombre' => 'editar filtros', 'modulo_id' => 6),\n array('nombre' => 'indice tipos', 'modulo_id' => 6),\n array('nombre' => 'ver tipos', 'modulo_id' => 6),\n array('nombre' => 'crear tipos', 'modulo_id' => 6),\n array('nombre' => 'editar tipos', 'modulo_id' => 6),\n // productos\n array('nombre' => 'indice productos', 'modulo_id' => 7),\n array('nombre' => 'ver producto', 'modulo_id' => 7),\n array('nombre' => 'alta excel', 'modulo_id' => 7),\n // oficinas\n array('nombre' => 'indice regiones', 'modulo_id' => 8),\n array('nombre' => 'indice estados', 'modulo_id' => 8),\n array('nombre' => 'indice oficinas', 'modulo_id' => 8),\n array('nombre' => 'ver oficina', 'modulo_id' => 8),\n array('nombre' => 'crear oficina', 'modulo_id' => 8),\n array('nombre' => 'editar oficina', 'modulo_id' => 8),\n array('nombre' => 'indice puntos', 'modulo_id' => 8),\n array('nombre' => 'ver punto', 'modulo_id' => 8),\n array('nombre' => 'crear punto', 'modulo_id' => 8),\n array('nombre' => 'editar punto', 'modulo_id' => 8),\n // precargas\n array('nombre' => 'canal de ventas', 'modulo_id' => 9),\n array('nombre' => 'bancos', 'modulo_id' => 9),\n array('nombre' => 'contratos', 'modulo_id' => 9),\n array('nombre' => 'puestos', 'modulo_id' => 9),\n array('nombre' => 'giros', 'modulo_id' => 9),\n array('nombre' => 'forma contacto', 'modulo_id' => 9),\n \t);\n\n \tComponente::insert($componentes);\n }", "public function equipementListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Equipement\");//type array\n\t}", "final function velcom(){\n }", "function peupler_base_produits_demos() {\n\n\t// données des 3 produits à insérer\n\t$set = array(\n\t\tarray('titre'=>'Cube', 'prix'=>'12.5'),\n\t\tarray('titre'=>'Sphere', 'prix'=>'8'),\n\t\tarray('titre'=>'Cylindre','prix'=>'23.99')\n\t);\n\n\t// insertion des 3 produits\n\tsql_insertq_multi('spip_produits_demos', $set);\n\n\t// ajout des logos d'après les fichiers présents dans demo/images (produitdemo_sphere.png etc.)\n\tforeach ($set as $k=>$produit) {\n\n\t\t$titre = $produit['titre'];\n\t\t$id_produitdemo = sql_getfetsel('id_produitdemo',table_objet_sql('produitdemo'),\"titre=\".sql_quote($titre));\n\n\t\t// copie temporaire de l'image dans /tmp\n\t\t$fichier = find_in_path('demo/images/produitdemo_'.strtolower($titre).'.png');\n\t\t$fichier_tmp = _DIR_TMP.pathinfo($image, PATHINFO_FILENAME).'_tmp.png';\n\t\tif (!copy($fichier,$fichier_tmp))\n\t\t\treturn;\n\t\t$name = pathinfo($fichier_tmp, PATHINFO_BASENAME);\n\t\t$type = 'image/png';\n\t\t$size = filesize($fichier_tmp);\n\n\t\t// variable de téléversement\n\t\t$_FILES['logo_on'] = array(\n\t\t\t'name' => $name,\n\t\t\t'tmp_name' => $fichier_tmp,\n\t\t\t'type' => $type,\n\t\t\t'size' => $size,\n\t\t\t'error' => ''\n\t\t);\n\n\t\t// traitements de « editer_logo »\n\t\t$traiter_logo = charger_fonction('traiter','formulaires/editer_logo');\n\t\t$res = $traiter_logo('produitdemo',$id_produitdemo);\n\n\t\t// suppression du fichier temporaire\n\t\tinclude_spip('inc/flock');\n\t\tsupprimer_fichier(find_in_path($fichier_tmp));\n\n\t}\n\n}", "public function run()\n {\n //\n \t$componentes = array (\n // perfil\n array('nombre' => 'indice perfiles', 'modulo_id' => 1),\n array('nombre' => 'ver perfil', 'modulo_id' => 1),\n array('nombre' => 'crear perfil', 'modulo_id' => 1),\n array('nombre' => 'editar perfil', 'modulo_id' => 1),\n array('nombre' => 'eliminar perfil', 'modulo_id' => 1),\n // usuario\n array('nombre' => 'indice usuarios', 'modulo_id' => 1),\n array('nombre' => 'ver usuario', 'modulo_id' => 1),\n array('nombre' => 'crear usuario', 'modulo_id' => 1),\n array('nombre' => 'editar usuario', 'modulo_id' => 1),\n array('nombre' => 'eliminar usuario', 'modulo_id' => 1),\n // empleado\n array('nombre' => 'indice empleados', 'modulo_id' => 2),\n array('nombre' => 'ver empleado', 'modulo_id' => 2),\n array('nombre' => 'crear empleado', 'modulo_id' => 2),\n array('nombre' => 'editar empleado', 'modulo_id' => 2),\n // proveedores\n array('nombre' => 'indice proveedores', 'modulo_id' => 3),\n array('nombre' => 'ver proveedor', 'modulo_id' => 3),\n array('nombre' => 'crear proveedor', 'modulo_id' => 3),\n array('nombre' => 'editar proveedor', 'modulo_id' => 3),\n // sucursales\n array('nombre' => 'indice sucursales', 'modulo_id' => 4),\n array('nombre' => 'ver sucursal', 'modulo_id' => 4),\n array('nombre' => 'crear sucursal', 'modulo_id' => 4),\n array('nombre' => 'editar sucursal', 'modulo_id' => 4),\n // pacientes\n array('nombre' => 'indice pacientes', 'modulo_id' => 5),\n array('nombre' => 'ver paciente', 'modulo_id' => 5),\n array('nombre' => 'crear paciente', 'modulo_id' => 5),\n array('nombre' => 'editar paciente', 'modulo_id' => 5),\n // precargas\n array('nombre' => 'algo', 'modulo_id' => 6),\n // convenios\n array('nombre' => 'indice convenios', 'modulo_id' => 7),\n array('nombre' => 'ver convenio', 'modulo_id' => 7),\n array('nombre' => 'crear convenio', 'modulo_id' => 7),\n array('nombre' => 'editar convenio', 'modulo_id' => 7),\n // productos\n array('nombre' => 'algo', 'modulo_id' => 8),\n // bonos\n array('nombre' => 'algo', 'modulo_id' => 9),\n // comisiones\n array('nombre' => 'algo', 'modulo_id' => 10),\n //CRM\n array('nombre' => 'indice crms', 'modulo_id' => 11 ),\n array('nombre' => 'ver crm', 'modulo_id' => 11 ),\n array('nombre' => 'crear crm', 'modulo_id' => 11 ),\n \t);\n\n \tComponente::insert($componentes);\n }", "public function index()\n {\n return Gestion::all();\n }", "public function gestionPedidos(){\n Utils::isAdmin();\n $gestion = true;\n\n $oPedido = new Pedido();\n $pedidos = $oPedido->getAll();\n\n require_once 'views/pedido/mis_pedidos.php';\n }", "function menu_proposition_evt()\r\n{\r\n\t// Init\r\n\tglobal $trad, $AGENDAS_AFFECTATIONS;\r\n\t$menu_proposition_evt = \"\";\r\n\t////\tAGENDAS ACCESSIBLE EN ECRITURE (de ressource OU mon agendas perso)\r\n\tforeach($AGENDAS_AFFECTATIONS as $agenda_tmp)\r\n\t{\r\n\t\tif(($agenda_tmp[\"type\"]==\"ressource\" && $agenda_tmp[\"droit\"]>=2) || ($agenda_tmp[\"type\"]==\"utilisateur\" && is_auteur($agenda_tmp[\"id_utilisateur\"])))\r\n\t\t{\r\n\t\t\t// Evenements de l'agenda : non confirmé et dont on est pas l'auteur !\r\n\t\t\t$evts_confirmer = db_tableau(\"SELECT T1.* FROM gt_agenda_evenement T1, gt_agenda_jointure_evenement T2 WHERE T1.id_evenement=T2.id_evenement AND T2.id_agenda='\".$agenda_tmp[\"id_agenda\"].\"' AND T2.confirme='0' AND T1.id_utilisateur!='\".$_SESSION[\"user\"][\"id_utilisateur\"].\"'\");\r\n\t\t\tif(count($evts_confirmer)>0)\r\n\t\t\t{\r\n\t\t\t\t// Libelle de l'agenda\r\n\t\t\t\t$menu_proposition_evt .= \"<div id='alerte_proposition\".$agenda_tmp[\"id_agenda\"].\"' style='margin-top:10px;'>\";\r\n\t\t\t\t\t$libelle_tmp = ($agenda_tmp[\"type\"]==\"utilisateur\" && is_auteur($agenda_tmp[\"id_utilisateur\"])) ? $trad[\"AGENDA_evenements_proposes_mon_agenda\"] : $trad[\"AGENDA_evenements_proposes_pour_agenda\"].\" <i>\".$agenda_tmp[\"titre\"].\"</i>\";\r\n\t\t\t\t\t$menu_proposition_evt .= \"<img src=\\\"\".PATH_TPL.\"divers/important_small.png\\\" style='height:15px;vertical-align:middle;' /> <b>\".$libelle_tmp.\"</b>\";\r\n\t\t\t\t\t$menu_proposition_evt .= \"<script type='text/javascript'> $(window).load(function(){ $('#alerte_proposition\".$agenda_tmp[\"id_agenda\"].\"').effect('pulsate',{times:2},1000); }); </script>\";\r\n\t\t\t\t$menu_proposition_evt .= \"</div>\";\r\n\t\t\t\t// Evénements à confirmer sur l'agenda\r\n\t\t\t\t$menu_proposition_evt .= \"<ul style='margin:0px;margin-bottom:10px;padding:0px;'>\";\r\n\t\t\t\tforeach($evts_confirmer as $evt_tmp){\r\n\t\t\t\t\t$libelle_infobulle = temps($evt_tmp[\"date_debut\"],\"complet\",$evt_tmp[\"date_fin\"]).\"<br />\".$trad[\"AGENDA_evenement_propose_par\"].\" \".auteur(user_infos($evt_tmp[\"id_utilisateur\"]),$evt_tmp[\"invite\"]).\"<div style=margin-top:5px;>\".$evt_tmp[\"description\"].\"</div>\";\r\n\t\t\t\t\t$menu_proposition_evt .= \"<li onClick=\\\"confirmer_propostion_evt('\".$evt_tmp[\"id_evenement\"].\"','\".$agenda_tmp[\"id_agenda\"].\"');\\\" \".infobulle($libelle_infobulle).\" class='lien' style='margin-left:30px;margin-top:5px;'>\".$evt_tmp[\"titre\"].\"</li>\";\r\n\t\t\t\t}\r\n\t\t\t\t$menu_proposition_evt .= \"</ul>\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t////\tJAVASCRIPT : CONFIRMER OU PAS UNE PROPOSITION D'EVENEMENT\r\n\tif($menu_proposition_evt!=\"\")\r\n\t{\r\n\t\t$menu_proposition_evt .=\r\n\t\t\t\"<script type='text/javascript'>\r\n\t\t\tfunction confirmer_propostion_evt(id_evt, id_agenda)\r\n\t\t\t{\r\n\t\t\t\tpage_redir = \\\"\".ROOT_PATH.\"module_agenda/index.php?id_agenda=\\\"+id_agenda;\r\n\t\t\t\tif(confirm(\\\"\".$trad[\"AGENDA_evenement_integrer\"].\"\\\"))\t\t\t\tredir(page_redir+'&id_evt_confirm='+id_evt);\r\n\t\t\t\telse if(confirm(\\\"\".$trad[\"AGENDA_evenement_pas_integrer\"].\"\\\"))\tredir(page_redir+'&id_evt_noconfirm='+id_evt);\r\n\t\t\t}\r\n\t\t\t</script>\";\r\n\t}\r\n\r\n\t////\tRETOUR\r\n\treturn $menu_proposition_evt;\r\n}", "public function isDraggable() {}", "function getDraggable() {return $this->readdraggable();}", "public function positions(){\n $this->articlesModel->positions();\n }", "public function relatorioAction() { \r\n \r\n }", "public function actividadesPorSegmento()\n {\n //\n }", "public function run()\n {\n factory(Component::class)->create([\n 'id' => 1,\n 'image' => 'img/imagen-1.png',\n 'title'=>'Ciudadania',\n 'description'=>'Poseer la ciudadanía estadounidense proporciona muchos derechos que los residentes permanentes u otras personas no poseen, incluido el derecho a votar.',\n 'section_id' => 2,\n 'button_id'=>1\n ]);\n\n factory(Component::class)->create([\n 'id' => 2,\n 'image' => 'img/imagen-2.png',\n 'title'=>'Remoción / Deportación',\n 'description'=>'La deportación y la Remoción son términos utilizados para describir el proceso de obligar a un no ciudadano a abandonar los Estados Unidos.',\n 'section_id' => 2,\n 'button_id'=>2\n ]);\n\n factory(Component::class)->create([\n 'id' => 3,\n 'image' => 'img/Visa_estudiante.png',\n 'title'=>'Visas de estudiante',\n 'description'=>'La ley de inmigración provee dos tipos de categoría de visas para estudiar en los Estados Unidos. La visa para estudios académicos, y la visa no académica o estudios vocacionales. Para obtener una visa de estudiante, primero debe solicitar y ser aceptado en una escuela en los E.U.',\n 'section_id' => 7,\n 'button_id'=>3\n ]);\n\n factory(Component::class)->create([\n 'id' => 4,\n 'image' => 'img/intercambio academico.png',\n 'title'=>'Visas de intercambio académico',\n 'description'=>'Esta visa está diseñada para promover el intercambio de personas, conocimiento, y habilidades en los campos de la educación, artes y ciencias. Entre los participantes figuran estudiantes de todos los niveles académicos, alumnos que reciben capacitación laboral con empresas.',\n 'section_id' => 7,\n 'button_id'=>4\n ]);\n\n factory(Component::class)->create([\n 'id' => 5,\n 'image' => 'img/empleo.png',\n 'title'=>'Visa de Empleo Basado en Petición',\n 'description'=>'Las visas de empleo permiten al portador de las mismas trabajar en los Estados Unidos. Todos estos tipos de visas requieren que la compañía u organización contratante trámite primero una petición ante el Departamento de Servicios de Inmigración y Ciudadanía de los Estados Unidos.',\n 'section_id' => 7,\n 'button_id'=>5\n ]);\n\n factory(Component::class)->create([\n 'id' => 6,\n 'image' => 'img/icono-1.png',\n 'title'=>'Consulta inicial y revisión de caso',\n 'section_id' => 3,\n ]);\n\n factory(Component::class)->create([\n 'id' => 7,\n 'image' => 'img/icono-3.png',\n 'title'=>'Te llevaremos de la mano paso a paso en tu proceso',\n 'section_id' => 3,\n ]);\n\n factory(Component::class)->create([\n 'id' => 8,\n 'image' => 'img/icono-2.png',\n 'title'=>'Se inicia el caso',\n 'section_id' => 3,\n ]);\n\n factory(Component::class)->create([\n 'id' => 9,\n 'image' => 'img/icono-4.png',\n 'title'=>'Lo haremos por ti unidos hasta el final',\n 'section_id' => 3,\n ]);\n\n factory(Component::class)->create([\n 'id' => 10,\n 'image' => 'img/blanco-y-negro-1.png',\n 'title'=>'Analuisa Pablos',\n 'subtitle'=>'Socio fundador y Gerente',\n 'description'=>'Analuisa Pablos es la Fundadora y Gerente de The Pablos Law Firm, P.C. donde trabaja exclusivamente en el área de inmigración y naturalización de EE. UU. Asesora a los empleadores en todos los aspectos de inmigración incluidas las visas de no inmigrante e inmigrante, la residencia permanente y la obtención de la ciudadanía.',\n 'section_id' => 4,\n ]);\n\n factory(Component::class)->create([\n 'id' => 11,\n 'image' => 'img/blanco-y-negro-2.png',\n 'title'=>'Jeffery D. Warren',\n 'subtitle'=>'Socio principal',\n 'description'=>'Jeffery D. Warren es un Socio Gerente de la firma de abogados de negocios, finanzas e inmigración global, The Pablos Law Firm, P.C. y mantiene intereses en varias empresas energéticas internacionales en curso.',\n 'section_id' => 4,\n ]);\n\n factory(Component::class)->create([\n 'id' => 12,\n 'title'=>'LLAMANOS AL 915-543-9100',\n 'description'=>'Somos un gran equipo trabajando para ti, brindamos servicios de clase mundial con calidad y seguridad a nuestros clientes. Proporcionamos la mejor estrategia jurídica para solucionar tus problemas en materia migratoria.',\n 'section_id' => 1,\n 'button_id'=>6,\n ]);\n\n factory(Component::class)->create([\n 'id' => 13,\n 'image' => 'img/blanco-y-negro-3.png',\n 'section_id' => 5,\n ]);\n\n factory(Component::class)->create([\n 'id' => 14,\n 'image' => 'img/blanco-y-negro-4.png',\n 'section_id' => 5,\n ]);\n\n factory(Component::class)->create([\n 'id' => 15,\n 'image' => 'img/blanco-y-negro-5.png',\n 'section_id' => 5,\n ]);\n\n factory(Component::class)->create([\n 'id' => 16,\n 'image' => 'img/icono-footer-1.png',\n 'title'=>'Dirección',\n 'description'=>'1112 Montana El Paso \n Texas 79902',\n 'section_id' => 6,\n ]);\n\n factory(Component::class)->create([\n 'id' => 17,\n 'image' => 'img/icono-footer-2.png',\n 'title'=>'Horario',\n 'description'=>'Lunes - Viernes \n 8:00 am - 5:00 pm',\n 'section_id' => 6,\n ]);\n\n factory(Component::class)->create([\n 'id' => 18,\n 'image' => 'img/icono-footer-3.png',\n 'title'=>'Teléfono',\n 'description'=>'Office: +1 915-543-9100',\n 'section_id' => 6,\n ]);\n\n factory(Component::class)->create([\n 'id' => 19,\n 'description'=>'Gran Abogado, gran servicio al cliente. Te lo recomiendo!.\n Mariana Sierra',\n 'section_id' => 8,\n ]);\n\n factory(Component::class)->create([\n 'id' => 20,\n 'description'=>'Excelente atención. Pude entender todo el proceso legal sin ningún estrés. Me ayudó con los papeles para mis estudios.\n Gustavo Bracho.',\n 'section_id' => 8,\n ]);\n\n factory(Component::class)->create([\n 'id' => 21,\n 'description'=>'El servicio es simple y eficiente. El personal es excelente y las tarifas son asequibles.\n Roberto Chavez.',\n 'section_id' => 8,\n ]);\n\n factory(Component::class)->create([\n 'id' => 22,\n 'description'=>'Analuisa Pablos es un gran abogado, los empleados son muy buenos y útiles.\n Mariana Sierra.',\n 'section_id' => 8,\n ]);\n }", "public function equipementachatListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"EquipementAchat\");//type array\n\t}", "function beer($nome) {\n\t$rows = selectBeer($nome);\n\t$voto = votoMedio($nome);\n\tforeach ($rows as $beer) {\n\t?>\n\t\t<div class=\"row\"> \n\t\t\t<div class=\"col-md-6\">\n\t\t\t\t<p>\n\t\t\t\t\tNome: <?= $beer[\"Nome\"] ?><br/>\n\t\t\t\t\tTipo: <?= $beer[\"Tipo\"] ?><br/>\n\t\t\t\t\tGradi: <?= $beer[\"Gradi\"] ?>%<br/>\n\t\t\t\t\tPaese: <?= $beer[\"Paese\"] ?><br/>\n\t\t\t\t\tVoto: <?= $voto ?><br/>\n\t\t\t\t</p>\n\t\t\t\t<p>\n\t\t\t\t\tDescrizione: <br/>\n\t\t\t\t\t<?= $beer[\"Descrizione\"] ?>\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<div class=\"col-md-6\" id=\"<?= $beer[\"Nome\"] ?>\">\n\t\t\t\t<div class=\"draggable\">\n\t\t\t\t\t<img src=\"../img/<?= $_GET[\"Nome\"] ?>.png\" alt=\"<?= $_GET[\"Nome\"] ?>\"\n\t\t\t\t\t width=\"200\" height=\"200\"><br/><br/>\n\t\t\t\t</div>\n\t\t\t\t<!-- Il bottone per aggiungere le birre non sarà visibile su schermi grandi-->\n\t\t\t\t<button class=\"aggiungi hidden-md hidden-lg hidden-xl\"> Aggiungi </button>\n\t\t\t\t<button>\n\t\t\t\t\t<a href =\"http://tweb-lubiejewski.rhcloud.com/progetto/php/scriviRecensione.php?birra=<?= $beer[\"Nome\"] ?>\">\n\t\t\t\t\t\tRecensisci\n\t\t\t\t\t</a>\n\t\t\t\t</button>\n\n\t\t\t</div>\n\t\t</div>\n\t<?php\t\n\t}\n}", "public function tratarDados(){\r\n\t\r\n\t\r\n }", "public function RicercaAvanzata(){\n $view = new VRicerca();\n $view->mostraFiltri();\n }", "function evt__Agregar()\n\t{\n\t\t$this->tabla()->resetear();\n\t\t$this->set_pantalla('pant_edicion');\n\t}", "public function RicercaPerIngredienti(){\n $pm = FPersistentManager::getInstance();\n $cibi = $pm->loadAllObjects();\n $view = new VRicerca();\n $view->mostraIngredienti($cibi);\n }", "protected function OnCreateElements() {}", "protected function OnCreateElements() {}", "public function echarlemagne(){\n //on inclut les scripts pour la recuperation des experiences et google maps pour l'autocomplete des lieux\n \t$this->set('jsIncludes',array('http://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&language=fr&libraries=places','add_experiences'));\n }", "abstract protected function draggable_item($mform);", "function post_eventos()\n\t{\n\t\tif ($this->disparar_importacion_efs ) {\n\t\t\tif (isset($this->s__importacion_efs['datos_tabla'])) {\n\t\t\t\t$clave = array('proyecto' => toba_editor::get_proyecto_cargado(),\n\t\t\t\t\t\t\t\t\t\t\t'componente' => $this->s__importacion_efs['datos_tabla']);\n\t\t\t\t$dt = toba_constructor::get_info($clave, 'toba_datos_tabla');\n\t\t\t\t$this->s__importacion_efs = $dt->exportar_datos_efs($this->s__importacion_efs['pk']);\n\t\t\t\tforeach ($this->s__importacion_efs as $ef) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (! $this->get_tabla()->existe_fila_condicion(array($this->campo_clave => $ef[$this->campo_clave]))) {\n\t\t\t\t\t\t\t$this->get_tabla()->nueva_fila($ef);\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch(toba_error $e) {\n\t\t\t\t\t\ttoba::notificacion()->agregar(\"Error agregando el EF '{$ef[$this->campo_clave]}'. \" . $e->getMessage());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->disparar_importacion_efs = false;\n\t\t}\n\t}", "function drawSelectedProducts(){\n \n }", "public function GestorReglasNegocios() {\n $this->gestorAccesoDatos = new GestorAccesoDatos();\n }", "public function attachEvents();", "public function attachEvents();", "public function especiais()\n {\n $metaTags = [\n 'title' => 'Displan Saúde - Planos empresariais',\n 'description' => 'Displan Seguros. Planos diferenciados para empresas, profissionais e individuais.',\n 'keywords' => 'Displan, Seguros, Preços'\n ];\n\n $dados = array(\n 'operadoras' => $this->operadoras->getByCategory('especiais'),\n 'categorias' => $this->categorias->all(),\n 'metaTags' => $metaTags,\n 'breadcrumb' => [\n ['title' => 'Home', 'url' => '/', 'class' => ''],\n ['title' => 'Planos para Profissionais', 'url' => 'planos-especiais/', 'class' => 'active']\n ]\n );\n\n $this->load->view('inc/header', $dados);\n $this->load->view('planos/especiais', $dados);\n $this->load->view('inc/footer');\n }", "function afficher(){?>\n<div id=\"zonetravail\"><div class = 'titre'>GESTION DES COMPTES.</div>\n<form action=\"<?php echo $_SERVER['PHP_SELF']; ?>\" name=\"frmgrid\" method=\"POST\" enctype=\"multipart/form-data\">\n\t<div class = 'cadre'><fieldset><legend>Liste des classes.</legend>\n <?php \n\t$print = new printlink('imprimercompte.php', false);\n\t$print->display();\n\t$query = \"SELECT c.IDCOMPTE, CONCAT(e.NOMEL, ' ', e.PRENOM) AS NOM, c.DATECREATION, c.AUTEUR \n\tFROM compte c \n\tINNER JOIN eleve e ON (e.MATEL = c.CORRESPONDANT) \n\tUNION\n\tSELECT c.IDCOMPTE, CONCAT(p.NOMPROF, ' ', p.PRENOM) AS NOM, c.DATECREATION, c.AUTEUR \n\tFROM compte c \n\tINNER JOIN professeur p ON (p.IDPROF = c.CORRESPONDANT) \n\tUNION \n\tSELECT c.IDCOMPTE, CONCAT(s.NOM, ' ', s.PRENOM) AS NOM, c.DATECREATION, c.AUTEUR \n\tFROM compte c \n\tINNER JOIN staff s ON (s.IDSTAFF = c.CORRESPONDANT)\";\n\t$grid = new grid($query, 0);\n\t$grid->addcolonne(0, \"COMPTE\", 'IDCOMPTE', true);\n\t$grid->addcolonne(1, \"PROPRIETAIRE\", 'NOM', TRUE);\n\t$grid->addcolonne(2, \"DATE CREATION\", 'DATECREATION', TRUE);\n\t$grid->addcolonne(3, \"CREATEUR\", 'AUTEUR', TRUE);\n\t$grid->setColDate(2);\n\t$grid->selectbutton = true;\n\t//On ajoute les cases a cocher que si l'utilisateur peut effectuer des suppressions en cascade\n\tif(is_autorized(\"DEL_COMPTE\"))\n\t\t$grid->selectbutton = true;\n\t//Verifie si l'utilisateur a le droit d'effectuer une suppression de professeur\n\tif(is_autorized(\"DEL_COMPTE\")){\n\t\t$grid->deletebutton = true;\n\t\t$grid->deletebuttontext = \"Supprimer\";\n\t}\n\t//Verifie si l'utilisateur a le droit d'effectuer une modification de professeur\n\tif(is_autorized(\"EDIT_COMPTE\")){\n\t\t$grid->editbutton = true;\n\t\t$grid->editbuttontext = \"Modifier\";\n\t}\n\t$grid->display();\n\t?>\n\t</fieldset></div>\n <div class=\"navigation\"><?php if(is_autorized(\"ADD_COMPTE\")) \n\t\t\tprint \"<input type = 'button' value = 'Ajouter' onclick=\\\"rediriger('ajouter.php');\\\" />\";\n\t\tif(is_autorized(\"DEL_COMPTE\"))\n\t\t\t\tprint \"<input type = 'button' onClick=\\\"deletecheck()\\\" value=\\\"Supprimer\\\"/>\";\n\t?>\n </div>\n </form></div>\n<?php }", "function jqdatag(){\n\n\t\t$grid = $this->defgrid();\n\t\t$grid->setHeight('185');\n\t\t$param['grids'][] = $grid->deploy();\n\n\t\t$grid1 = $this->defgridit();\n\t\t$grid1->setHeight('190');\n\t\t$param['grids'][] = $grid1->deploy();\n\n\t\t// Configura los Paneles\n\t\t$readyLayout = $grid->readyLayout2( 212, 220, $param['grids'][0]['gridname'],$param['grids'][1]['gridname']);\n\n\t\t//Funciones que ejecutan los botones\n\t\t$bodyscript = $this->bodyscript( $param['grids'][0]['gridname'], $param['grids'][1]['gridname'] );\n\n\t\t//Botones Panel Izq\n\t\t$grid->wbotonadd(array('id'=>'fimprime', 'img'=>'assets/default/images/print.png','alt'=> 'Imprimir transferencia', 'label'=>'Reimprimir'));\n\t\t$grid->wbotonadd(array(\"id\"=>\"ordene\" , \"img\"=>\"images/engrana.png\", \"alt\" => \"Orden Estimada\", \"label\"=>\"Orden Estimada\"));\n\t\t$grid->wbotonadd(array(\"id\"=>\"descar\", \"img\"=>\"images/engrana.png\", \"alt\" => \"Descargar Ingredientes\", \"label\"=>\"Descargar Ingred.\"));\n\t\t$grid->wbotonadd(array(\"id\"=>\"recibir\", \"img\"=>\"images/engrana.png\", \"alt\" => \"Recibir Produccion\", \"label\"=>\"Recibir Produccion\"));\n\t\t$grid->wbotonadd(array(\"id\"=>\"cerrado\", \"img\"=>\"images/engrana.png\", \"alt\" => \"Cerrar Orden\", \"label\"=>\"Cerrar Orden\"));\n\n\t\t$WestPanel = $grid->deploywestp();\n\n\t\t//Panel Central\n\t\t$centerpanel = $grid->centerpanel( $id = \"radicional\", $param['grids'][0]['gridname'], $param['grids'][1]['gridname'] );\n\n\t\t$adic = array(\n\t\t\tarray('id'=>'fedita', 'title'=>'Agregar/Editar Registro'),\n\t\t\tarray('id'=>'fshow' , 'title'=>'Mostrar Registro'),\n\t\t\tarray('id'=>'fborra', 'title'=>'Eliminar Registro')\n\t\t);\n\t\t$SouthPanel = $grid->SouthPanel($this->datasis->traevalor('TITULO1'), $adic);\n\n\t\t$param['WestPanel'] = $WestPanel;\n\t\t//$param['EastPanel'] = $EastPanel;\n\t\t$param['SouthPanel'] = $SouthPanel;\n\t\t$param['listados'] = $this->datasis->listados('PRDO', 'JQ');\n\t\t$param['otros'] = $this->datasis->otros('PRDO', 'JQ');\n\t\t$param['temas'] = array('proteo','darkness','anexos1');\n\t\t$param['bodyscript'] = $bodyscript;\n\t\t$param['tabs'] = false;\n\t\t$param['encabeza'] = $this->titp;\n\t\t$param['tamano'] = $this->datasis->getintramenu( substr($this->url,0,-1) );\n\n\t\t$param['script'] = script('plugins/jquery.ui.autocomplete.autoSelectOne.js');\n\t\t$param['readyLayout'] = $readyLayout;\n\t\t$param['centerpanel'] = $centerpanel;\n\n\t\t$this->load->view('jqgrid/crud2',$param);\n\n\t}", "function AfficherEDT($tab_data, $entetes, $creneaux, $type_edt, $login_edt, $period) \r\n{\r\n\tglobal $icone_deposer_alerte;\r\n\t$peut_poster_message=peut_poster_message($_SESSION['statut']);\r\n echo (\"<div class=\\\"fenetre\\\">\\n\");\r\n\r\n echo(\"<div class=\\\"contenu\\\">\r\n\r\n\t\t<div class=\\\"coingh\\\"></div>\r\n <div class=\\\"coindh\\\"></div>\r\n <div class=\\\"partiecentralehaut\\\"></div>\r\n <div class=\\\"droite\\\"></div>\r\n <div class=\\\"gauche\\\"></div>\r\n\t\t<div class=\\\"coingb\\\"></div>\r\n\t\t<div class=\\\"coindb\\\"></div>\r\n\t\t<div class=\\\"partiecentralebas\\\"></div>\r\n\r\n <div class=\\\"tableau\\\">\\n\");\r\n\r\n\r\n// ===== affichage des colonnes\r\n// ===== Les \"display:none\" sont utilisés pour l'accessibilité\r\n $jour = 0;\r\n $isIconeAddUsable = true;\r\n while (isset($entetes['entete'][$jour])) {\r\n\r\n echo(\"<div class=\\\"colonne\".$creneaux['nb_creneaux'].\"\\\">\\n\");\r\n $jour_sem = $entetes['entete'][$jour];\r\n echo(\"<h2 class=\\\"entete\\\"><div class=\\\"cadre\\\"><strong>\".$jour_sem.\"</strong></div></h2>\\n\");\r\n $index_box = 0;\r\n while (isset($tab_data[$jour]['type'][$index_box]))\r\n {\r\n if ($tab_data[$jour]['type'][$index_box] == \"vide\") {\r\n \r\n echo(\"<div class=\\\"\".$tab_data[$jour]['duree'][$index_box].\"\\\">\");\r\n echo(\"<div style=\\\"display:none;\\\">\".$tab_data[$jour]['affiche_creneau'][$index_box].\" - durée = \".$tab_data[$jour]['duree_valeur'][$index_box].\" heure(s)</div>\\n\");\r\n echo (\"<div class=\\\"\".$tab_data[$jour]['couleur'][$index_box].\"\\\">\\n\");\r\n echo (\"<div class=\\\"ButtonBar\\\">\");\r\n AfficheIconePlusNew($type_edt,$tab_data[$jour]['heuredeb_dec'][$index_box],$login_edt,$jour_sem,$tab_data[$jour]['id_creneau'][$index_box], $period);\r\n echo (\"</div>\\n\");\r\n echo (\"</div></div>\\n\"); \r\n \r\n }\r\n else if ($tab_data[$jour]['type'][$index_box] == \"erreur\")\r\n {\r\n \r\n echo(\"<div class=\\\"\".$tab_data[$jour]['duree'][$index_box].\"\\\">\");\r\n echo(\"<div style=\\\"display:none;\\\">\".$tab_data[$jour]['affiche_creneau'][$index_box].\" - durée = \".$tab_data[$jour]['duree_valeur'][$index_box].\" heure(s)</div>\\n\");\r\n echo(\"<div class=\\\"cadreRouge\\\">\\n\");\r\n echo $tab_data[$jour]['contenu'][$index_box];\r\n echo (\"<div class=\\\"ButtonBar\\\">\");\r\n echo (\"</div>\\n\");\r\n echo (\"</div></div>\\n\"); \r\n \r\n }\r\n else if ($tab_data[$jour]['type'][$index_box] == \"conteneur\")\r\n {\r\n echo(\"<div class=\\\"\".$tab_data[$jour]['duree'][$index_box].\"\\\">\\n\");\r\n $isIconeAddUsable = false;\r\n \r\n }\r\n else if ($tab_data[$jour]['type'][$index_box] == \"cours\")\r\n {\r\n echo(\"<div class=\\\"\".$tab_data[$jour]['duree'][$index_box].\"\\\">\");\r\n echo(\"<div style=\\\"display:none;\\\">\".$tab_data[$jour]['affiche_creneau'][$index_box].\" - durée = \".$tab_data[$jour]['duree_valeur'][$index_box].\" heure(s)</div>\\n\");\r\n echo (\"<div class=\\\"\".$tab_data[$jour]['couleur'][$index_box].\"\\\">\");\r\n echo $tab_data[$jour]['contenu'][$index_box];\r\n echo (\"<div class=\\\"ButtonBar\\\">\");\r\n AfficheEffacerIcone($type_edt,$login_edt,$tab_data[$jour]['id_cours'][$index_box], $period);\r\n AfficheModifierIcone($type_edt,$login_edt,$tab_data[$jour]['id_cours'][$index_box], $period);\r\n if ($isIconeAddUsable)\r\n {\r\n AfficheIconePlusAdd($type_edt,0,$login_edt,$jour_sem,$tab_data[$jour]['id_creneau'][$index_box], $period);\r\n }\r\n\r\n\t\t\t\tif($peut_poster_message) {\r\n\t\t\t\t\tif((isset($_GET['appel_depuis_form_message']))&&($_GET['appel_depuis_form_message']==\"y\")) {\r\n\t\t\t\t\t\t$tmp_jour_suivant=get_next_tel_jour($jour+1);\r\n\t\t\t\t\t\tif(($tmp_jour_suivant!=\"\")&&(is_numeric($tmp_jour_suivant))) {\r\n\t\t\t\t\t\t\t$tmp_chaine_date=strftime(\"%d/%m/%Y\", time()+24*3600*$tmp_jour_suivant);\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$tmp_chaine_date=strftime(\"%d/%m/%Y\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$chaine_heure_visibilite=\"\";\r\n\t\t\t\t\t\tif((isset($tab_data[$jour]['heuredebut'][$index_box]))&&($tab_data[$jour]['heuredebut'][$index_box]!='')) {\r\n\t\t\t\t\t\t\t$chaine_heure_visibilite=\"document.getElementById('heure_visibilite').value='\".$tab_data[$jour]['heuredebut'][$index_box].\"';\";\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\techo \"<div style='float:right;width:10px'><a href='#' onclick=\\\"document.getElementById('date_visibilite').value='$tmp_chaine_date';\".$chaine_heure_visibilite.\"return false;\\\" target='_blank' title=\\\"Fixer la date et l'heure du message\\ndans le module Alertes/Informations de Gepi\\\"><img src='../images/icons/sound.png' width='10' height='10' /></a></div>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telseif(isset($tab_data[$jour]['login_prof'][$index_box])) {\r\n\t\t\t\t\t\t// Récupérer le jour suivant\r\n\t\t\t\t\t\techo \"<div style='float:right;width:10px'><a href='../mod_alerte/form_message.php?message_envoye=y&amp;login_dest=\".$tab_data[$jour]['login_prof'][$index_box];\r\n\t\t\t\t\t\t$tmp_jour_suivant=get_next_tel_jour($jour+1);\r\n\t\t\t\t\t\tif(($tmp_jour_suivant!=\"\")&&(is_numeric($tmp_jour_suivant))) {\r\n\t\t\t\t\t\t\techo \"&date_visibilite=\".strftime(\"%d/%m/%Y\", time()+24*3600*$tmp_jour_suivant);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\techo \"&date_visibilite=\".strftime(\"%d/%m/%Y\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif((isset($tab_data[$jour]['heuredebut'][$index_box]))&&($tab_data[$jour]['heuredebut'][$index_box]!='')) {\r\n\t\t\t\t\t\t\techo \"&amp;heure_visibilite=\".$tab_data[$jour]['heuredebut'][$index_box];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\techo add_token_in_url().\"' target='_blank' title=\\\"Déposer pour ce professeur un message\\ndans le module Alertes/Informations de Gepi\\\"><img src='../images/icons/$icone_deposer_alerte' width='10' height='10' /></a></div>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n echo (\"</div>\\n\");\r\n echo (\"</div></div>\\n\"); \r\n \r\n }\r\n else if ($tab_data[$jour]['type'][$index_box] == \"fin_conteneur\")\r\n {\r\n echo(\"</div>\\n\");\r\n $isIconeAddUsable = true;\r\n }\r\n else \r\n {\r\n // ========= type de box non implémentée\r\n \r\n }\r\n\r\n $index_box++;\r\n }\r\n\r\n echo(\"</div>\\n\");\r\n\t\t/*\r\n\t\techo \"<hr /><pre>\";\r\n\t\tprint_r($tab_data[$jour]);\r\n\t\techo \"<pre>\";\r\n\t\t*/\r\n $jour++;\r\n }\r\n\r\n// ===== affichage de la colonne créneaux\r\n\r\n echo (\"<div class=\\\"creneaux\".$creneaux['nb_creneaux'].\"\\\">\\n\");\r\n echo (\"<div class=\\\"entete_creneaux\\\"></div>\\n\");\r\n for ($i = 0; $i < $creneaux['nb_creneaux']; $i++)\r\n {\r\n/*\r\n if(in_array($creneaux['creneaux'][$i], array('R0', 'R1', 'R2'))) {\r\n echo(\"<div class=\\\"demihoraires\\\"><div class=\\\"cadre\\\"><strong>\".$creneaux['creneaux'][$i].\"</strong></div></div>\\n\");\r\n }\r\n else {\r\n*/\r\n echo(\"<div class=\\\"horaires\\\"><div class=\\\"cadre\\\"><strong>\".$creneaux['creneaux'][$i].\"</strong></div></div>\\n\");\r\n// }\r\n }\r\n\r\n echo(\"</div></div><div class=\\\"spacer\\\"></div></div></div>\");\r\n\r\n/*\r\n//20141007\r\necho \"Tableau des créneaux<pre>\";\r\nprint_r($creneaux);\r\necho \"</pre>\";\r\n*/\r\n}", "function horarios()\n {\n $this->view2->__construct($this->dataView,$this->dataTable);\n $this->view2->show();\n }", "public function possederListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Posseder\");//type array\n\t}", "public function Executar() : void\n {\n include RAIZ.'/Module/Application/View/HTML/Layout/Elemento/Vendedor.php';\n }", "private function creaEvento() {\n $fevento = USingleton::getInstance('FEvento');\n $dati = $this->dati;\n $classe = $this->classe;\n \n //----------------sezione di controllo delle operazioni-----------------\n \n if ($this->operazione == 'inserimento') {\n if ($this->tabella == 'evento') {\n $id = 1 + $fevento->loadultimoevento()[0];\n }\n if ($this->tabella == 'evento_spec') {\n $id = $dati['code'];\n }\n if ($this->tabella == 'partecipazione') {\n $feventosp = USingleton::getInstance('FEventoSPecifico');\n $tipo = $feventosp->loadTipo($dati['code'])['tipo'];\n $classe = \"E\" . $tipo;\n $id = $dati['code'];\n }\n if ($this->tabella == 'biglietti') {\n $feventosp = USingleton::getInstance('FEventoSPecifico');\n $tipo = $feventosp->loadTipo($dati['code'])['tipo'];\n $classe = \"E\" . $tipo;\n $id = $dati['code'];\n }\n }\n if ($this->operazione == 'cancellazione') {\n if ($this->tabella == 'evento') {\n $feventosp = USingleton::getInstance('FEventoSPecifico');\n $tipo = $feventosp->loadTipo($dati['code'])['tipo'];\n $classe = \"E\" . $tipo;\n $id = $dati['code'];\n }\n if ($this->tabella == 'evento_spec') {\n $feventosp = USingleton::getInstance('FEventoSPecifico');\n $tipo = $feventosp->loadTipo($dati['code'])['tipo'];\n $classe = \"E\" . $tipo;\n $id = $dati['code'];\n }\n if ($this->tabella == 'partecipazione') {\n $feventosp = USingleton::getInstance('FEventoSPecifico');\n $tipo = $feventosp->loadTipo($dati['code'])['tipo'];\n $classe = \"E\" . $tipo;\n $id = $dati['code'];\n }\n }\n//---------------------------------------------------------------------------------------------------------\n\n $zona = [new EZona($dati['zona'], $dati['capacita'])];\n $luogo = new ELuogo($dati['citta'], $dati['struttura'], $zona);\n $partecipazioni = [new EPartecipazione($zona[0], $dati['prezzo'])];\n\n if ($classe == 'EPartita') {\n $eventoSpecifico = [new EPartita($luogo, $dati['data'], $partecipazioni, $dati['casa'], $dati['ospite'])];\n }\n if ($classe == 'ESpettacolo') {\n $eventoSpecifico = [new ESpettacolo($luogo, $dati['data'], $partecipazioni, $dati['compagnia'])];\n }\n if ($classe == 'EConcerto') {\n $eventoSpecifico = [new EConcerto($luogo, $dati['data'], $partecipazioni, $dati['artista'])];\n }\n\n $evento = new EEvento($id, $dati['immagine'], $dati['nome_evento'], $eventoSpecifico);\n\n return $evento;\n }", "public function insertMenuEvent(){\n //\n }", "public function alejarCamaraAlumnos1() {\n\n self::$alumnos1->alejarZoom();\n\n }", "function entetecarte($IDDNR,$TYPECARTE)\n {\n\t//1ere page\n\t//face droite\n\t$this->AddPage('p','A5');\n\t$this->SetDisplayMode('fullpage','single');//mode d affichage \n\t$this->Image('../public/images/photos/LOGOAO.GIF',105,25,15,15,0);//image (url,x,y,hauteur,largeur,0)\n\t$this->SetFont('Arial','B',6);\n\t$this->RoundedRect(78, 1, 70, 100, 2, $style = '');\n\t$this->SetTextColor(225,0,0); \n\t$this->Text(82,10,\"REPUBLIQUE ALGERIENNE DEMOCRATIQUE ET POPULAIRE \");\n\t$this->Text(96,15,\"AGENCE NATIONALE DU SANG\");\n\t$this->Text(90,20,\"AGENCE REGIONALE DU SANG \".$this->nbrtostring($this->db_name,\"ars\",\"IDARS\",$this->REGION(),\"WILAYAS\"));\n\t$this->SetTextColor(0,0,0); \n\t$this->Line(80 ,23 ,145 ,23 );\n\t$this->SetFont('Arial','B',14);\n\t$this->Text(104,48,\"CARTE\");\n\t$this->Text(88,53,$TYPECARTE);\n\t$this->SetFont('Arial','B',8);\n\t$this->Text(90,60,\"Structure de Transfusion Sanguine:\");\n\t$this->Text(90,65,$this->nbrtostring($this->db_name,\"cts\",\"IDCTS\",$this->STRUCTURE(),\"CTS\"));\n\t$this->Text(90,70,\"wilaya de \".$this->nbrtostring($this->db_name,\"wrs\",\"IDWIL\",$this->WILAYA(),\"WILAYAS\"));\n\t$this->SetFont('Arial','B',7);\n\t$this->Text(80,84,\"Numéro d'identification du donneur:\");//\n\t$this->Text(80,98,\"Delivrée le:\");\n\t$this->SetFont('Arial','B',8);\n\t$this->SetTextColor(225,0,0);\n\t$this->Text(93,98,date('d/m/Y'));\n\t$this->SetTextColor(0,0,0);\n\t$this->Code39(80,85 , $IDDNR, $baseline=0.5, $height=5);\n\t}", "public function getElementos();", "function jqdatag(){\n\n\t\t$grid = $this->defgrid();\n\t\t$grid->setHeight('185');\n\t\t$param['grids'][] = $grid->deploy();\n\n\t\t$grid1 = $this->defgridit();\n\t\t$grid1->setHeight('190');\n\t\t$param['grids'][] = $grid1->deploy();\n\n\t\t// Configura los Paneles\n\t\t$readyLayout = $grid->readyLayout2( 212, 220, $param['grids'][0]['gridname'],$param['grids'][1]['gridname']);\n\n\t\t//Funciones que ejecutan los botones\n\t\t$bodyscript = $this->bodyscript( $param['grids'][0]['gridname'], $param['grids'][1]['gridname'] );\n\n\t\t//Botones Panel Izq\n\t\t$grid->wbotonadd(array('id'=>'imprime', 'img'=>'assets/default/images/print.png','alt' => 'Reimprimir', 'label'=>'Reimprimir Documento'));\n\t\tif($this->datasis->sidapuede('SCON','INCLUIR%' )){\n\t\t\t$grid->wbotonadd(array('id'=>'addscli', 'img'=>'images/agrega4.png' ,'alt' => 'Consignaci&oacute;n a cliente' , 'label'=>'Consignaci&oacute;n a Cliente'));\n\t\t\t$grid->wbotonadd(array('id'=>'addsprv', 'img'=>'images/agrega4.png' ,'alt' => 'Consignaci&oacute;n a proveedor', 'label'=>'Consignaci&oacute;n a Proveedor'));\n\t\t}\n\n\t\t$WestPanel = $grid->deploywestp();\n\n\t\t//Panel Central\n\t\t$centerpanel = $grid->centerpanel( $id = 'radicional', $param['grids'][0]['gridname'], $param['grids'][1]['gridname'] );\n\n\t\t$adic = array(\n\t\t\tarray('id'=>'fedita', 'title'=>'Agregar/Editar Registro'),\n\t\t\tarray('id'=>'fshow' , 'title'=>'Mostrar Registro'),\n\t\t\tarray('id'=>'fborra', 'title'=>'Eliminar Registro')\n\t\t);\n\t\t$SouthPanel = $grid->SouthPanel($this->datasis->traevalor('TITULO1'), $adic);\n\n\t\t$param['WestPanel'] = $WestPanel;\n\t\t$param['script'] = '';\n\t\t$param['readyLayout'] = $readyLayout;\n\t\t$param['SouthPanel'] = $SouthPanel;\n\t\t$param['listados'] = $this->datasis->listados('SCON', 'JQ');\n\t\t$param['otros'] = $this->datasis->otros('SCON', 'JQ');\n\t\t$param['centerpanel'] = $centerpanel;\n\t\t$param['temas'] = array('proteo','darkness','anexos1');\n\t\t$param['bodyscript'] = $bodyscript;\n\t\t$param['tabs'] = false;\n\t\t$param['encabeza'] = $this->titp;\n\t\t$param['tamano'] = $this->datasis->getintramenu( substr($this->url,0,-1) );\n\t\t$this->load->view('jqgrid/crud2',$param);\n\n\t}", "public function panLeftCamaraAlumnos1() {\n\n self::$alumnos1->moverALaIzquierda();\n\n }", "public function acessarRelatorios(){\n\n }", "public function run()\n {\n $this->makeEquipos();\n }", "function OnLoad()\n\t\t{\n\t\t\tfor ($j = 0; $j < $this->grid_h; $j++)\n\t\t\t{\n\t\t\t\tfor ($i = 0; $i < $this->grid_w; $i++)\n\t\t\t\t{\n\t\t\t\t\t$btn = new TButton();\n\t\t\t\t\t//$btn->Theme = $this->Theme;\n\t\t\t\t\t$btn->Name = 'btn_'.$i.'_'.$j;\n\t\t\t\t\t$btn->Left = 128 + $i * 32;\n\t\t\t\t\t$btn->Top = 16 + $j * 32;\n\t\t\t\t\t$btn->Width = 32;\n\t\t\t\t\t$btn->Height = 32;\n\t\t\t\t\t$btn->OnClick = 'MineButtonClick';\n\t\t\t\t\t$btn->Parent = $this;\n\t\t\t\t\t\n\t\t\t\t\t$shp = new TShape();\n\t\t\t\t\t$shp->Name = 'shp_'.$i.'_'.$j;\n\t\t\t\t\t$shp->Left = 128 + $i * 32;\n\t\t\t\t\t$shp->Top = 16 + $j * 32;\n\t\t\t\t\t$shp->Width = 32;\n\t\t\t\t\t$shp->Height = 32;\n\t\t\t\t\t$shp->BrushColor = 'silver';\n\t\t\t\t\t$shp->PenColor = 'gray';\n\t\t\t\t\t$shp->Shape = 'stRoundRect';\n\t\t\t\t\t$shp->Parent = $this;\n\t\t\t\t\t$shp->Style = 'font-weight: bold; font-size: 16px; padding-top: 8px; max-height: 24px;';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$this->Controls[$shp->Name] = $shp;\n\t\t\t\t\t$this->Controls[$btn->Name] = $btn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->NewGame();\n\t\t}", "public function run()\n {\n $uno = new Carro();\n $uno->idMarca = 1;\n $uno->modelo = 'Uno Mille';\n $uno->ano = 1999;\n $uno->img = 'https://img1.icarros.com/dbimg/galeriaimgmodelo/2/1812_1.png';\n $uno->save();\n\n $fusca = new Carro();\n $fusca->idMarca = 2;\n $fusca->modelo = 'Fusca';\n $fusca->ano = 1996;\n $fusca->img = 'https://img0.icarros.com/dbimg/imgmodelo/4/479_12.png';\n $fusca->save();\n\n $brasilia = new Carro();\n $brasilia->idMarca = 2;\n $brasilia->modelo = 'Brasilia';\n $brasilia->ano = 1989;\n $brasilia->img = 'https://img0.icarros.com/dbimg/imgmodelo/4/793_9.png';\n $brasilia->save();\n\n $corsa = new Carro();\n $corsa->idMarca = 3;\n $corsa->modelo = 'Corsa';\n $corsa->ano = 1996;\n $corsa->img = 'https://img0.icarros.com/dbimg/imgmodelo/4/134_4.png';\n $corsa->save();\n\n $chevette = new Carro();\n $chevette->idMarca = 4;\n $chevette->modelo = 'Chevette';\n $chevette->ano = 1997;\n $chevette->img = 'https://www.webclassicos.com.br/wp-content/uploads/2018/01/Sem-t%C3%ADtulo-3-1024x645.png';\n $chevette->save();\n\n }", "public function run()\n {\n //Tipo de items que existen para cada area\n Tipo_Item::create([\n \t'nombre_tipo_item'=>'Opcion multiple'\n ]);\n\n Tipo_Item::create([\n \t'nombre_tipo_item'=>'Falso/Verdadero'\n ]);\n\n Tipo_Item::create([\n \t'nombre_tipo_item'=>'Emparejamiento'\n ]);\n\n Tipo_Item::create([\n \t'nombre_tipo_item'=>'Texto corto'\n ]);\n }", "function categories_evt($mode)\r\n{\r\n\t// Toutes les categories du site (admin général) / selectionne les categories de l'espace courant\r\n\t$filtre_espace = ($mode==\"categorie_edit\" && $_SESSION[\"user\"][\"admin_general\"]==1) ? \"\" : \"WHERE id_espaces is null OR id_espaces LIKE '%@@\".$_SESSION[\"espace\"][\"id_espace\"].\"@@%'\";\r\n\t$liste_categories = db_tableau(\"SELECT * FROM gt_agenda_categorie \".$filtre_espace.\" ORDER BY titre\", \"id_categorie\");\r\n\t// Ajoute le droit d'accès (écriture si auteur ou admin général)\r\n\tforeach($liste_categories as $cle => $categorie){\r\n\t\t$liste_categories[$cle][\"droit\"] = (is_auteur($categorie[\"id_utilisateur\"])==true || $_SESSION[\"user\"][\"admin_general\"]==1) ? 2 : 1;\r\n\t}\r\n\treturn $liste_categories;\r\n}", "function desplegarCampo(Detallesmantenimientosdetablas $detalle,$numeroGrid,$sinValorPorDefecto=false){\n $size=$detalle->getTamanoCampo();\n $max=$detalle->getTamanoMaximoCampo();\n $javascript=$detalle->getJavascriptDesdeCampo();\n $valorPorDefecto=trim(obtenerValorPorDefecto($detalle));\n if($sinValorPorDefecto!=false){\n $valorPorDefecto=$ValorPorDefecto;\n }\n $id=$detalle->getIdCampo();\n $tipo=$detalle->getIdTipoCampo();\n $requerido=$detalle->getNulidadCampo();\n $accion=strtoupper($detalle->getAccionCampo());\n\n $ayuda=$detalle->getDescripcionCampo();\n\n if ($tipo == 14) { //Si es tipo Separador de Campos\n Campos::columnaGrid($numeroGrid);\n echo \"<center><strong>\" . $detalle->getNombreCampo() . \"</strong></center>\";\n Campos::finColumnaGrid();\n return;\n } else {\n Campos::columnaGrid($numeroGrid);\n echo $detalle->getNombreCampo();\n C::finColumnaGrid();\n }\n\n Campos::columnaGrid($numeroGrid);\n\n/*\n 1\tFecha\n 2\tFecha Hora\n 3\tHora\n 4\tArchivo\n 5\tNumerico\n 6\tMoneda\n 7\tCaracteres\n 8\tTexto\n 9\tTabla Extranjera\n 10\tBoton de Cheque\n 11\tBotones de Opcion Múltiple PENDIENTE\n 12\tFALSO\n 13\tLista Desplegable\n 14\tAgrupador de Campos\n 15\tSeparador De Campos Oculto PENDIENTE\n 16\tFinalizacion del Separador PENDIENTE\n 17\tTabla PENDIENTE\n 18\tBoton PENDIENTE\n 19\tRuta de archivo PENDIENTE\n 20 Editor HTML PopUp\n */\n\n\n //Aqui empieza la captura...\n if($tipo==1){\n $resFecha=$detalle->getRestriccionDeFechas();\n if(trim($resFecha)==\"\"){\n $resFecha=null;\n }\n if(trim($valorPorDefecto)==\"\"){\n $valorPorDefecto=null;\n }\n C::texto($id,$valorPorDefecto,10,10,\" READONLY \");\n }else if($tipo==2){\n $resFecha=$detalle->getRestriccionDeFechas();\n if(trim($resFecha)==\"\"){\n $resFecha=null;\n }\n C::texto($id,$valorPorDefecto,15,15,\" READONLY \");\n }else if($tipo==3){\n C::texto($id,$valorPorDefecto,10,10,\" READONLY \");\n }else if($tipo==5){\n C::entero($id,$valorPorDefecto,$size,$max,$javascript.\" READONLY \");\n }else if($tipo==6){\n C::flotante($id,$valorPorDefecto,$size,$max,$javascript.\" READONLY \");\n }else if($tipo==7){\n C::texto($id,$valorPorDefecto,$size,$max,$javascript.\" READONLY \");\n }else if($tipo==8){\n $filas=$detalle->getAltoCampo();\n C::textArea($id,$valorPorDefecto,$filas,$size,$javascript.\" READONLY \");\n }else if($tipo==9){\n $query=generarQueryCapturaExtranjera($detalle);\n $rsT=new ResultSet($query);\n C::selectAPartirDeResultSet($id.\"selectDisabled\", $rsT, $valorPorDefecto,\" DISABLED \");\n C::oculto($id,$valorPorDefecto);\n }else if($tipo==10){\n $chequeado=false;\n if($valorPorDefecto==1){\n $chequeado=true;\n }\n C::chequeSiNo($id,'',$chequeado,1,\" DISABLED \");\n } else if($tipo==12){\n C::texto($id, $valorPorDefecto, $size, $max, $javascript.\" READONLY\");\n }else if($tipo==13){\n $query=generarQueryCapturaExtranjera($detalle);\n $rsT=new ResultSet($query);\n C::selectAPartirDeResultSet($id.\"selectDisabled\", $rsT, $valorPorDefecto,\" DISABLED \");\n C::oculto($id,$valorPorDefecto);\n }else if($tipo==20){\n C::editorHTMLPopUp($id, $valorPorDefecto, $detalle->getNombreCampo());\n }else if($tipo==26){\n $query=generarQueryCapturaExtranjera($detalle);\n $rsT=new ResultSet($query);\n C::selectAPartirDeResultSetConBusqueda($id, $rsT, $valorPorDefecto);\n }else if($tipo==27){\n $chequeado=false;\n if($valorPorDefecto=='A'){\n $chequeado=true;\n }\n C::chequeActivo($id,'',$chequeado);\n }else if($tipo==28){\n C::textoConMascara($id,$detalle->getQueryFiltro());\n }else if($tipo==29){\n C::selectCatalogoId($id,$detalle->getCatalogoId(), $valorPorDefecto);\n }\n\n C::finColumnaGrid();\n}", "private function _agregarComponenteTabuladores() {\n $componente_carga = new Acciones_ComponenteAltaInsercion();\n\n $this->_id_componente = $componente_carga->crearComponente($_POST['id_tb_rel'], 'PaginaTabuladores', '');\n\n // crear componente y obtener id de insercion\n $componente_carga->consultaParametro($this->_id_componente, 'id_tabla', $_GET['id_tabla']);\n $componente_carga->consultaParametro($this->_id_componente, 'intermedia_tb_id', $_GET['intermedia_tb_id']);\n $componente_carga->consultaParametro($this->_id_componente, 'id_tabla_trd', $_GET['id_tabla_trd']);\n if (isset($_POST['id_cp_rel']) && ($_POST['id_cp_rel'] != '')) {\n $componente_carga->consultaParametro($this->_id_componente, 'id_cp_rel', $_POST['id_cp_rel']);\n }\n $componente_carga->consultaParametro($this->_id_componente, 'tabla_relacionada', $_POST['id_tb_rel']);\n }", "function jqdatag(){\n\n\t\t$grid = $this->defgrid();\n\t\t$param['grids'][] = $grid->deploy();\n\n\t\t$grid1 = $this->defgridit();\n\t\t$param['grids'][] = $grid1->deploy();\n\n\t\t// Configura los Paneles\n\t\t$readyLayout = $grid->readyLayout2( 212, 220, $param['grids'][0]['gridname'],$param['grids'][1]['gridname']);\n\n\t\t//Funciones que ejecutan los botones\n\t\t$bodyscript = $this->bodyscript( $param['grids'][0]['gridname'], $param['grids'][1]['gridname'] );\n\n\t\t//Botones Panel Izq\n\t\t$grid->wbotonadd(array('id'=>'boton1', 'img'=>'assets/default/images/print.png', 'alt' => 'Reimprimir', 'label'=>'Reimprimir'));\n\n\t\tif($this->datasis->sidapuede('SFAC','INCLUIR%' ))\n\t\t\t$grid->wbotonadd(array('id'=>'bffact', 'img'=>'images/RedoGreen.png', 'alt' => 'Facturar', 'label'=>'Facturar'));\n\n\t\tif($this->datasis->sidapuede('SNTE','INCLUIR%' ))\n\t\t\t$grid->wbotonadd(array('id'=>'bsnte', 'img'=>'images/RedoBlue.png', 'alt' => 'Nota de Entrega', 'label'=>'N.Entrega'));\n\n\t\t$grid->wbotonadd(array('id'=>'bcorreo', 'img'=>'assets/default/images/mail_btn.png','alt' => 'Notificacion', 'label'=>'Notificar por email'));\n\t\t$grid->wbotonadd(array('id'=>'bfavori', 'img'=>'images/star.png','alt' => 'Marcar Favorito', 'label'=>'Marcar Favorito'));\n\t\t$grid->wbotonadd(array('id'=>'bgrfavo', 'img'=>'images/star.png','alt' => 'Grupo de Favorito', 'label'=>'Grupo de Favorito'));\n\n\t\t$WestPanel = $grid->deploywestp();\n\n\t\t//Panel Central\n\t\t$centerpanel = $grid->centerpanel( $id = 'radicional', $param['grids'][0]['gridname'], $param['grids'][1]['gridname'] );\n\n\t\t$adic = array(\n\t\t\tarray('id'=>'fedita' , 'title'=>'Agregar/Editar Registro'),\n\t\t\tarray('id'=>'ffact' , 'title'=>'Convertir en factura'),\n\t\t\tarray('id'=>'scliexp', 'title'=>'Ficha de Cliente' ),\n\t\t\tarray('id'=>'fshow' , 'title'=>'Mostrar Registro' ),\n\t\t\tarray('id'=>'fborra' , 'title'=>'Eliminar Registro')\n\t\t);\n\t\t$SouthPanel = $grid->SouthPanel($this->datasis->traevalor('TITULO1'), $adic);\n\n\t\t$param['WestPanel'] = $WestPanel;\n\t\t$param['script'] = '';\n\t\t//$param['EastPanel'] = $EastPanel;\n\t\t$param['readyLayout'] = $readyLayout;\n\t\t$param['SouthPanel'] = $SouthPanel;\n\t\t$param['listados'] = $this->datasis->listados('SPRE', 'JQ');\n\t\t$param['otros'] = $this->datasis->otros('SPRE', 'JQ');\n\t\t$param['centerpanel'] = $centerpanel;\n\t\t//$param['funciones'] = $funciones;\n\t\t$param['temas'] = array('proteo','darkness','anexos1');\n\t\t$param['bodyscript'] = $bodyscript;\n\t\t$param['tabs'] = false;\n\t\t$param['encabeza'] = $this->titp;\n\t\t$param['tamano'] = $this->datasis->getintramenu( substr($this->url,0,-1) );\n\t\t$this->load->view('jqgrid/crud2',$param);\n\t}", "public function position();", "public function panLeftCamaraPresidencia() {\n\n self::$presidencia->moverALaIzquierda();\n }", "public function visualizar(){\n\t\n\t\tset_tema('titulo', 'Visualizar de Coment&aacute;rio');\n\t\tset_tema('conteudo', load_modulo('Comentarios', 'visualizar'));\n\t\tload_template();\n\t}", "function exec_suivi() {\n\t$id_auteur = (int) _request('id_auteur');\n\t$id_article = (int) _request('id_article');\n\t$nouv_auteur = (int) _request('nouv_auteur');\n\t$contexte = array();\n\t$idper = '';\n\t$nom = '';\n\t$prenom = '';\n\t$statutauteur = '6forum';\n\t$inscrit = '';\n\t$statutsuivi = '';\n\t$date_suivi = '';\n\t$heure_suivi = '';\n\n\t//Addon fields\n\t$sante_comportement = '';\n\t$alimentation = '';\n\t$remarques_inscription = '';\n\t$ecole = '';\n\t$places_voitures = '';\n\t$brevet_animateur = '';\n\t$historique_payement = '';\n\t$extrait_de_compte = '';\n\t$statut_payement = '';\n\t$tableau_exception = '';\n\t$recus_fiche_medical = '';\n $facture = '';\n $adresse_facturation = '';\n\n\n\t//----------- lire DB ---------- AND id_secteur=2\n\t$req = sql_select('id_article,idact,titre,date_debut', 'spip_articles', \"id_article=$id_article\");\n\tif ($data = sql_fetch($req)) {\n $idact = $data['idact'];\n\t\t$titre = $data['titre'];\n $date_debut = $data['date_debut'];\n\t}\n\telse\n\t\t$id_article = 0;\n\n\t$req = sql_select('*', \n \"spip_auteurs AS A LEFT JOIN spip_auteurs_articles AS S ON S.id_auteur=$id_auteur AND S.id_article=$id_article AND S.inscrit<>''\", \"A.id_auteur=$id_auteur\");\n\tif ($data = sql_fetch($req)) {\n\t\t$idper = $data['idper'];\n\t\t$nom = $data['nom'];\n\t\t$prenom = $data['prenom'];\n\t\t$statutauteur = $data['statut'];\n\t\tif ($data['inscrit']) {\n\t\t\t$inscrit = 'Y';\n\t\t\t$statutsuivi = $data['statutsuivi'];\n\t\t\t$date_suivi = $data['date_suivi'];\n\t\t\t$heure_suivi = $data['heure_suivi'];\n\n\t\t\t$sante_comportement = $data['sante_comportement'];\n\t\t\t$alimentation = $data['alimentation'];\n\t\t\t$remarques_inscription = $data['remarques_inscription'];\n\t\t\t$ecole = $data['ecole'];\n\t\t\t$places_voitures = $data['places_voitures'];\n\t\t\t$brevet_animateur = $data['brevet_animateur'];\n\t\t\t$historique_payement = $data['historique_payement'];\n\t\t\t$extrait_de_compte = $data['extrait_de_compte'];\n\t\t\t$statut_payement = $data['statut_payement'];\n\t\t\t$tableau_exception = $data['tableau_exception'];\n\t\t\t$recus_fiche_medical = $data['recus_fiche_medical'];\n\t\t\t$prix_special = $data['prix_special'];\n $facture = $data['facture'];\n $adresse_facturation = $data['adresse_facturation'];\n\t\t}\n\t}\n\telse\n\t\t$id_auteur = 0;\n\n\t//-------- form soumis -----------\n\tif (_request('okconfirm') && $id_article && ($id_auteur || $nouv_auteur))\n\t\tif ($GLOBALS['connect_statut']!='0minirezo' || ! autoriser('modifier', 'article', $id_article))\n\t\t\t$contexte['message_erreur'] = 'Autorisation refusée';\n\t\telse {\n\t\t\t$statutsuivi = _request('statutsuivi');\n\t\t\t$date_suivi = _request('date_suivi');\n\t\t\t$heure_suivi = _request('heure_suivi');\n \n $sante_comportement = _request('sante_comportement');\n $alimentation = _request('alimentation');\n $remarques_inscription = _request('remarques_inscription');\n $ecole = _request('ecole');\n $places_voitures = _request('places_voitures');\n $brevet_animateur = _request('brevet_animateur');\n $extrait_de_compte = _request('extrait_de_compte');\n $historique_payement = str_replace(',', '.', _request('historique_payement'));\n $statut_payement = _request('statut_payement');\n $tableau_exception = _request('tableau_exception');\n $recus_fiche_medical = _request('recus_fiche_medical');\n $prix_special = _request('prix_special');\n $facture = _request('facture');\n $adresse_facturation = _request('adresse_facturation');\n\n\t\t\tinclude_spip('inc/date_gestion');\n\t\t\t$contexte['erreurs'] = array();\n\t\t\tif (@verifier_corriger_date_saisie('suivi', false, $contexte['erreurs']))\n\t\t\t\t$date_suivi = substr($date_suivi, 6, 4).'-'.substr($date_suivi, 3, 2).'-'.substr($date_suivi, 0, 2);\n\t\t\telse\n\t\t\t\t$contexte['message_erreur'] = 'Erreur';\n\n\t\t\tif (! $contexte['message_erreur'])\n\t\t\t\tif ($nouv_auteur) {\n\t\t\t\t\t$req = sql_select('A.id_auteur,id_article',\"spip_auteurs AS A LEFT JOIN spip_auteurs_articles AS S ON S.id_auteur=$nouv_auteur AND S.id_article=$id_article\", \"A.id_auteur=$nouv_auteur\");\n\t\t\t\t\tif ($data = sql_fetch($req)) {\n\t\t\t\t\t\t$id_auteur = $data['id_auteur'];\n\t\t\t\t\t\tif (! $data['id_article'])\n\t\t\t\t\t\t\tsql_insertq('spip_auteurs_articles', array('id_auteur'=>$id_auteur, 'id_article'=>$id_article, 'inscrit'=>'Y'));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$contexte['message_erreur'] = 'Erreur';\n\t\t\t\t\t\t$contexte['erreurs']['nouv_auteur'] = 'auteur ID inconnu';\n\t\t\t\t\t\t$id_auteur = 0;\n\t\t\t\t\t\t$inscrit = '';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif ($id_auteur && ! $contexte['message_erreur']) {\n\t\t\t\tsql_updateq('spip_auteurs_articles', \n array(\n \t\t'inscrit'=>'Y', \n \t\t'statutsuivi'=>$statutsuivi, \n \t\t'date_suivi'=>$date_suivi, \n \t\t'heure_suivi'=>$heure_suivi,\n \t'sante_comportement'=>$sante_comportement,\n \t'alimentation'=>$alimentation,\n \t'remarques_inscription'=>$remarques_inscription,\n \t'ecole'=>$ecole,\n \t'brevet_animateur'=>$brevet_animateur,\n \t'places_voitures'=>$places_voitures,\n \t'extrait_de_compte' => $extrait_de_compte,\n \t'historique_payement' => $historique_payement,\n \t'statut_payement' => $statut_payement,\n \t'tableau_exception' => $tableau_exception,\n \t'recus_fiche_medical' => $recus_fiche_medical,\n \t'prix_special' => $prix_special,\n 'facture' => $facture,\n 'adresse_facturation' => $adresse_facturation\n ), \"id_auteur=$id_auteur AND id_article=$id_article\");\n\n // On fait l'update de la date_validation via sql_update plutôt que sql_updateq.\n sql_update('spip_auteurs_articles', array('date_validation' => 'NOW()'), 'id_auteur='.sql_quote($id_auteur).' AND id_article='.sql_quote($id_article));\n\t\t\t\t$contexte['message_ok'] = 'Ok, l\\'inscription est mise à jour';\n\t\t\t\t$inscrit = 'Y';\n\n /*\n * Si c'est une nouvelle inscription faite par un admin, on envoie un mail\n */\n if (_request('new') == 'oui') {\n $p = 'Bonjour,'.\"\\n\\n\".'Voici une nouvelle inscription :'.\"\\n\\n\";\n $p .= 'Sexe : '.$data['codecourtoisie'].\"\\n\";\n $p .= 'Prénom : '.$prenom.\"\\n\";\n $p .= 'Nom : '.$nom.\"\\n\";\n $p .= 'e-mail : '.$data['email'].\"\\n\";\n $p .= 'Date naissance : '.$data['date_naissance'].\"\\n\";\n $p .= 'Lieu naissance : '.$data['lieunaissance'].\"\\n\";\n \n $p .= 'Adresse : '.$data['adresse'].\"\\n\";\n $p .= 'No : '.$data['adresse_no'].\"\\n\";\n $p .= 'Code postal : '.$data['codepostal'].\"\\n\";\n $p .= 'Localité : '.$data['localite'].\"\\n\";\n $p .= 'Téléphone : '.$data['tel1'].\"\\n\";\n $p .= 'GSM : '.$data['gsm1'].\"\\n\";\n $p .= 'Fax : '.$data['fax1'].\"\\n\";\n \n $p .= \"\\n*******\\n\\n\";\n \n $p .= 'Études en cours et établissement : '.$data['etude_etablissement'].\"\\n\";\n $p .= 'Profession : '.$data['profession'].\"\\n\";\n $p .= 'Demandeur d’emploi : '.$data['demandeur_emploi'].\"\\n\";\n $p .= 'Membre d’une association : '.$data['membre_assoc'].\"\\n\";\n $p .= 'Pratique : '.$data['pratique'].\"\\n\";\n $p .= 'Formations : '.$data['formation'].\"\\n\";\n $p .= 'Facture : '.$data['facture'].\"\\n\";\n $p .= 'Adresse de facturation : '.$data['adresse_facturation'].\"\\n\";\n $p .= 'Régime alimentaire : '.$alimentation.\"\\n\";\n $p .= 'Places dans votre voiture : '.$places_voitures.\"\\n\";\n $p .= 'Brevet d’animateur : '.$brevet_animateur.\"\\n\";\n $p .= 'Remarques : '.$remarques_inscription.\"\\n\";\n \n $p .= \"\\n*******\\n\\n\";\n \n $p .= 'id_auteur : '.$id_auteur.\"\\n\";\n $p .= 'Statut : '.$statutsuivi.\"\\n\";\n $p .= 'Action : '.$titre.\"\\n\";\n $p .= 'Dates : '.$date_debut.\"\\n\";\n $p .= 'id_article : '.$id_article.\"\\n\";\n $p .= \"\\n\".'-----'.\"\\n\";\n\n\n $envoyer_mail = charger_fonction('envoyer_mail','inc');\n \n $p = $envoyer_mail(\n $GLOBALS['meta']['email_webmaster'].', [email protected]',\n $GLOBALS['meta']['nom_site'].' : nouvelle inscription '.$data['idact'].'-'.$id_auteur, \n $p,\n $GLOBALS['meta']['email_webmaster']);\n \n }\n\n\n\t\t\t\tinclude_spip('inc/headers');\n\t\t\t\tredirige_par_entete(parametre_url('?exec=articles', 'id_article', $id_article, '&'));\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\n\t//-------- desinscrire -----------\n\tif (_request('noinscr') && $id_article && $id_auteur)\n\t\tif ($GLOBALS['connect_statut']!='0minirezo' || ! autoriser('modifier', 'article', $id_article))\n\t\t\t$contexte['message_erreur'] = 'Autorisation refusée';\n\t\telse {\n\t\t\tif ($statutauteur == '6forum')\n\t\t\t\tsql_delete('spip_auteurs_articles', \"id_auteur=$id_auteur AND id_article=$id_article\");\n\t\t\telse\n\t\t\t\tsql_updateq('spip_auteurs_articles', array('inscrit'=>''), \"id_auteur=$id_auteur AND id_article=$id_article\");\n\t\t\t$inscrit = '';\n\t\t\t$contexte['message_ok'] = 'Ok, la désinscription est faite';\n\t\t\tinclude_spip('inc/headers');\n\t\t\tredirige_par_entete(parametre_url('?exec=articles', 'id_article', $id_article, '&'));\n\t\t\texit();\n\t\t}\n\n\t//--------- page + formulaire ---------\n\t\t$commencer_page = charger_fonction('commencer_page', 'inc');\n\t\techo $commencer_page('Suivi des inscriptions', '', '');\n\n\t\techo '<br />',gros_titre('Suivi des inscriptions');\n\n\t\techo debut_gauche('', true);\n\t\techo debut_boite_info(true);\n\t\techo 'Suivi des inscriptions<br /><br />Explications',\"\\n\";\n\t\techo fin_boite_info(true);\n\n\t\techo debut_droite('', true);\n\n\t\tinclude_spip('fonctions_gestion_cemea');\n\t\tinclude_spip('prive/gestion_update_db');\n\n\t\techo debut_cadre_relief('', true, '', '');\n\n\t\t$contexte['id_article'] = $id_article;\n\t\t$contexte['id_auteur'] = $id_auteur;\n\t\t$contexte['idact'] = $idact;\n\t\t$contexte['titre'] = $titre;\n\t\t$contexte['idper'] = $idper;\n\t\t$contexte['nom'] = $nom;\n\t\t$contexte['prenom'] = $prenom;\n\t\t$contexte['inscrit'] = $inscrit;\n\t\t$contexte['statutsuivi'] = $statutsuivi;\n\t\t$contexte['date_suivi'] = $date_suivi;\n\t\t$contexte['heure_suivi'] = $heure_suivi;\n\n\t\t$contexte['sante_comportement'] = $sante_comportement;\n\t\t$contexte['alimentation'] = $alimentation;\n\t\t$contexte['remarques_inscription'] = $remarques_inscription;\n\t\t$contexte['ecole'] = $ecole;\n\t\t$contexte['places_voitures'] = $places_voitures;\n\t\t$contexte['brevet_animateur'] = $brevet_animateur;\n\t\t$contexte['extrait_de_compte'] = $extrait_de_compte;\n\t\t$contexte['historique_payement'] = str_replace('.', ',', $historique_payement);\n\t\t$contexte['statut_payement'] = $statut_payement;\n\t\t$contexte['tableau_exception'] = $tableau_exception;\n\t\t$contexte['recus_fiche_medical'] = $recus_fiche_medical;\n\t\t$contexte['prix_special'] = $prix_special;\n $contexte['facture'] = $facture;\n $contexte['adresse_facturation'] = $adresse_facturation;\n\n\t\t$contexte['editable'] = ' ';\n\n\t\t$milieu = recuperer_fond(\"prive/form_suivi\", $contexte);\n\t\techo pipeline('editer_contenu_objet',array('args'=>array('type'=>'auteurs_article','contexte'=>$contexte),'data'=>$milieu));\n\n\t\techo fin_cadre_relief(true);\n\t\techo fin_gauche();\n\t\techo fin_page();\n}", "function getEstadisticaDetallado() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $usr;\n\n\t\t# Variables para eventos especiales marcados por el cliente codigo 9.\n\t\t$event = new Event;\n\t\t$usr = new Usuario($current_usuario_id);\n\t\t$usr->__Usuario();\n\t\t$graficoSvg = new GraficoSVG();\n\n\n\t\t$timeZoneId = $usr->zona_horaria_id;\n\t\t$arrTime = Utiles::getNameZoneHor($timeZoneId); \t\t\n\t\t$timeZone = $arrTime[$timeZoneId];\n\t\t$tieneEvento = 'false';\n\t\t$arrayDateStart = array();\t\t\n\t\t$nameFunction = 'EstadisticaDet';\n\t\t$data = null;\n\t\t$ids = null;\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'comparativo_resumen.tpl');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TITULO_HORARIOS', 'bloque_titulo_horarios');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_MONITOR', 'es_primero_monitor');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_TOTAL', 'es_primero_total');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TABLA', 'bloque_tabla');\n\n\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\t\t# Variables para mantenimiento.\n\t\t$T->setVar('__path_jquery_ui', REP_PATH_JQUERY_UI);\n\t\n\t\t$horarios = array($usr->getHorario($this->horario_id));\n\t\tif ($this->horario_id != 0) {\n\t\t\t$horarios[] = $usr->getHorario(0);\n\t\t}\n\n\t\t$orden = 1;\n\t\t$T->setVar('bloque_titulo_horarios', '');\n\t\tforeach ($horarios as $horario) {\n\n\t\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t\t$sql = \"SELECT * FROM reporte.comparativo_resumen_parcial(\".\n\t\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n\t\t\t\t\tpg_escape_string($horario->horario_id).\",' \".\n\t\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\t\t\t$res =& $mdb2->query($sql);\n// \t\t\tprint($sql);\n\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$row = $res->fetchRow();\n\t\t\t$dom = new DomDocument();\n\t\t\t$dom->preserveWhiteSpace = false;\n\t\t\t$dom->loadXML($row[\"comparativo_resumen_parcial\"]);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"comparativo_resumen_parcial\"]);\n\n\t\t\tif ($xpath->query('//detalle[@paso_orden]/estadisticas/estadistica')->length == 0) {\n\t\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$conf_objetivo = $xpath->query('/atentus/resultados/propiedades/objetivos/objetivo')->item(0);\n\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\t\t\t$conf_nodos = $xpath->query('//nodos/nodo');\n\n\t\t\tif(count($horarios) > 1) {\n\t\t\t\t$T->setVar('__item_horario', $this->extra[\"item_orden\"]);\n\t\t\t\t$T->setVar('__horario_orden', $orden);\n\t\t\t\t$T->setVar('__horario_nombre',$horario->nombre);\n\t\t\t\t$T->parse('bloque_titulo_horarios', 'BLOQUE_TITULO_HORARIOS', false);\n\t\t\t}\n\n\t\t\t\n\t\t\t# Obtención de los eventos especiales marcados por el cliente\n\t\t\tforeach ($xpath->query(\"/atentus/resultados/detalles_marcado/detalle/marcado\") as $tag_marcado) {\n\t\t\t$ids = $ids.','.$tag_marcado->getAttribute('mantenimiento_id');\n\t\t\t$marcado = true;\n\t\t\t}\t\t\n\t\t\t\n\t\t\t# Verifica que exista marcado evento cliente.\n\t\t\tif ($marcado == true) {\n\n\t\t\t\t$dataMant = $event->getData(substr($ids, 1), $timeZone);\n\t\t\t\t$character = array(\"{\", \"}\");\n\t\t\t\t$objetives = explode(',',str_replace($character,\"\",($dataMant[0]['objetivo_id'])));\n\t\t\t\t$tieneEvento = 'true';\n\t\t\t\t$encode = json_encode($dataMant);\n\t\t\t\t$nodoId = (string)0;\n\t\t\t\t$T->setVar('__tiene_evento', $tieneEvento);\n\t\t\t\t$T->setVar('__name', $nameFunction);\n\n\t\t\t}\n\n\t\t\t/* LISTA DE MONITORES */\n\t\t\t$linea = 1;\n\t\t\t$T->setVar('lista_pasos', '');\n\t\t\tforeach($conf_nodos as $conf_nodo) {\n\t\t\t\t$primero = true;\n\t\t\t\t$tag_nodo = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/estadisticas/estadistica')->item(0);\n\n\t\t\t\t/* LISTA DE PASOS */\n\t\t\t\tforeach($conf_pasos as $conf_paso) {\n\t\t\t\t\t$tag_dato = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/detalles/detalle[@paso_orden='.$conf_paso->getAttribute('paso_orden').']/estadisticas/estadistica')->item(0);\n\t\t\t\t\tif($tag_dato != null) {\n\t\t\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\n\t\t\t\t\t\t$T->setVar('es_primero_monitor', '');\n\t\t\t\t\t\t$T->setVar('es_primero_total', '');\n\t\t\t\t\t\tif ($primero) {\n\t\t\t\t\t\t\t$T->setVar('__monitor_nombre', $conf_nodo->getAttribute('nombre'));\n\t\t\t\t\t\t\t$T->setVar('__monitor_rowspan', $conf_pasos->length);\n\t\t\t\t\t\t\t$T->setVar('__monitor_total_monitoreo', $tag_nodo->getAttribute('cantidad'));\n\t\t\t\t\t\t\t$T->parse('es_primero_monitor', 'ES_PRIMERO_MONITOR', false);\n\t\t\t\t\t\t\t$T->parse('es_primero_total', 'ES_PRIMERO_TOTAL', false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute(\"nombre\"));\n\t\t\t\t\t\t$T->setVar('__paso_minimo', number_format($tag_dato->getAttribute('tiempo_min'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_maximo', number_format($tag_dato->getAttribute('tiempo_max'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_promedio', number_format($tag_dato->getAttribute('tiempo_prom'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_uptime', number_format($tag_dato->getAttribute('uptime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_downtime', number_format($tag_dato->getAttribute('downtime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_no_monitoreo', number_format($tag_dato->getAttribute('sin_monitoreo'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_evento_especial', number_format($tag_dato->getAttribute('marcado_cliente'), 3, ',', ''));\n\n\t\t\t\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n\t\t\t\t\t\t$primero = false;\n\t\t\t\t\t\t$linea++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$T->parse('bloque_tabla', 'BLOQUE_TABLA', true);\n\t\t\t$orden++;\n\t\t}\n\t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\n\t\t# Agrega el acordeon cuando existan eventos.\n\t\tif (count($dataMant)>0){\n\t\t\t$this->resultado.= $graficoSvg->getAccordion($encode,$nameFunction);\n\t\t}\n\t\treturn $this->resultado;\n\t}", "protected function entidades(){\n\t\tfor($i=1; $i < 6;$i++) $niveis[$i] = \"nivel de busca {$i}\";\n\t\t$this->visualizacao->nivel = VComponente::montar(VComponente::caixaCombinacao, 'nivel', isset($_POST['nivel']) ? $_POST['nivel'] : 1 ,null,$niveis);\n\t\t$this->visualizacao->filtro = isset($_POST['filtro']) ? $_POST['filtro'] : null;\n\t\t$this->visualizacao->listagens = false;\n\t\tif(!$this->visualizacao->filtro) return;\n\t\t$d = dir(\".\");\n\t\t$negocios = new colecao();\n\t\t$controles = new colecao();\n\t\twhile (false !== ($arquivo = $d->read())) {\n\t\t\tif( is_dir($arquivo) && ($arquivo{0} !== '.') ){\n\t\t\t\tif(is_file($arquivo.'/classes/N'.ucfirst($arquivo).'.php')){\n\t\t\t\t\t$negocio = 'N'.ucfirst($arquivo);\n\t\t\t\t\t$obNegocio = new $negocio();\n\t\t\t\t\tif( $obNegocio instanceof negocioPadrao ) {\n\t\t\t\t\t\t$ordem[$arquivo] = array(\n\t\t\t\t\t\t\t'nome'=>$obNegocio->pegarInter()->pegarNome(),\n\t\t\t\t\t\t\t'caminho'=>$arquivo.'/classes/N'.ucfirst($arquivo).'.php'\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$negocios->$arquivo = $obNegocio;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$d->close();\n\t\tasort($ordem);\n\t\t$this->visualizacao->ordem = $ordem;\n\t\t$listagens = array();\n\t\tforeach($ordem as $idx => $arquivo){\n\t\t\t$obNegocio = $negocios->pegar($idx);\n\t\t\t$nome['controle'] = definicaoEntidade::controle($obNegocio, 'verPesquisa');\n\t\t\tif($this->exibirListagem($arquivo)){\n\t\t\t\t$colecao = $obNegocio->pesquisaGeral($this->pegarFiltro(),$this->pegarPagina(),isset($_POST['nivel']) ? $_POST['nivel'] : 1);\n\t\t\t\tcall_user_func_array(\"{$nome['controle']}::montarListagem\", array($this->visualizacao,$colecao,$this->pegarPagina(),$nome['controle']));\n\t\t\t\t$this->visualizacao->listagem->passarControle($nome['controle']);\n\t\t\t\tif($colecao->contarItens()){\n\t\t\t\t\t$listagens[$idx]['listagem'] = $this->visualizacao->listagem;\n\t\t\t\t\t$listagens[$idx]['ocorrencias'] = $colecao->contarItens();\n\t\t\t\t\t$listagens[$idx]['nome'] = $arquivo['nome'];\n\t\t\t\t\t$listagens[$idx]['controlePesquisa'] = $nome['controle'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tunset($this->visualizacao->listagem);\n\t\t$this->visualizacao->listagens = $listagens;\n\t}", "public function panRightCamaraAlumnos1() {\n\n self::$alumnos1->moverALaDerecha();\n\n }", "function evt__cuadro_puntajes__aplicar()\n\t{\n //a los que se desea aplicar el puntaje elegido \n $hab = $this->controlador()->get_habilitacion();\n $rel = $this->controlador()->get_relacion_evaluacion();\n \n foreach ($this->s__seleccion_puntajes as $elegido) {\n $fh = $elegido['formulario_habilitado'];\n $conc = ($elegido['concepto'] != '-1') ? $elegido['concepto'] : null;\n $t_elto = ($elegido['tipo_elemento'] != '-1') ? $elegido['tipo_elemento'] : null; \n \n //se debe averiguar primero todos los formulario_habilitado_detalle que correspoden\n //a formulario_habilitado+concepto+tipo_elemento indicados\n $res = $this->get_formularios_detalle($hab, $fh, $conc, $this->s__encuesta, $t_elto);\n foreach ($res as $fhd) {\n $fila['formulario_habilitado'] = $fh;\n $fila['formulario_habilitado_detalle'] = $fhd['formulario_habilitado_detalle'];\n $fila['puntaje'] = $this->s__nuevo_puntaje;\n $this->upsert_puntaje_aplicacion($fh, $fhd['formulario_habilitado_detalle'], $this->s__nuevo_puntaje);\n }\n }\n $rel->sincronizar();\n\t}", "function qode_woocommerce_single_elements_position() {\n\n\t\t$type = qode_woocommerce_single_type();\n\t\tif($type != 'tabs-on-bottom'){\n\t\t\tremove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );\n\t\t\tadd_action('woocommerce_single_product_summary', 'woocommerce_output_product_data_tabs', 60);\n\t\t}\n\n\t\tif($type == 'tabs-on-bottom') {\n\t\t\tremove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );\n\t\t\tadd_action('woocommerce_after_single_product_summary', 'woocommerce_template_single_meta',15);\n\t\t\tremove_action('woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10);\n\t\t\tadd_action('woocommerce_single_product_summary', 'woocommerce_template_single_rating', 11);\n\t\t\tadd_action('woocommerce_single_product_summary','qode_single_product_categories',3);\n\t\t}\n\n\t\tif($type == 'wide-gallery') {\n\t\t\tremove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );\n\t\t\tremove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );\n\t\t\tadd_action('woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart',40);\n\t\t\tadd_action('woocommerce_single_product_summary', 'woocommerce_template_single_meta',30);\n\t\t\tremove_action('woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10);\n\t\t\tadd_action('woocommerce_single_product_summary', 'woocommerce_template_single_rating', 11);\n\t\t}\n }", "public function run()\n {\n $cables = new Image;\n \t$cables->file_path ='img/products/cables/HDMI CABLE.jpg';\n \t$cables->product_id='226';\n \t$cables->is_front = '1';\n \t$cables->save();\n\n\n \t $cables = new Image;\n \t$cables->file_path ='img/products/cables/PRINTER CABLE.jpg';\n \t$cables->product_id='227';\n \t$cables->is_front = '1';\n \t$cables->save();\n\n\n $cables = new Image;\n \t$cables->file_path ='img/products/cables/SATA to USB 3.0 cable.png';\n \t$cables->product_id='228';\n \t$cables->is_front = '1';\n \t$cables->save();\n\n \t $cables = new Image;\n \t$cables->file_path ='img/products/cables/VGA CABLE.jpg';\n \t$cables->product_id='229';\n \t$cables->is_front = '1';\n \t$cables->save();\n\n\n }", "public function afficheMenu()\r\n\t\t{\r\n\t\t//appel de la vue du menu\r\n\t\trequire 'Vues/menu.php';\r\n\t\t}", "public function obtenerElementosMenu();", "function alistar()\n\t{\n\t\t$data['equipo'] = $this->equipos_model->equipos();\n\t\t$data['insumo'] = $this->equipos_model->insumos1();\n\t\t//$data['test'] = $this->insumos_model->decrementa_stock('12'); \n\t\t\n\t\t\n\t\t//cargo vista para realizar recepciones\n $data['content_view']='entregas_view';\n \t//template diferente para vistas que no incluyen grocery \n \t$this->load->view('template2',$data);\n\t\t\n\t\t}", "public function edit(Gestion $gestion)\n {\n //\n }", "public function run()\n {\n //esto es para que limpie la tabla antes de insertar los registros\n Gestion::truncate();\n\n $gestion = new Gestion;\n $gestion->nombre = \"Rectoría\";\n $gestion->save();\n\n $gestion = new Gestion;\n $gestion->nombre = \"Dirección de Finanzas\";\n $gestion->save();\n\n $gestion = new Gestion;\n $gestion->nombre = \"Dirección Administrativa\";\n $gestion->save();\n\n $gestion = new Gestion;\n $gestion->nombre = \"Dirección Preescolar\";\n $gestion->save();\n\n $gestion = new Gestion;\n $gestion->nombre = \"Dirección Primaria\";\n $gestion->save();\n\n $gestion = new Gestion;\n $gestion->nombre = \"Dirección Secundaria\";\n $gestion->save();\n\n $gestion = new Gestion;\n $gestion->nombre = \"Dirección Bachillerato\";\n $gestion->save();\n\n $gestion = new Gestion;\n $gestion->nombre = \"Dirección Formación Ignaciana\";\n $gestion->save();\n\n $gestion = new Gestion;\n $gestion->nombre = \"Coordinación General Académica\";\n $gestion->save();\n\n $gestion = new Gestion;\n $gestion->nombre = \"Coordinación de Deportes\";\n $gestion->save();\n\n $gestion = new Gestion;\n $gestion->nombre = \"Coordinación de Comunicación\";\n $gestion->save();\n\n $gestion = new Gestion;\n $gestion->nombre = \"Coordinación de Idiomas\";\n $gestion->save();\n }", "function evt__1__salida()\n\t{\n\t\t$this->dep('dependencias')->limpiar_seleccion();\n\t}", "public function getModelEvents();", "public function geraClasseControle(){\n # Abre o template da classe Controle e armazena conteudo do modelo\t\t\n $modelo = Util::getConteudoTemplate('class.Modelo.Controle.tpl');\n\n # Abre o template dos metodos de cadastros e armazena conteudo do modelo\n $modeloCAD = Util::getConteudoTemplate('metodoCadastra.tpl');\n $modeloExclui = Util::getConteudoTemplate('metodoExclui.tpl');\n $modeloSelecionar = Util::getConteudoTemplate('metodoSeleciona.tpl');\n $modeloGetAll = Util::getConteudoTemplate('metodoGetAll.tpl'); \n $modeloConsultar = Util::getConteudoTemplate('metodoConsulta.tpl');\n $modeloAlterar = Util::getConteudoTemplate('metodoAltera.tpl');\n\n # Abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n\n # Varre a estrutura das tabelas\n $aRequire = $aCadastro = $aExclui = $aSelecionar = $aGetAll = $aAlterar = $aConsultar = array();\n $copiaModelo = $modelo;\n //print_r($aBanco);exit;\n foreach($aBanco as $aTabela){\n $aPKDoc = $aPK = array(); \n foreach($aTabela as $oCampo){\n if((string)$oCampo->CHAVE == '1'){\n $aPKDoc[] = \"\\t * @param integer \\$\".(string)$oCampo->NOME;\n $aPK[] = \"\\$\".(string)$oCampo->NOME;\n }\n }\n\n # Montar a Lista de DOC do metodo selecionar\n $listaPKDoc = join(\"\\n\", $aPKDoc);\n $listaPK = join(\",\", $aPK);\n\n # Recupera o nome da tabela e gera os valores a serem gerados\n $nomeClasse = ucfirst($this->getCamelMode($aTabela['NOME']));\n $copiaModeloCAD = str_replace('%%NOME_CLASS%%', $nomeClasse, $modeloCAD);\n $copiaModeloExclui = str_replace('%%NOME_CLASS%%', $nomeClasse, $modeloExclui);\n $copiaModeloSelecionar = str_replace('%%NOME_CLASS%%', $nomeClasse, $modeloSelecionar);\n $copiaModeloGetAll = str_replace('%%NOME_CLASS%%', $nomeClasse, $modeloGetAll);\n $copiaModeloAlterar = str_replace('%%NOME_CLASS%%', $nomeClasse, $modeloAlterar);\n $copiaModeloConsultar = str_replace('%%NOME_CLASS%%', $nomeClasse, $modeloConsultar);\n\n $montaObjeto = $this->retornaObjetosMontados($aTabela['NOME']);\n $montaObjetoBD = $this->retornaObjetosBDMontados($aTabela['NOME']);\n\n $copiaModeloCAD = str_replace('%%MONTA_OBJETO%%', $montaObjeto, $copiaModeloCAD);\n $copiaModeloCAD = str_replace('%%MONTA_OBJETOBD%%', $montaObjetoBD, $copiaModeloCAD);\n $copiaModeloExclui = str_replace('%%MONTA_OBJETOBD%%', $montaObjetoBD, $copiaModeloExclui);\n $copiaModeloSelecionar = str_replace('%%MONTA_OBJETOBD%%', $montaObjetoBD, $copiaModeloSelecionar);\n $copiaModeloSelecionar = str_replace('%%DOC_LISTA_PK%%', $listaPKDoc, $copiaModeloSelecionar);\n $copiaModeloSelecionar = str_replace('%%LISTA_PK%%', \t$listaPK, $copiaModeloSelecionar);\n $copiaModeloGetAll = str_replace('%%MONTA_OBJETOBD%%', $montaObjetoBD, $copiaModeloGetAll);\n $copiaModeloAlterar = str_replace('%%MONTA_OBJETO%%', $montaObjeto, $copiaModeloAlterar);\n $copiaModeloAlterar = str_replace('%%MONTA_OBJETOBD%%', $montaObjetoBD, $copiaModeloAlterar);\n $copiaModeloConsultar = str_replace('%%MONTA_OBJETOBD%%', $montaObjetoBD, $copiaModeloConsultar);\n\n $aRequire[] = \"require_once(dirname(__FILE__).'/bd/class.$nomeClasse\".\"BD.php');\";\n $aCadastro[] = $copiaModeloCAD;\n $aExclui[] = $copiaModeloExclui;\n $aSelecionar[] = $copiaModeloSelecionar;\n $aGetAll[] = $copiaModeloGetAll;\n $aAlterar[] = $copiaModeloAlterar;\n $aConsultar[] = $copiaModeloConsultar;\n }\n\n # Monta demais valores a serem substituidos\n $listaRequire = join(\"\\n\", $aRequire);\n $listaCadastro = join(\"\\n\\n\", $aCadastro);\n $listaExclui = join(\"\\n\\n\", $aExclui);\n $listaSelecionar = join(\"\\n\\n\", $aSelecionar);\n $listaGetAll = join(\"\\n\\n\", $aGetAll);\n $listaAlterar = join(\"\\n\\n\", $aAlterar);\n //print \"<pre>\"; print_r($aAlterar); print \"</pre>\"; \n //print \"<pre>\"; print_r($aConsultar); print \"</pre>\"; \n $listaConsultar = join(\"\\n\\n\", $aConsultar);\n\n # Substitui todas os parametros pelas variaveis ja processadas\n $copiaModelo = str_replace('%%LISTA_REQUIRE%%',\t\t $listaRequire, $copiaModelo);\n $copiaModelo = str_replace('%%METODOS_CADASTRA%%',\t $listaCadastro, $copiaModelo);\n $copiaModelo = str_replace('%%METODOS_EXCLUI%%',\t $listaExclui, $copiaModelo);\n $copiaModelo = str_replace('%%METODOS_SELECIONAR%%',\t $listaSelecionar, $copiaModelo);\n $copiaModelo = str_replace('%%METODOS_CARREGAR_COLECAO%%', $listaGetAll, $copiaModelo);\n $copiaModelo = str_replace('%%METODOS_ALTERA%%',\t $listaAlterar, $copiaModelo);\n $copiaModelo = str_replace('%%METODOS_CONSULTA%%',\t $listaConsultar, $copiaModelo);\n\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/classes\";\n if(!file_exists($dir)) mkdir($dir);\n\n $fp = fopen(\"$dir/class.Controle.php\",\"w\");\n fputs($fp,$copiaModelo);\n\n # ============ Adicionando Classes de core/Config =========\n $modeloConfig = Util::getConteudoTemplate(\"Modelo.Config.\".$aBanco['SGBD'].\".tpl\");\n $modeloConfig = str_replace('%%DATABASE%%', $this->projeto, $modeloConfig);\n \n $fpConfig = fopen(\"$dir/core/config.ini\",\"w\"); \t\n fputs($fpConfig, $modeloConfig); \n fclose($fpConfig);\n\n copy(dirname(__FILE__).\"/core/class.Seguranca.php\", \"$dir/class.Seguranca.php\");\n copy(dirname(__FILE__).\"/class.Util.php\",\t \"$dir/core/class.Util.php\");\n copy(dirname(__FILE__).\"/class.Conexao.php\", \"$dir/core/class.Conexao.php\");\n \n return true;\n }", "public function gestioneUtenti(){\n\t\t// Istanzio Grocery Crud\n\t\t$crud = new grocery_CRUD();\n\t\t$crud->set_model('Mod_GCR');\n\t\t$crud->set_theme('bootstrap');\n\t\t$crud->set_language('italian');\n\t\t// Determino la tabella di riferimento\n\t\t//$crud->set_table('utenti');\n\t\t$crud->set_table('users');\n\t\t// Imposto la relazione n-n\n\t\t$crud->set_relation_n_n('elenco_categorie', 'utenti_categorie', 'tasks_categorie', 'id', 'id_categoria', 'categoria');\n\t\t$crud->unset_columns(array('ip', 'password','salt'));\n\t\t//$crud->unset_fields(array('id_cliente','username','last_login','ip_address', 'password','salt','activation_code','forgotten_password_code','forgotten_password_time','remember_code','created_on','phone'));\n\t\t$crud->fields(array('last_name','first_name','email','active','elenco_categorie'));\n\t\t$crud->columns(array('last_name','first_name','email','active','elenco_categorie'));\n\t\t$crud->display_as('first_name', 'Nome');\n\t\t$crud->display_as('last_name', 'Cognome');\n\t\t$crud->display_as('active', 'Abilitato');\n\n\t\t$crud->unset_delete();\n\t\t$crud->unset_bootstrap();\n\t\t$output = $crud->render();\n\t\t// Definisco le opzioni\n\t\t$opzioni=array();\n\t\t// Carico la vista\n\t\t$this->opzioni=array();\n\t\t$this->codemakers->genera_vista_aqp('crud',$output,$this->opzioni);\n\t}", "public function onEdit($param)\n {\n try\n {\n TTransaction::open('rh');\n \n if (isset($param['key']))\n {\n $key = $param['key'];\n \n $object = new Aprovados($key);\n $items = Nomeados::where('aprovados_id', '=', $key)->load();\n \n foreach( $items as $item )\n {\n \n // GERES\n $cGeres = Geres::find($item->geres_id);\n if ($cGeres instanceof Geres)\n {\n $item->detail_geres_desc = $cGeres->nome; \n } \n //Fim GERES\n\n // Ato\n $cAto = Ato::find($item->ato_id);\n if ($cAto instanceof Ato)\n {\n $item->detail_ato_desc = $cAto->ato; \n } \n //Fim Ato\n\n // Situação\n $cSituacao = SituacaoConcurso::find($item->situacaoconcurso_id);\n if ($cSituacao instanceof SituacaoConcurso)\n {\n $item->detail_situacaoconcurso_desc = $cSituacao->nome; \n } \n //Fim Situação\n\n // Cargo\n $cCargo = cargo::find($item->cargo_id);\n if ($cCargo instanceof cargo)\n {\n $item->detail_cargo_desc = $cCargo->nome; \n } \n //Fim Cargo\n\n // Especialidade\n $cEspecialidade = Especialidade::find($item->especialidade_id);\n if ($cEspecialidade instanceof Especialidade)\n {\n $item->detail_especialidade_desc = $cEspecialidade->nome; \n } \n //Fim Especialidade\n\n // Regime\n $cRegime = Regime::find($item->regime_trabalho_id);\n if ($cRegime instanceof Regime)\n {\n $item->detail_regime_trabalho_desc = $cRegime->nome; \n } \n //Fim Regime\n\n // Reconvocado\n $cReconvoc = Nomeados::find($item->id);\n if ($cReconvoc instanceof Nomeados)\n {\n $item->detail_reconvocacao = $cReconvoc->reconvocado;\n $item->detail_obs = $cReconvoc->obs;\n } \n //Fim Reconvocado\n\n $item->uniqid = uniqid();\n $row = $this->detail_list->addItem( $item );\n $row->id = $item->uniqid;\n }\n $this->form->setData($object);\n TTransaction::close();\n }\n else\n {\n $this->form->clear(TRUE);\n }\n }\n catch (Exception $e) // in case of exception\n {\n new TMessage('error', $e->getMessage());\n TTransaction::rollback();\n }\n }", "protected function editar()\n {\n }", "public function slide(){\r\n\t\t\r\n\t}", "public function execute()\n {\n $this->slectPrioritis();\n\n Bots::getInstance()->clearNext();\n $ants = Bots::getInstance()->getList();\n foreach ($ants as $ant){\n\n $log = !empty($ant->gol) ? implode(Tools::createCoordinate($ant->gol), ':') : 'НЕТУ';\n// Tools::logger(\"Ant:[\" . implode(Tools::createCoordinate($ant->currentCoord ), ':'). \"] = EDA:$log\");\n $coordinats = Tools::createCoordinate($ant->currentCoord);\n if (empty($ant->gol)){\n// Tools::logger(\"У этого нет цели \" . $ant->currentCoord . \" Ставим ему дефолт\");\n// $ant->gol = $ant->currentCoord;\n// $ant->gol = Tools::createNum(28, 19);\n// $ant->gol = Tools::createNum(10, 67);\n// $ant->gol = Tools::createNum(14, 19);\n }\n// $golCoord = Tools::createCoordinate($ant->gol);\n// $dir = $this->createDirection($coordinats, $golCoord);\n// $dir = Tools::createDirection($coordinats, $golCoord);\n $dirArray = Tools::createDirection($ant);\n// Tools::logger(\"GO TO ВЫБОР ИЗ : \" . implode(':',$dirArray));\n $dir = Bots::getInstance()->selectMove($ant, $dirArray);\n// Bots::getInstance()->addNext($ant, $dir);\n// Tools::logger(\"GO TO ВЫБРАЛ $dir\");\n// Tools::logger(\"GO TO Этот выбрал - > \" . print_r($coordinats,true));\n\n $nextCoordinat = Tools::nextStep($ant->coordinatColRow['col'], $ant->coordinatColRow['row'], $dir);\n $nextNum = Tools::createNum($nextCoordinat['row'], $nextCoordinat['col']);\n \n Steamer::issueOrder($coordinats['row'], $coordinats['col'], $dir);\n// break;\n }\n\n }", "function informationsMonCompte() {\n $this->vue = new V_Vue(\"../vues/templates/template.inc.php\");\n $this->vue->ecrireDonnee(\"titreVue\",\"Margo : Mon Compte\");\n $this->vue->ecrireDonnee('centre',\"../vues/includes/gestionDeCompte/centreMonCompte.inc.php\");\n \n $this->vue->ecrireDonnee(\"titreSection\",\"Mon Compte: Informations\");\n // Centre : formulaire de connexion\n $this->vue->ecrireDonnee('loginAuthentification',MaSession::get('login')); \n \n // ... depuis la BDD \n $daoPers = new M_DaoPersonne();\n $daoPers->connecter();\n $perso = $daoPers->getOneByLogin(MaSession::get('login'));\n \n $this->vue->ecrireDonnee(\"infoPerso\",$perso);\n \n $this->vue->afficher();\n }", "public function tiltDownCamaraAlumnos1() {\n\n self::$alumnos1->moverAbajo();\n\n }", "function accionSpot($box){\n include (__ROOT__.'/backend/comprobaciones.php');\n include (__ROOT__.'/backend/aventuras.php');\n global $db;\n $id = $_SESSION['loggedIn'];\n \n //Consultar que objetos tiene equipados mi personaje en cada slot (se ordenan por slot)\n $sql = \"SELECT objetos.*, inventario.slot FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot < 8\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n foreach($result as $objetosEquipados){\n if($objetosEquipados['especial'] === 'aturdidor'){\n $aturdidor = 1;\n }\n elseif($objetosEquipados['especial'] === 'mistico'){\n $mistico = 1;\n }\n elseif($objetosEquipados['especial'] === 'recaudador'){\n $recaudador = 1;\n }\n }\n \n //Bonus de mejoras de habilidades\n $mejoraPrincipalMuyAlta = 1.25;\n $mejoraPrincipalAlta = 0.8;\n $mejoraPrincipalMedia = 0.5;\n $mejoraPrincipalBaja = 0.22;\n $mejoraPrincipalMuyBaja = 0.1;\n $mejoraSecundariaMuyAlta = 0.625;\n $mejoraSecundariaAlta = 0.4;\n $mejoraSecundariaMedia = 0.25;\n $mejoraSecundariaBaja = 0.11;\n $mejoraSecundariaMuyBaja = 0.05;\n \n switch($box){\n //BAR BOHEMIOS\n case 'misionBohemios':\n $sql = \"SELECT * FROM progresos WHERE idP='$id' AND idM='4'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n if(isset($result[0])){ //Si ya tengo comenzada la mision\n if($result[0]['completada']==='0'){\n //Compruebo en que etapa me encuentro ahora mismo\n $etapaActual = $result[0]['progreso'];\n if($etapaActual === '1'){ //Si estoy en la 1a etapa, debo hacer la entrega en Skatepark antes de que llegue al deadline de tiempo\n $tiempoRestante = comprobarTiempoRestanteMision($id,4);\n if($tiempoRestante != 0){\n //Aumento el Progreso de Mision a 2\n $sql = \"UPDATE progresos SET progreso = 2 WHERE idP = '$id' AND idM = '4'\";\n $db->query($sql);\n }\n else{ //Reinicio la mision\n $sql = \"UPDATE tiempos SET deadline = ADDTIME(NOW(), '0:40:0') WHERE idP = '$id' AND idM = '4'\";\n $db->query($sql);\n \n //Envio mensaje de Reinicio de Mision\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Reiniciada','¡Has reiniciado la Misión <i>Reparto Relámpago</i>!<br>¡Deja ya de leer y aligera para entregar ese pedido a tiempo!','etapa.png')\";\n $db->query($sql);\n }\n \n \n }\n elseif($etapaActual === '2'){\n //MIRAR EL DEADLINE A VER SI LO HE ENTREGADO DENTRO DE TIEMPO O NO\n $tiempoRestante = comprobarTiempoRestanteMision($id,4);\n if($tiempoRestante != 0){ //EXITO. COMPLETO LA MISION\n //Recojo Recompensa: +300exp y +600 monedas\n $sql = \"UPDATE personajes SET experiencia = experiencia + 300, cash = cash + 600 WHERE id = '$id'\";\n $db->query($sql);\n\n //Pongo la mision como completada\n $sql = \"UPDATE progresos SET completada = 1 WHERE idP = '$id' AND idM = '4'\";\n $db->query($sql);\n\n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Misión <i>Reparto Relámpago</i>!<br>Al entregar ese pedido en tiempo récord, ganas +300 EXP y +600 monedas. ¡Bien hecho!','etapa.png')\";\n $db->query($sql);\n\n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{ //Reinicio la mision\n $sql = \"UPDATE tiempos SET deadline = ADDTIME(NOW(), '0:40:0') WHERE idP = '$id' AND idM = '4'\";\n $db->query($sql);\n \n //Envio mensaje de Reinicio de Mision\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Reiniciada','¡Has reiniciado la Misión <i>Reparto Relámpago</i>!<br>¡Deja ya de leer y aligera para entregar ese pedido a tiempo!','etapa.png')\";\n $db->query($sql);\n }\n \n \n }\n }\n }\n else{ //Si no está comenzada, activarla y activar tambien un contador de tiempo\n $sql = \"INSERT INTO progresos (idP,idM,progreso,completada) VALUES('$id','4','1','0')\";\n $db->query($sql);\n \n $sql = \"INSERT INTO tiempos (idM,idP, deadline) VALUES('4','$id',ADDTIME(NOW(), '0:40:0'))\";\n $db->query($sql);\n \n //Envio mensaje de Aceptar Mision\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Aceptada','¡Has aceptado la Misión <i>Reparto Relámpago</i>!<br>¡Deja ya de leer y aligera para entregar ese pedido a tiempo!','etapa.png')\";\n $db->query($sql);\n }\n \n break;\n case 'burrito':\n $coste = 10;\n $mejoraSalud = 10;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET salud = CASE WHEN salud + '$mejoraSalud' > 100 THEN 100 ELSE salud + '$mejoraSalud' END, cash = cash-$coste WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"No puedo pagar eso\";\n }\n break;\n case 'pizza':\n $coste = 18;\n $mejoraSalud = 20;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET salud = CASE WHEN salud + '$mejoraSalud' > 100 THEN 100 ELSE salud + '$mejoraSalud' END, cash = cash-$coste WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"No puedo pagar eso\";\n }\n break;\n case 'brownie':\n $coste = 18;\n $mejoraSalud = 20;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET salud = CASE WHEN salud + '$mejoraSalud' > 100 THEN 100 ELSE salud + '$mejoraSalud' END, cash = cash-$coste WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"No puedo pagar eso\";\n }\n break;\n case 'panCamino':\n $coste = 25;\n $mejoraSalud = 3;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET salud = CASE WHEN salud + '$mejoraSalud' > 100 THEN 100 ELSE salud + '$mejoraSalud' END, cash = cash-$coste WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"No puedo pagar eso\";\n }\n break;\n case 'segundoDesayuno':\n $coste = 25;\n $mejoraSalud = 3;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET salud = CASE WHEN salud + '$mejoraSalud' > 100 THEN 100 ELSE salud + '$mejoraSalud' END, cash = cash-$coste WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"No puedo pagar eso\";\n }\n break;\n case 'bravas':\n $coste = 25;\n $mejoraSalud = 3;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET salud = CASE WHEN salud + '$mejoraSalud' > 100 THEN 100 ELSE salud + '$mejoraSalud' END, cash = cash-$coste WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"No puedo pagar eso\";\n }\n break;\n case 'brochetas':\n $coste = 25;\n $mejoraSalud = 3;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET salud = CASE WHEN salud + '$mejoraSalud' > 100 THEN 100 ELSE salud + '$mejoraSalud' END, cash = cash-$coste WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"No puedo pagar eso\";\n }\n break;\n case 'retoPicante':\n $coste = 25;\n $mejoraSalud = 3;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET salud = CASE WHEN salud + '$mejoraSalud' > 100 THEN 100 ELSE salud + '$mejoraSalud' END, cash = cash-$coste WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"No puedo pagar eso\";\n }\n break;\n //CAFES\n case 'cafeLeche':\n $coste = 10;\n $mejoraSalud = 1;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET salud = CASE WHEN salud + '$mejoraSalud' > 100 THEN 100 ELSE salud + '$mejoraSalud' END, cash = cash-$coste WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"No puedo pagar eso\";\n }\n break;\n case 'cafeIrlandes':\n $coste = 25;\n $mejoraSalud = 3;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET salud = CASE WHEN salud + '$mejoraSalud' > 100 THEN 100 ELSE salud + '$mejoraSalud' END, cash = cash-$coste WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"No puedo pagar eso\";\n }\n break;\n \n //CARRIL BICI\n case 'ritmitoGeneroso':\n $agotamiento = 40;\n $coste = 10;\n $puedoHacerlo = comprobarEnergia($agotamiento);\n if($puedoHacerlo === 1){\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n //Consulta para hacer el informe\n $sql = \"SELECT agilidad,resistencia FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n \n $agilidadPrevia = $habilidades[0]['agilidad'];\n $resistenciaPrevia = $habilidades[0]['resistencia'];\n $sql = \"UPDATE personajes SET cash = cash - $coste, energia = energia-$agotamiento, agilidad = agilidad + $mejoraSecundariaMedia/personajes.agilidad, resistencia = resistencia + $mejoraPrincipalMedia/personajes.resistencia, accion = ADDTIME(NOW(), '0:30:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //INFORME DE ENTRENAMIENTO\n $sql = \"SELECT agilidad,resistencia FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n \n $agilidadPosterior = $habilidades[0]['agilidad'];\n $resistenciaPosterior = $habilidades[0]['resistencia'];\n \n $mejoraAgilidad = round($agilidadPosterior - $agilidadPrevia, 2, PHP_ROUND_HALF_DOWN);\n $mejoraResistencia = round($resistenciaPosterior - $resistenciaPrevia, 2, PHP_ROUND_HALF_DOWN);\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Mejora de Habilidad','Buen ritmito de piernas. He mejorado $mejoraResistencia puntos de Resistencia y también $mejoraAgilidad puntos de Agilidad.','entrenamiento.png')\";\n $db->query($sql);\n }\n else{\n $box = \"Necesito dinero para engrasar la cadena.\";\n }\n }else{\n $box = \"EH, EH, tranqui. No aguanto ese ritmo sin antes dormir una siestita\";\n }\n break;\n \n case 'vueltaBici':\n $agotamiento = 60;\n $coste = 20;\n $puedoHacerlo = comprobarEnergia($agotamiento);\n if($puedoHacerlo === 1){\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n //Consulta para hacer el informe\n $sql = \"SELECT agilidad,resistencia FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n \n $agilidadPrevia = $habilidades[0]['agilidad'];\n $resistenciaPrevia = $habilidades[0]['resistencia'];\n \n $sql = \"UPDATE personajes SET cash = cash - $coste, energia = energia-$agotamiento, agilidad = agilidad + $mejoraSecundariaAlta/personajes.agilidad, resistencia = resistencia + $mejoraPrincipalAlta/personajes.resistencia, accion = ADDTIME(NOW(), '0:45:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //INFORME DE ENTRENAMIENTO\n $sql = \"SELECT agilidad,resistencia FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n \n $agilidadPosterior = $habilidades[0]['agilidad'];\n $resistenciaPosterior = $habilidades[0]['resistencia'];\n \n $mejoraAgilidad = round($agilidadPosterior - $agilidadPrevia, 2, PHP_ROUND_HALF_DOWN);\n $mejoraResistencia = round($resistenciaPosterior - $resistenciaPrevia, 2, PHP_ROUND_HALF_DOWN);\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Mejora de Habilidad','¡De aquí a correr el Tour! He mejorado $mejoraResistencia puntos de Resistencia y también $mejoraAgilidad puntos de Agilidad.','entrenamiento.png')\";\n $db->query($sql);\n }\n else{\n $box = \"¿Y si me multan por ir tan rápido? Mejor reunir algo de dinero antes\";\n }\n }else{\n $box = \"Pensándolo mejor... la única Vuelta que haré va a ser al sofá.\";\n }\n break;\n \n //SKATEPARK ENTRENAMIENTO\n case 'rodarSkate':\n $agotamiento = 30;\n $coste = 5;\n $puedoHacerlo = comprobarEnergia($agotamiento);\n if($puedoHacerlo === 1){\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n //Consulta para hacer el informe\n $sql = \"SELECT agilidad,resistencia FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n \n $agilidadPrevia = $habilidades[0]['agilidad'];\n $resistenciaPrevia = $habilidades[0]['resistencia'];\n $sql = \"UPDATE personajes SET cash = cash - $coste, energia = energia-$agotamiento, agilidad = agilidad + $mejoraPrincipalBaja/personajes.agilidad, resistencia = resistencia + $mejoraSecundariaBaja/personajes.resistencia, accion = ADDTIME(NOW(), '0:15:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //INFORME DE ENTRENAMIENTO\n $sql = \"SELECT agilidad,resistencia FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n \n $agilidadPosterior = $habilidades[0]['agilidad'];\n $resistenciaPosterior = $habilidades[0]['resistencia'];\n \n $mejoraAgilidad = round($agilidadPosterior - $agilidadPrevia, 2, PHP_ROUND_HALF_DOWN);\n $mejoraResistencia = round($resistenciaPosterior - $resistenciaPrevia, 2, PHP_ROUND_HALF_DOWN);\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Mejora de Habilidad','Al menos le he quitado el óxido a la tabla. He mejorado $mejoraAgilidad puntos de Agilidad y también $mejoraResistencia puntos de Resistencia.','entrenamiento.png')\";\n $db->query($sql);\n }\n else{\n $box = \"Necesito dinero para poner una lija nueva.\";\n }\n }else{\n $box = \"No creo tener el cuerpo ahora mismo para subirme a rodar.\";\n }\n break;\n \n case 'horse':\n $agotamiento = 45;\n $coste = 10;\n $puedoHacerlo = comprobarEnergia($agotamiento);\n if($puedoHacerlo === 1){\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n //Consulta para hacer el informe\n $sql = \"SELECT agilidad,resistencia FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n \n $agilidadPrevia = $habilidades[0]['agilidad'];\n $resistenciaPrevia = $habilidades[0]['resistencia'];\n \n $sql = \"UPDATE personajes SET cash = cash - $coste, energia = energia-$agotamiento, agilidad = agilidad + $mejoraPrincipalMedia/personajes.agilidad, resistencia = resistencia + $mejoraSecundariaMedia/personajes.resistencia, accion = ADDTIME(NOW(), '0:30:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //INFORME DE ENTRENAMIENTO\n $sql = \"SELECT agilidad,resistencia FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n \n $agilidadPosterior = $habilidades[0]['agilidad'];\n $resistenciaPosterior = $habilidades[0]['resistencia'];\n \n $mejoraAgilidad = round($agilidadPosterior - $agilidadPrevia, 2, PHP_ROUND_HALF_DOWN);\n $mejoraResistencia = round($resistenciaPosterior - $resistenciaPrevia, 2, PHP_ROUND_HALF_DOWN);\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Mejora de Habilidad','¡Wow, qué hambre me ha entrado después de hacer tantos trucos! He mejorado $mejoraAgilidad puntos de Agilidad y también $mejoraResistencia puntos de Resistencia.','entrenamiento.png')\";\n $db->query($sql);\n }\n else{\n $box = \"Necesito algo para apostar en el juego del H.O.R.S.E.\";\n }\n }else{\n $box = \"Con este cansancio el mejor truco que puedo hacer es tumbarme, cerrar los ojos y aparecer en otro día.\";\n }\n break;\n \n //FOGATA RITUAL ASDRÚBAL\n case 'ritual':\n $agotamiento = 30;\n $coste = 0;\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n $puedoHacerlo = comprobarEnergia($agotamiento);\n if($puedoHacerlo === 1){\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n //Consulta para hacer el informe\n $sql = \"SELECT espiritu FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n\n $espirituPrevia = $habilidades[0]['espiritu'];\n \n if($mistico === 1){\n $sql = \"UPDATE personajes SET cash = cash-$coste, energia = energia-$agotamiento, espiritu = espiritu + $mejoraPrincipalMuyAlta*2/personajes.espiritu, accion = ADDTIME(NOW(), '1:0:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $sql = \"UPDATE personajes SET cash = cash - $coste, energia = energia-$agotamiento, espiritu = espiritu + $mejoraPrincipalMuyAlta/personajes.espiritu, accion = ADDTIME(NOW(), '1:0:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n //INFORME DE ENTRENAMIENTO\n $sql = \"SELECT espiritu FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n\n $espirituPosterior = $habilidades[0]['espiritu'];\n\n $mejoraEspiritu = round($espirituPosterior - $espirituPrevia, 2, PHP_ROUND_HALF_DOWN);\n \n\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Mejora de Habilidad','Me siento en algo más de tranquilidad ahora. He mejorado $mejoraEspiritu puntos de Espíritu.','rezo.png')\";\n $db->query($sql);\n }\n else{\n $box = \"Alguna moneda necesito para echar de ofrenda.\";\n }\n }else{\n $box = \"No tengo energía para controlar el ritual. Como entre ahí, algún espíritu maligno podría poseer mi cuerpo.\";\n }\n }\n else{\n $box = \"Aún no he descansado de mi ultima acción\";\n }\n break; \n //IGLESIAS\n case 'plegaria': //MUY BAJA\n $agotamiento = 10;\n $coste = 5;\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n $puedoHacerlo = comprobarEnergia($agotamiento);\n if($puedoHacerlo === 1){\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n //Consulta para hacer el informe\n $sql = \"SELECT espiritu FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n\n $espirituPrevia = $habilidades[0]['espiritu'];\n \n if($mistico === 1){\n $sql = \"UPDATE personajes SET cash = cash-$coste, energia = energia-$agotamiento, espiritu = espiritu + $mejoraPrincipalMuyBaja*2/personajes.espiritu, accion = ADDTIME(NOW(), '0:5:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $sql = \"UPDATE personajes SET cash = cash - $coste, energia = energia-$agotamiento, espiritu = espiritu + $mejoraPrincipalMuyBaja/personajes.espiritu, accion = ADDTIME(NOW(), '0:5:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n //INFORME DE ENTRENAMIENTO\n $sql = \"SELECT espiritu FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n\n $espirituPosterior = $habilidades[0]['espiritu'];\n\n $mejoraEspiritu = round($espirituPosterior - $espirituPrevia, 2, PHP_ROUND_HALF_DOWN);\n \n\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Mejora de Habilidad','Me siento en algo más de tranquilidad ahora. He mejorado $mejoraEspiritu puntos de Espíritu.','rezo.png')\";\n $db->query($sql);\n }\n else{\n $box = \"Alguna moneda necesito para echar de ofrenda.\";\n }\n }else{\n $box = \"No tengo fuerzas. Como entre ahí, me quedo sopa en un banco.\";\n }\n }\n else{\n $box = \"Aún no he descansado de mi ultima acción\";\n }\n break; \n \n case 'ponerVelitas': //BAJA\n $agotamiento = 15;\n $coste = 15;\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n $puedoHacerlo = comprobarEnergia($agotamiento);\n if($puedoHacerlo === 1){\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n //Consulta para hacer el informe\n $sql = \"SELECT espiritu FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n\n $espirituPrevia = $habilidades[0]['espiritu'];\n \n if($mistico === 1){\n $sql = \"UPDATE personajes SET cash = cash-$coste, energia = energia-$agotamiento, espiritu = espiritu + $mejoraPrincipalBaja*2/personajes.espiritu, accion = ADDTIME(NOW(), '0:5:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $sql = \"UPDATE personajes SET cash = cash - $coste, energia = energia-$agotamiento, espiritu = espiritu + $mejoraPrincipalBaja/personajes.espiritu, accion = ADDTIME(NOW(), '0:5:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n //INFORME DE ENTRENAMIENTO\n $sql = \"SELECT espiritu FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n\n $espirituPosterior = $habilidades[0]['espiritu'];\n\n $mejoraEspiritu = round($espirituPosterior - $espirituPrevia, 2, PHP_ROUND_HALF_DOWN);\n \n\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Mejora de Habilidad','Mientras encendía velitas he notado que algo nuevo se ha encendido dentro de mi espíritu. He mejorado $mejoraEspiritu puntos de Espíritu.','rezo.png')\";\n $db->query($sql);\n }\n else{\n $box = \"¿Sabías que las velas no se encienden si no echas dinero?\";\n }\n }else{\n $box = \"Si no tengo energía ni para contar las monedas.\";\n }\n }\n else{\n $box = \"Aún no he descansado de mi ultima acción\";\n }\n break; \n \n case 'escucharMisa': //MEDIA\n $agotamiento = 20;\n $coste = 25;\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n $puedoHacerlo = comprobarEnergia($agotamiento);\n if($puedoHacerlo === 1){\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n //Consulta para hacer el informe\n $sql = \"SELECT espiritu FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n\n $espirituPrevia = $habilidades[0]['espiritu'];\n \n if($mistico === 1){\n $sql = \"UPDATE personajes SET cash = cash-$coste, energia = energia-$agotamiento, espiritu = espiritu + $mejoraPrincipalMedia*2/personajes.espiritu, accion = ADDTIME(NOW(), '0:10:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $sql = \"UPDATE personajes SET cash = cash - $coste, energia = energia-$agotamiento, espiritu = espiritu + $mejoraPrincipalMedia/personajes.espiritu, accion = ADDTIME(NOW(), '0:10:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n //INFORME DE ENTRENAMIENTO\n $sql = \"SELECT espiritu FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n\n $espirituPosterior = $habilidades[0]['espiritu'];\n\n $mejoraEspiritu = round($espirituPosterior - $espirituPrevia, 2, PHP_ROUND_HALF_DOWN);\n \n\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Mejora de Habilidad','Ya te digo que si podemos ir en paz, y tanto. Y tanta paz lleves tú como descanso dejas.<br><br>He mejorado $mejoraEspiritu puntos de Espíritu.','rezo.png')\";\n $db->query($sql);\n }\n else{\n $box = \"Necesito unas monedillas para echarle al cepillo.\";\n }\n }else{\n $box = \"Yo una misa no la aguanto ahora mismo con este cuerpo.\";\n }\n }\n else{\n $box = \"Aún no he descansado de mi ultima acción\";\n }\n break; \n \n case 'confesarPecados': //ALTA\n $agotamiento = 25;\n $coste = 35;\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n $puedoHacerlo = comprobarEnergia($agotamiento);\n if($puedoHacerlo === 1){\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n //Consulta para hacer el informe\n $sql = \"SELECT espiritu FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n\n $espirituPrevia = $habilidades[0]['espiritu'];\n \n if($mistico === 1){\n $sql = \"UPDATE personajes SET cash = cash-$coste, energia = energia-$agotamiento, espiritu = espiritu + $mejoraPrincipalAlta*2/personajes.espiritu, accion = ADDTIME(NOW(), '0:10:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $sql = \"UPDATE personajes SET cash = cash - $coste, energia = energia-$agotamiento, espiritu = espiritu + $mejoraPrincipalAlta/personajes.espiritu, accion = ADDTIME(NOW(), '0:10:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n //INFORME DE ENTRENAMIENTO\n $sql = \"SELECT espiritu FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n\n $espirituPosterior = $habilidades[0]['espiritu'];\n\n $mejoraEspiritu = round($espirituPosterior - $espirituPrevia, 2, PHP_ROUND_HALF_DOWN);\n \n\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Mejora de Habilidad','Necesitaba contárselo a alguien, es así. Me siento ahora con el Espíritu más tranquilo por fín.<br><br>He mejorado $mejoraEspiritu puntos de Espíritu.','rezo.png')\";\n $db->query($sql);\n }\n else{\n $box = \"Algo de dinero no estaría mal llevar.\";\n }\n }else{\n $box = \"Si es que tengo más sueño que un bebé koala.\";\n }\n }\n else{\n $box = \"Aún no he descansado de mi ultima acción\";\n }\n break; \n \n case 'monaguillo': //MUY ALTA\n $agotamiento = 30;\n $coste = 45;\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n $puedoHacerlo = comprobarEnergia($agotamiento);\n if($puedoHacerlo === 1){\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n //Consulta para hacer el informe\n $sql = \"SELECT espiritu FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n\n $espirituPrevia = $habilidades[0]['espiritu'];\n \n if($mistico === 1){\n $sql = \"UPDATE personajes SET cash = cash-$coste, energia = energia-$agotamiento, espiritu = espiritu + $mejoraPrincipalMuyAlta*2/personajes.espiritu, accion = ADDTIME(NOW(), '0:30:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $sql = \"UPDATE personajes SET cash = cash - $coste, energia = energia-$agotamiento, espiritu = espiritu + $mejoraPrincipalMuyAlta/personajes.espiritu, accion = ADDTIME(NOW(), '0:30:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n //INFORME DE ENTRENAMIENTO\n $sql = \"SELECT espiritu FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n\n $espirituPosterior = $habilidades[0]['espiritu'];\n\n $mejoraEspiritu = round($espirituPosterior - $espirituPrevia, 2, PHP_ROUND_HALF_DOWN);\n \n\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Mejora de Habilidad','Oye pues a ver si voy a tener vocación para esto eh. Que me siento ahora como con más espíritu.<br><br>He mejorado $mejoraEspiritu puntos de Espíritu.','rezo.png')\";\n $db->query($sql);\n }\n else{\n $box = \"Tengo que poner algún billetejo en el cepillo para que la gente se vea obligada.\";\n }\n }else{\n $box = \"Mejor dormir un rato antes o lo pondré todo perdido de vino.\";\n }\n }\n else{\n $box = \"Aún no he descansado de mi ultima acción\";\n }\n break; \n \n case 'tragoVino':\n $coste = 40;\n $mejoraSalud = 10;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET salud = CASE WHEN salud + '$mejoraSalud' > 100 THEN 100 ELSE salud + '$mejoraSalud' END, cash = cash-$coste WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"No puedo pagarme el trago de Vino\";\n }\n break;\n \n case 'guarroAsao':\n $coste = 150;\n $mejoraSalud = 50;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET salud = CASE WHEN salud + '$mejoraSalud' > 100 THEN 100 ELSE salud + '$mejoraSalud' END, cash = cash-$coste WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"No me quedan monedas suficientes\";\n }\n break;\n //Cultura Multicines Ortega \n case 'misionCine':\n $sql = \"SELECT * FROM progresos WHERE idP='$id' AND idM='2'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n if(isset($result[0])){ //Si ya tengo comenzada la mision\n if($result[0]['completada']==='0'){\n //Compruebo en que etapa me encuentro ahora mismo\n $etapaActual = $result[0]['progreso'];\n if($etapaActual === '1'){ //Si estoy en la 1a etapa, debo entregar una Bobina de Pelicula\n //Ver Objetos que llevo desequipados\n $objetosDesequipados = objetosDesequipados();\n foreach($objetosDesequipados as $cadaObjeto){\n if($cadaObjeto['id'] === '921'){//Si es una bobina de pelicula, la elimino y recojo recompensa y progreso en la mision a la siguiente etapa y notifico mensaje mision\n //VER QUE SLOT QUEDA LIBRE EN EL INVENTARIO\n $sql = \"SELECT inventario.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot > 7 AND inventario.idO = '921'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n $slotLibre = $resultado[0]['slot'];\n\n //BORRAR EL OBJETO VENDIDO\n $sql = \"UPDATE inventario SET idO='0' WHERE (idP='$id' AND slot = '$slotLibre')\";\n $db->query($sql);\n\n //Recojo Recompensa: +400exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 400 WHERE id = '$id'\";\n $db->query($sql);\n\n //Completo la Mision\n $sql = \"UPDATE progresos SET completada = 1 WHERE idP = '$id' AND idM = '2'\";\n $db->query($sql);\n\n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Misión <i>Pánico en el Cine</i>!<br>Al entregar esa Bobina de Película, el operario se echa a tus brazos agradecido y como recompensa te invita a proyectar juntos la película que acabáis de recuperar. Te acomodas en la butaca, saboreas las crujientes palomitas y por fín la pantalla se ilumina con 6 letras vistosas: \\\"EUROEL\\\". Por el altavoz alguien narra lo que estás viendo en pantalla: \\\"Euroel. En C/Cisneros 22. Suministros Electricos. EUROEL\\\". Parece una interesante tienda, la apuntaré en mi mapa para visitarla más tarde.<br>Ganas +400 EXP. ¡Bien hecho!','etapa.png')\";\n $db->query($sql);\n\n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n\n break;\n\n }\n else{\n $box = \"Aún no he encontrado esa <i>Bobina de Película</i>, debe estar aquí cerca.\";\n }\n }\n }\n else{\n $box = \"Ya completaste esta misión.\";\n }\n }\n \n }\n else{\n //Insertar la Mision en el registro de Misiones\n $sql = \"INSERT INTO progresos (idP,idM,progreso,completada) VALUES('$id','2','1','0')\";\n $db->query($sql);\n \n //Envio mensaje de Aceptar Mision\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Aceptada','¡Has aceptado la Misión <i>Pánico en el Cine</i>!<br><br>Tienes una Bobina de Película que encontrar. No andará muy lejos. Busca bien entre las butacas del Cine.','etapa.png')\";\n $db->query($sql);\n }\n \n break;\n \n case 'verPeli':\n $agotamiento = 10;\n $coste = 40;\n $puedoHacerlo = comprobarEnergia($agotamiento);\n if($puedoHacerlo === 1){\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n //Consulta para hacer el informe\n $sql = \"SELECT ingenio,percepcion FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n \n $ingenioPrevio = $habilidades[0]['ingenio'];\n $percepcionPrevia = $habilidades[0]['percepcion'];\n $sql = \"UPDATE personajes SET cash = cash - $coste, energia = energia-$agotamiento, ingenio = ingenio + $mejoraSecundariaMedia/personajes.ingenio, percepcion = percepcion + $mejoraPrincipalMedia/personajes.percepcion, accion = ADDTIME(NOW(), '0:30:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //INFORME DE ENTRENAMIENTO\n $sql = \"SELECT ingenio, percepcion FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n \n $ingenioPosterior = $habilidades[0]['ingenio'];\n $percepcionPosterior = $habilidades[0]['percepcion'];\n \n $mejoraIngenio = round($ingenioPosterior - $ingenioPrevio, 2, PHP_ROUND_HALF_DOWN);\n $mejoraPercepcion = round($percepcionPosterior - $percepcionPrevia, 2, PHP_ROUND_HALF_DOWN);\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Mejora de Habilidad','¡Peliculón!. He mejorado $mejoraPercepcion puntos de Percepción y también $mejoraIngenio puntos de Ingenio.','cultura.png')\";\n $db->query($sql);\n }\n else{\n $box = \"Necesito más monedas para comprar el ticket\";\n }\n }else{\n $box = \"Tengo poca energía, lo mismo me quedo sopa en la butaca.\";\n }\n break;\n \n case 'rebuscar':\n $tengoIluminacion = comprobarIluminacion();\n if($tengoIluminacion === 1){\n //Voy a encontrar un objeto y voy a notificarselo\n $rand = rand(0, 5);\n if($rand === 0 || $rand === 1){ //No encuentro nada mas que pelusas y restos de palomitas\n //Genero un informe de Rebuscar\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Rebuscar','¡Mmeh! Tras pasar 10 Minutos gateando entre las butacas lo único que he conseguido ha sido llenarme la ropa de pelusas y restos de palomitas. No he encontrado nada de interés esta vez.','rebuscar.png')\";\n $db->query($sql);\n }\n elseif($rand === 2 || $rand === 3){ //Encuentro dinero\n //Genero un informe de Rebuscar\n $cantidad = rand(20,80);\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Rebuscar','¡Anda! Alguien ha perdido su cambio por aquí. Obtengo $cantidad monedas.','rebuscar.png')\";\n $db->query($sql);\n \n $sql = \"UPDATE personajes SET cash = cash + $cantidad WHERE id='$id'\";\n $db->query($sql);\n }\n elseif($rand === 4){ //Encuentro chocolatina derretida\n $mensajeObjeto = ' ¡Me la llevo!';\n //Miro que tenga algun slot libre en el inventario\n $slotDondeGuardo = comprobarSlotLibre();\n if($slotDondeGuardo === -1){\n $mensajeObjeto = \" No puedo llevarme el botín porque mi inventario está lleno.\";\n }\n else{\n //AÑADIR AL INVENTARIO\n $idObjetoObtenido = $obj[$objetoObtenido]['id'];\n $sql = \"UPDATE inventario SET idO = '920' WHERE idP='$id' AND slot = '$slotDondeGuardo'\";\n $db->query($sql);\n }\n //Genero un informe de Rebuscar\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Rebuscar','¡Puaj! Una chocolatina derretida. $mensajeObjeto','rebuscar.png')\";\n $db->query($sql);\n }\n elseif($rand === 5){ //ENCUENTRO LA BOBINA DE PELICULA\n $mensajeObjeto = ' ¡Me la llevo!';\n //Miro que tenga algun slot libre en el inventario\n $slotDondeGuardo = comprobarSlotLibre();\n if($slotDondeGuardo === -1){\n $mensajeObjeto = \" No puedo llevarme el botín porque mi inventario está lleno.\";\n }\n else{\n //AÑADIR AL INVENTARIO\n $idObjetoObtenido = $obj[$objetoObtenido]['id'];\n $sql = \"UPDATE inventario SET idO = '921' WHERE idP='$id' AND slot = '$slotDondeGuardo'\";\n $db->query($sql);\n }\n //Genero un informe de Rebuscar\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Rebuscar','¡¿Y esto?! Parece una bobina de película antigua, como las que salen en las películas. $mensajeObjeto','rebuscar.png')\";\n $db->query($sql);\n }\n $sql = \"UPDATE personajes SET accion= ADDTIME(NOW(), '0:10:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n }\n else{\n $box = \"Necesito llevar algo para iluminar. Está muy oscuro.\";\n }\n break;\n //MISION EXTASIS DEL ORO\n case 'misionOro':\n $sql = \"SELECT * FROM progresos WHERE idP='$id' AND idM='9'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n if(isset($result[0])){ //Si ya tengo comenzada la mision\n if($result[0]['completada']==='0'){\n //Compruebo en que etapa me encuentro ahora mismo\n $etapaActual = $result[0]['progreso'];\n if($etapaActual === '1'){ //Si estoy en la 1a etapa, debo entregar Agua Agria\n //Ver Objetos que llevo desequipados\n $objetosDesequipados = objetosDesequipados();\n foreach($objetosDesequipados as $cadaObjeto){\n if($cadaObjeto['id'] === '923'){//Si es una botella de Agua Agria, la elimino y recojo recompensa y progreso en la mision a la siguiente etapa y notifico mensaje mision\n //VER QUE SLOT QUEDA LIBRE EN EL INVENTARIO\n $sql = \"SELECT inventario.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot > 7 AND inventario.idO = '923'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n $slotLibre = $resultado[0]['slot'];\n\n //BORRAR EL OBJETO VENDIDO\n $sql = \"UPDATE inventario SET idO='0' WHERE (idP='$id' AND slot = '$slotLibre')\";\n $db->query($sql);\n\n //Recojo Recompensa: +50exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 50 WHERE id = '$id'\";\n $db->query($sql);\n\n //Actualizo la mision a Etapa 2\n $sql = \"UPDATE progresos SET progreso = 2 WHERE idP = '$id' AND idM = '9'\";\n $db->query($sql);\n\n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 1 de la misión <i>Éxtasis del Oro</i>!<br>El viajero moribundo se refresca bebiendo un largo trago del Agua Agria que le acabas de traer. ¡Estaba sediento! <br>Ganas +50 EXP. ¡Bien hecho! Vuelve a hablar con él en el Cruce de Caminos del Abulagar para recibir su agradecimiento en persona.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n $box = \"\";\n break;\n }\n else{\n $box = \"No llevo ni una gota de Agua Agria, tendré que pasarme por la Fuente.\";\n }\n }\n }\n elseif($etapaActual === '2'){ //Si estoy en la 2a etapa, debo llevar equipado un revolver\n\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n $tengoRevolver = comprobarRevolver();\n if($tengoRevolver === 1){\n \n //Recojo Recompensa: +100exp y +150monedas\n $sql = \"UPDATE personajes SET experiencia = experiencia + 100, cash = cash + 150 WHERE id = '$id'\";\n $db->query($sql);\n\n //Avanzar a siguiente etapa\n $sql = \"UPDATE progresos SET progreso = 3 WHERE idP = '$id' AND idM = '9'\";\n $db->query($sql);\n\n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','Permaneces atento, vigilando cada minúsculo movimiento que hacen tanto el Rubio como el otro pistolero. Mientras de fondo suena una música Western, la tensión va aumentando y te sientes con necesidad de ir acercando lentamente tu mano al Revólver. El arma ya está a tu alcance pero te das cuenta de que... ¡NO TIENES BALAS! Una gota de sudor frío resbala por tu frente hasta tocar el ojo y ya no ves nada más porque de repente... ¡Todos desenfundan! ¡Pum! ¡Baang! ¡Puuumm!<br><br>Vuelves a abrir los ojos pero los cierras otra vez. <br><br>Ahora sí, los abres y ves que el otro pistolero está malherido en el suelo. ¡Baaumm! El Rubio le remata con un segundo disparo que hace caer al cadáver dentro de una tumba abierta.<br><br>A ti te perdona la vida, al fin y al cabo él es el bueno de esta película y tú pese a ser feo no lo eres tanto como lo sería disparar a quien un día de pleno verano manchego te dio Agua Agria para beber. A cambio lo que te da es una pala para cavar tumba por tumba hasta que encuentres el tesoro enterrado, ¿o es que acaso tú tienes alguna pista de en qué tumba está exactamente? Si es así, vuelve a hablar con el Rubio y te recompensará con la mitad del botín.<br><br>¡Has completado la Etapa 2 de la Misión <i>Éxtasis del Oro</i>!<br><br>Ganas +100 EXP y +150 monedas que llevaba el pistolero fiambre en su bolsillo. ¡Bien hecho!','etapa.png')\";\n $db->query($sql);\n\n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n $box = \"\";\n break;\n }\n else{\n $box = \"No pienso desafiarles si no llevo empuñado un buen Revólver.\";\n \n }\n }\n else{\n $box = \"Aún no estoy libre de mi última acción.\";\n }\n \n }\n elseif($etapaActual === '3'){ //Si estoy en la 1a etapa, debo entregar la Roca Tallada\n //Ver Objetos que llevo desequipados\n $objetosDesequipados = objetosDesequipados();\n foreach($objetosDesequipados as $cadaObjeto){\n if($cadaObjeto['id'] === '922'){//Si es una botella de Agua Agria, la elimino y recojo recompensa y progreso en la mision a la siguiente etapa y notifico mensaje mision\n //VER QUE SLOT QUEDA LIBRE EN EL INVENTARIO\n $sql = \"SELECT inventario.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot > 7 AND inventario.idO = '922'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n $slotLibre = $resultado[0]['slot'];\n\n //BORRAR EL OBJETO VENDIDO\n $sql = \"UPDATE inventario SET idO='0' WHERE (idP='$id' AND slot = '$slotLibre')\";\n $db->query($sql);\n\n //Recojo Recompensa: +300exp +5000 monedas\n $sql = \"UPDATE personajes SET experiencia = experiencia + 300, cash = cash + 5000 WHERE id = '$id'\";\n $db->query($sql);\n\n //completo la mision\n $sql = \"UPDATE progresos SET completada = 1 WHERE idP = '$id' AND idM = '9'\";\n $db->query($sql);\n\n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','En la roca que trajiste había un nombre tallado: \\\"Arch Stanton\\\". Esa es la lápida donde debemos cavar para desenterrar el oro.<br><br>Corres y corres hacia allí mientras te preguntas si se puede tener tanta mala suerte de que te haya ido a tocar ir justo a la tumba que está en la otra punta del cementerio.<br><br>¡Por fín llegas! Es aquí: \\\"Arch Stanton\\\". Cavas, cavas, cavas... y sigues cavando. Y cavas un poquito más. Y ¡SÍIII! Ahí están. Bolsas y bolsas repletas de monedas de oro.<br><br>¡Has completado la misión <i>Éxtasis del Oro</i>! ¡Bien Hecho! Ganas +300 EXP y el Rubio te recompensa con la mitad del botín mientras de la nada aparecen unas letras: \\\"The End\\\".','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n $box = \"\";\n break;\n }\n else{\n $box = \"No sé ni por dónde empezar a cavar, Hulio.\";\n }\n }\n }\n else{\n $box = \"Ya completaste esta misión.\";\n }\n }\n \n }\n else{\n //Insertar la Mision en el registro de Misiones y Generar un informe\n $sql = \"INSERT INTO progresos (idP,idM,progreso,completada) VALUES('$id','9','1','0')\";\n $db->query($sql);\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Aceptada','Acabas de aceptar la misión <i>Éxtasis del Oro</i>.<br>Juras por tu honor regresar con una botella de Agua Agria fresca para dar de beber a ese viajero moribundo. Consigue algo de Agua Agria y regresa al Cruce de Caminos situado en el Abulagar.','misionAceptada.png')\";\n $db->query($sql);\n }\n \n break;\n //PETANCA\n case 'misionPetanca':\n $sql = \"SELECT * FROM progresos WHERE idP='$id' AND idM='8'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n if(isset($result[0])){ //Si ya tengo comenzada la mision\n if($result[0]['completada']==='0'){\n //Compruebo en que etapa me encuentro ahora mismo\n $etapaActual = $result[0]['progreso'];\n if($etapaActual === '1'){ //Si estoy en la 1a etapa, debo entregar 150 monedas para la Inscripción\n $coste = 150;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n //Hago el Pago y Recojo Recompensa: +100exp\n $sql = \"UPDATE personajes SET cash = cash - 150, experiencia = experiencia + 100 WHERE id = '$id'\";\n $db->query($sql);\n\n //Actualizo la mision a Etapa 2\n $sql = \"UPDATE progresos SET progreso = 2 WHERE idP = '$id' AND idM = '8'\";\n $db->query($sql);\n\n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 1 de la misión <i>Por Viejo o por Diablo</i>!<br>Al poner ese dinero, te inscribes junto con tu compañero para participar en el torneo de Petanca que tanta ilusión le hace al hombre. ¡Espero que merezca la pena!<br>Ganas +25 EXP. ¡Bien hecho!','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n $box = \"No puedo pagar la inscripción. Vendré más tarde.\";\n }\n }\n elseif($etapaActual === '2'){ //Si estoy en la 2a etapa, debo jugar durante 1 Hora y ya completo la misión\n\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n //Trabajar durante 1 HORA, completar mision, recibir recompensa y emitir notificacion\n $sql = \"UPDATE personajes SET accion= ADDTIME(NOW(), '0:59:59') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //Recojo Recompensa: +125exp y +150monedas\n $sql = \"UPDATE personajes SET experiencia = experiencia + 125, cash = cash + 150 WHERE id = '$id'\";\n $db->query($sql);\n\n //Completar mision\n $sql = \"UPDATE progresos SET completada = 1 WHERE idP = '$id' AND idM = '8'\";\n $db->query($sql);\n\n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Misión <i>Por Viejo o por Diablo</i>!<br>Qué gran torneo habéis jugado. No conseguís ser campeones pero al menos os hacéis con una digna Segunda Posición que no está nada mal.<br>Ganas +125 EXP y +150 monedas como Premio. ¡Bien hecho!','etapa.png')\";\n $db->query($sql);\n\n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n $box = \"Aún no estoy libre de mi última acción.\";\n }\n \n }\n else{\n $box = \"Ya completaste esta misión.\";\n }\n }\n \n }\n else{\n //Insertar la Mision en el registro de Misiones y Generar un informe\n $sql = \"INSERT INTO progresos (idP,idM,progreso,completada) VALUES('$id','8','1','0')\";\n $db->query($sql);\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Aceptada','Acabas de aceptar la misión <i>Por Viejo o por Diablo</i>.<br>Le has dado tu palabra a ese viejete para formar una pareja de Petanca. Entrena un poco y vuelve a hablar con él para comenzar el torneo.','subirNivel.png')\";\n $db->query($sql);\n }\n \n break; \n //TERRI. CRIBA DE ORO\n case 'misionTerri':\n $sql = \"SELECT * FROM progresos WHERE idP='$id' AND idM='5'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n if(isset($result[0])){ //Si ya tengo comenzada la mision\n if($result[0]['completada']==='0'){\n //Compruebo en que etapa me encuentro ahora mismo\n $etapaActual = $result[0]['progreso'];\n if($etapaActual === '1'){ //Si estoy en la 1a etapa, debo entregar 150 monedas para el Ramo de Flores\n $coste = 150;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n //Hago el Pago y Recojo Recompensa: +100exp\n $sql = \"UPDATE personajes SET cash = cash - 150, experiencia = experiencia + 100 WHERE id = '$id'\";\n $db->query($sql);\n\n //Actualizo la mision a Etapa 2\n $sql = \"UPDATE progresos SET progreso = 2 WHERE idP = '$id' AND idM = '5'\";\n $db->query($sql);\n\n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 1 de la misión <i>Pico y Pala</i>!<br>Al prestar ese dinero, tu compañero ya puede comprar un Ramo de Flores bien bonito para su ligue. ¡Espero que la chica no sea alérgica!<br>Ganas +100 EXP. ¡Bien hecho!','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n $box = \"No tengo dinero. Estoy friendo los huevos con saliva...\";\n }\n }\n elseif($etapaActual === '2'){ //Si estoy en la 2a etapa, debo entregar un conjunto elegante\n //Ver Objetos que llevo desequipados\n $objetosDesequipados = objetosDesequipados();\n foreach($objetosDesequipados as $cadaObjeto){\n if($cadaObjeto['id'] === '208'){//Si es un conjunto elegante, la elimino y recojo recompensa y progreso en la mision a la siguiente etapa y notifico mensaje mision\n //VER QUE SLOT QUEDA LIBRE EN EL INVENTARIO\n $sql = \"SELECT inventario.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot > 7 AND inventario.idO = '208'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n $slotLibre = $resultado[0]['slot'];\n\n //BORRAR EL OBJETO VENDIDO\n $sql = \"UPDATE inventario SET idO='0' WHERE (idP='$id' AND slot = '$slotLibre')\";\n $db->query($sql);\n\n //Recojo Recompensa: +200exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 200 WHERE id = '$id'\";\n $db->query($sql);\n\n //Actualizo la mision a Etapa 3\n $sql = \"UPDATE progresos SET progreso = 3 WHERE idP = '$id' AND idM = '5'\";\n $db->query($sql);\n\n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 2 de la misión <i>Pico y Pala</i>!<br>Al entregar esa ropa elegante, tu compañero se viste para la ocasión como un galán en vez de como un gañán. Ahora ya está listo para ir con la chica que le gusta.<br>Ganas +200 EXP. ¡Bien hecho!','etapa.png')\";\n $db->query($sql);\n\n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n\n break;\n\n }\n else{\n $box = \"Pues no llevo ahora mismo ninguna ropa elegante en la mochila.\";\n }\n }\n \n }\n elseif($etapaActual === '3'){ //Si estoy en la 3a etapa, debo ahora trabajar 1H y ya completo la mision\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n //Trabajar durante 1 HORA, completar mision, recibir recompensa y emitir notificacion\n $sql = \"UPDATE personajes SET accion= ADDTIME(NOW(), '0:59:59') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //Recojo Recompensa: +300exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 300 WHERE id = '$id'\";\n $db->query($sql);\n\n //Completar mision\n $sql = \"UPDATE progresos SET completada = 1 WHERE idP = '$id' AND idM = '5'\";\n $db->query($sql);\n\n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Misión <i>Pico y Pala</i>!<br>Al cambiar el turno de trabajo con tu compañero, le has permitido cumplir su sueño de poder ir en busca de su enana.<br>Ganas +300 EXP. ¡Bien hecho!','etapa.png')\";\n $db->query($sql);\n\n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n $box = \"Aún no estoy libre de mi última acción.\";\n }\n \n }\n else{\n $box = \"Ya completaste esta misión.\";\n }\n }\n \n }\n else{\n //Insertar la Mision en el registro de Misiones y Generar un informe\n $sql = \"INSERT INTO progresos (idP,idM,progreso,completada) VALUES('$id','5','1','0')\";\n $db->query($sql);\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Aceptada','Acabas de aceptar la misión <i>Pico y Pala</i>.<br>Busca a tu compañero en la Escombrera para que te cuente más detalles.','subirNivel.png')\";\n $db->query($sql);\n }\n \n break;\n \n case 'escombrera':\n \n //Voy a encontrar un objeto y voy a notificarselo\n $rand = rand(0, 15);\n if($rand >= 0 && $rand <=3){ //No encuentro nada mas que arena y grava\n //Genero un informe de Rebuscar\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Rebuscar','¡Mmeh! Tras pasar 10 Minutos removiendo arena y grava, lo único que he conseguido ha sido llenarme la ropa de polvo y barro. Esto no lo podré meter así en la lavadora. No he encontrado nada de interés esta vez.','rebuscar.png')\";\n $db->query($sql);\n }\n elseif($rand >=4 && $rand <= 7){ //Encuentro dinero\n //Genero un informe de Rebuscar\n $cantidad = rand(5,20);\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Rebuscar','¡Anda! Alguien ha debido perder su dinero del desayuno aquí, está semienterrado. Obtengo $cantidad monedas.','rebuscar.png')\";\n $db->query($sql);\n \n $sql = \"UPDATE personajes SET cash = cash + $cantidad WHERE id='$id'\";\n $db->query($sql);\n }\n elseif($rand >=8 && $rand <= 10){ //Encuentro chocolatina derretida\n $mensajeObjeto = ' ¡Me la llevo!';\n //Miro que tenga algun slot libre en el inventario\n $slotDondeGuardo = comprobarSlotLibre();\n if($slotDondeGuardo === -1){\n $mensajeObjeto = \" No puedo llevarme el botín porque mi inventario está lleno.\";\n }\n else{\n //AÑADIR AL INVENTARIO\n $idObjetoObtenido = $obj[$objetoObtenido]['id'];\n $sql = \"UPDATE inventario SET idO = '920' WHERE idP='$id' AND slot = '$slotDondeGuardo'\";\n $db->query($sql);\n }\n //Genero un informe de Rebuscar\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Rebuscar','¡Puaj! Una chocolatina llena de hormigas. $mensajeObjeto','rebuscar.png')\";\n $db->query($sql);\n }\n elseif($rand >=11 && $rand <= 12){ //Encuentro pepita de oro\n $mensajeObjeto = ' ¡Me la llevo!';\n //Miro que tenga algun slot libre en el inventario\n $slotDondeGuardo = comprobarSlotLibre();\n if($slotDondeGuardo === -1){\n $mensajeObjeto = \" No puedo llevarme el botín porque mi inventario está lleno.\";\n }\n else{\n //AÑADIR AL INVENTARIO\n $idObjetoObtenido = $obj[$objetoObtenido]['id'];\n $sql = \"UPDATE inventario SET idO = '926' WHERE idP='$id' AND slot = '$slotDondeGuardo'\";\n $db->query($sql);\n }\n //Genero un informe de Rebuscar\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Rebuscar','¡Eeeeh! ¡Algo que brilla! Mientras voy cribando rezo para que no sea otra lata de cerveza oxidada y.... ¡Premio! esta vez es una <i>Pepita de Oro</i>.','rebuscar.png')\";\n $db->query($sql);\n }\n elseif($rand >=13 && $rand <= 14){ //Encuentro pico de minero\n $mensajeObjeto = ' ¡Me lo llevo!';\n //Miro que tenga algun slot libre en el inventario\n $slotDondeGuardo = comprobarSlotLibre();\n if($slotDondeGuardo === -1){\n $mensajeObjeto = \" No puedo llevarme el botín porque mi inventario está lleno.\";\n }\n else{\n //AÑADIR AL INVENTARIO\n $idObjetoObtenido = $obj[$objetoObtenido]['id'];\n $sql = \"UPDATE inventario SET idO = '308' WHERE idP='$id' AND slot = '$slotDondeGuardo'\";\n $db->query($sql);\n \n //Genero un informe de Reliquia Encontrada\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Reliquia Encontrada','Encontrar algún objeto valioso en la Criba ya es suerte, así que imagínate la alegría que da encontrarse un <i>Pico de Minero</i>, toda una Reliquia símbolo del pasado de Puertollano.','reliquia.png')\";\n $db->query($sql);\n }\n //Genero un informe de Rebuscar\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Rebuscar','¡No me digas que eso es lo que creo que es! Cribas, cribas, cribas y... obtienes un <i>Pico de Minero</i>, toda una Reliquia símbolo del pasado de Puertollano.','rebuscar.png')\";\n $db->query($sql);\n }\n elseif($rand === 15){ //ENCUENTRO LA ROCA TALLADA\n $mensajeObjeto = ' ¡Me lo llevo!';\n //Miro que tenga algun slot libre en el inventario\n $slotDondeGuardo = comprobarSlotLibre();\n if($slotDondeGuardo === -1){\n $mensajeObjeto = \" No puedo llevarme el botín porque mi inventario está lleno.\";\n }\n else{\n //AÑADIR AL INVENTARIO\n $idObjetoObtenido = $obj[$objetoObtenido]['id'];\n $sql = \"UPDATE inventario SET idO = '922' WHERE idP='$id' AND slot = '$slotDondeGuardo'\";\n $db->query($sql);\n \n //Genero un informe de Rebuscar\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Rebuscar','¡TOMA YA! Espera...no, es sólo una roca. O bueno, no una roca cualquiera. Aquí alguien ha tallado un nombre: \\\"Arch Stanton\\\". Quien quiera que sea debe llevar ya años muerto, a juzgar por el desgaste que tiene esta inscripción. \\\"','rebuscar.png')\";\n $db->query($sql);\n }\n }\n $sql = \"UPDATE personajes SET accion= ADDTIME(NOW(), '0:10:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n break;\n // MISION 10: SANTO VOTO\n case 'misionVoto':\n $sql = \"SELECT * FROM progresos WHERE idP='$id' AND idM='10'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n if(isset($result[0])){ //Si ya tengo comenzada la mision\n if($result[0]['completada']==='0'){\n //Compruebo en que etapa me encuentro ahora mismo\n $etapaActual = $result[0]['progreso'];\n if($etapaActual === '1'){ //Si estoy en la 1a etapa, debo entregar Patata\n //Ver Objetos que llevo desequipados\n $objetosDesequipados = objetosDesequipados();\n foreach($objetosDesequipados as $cadaObjeto){\n if($cadaObjeto['id'] === '924'){//Si es una Patata Cruda, la elimino y recojo recompensa y progreso en la mision a la siguiente etapa y notifico mensaje mision\n //VER QUE SLOT QUEDA LIBRE EN EL INVENTARIO\n $sql = \"SELECT inventario.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot > 7 AND inventario.idO = '924'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n $slotLibre = $resultado[0]['slot'];\n\n //BORRAR EL OBJETO VENDIDO\n $sql = \"UPDATE inventario SET idO='0' WHERE (idP='$id' AND slot = '$slotLibre')\";\n $db->query($sql);\n\n //Recojo Recompensa: +50exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 50 WHERE id = '$id'\";\n $db->query($sql);\n\n //Actualizo la mision a Etapa 2\n $sql = \"UPDATE progresos SET progreso = 2 WHERE idP = '$id' AND idM = '10'\";\n $db->query($sql);\n\n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 1 de la misión <i>Santo Voto</i>!<br><br>¡La cocinera ya tiene Patatas para comenzar a preparar su guiso! Pero seguro que necesita más ingredientes. Tú podrías conseguirlos mientras va pelando las patatas.<br><br>Ganas +50 EXP. ¡Bien hecho! Vuelve a hablar con ella en el Parque de Ollas del Paseo El Bosque para recibir nuevas instrucciones en la lista de la compra.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n $box = \"\";\n break;\n }\n else{\n $box = \"Será mejor que vuelva con una patata.\";\n }\n }\n }\n elseif($etapaActual === '2'){ //Si estoy en la 2a etapa, debo entregar una barra de pan\n\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n //Ver Objetos que llevo desequipados\n $objetosDesequipados = objetosDesequipados();\n foreach($objetosDesequipados as $cadaObjeto){\n if($cadaObjeto['id'] === '311'){//Si es una Barra de Pan duro, la elimino y recojo recompensa y progreso en la mision a la siguiente etapa y notifico mensaje mision\n //VER QUE SLOT QUEDA LIBRE EN EL INVENTARIO\n $sql = \"SELECT inventario.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot > 7 AND inventario.idO = '311'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n $slotLibre = $resultado[0]['slot'];\n\n //BORRAR EL OBJETO VENDIDO\n $sql = \"UPDATE inventario SET idO='0' WHERE (idP='$id' AND slot = '$slotLibre')\";\n $db->query($sql);\n\n //Recojo Recompensa: +100exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 100 WHERE id = '$id'\";\n $db->query($sql);\n\n //Actualizo la mision a Etapa 3\n $sql = \"UPDATE progresos SET progreso = 3 WHERE idP = '$id' AND idM = '10'\";\n $db->query($sql);\n\n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 2 de la misión <i>Santo Voto</i>!<br><br>¡Por fin tenemos Pan para acompañar bien al guiso! Pero va a necesitar también fuego para encender las ollas.<br><br>Ganas +100 EXP. ¡Bien hecho! Vuelve a hablar con la Cocinera en el Parque de Ollas del Paseo El Bosque para recibir nuevas instrucciones.','etapa.png')\";\n $db->query($sql);\n\n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n $box = \"\";\n break;\n }\n else{\n $box = \"Si no hay Pan no hay Party.\";\n }\n } \n }\n else{\n $box = \"Aún no estoy libre de mi última acción.\";\n }\n \n }\n elseif($etapaActual === '3'){ //Si estoy en la 3a etapa, debo entregar madera (Remo de Madera)\n\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n //Ver Objetos que llevo desequipados\n $objetosDesequipados = objetosDesequipados();\n foreach($objetosDesequipados as $cadaObjeto){\n if($cadaObjeto['id'] === '300'){//Si es un Remo, la elimino y recojo recompensa y progreso en la mision a la siguiente etapa y notifico mensaje mision\n //VER QUE SLOT QUEDA LIBRE EN EL INVENTARIO\n $sql = \"SELECT inventario.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot > 7 AND inventario.idO = '300'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n $slotLibre = $resultado[0]['slot'];\n\n //BORRAR EL OBJETO VENDIDO\n $sql = \"UPDATE inventario SET idO='0' WHERE (idP='$id' AND slot = '$slotLibre')\";\n $db->query($sql);\n\n //Recojo Recompensa: +200exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 200 WHERE id = '$id'\";\n $db->query($sql);\n\n //Completo la mision\n $sql = \"UPDATE progresos SET completada = 1 WHERE idP = '$id' AND idM = '10'\";\n $db->query($sql);\n\n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la misión <i>Santo Voto</i>!<br><br>¡Fuego, Guiso y Pan! Ya está todo para guisar en el día del Santo Voto.<br><br>Ganas +200 EXP. ¡Bien hecho! La Cocinera está muy agradecida. Ve a verla al Parque de Ollas del Paseo El Bosque cada vez que sea el Día del Voto y te dará a probar una ración de guiso que resucita hasta a los muertos.','etapa.png')\";\n $db->query($sql);\n\n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n $box = \"\";\n break;\n }\n else{\n $box = \"Una vez quemé un Remo para encender la barbacoa.\";\n }\n } \n }\n else{\n $box = \"Aún no estoy libre de mi última acción.\";\n }\n \n }\n else{\n $box = \"Ya completaste esta misión.\";\n }\n }\n \n }\n else{\n //Insertar la Mision en el registro de Misiones y Generar un informe\n $sql = \"INSERT INTO progresos (idP,idM,progreso,completada) VALUES('$id','10','1','0')\";\n $db->query($sql);\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Aceptada','Acabas de aceptar la misión <i>Santo Voto</i>.<br><br>La cocinera anda en apuros. Consigue todos los ingredientes que te pida y quizá te deje probar su guiso cuando regreses al parque de Ollas situado en el Paseo El Bosque.','misionAceptada.png')\";\n $db->query($sql);\n }\n \n break;\n //Evento Santo Voto\n case 'tomarGuiso':\n $mejoraSalud = 100;\n \n $sql = \"UPDATE personajes SET salud = CASE WHEN salud + '$mejoraSalud' > 100 THEN 100 ELSE salud + '$mejoraSalud' END WHERE id='$id'\";\n $stmt = $db->query($sql);\n break;\n //PETANCA\n case 'misionPetanca':\n $sql = \"SELECT * FROM progresos WHERE idP='$id' AND idM='8'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n if(isset($result[0])){ //Si ya tengo comenzada la mision\n if($result[0]['completada']==='0'){\n //Compruebo en que etapa me encuentro ahora mismo\n $etapaActual = $result[0]['progreso'];\n if($etapaActual === '1'){ //Si estoy en la 1a etapa, debo entregar 150 monedas para la Inscripción\n $coste = 150;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n //Hago el Pago y Recojo Recompensa: +100exp\n $sql = \"UPDATE personajes SET cash = cash - 150, experiencia = experiencia + 100 WHERE id = '$id'\";\n $db->query($sql);\n\n //Actualizo la mision a Etapa 2\n $sql = \"UPDATE progresos SET progreso = 2 WHERE idP = '$id' AND idM = '8'\";\n $db->query($sql);\n\n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 1 de la misión <i>Por Viejo o por Diablo</i>!<br>Al poner ese dinero, te inscribes junto con tu compañero para participar en el torneo de Petanca que tanta ilusión le hace al hombre. ¡Espero que merezca la pena!<br>Ganas +25 EXP. ¡Bien hecho!','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n $box = \"No puedo pagar la inscripción. Vendré más tarde.\";\n }\n }\n elseif($etapaActual === '2'){ //Si estoy en la 2a etapa, debo jugar durante 1 Hora y ya completo la misión\n\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n //Trabajar durante 1 HORA, completar mision, recibir recompensa y emitir notificacion\n $sql = \"UPDATE personajes SET accion= ADDTIME(NOW(), '0:59:59') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //Recojo Recompensa: +125exp y +150monedas\n $sql = \"UPDATE personajes SET experiencia = experiencia + 125, cash = cash + 150 WHERE id = '$id'\";\n $db->query($sql);\n\n //Completar mision\n $sql = \"UPDATE progresos SET completada = 1 WHERE idP = '$id' AND idM = '8'\";\n $db->query($sql);\n\n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Misión <i>Por Viejo o por Diablo</i>!<br>Qué gran torneo habéis jugado. No conseguís ser campeones pero al menos os hacéis con una digna Segunda Posición que no está nada mal.<br>Ganas +125 EXP y +150 monedas como Premio. ¡Bien hecho!','etapa.png')\";\n $db->query($sql);\n\n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n $box = \"Aún no estoy libre de mi última acción.\";\n }\n \n }\n else{\n $box = \"Ya completaste esta misión.\";\n }\n }\n \n }\n else{\n //Insertar la Mision en el registro de Misiones y Generar un informe\n $sql = \"INSERT INTO progresos (idP,idM,progreso,completada) VALUES('$id','8','1','0')\";\n $db->query($sql);\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Aceptada','Acabas de aceptar la misión <i>Por Viejo o por Diablo</i>.<br>Le has dado tu palabra a ese viejete para formar una pareja de Petanca. Entrena un poco y vuelve a hablar con él para comenzar el torneo.','subirNivel.png')\";\n $db->query($sql);\n }\n \n break; \n \n //MISION 21: BUSCANDO A TENACITAS \n case 'misionTenacitas':\n $sql = \"SELECT * FROM progresos WHERE idP='$id' AND idM='21'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n if(isset($result[0])){ //Si ya tengo comenzada la mision\n if($result[0]['completada']==='0'){\n //Compruebo en que etapa me encuentro ahora mismo\n $etapaActual = $result[0]['progreso'];\n if($etapaActual === '1'){ //Si estoy en la 1a etapa, debo entregar a Tenacitas a su dueña\n //Ver Objetos que llevo desequipados\n $objetosDesequipados = objetosDesequipados();\n foreach($objetosDesequipados as $cadaObjeto){\n if($cadaObjeto['id'] === '7'){//Si es TENACITAS, la elimino y recojo recompensa y completo la mision y notifico mensaje mision\n //VER QUE SLOT QUEDA LIBRE EN EL INVENTARIO\n $sql = \"SELECT inventario.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot > 7 AND inventario.idO = '7'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n $slotLibre = $resultado[0]['slot'];\n\n //BORRAR EL OBJETO VENDIDO\n $sql = \"UPDATE inventario SET idO='0' WHERE (idP='$id' AND slot = '$slotLibre')\";\n $db->query($sql);\n\n //Recojo Recompensa: +300exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 300 WHERE id = '$id'\";\n $db->query($sql);\n\n //Recojo Recompensa: +500 monedas\n $sql = \"UPDATE personajes SET cash = cash + 500 WHERE id = '$id'\";\n $db->query($sql);\n\n //Completo la Mision\n $sql = \"UPDATE progresos SET completada = 1 WHERE idP = '$id' AND idM = '21'\";\n $db->query($sql);\n\n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Misión <i>Buscando a Tenacitas</i>!<br>Al devolver la criaturita a su dueña ganas +300 EXP y además está tan feliz que decide recompensarte con un dinerillo. Obtienes +500 monedas. ¡Bien hecho!','etapa.png')\";\n $db->query($sql);\n\n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n\n break;\n\n }\n else{\n $box = \"No he encontrado aún a Tenacitas, pero la traeré de vuelta.\";\n }\n }\n \n \n }\n else{\n $box = \"Ya completaste esta misión.\";\n }\n }\n \n }\n else{\n //Insertar la Mision en el registro de Misiones y Generar un informe\n $sql = \"INSERT INTO progresos (idP,idM,progreso,completada) VALUES('$id','21','1','0')\";\n $db->query($sql);\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Aceptada','Acabas de aceptar la misión <i>Buscando a Tenacitas</i>.<br>Su dueña dice que les atacaron en el <b>Estanque de Patos</b> y ya no volvió a saber nada más de la pobre criaturita. ¿Qué tal si empiezo a buscar por allí?','subirNivel.png')\";\n $db->query($sql);\n }\n \n break;\n \n \n // MISION 3: BAR UN ALTO\n case 'misionUnAlto':\n $sql = \"SELECT * FROM progresos WHERE idP='$id' AND idM='3'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n if(isset($result[0])){ //Si ya tengo comenzada la mision\n if($result[0]['completada']==='0'){\n //Compruebo en que etapa me encuentro ahora mismo\n $etapaActual = $result[0]['progreso'];\n if($etapaActual === '1'){ //Si estoy en la 1a etapa, debo reunirme en Los Arcos (Abulagar)\n comprobarZona1Barrio3();\n \n //Recojo Recompensa: +100exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 100 WHERE id = '$id'\";\n $db->query($sql);\n \n //Aumento el Progreso de Mision a 2\n $sql = \"UPDATE progresos SET progreso = 2 WHERE idP = '$id' AND idM = '3'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 1 de la Misión <i>Hogar, dulce hogar</i>!<br>Al escoltar al viajero hasta El Abulagar, ganas +100 EXP. ¡Bien hecho! Vuelve a hablar con él para continuar con la misión.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n \n }\n \n if($etapaActual === '2'){ //Si estoy en la 2a etapa, debo reunirme en El Asador del Club (El Poblado)\n comprobarZona1Barrio3();\n \n //Recojo Recompensa: +100exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 100 WHERE id = '$id'\";\n $db->query($sql);\n \n //Aumento el Progreso de Mision a 3\n $sql = \"UPDATE progresos SET progreso = 3 WHERE idP = '$id' AND idM = '3'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 2 de la Misión <i>Hogar, dulce hogar</i>!<br>Al escoltar al viajero hasta El Poblado, ganas +100 EXP. ¡Bien hecho! Vuelve a hablar con él para continuar con la misión.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n \n }\n \n if($etapaActual === '3'){ //Si estoy en la 3a etapa, debo reunirme en Lounge Bar La Plaza (Salesianos)\n comprobarZona1Barrio3();\n \n //Recojo Recompensa: +100exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 100 WHERE id = '$id'\";\n $db->query($sql);\n \n //Aumento el Progreso de Mision a 4\n $sql = \"UPDATE progresos SET progreso = 4 WHERE idP = '$id' AND idM = '3'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 3 de la Misión <i>Hogar, dulce hogar</i>!<br>Al escoltar al viajero hasta los Salesianos, ganas +100 EXP. ¡Bien hecho! Vuelve a hablar con él para continuar con la misión.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n \n }\n \n if($etapaActual === '4'){ //Si estoy en la 4a etapa, debo reunirme en Restaurante Casa Ginés (Terri)\n comprobarZona1Barrio3();\n \n //Recojo Recompensa: +100exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 100 WHERE id = '$id'\";\n $db->query($sql);\n \n //Aumento el Progreso de Mision a 5\n $sql = \"UPDATE progresos SET progreso = 5 WHERE idP = '$id' AND idM = '3'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 4 de la Misión <i>Hogar, dulce hogar</i>!<br>Al escoltar al viajero hasta el Terri, ganas +100 EXP. ¡Bien hecho! Vuelve a hablar con él para continuar con la misión.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n \n }\n \n if($etapaActual === '5'){ //Si estoy en la 4a etapa, debo reunirme en Cafeteria Doctor Limon (El Pino)\n comprobarZona1Barrio3();\n \n //Recojo Recompensa: +100exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 100 WHERE id = '$id'\";\n $db->query($sql);\n \n //Recojo Recompensa: Macuto de Acampar\n $slotLibre = comprobarSlotLibre();\n if($slotLibre >=0){\n \n $sql = \"UPDATE inventario SET idO = 512 WHERE idP='$id' AND slot = '$slotLibre'\";\n $db->query($sql);\n $mensajeObjeto = \"\";\n }\n else{\n $mensajeObjeto = \"No tengo espacio libre\";\n }\n $sql = \"UPDATE personajes SET experiencia = experiencia + 100 WHERE id = '$id'\";\n $db->query($sql);\n \n //Completo la Mision\n $sql = \"UPDATE progresos SET completada = 1 WHERE idP = '$id' AND idM = '3'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Misión <i>Hogar, dulce hogar</i>!<br>Al escoltar al viajero hasta la Cafetería del Doctor Limón, ganas +100 EXP y un Macuto de Acampar que te ayudará a llevar un montón de objetos en el inventario. $mensajeObjeto','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n \n }\n }\n }\n else{ //Si NO tengo comenzada la mision\n //Insertarla en la lista de progresos\n $sql = \"INSERT INTO progresos (idP,idM,progreso,completada) VALUES('$id','3','1','0')\";\n $db->query($sql);\n \n //Generar mensaje del informe de aceptar la mision\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Aceptada','Acabas de aceptar la misión \\\"Hogar, dulce hogar\\\". Dirígete al Bar Un Alto en el Camino, situado en Asdrúbal, para obtener más información.','misionAceptada.png')\";\n $db->query($sql);\n }\n break;\n \n // MISION 15: Temor y Respeto\n case 'misionRespeto':\n $sql = \"SELECT * FROM progresos WHERE idP='$id' AND idM='15'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n if(isset($result[0])){ //Si ya tengo comenzada la mision\n if($result[0]['completada']==='0'){\n //Compruebo en que etapa me encuentro ahora mismo\n $etapaActual = $result[0]['progreso'];\n if($etapaActual === '1'){ //Si estoy en la 1a etapa, debo tener >=4000 Respeto\n $respeto = comprobarRespeto();\n if($respeto >= 4000){\n //Recojo Recompensa: +100exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 100 WHERE id = '$id'\";\n $db->query($sql);\n \n //Aumento el Progreso de Mision a 2\n $sql = \"UPDATE progresos SET progreso = 2 WHERE idP = '$id' AND idM = '15'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 1 de la Misión <i>Temor y Respeto</i>!<br>Con tu demostración de Respeto, has bajado los humos a ese nene.<br><br>Ganas +100 EXP. ¡Bien hecho! Vuelve a la obra situada en El Pino para medirte con el siguiente miembro del clan Montoya.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n $box = \"Aún no me respetan tanto. Volveré cuando tenga al menos 4.000 puntos.\";\n }\n \n }\n \n if($etapaActual === '2'){ //Si estoy en la 2a etapa, 9000 puntos respeto\n $respeto = comprobarRespeto();\n if($respeto >= 9000){\n \n //Recojo Recompensa: +400exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 400 WHERE id = '$id'\";\n $db->query($sql);\n \n //Aumento el Progreso de Mision a 3\n $sql = \"UPDATE progresos SET progreso = 3 WHERE idP = '$id' AND idM = '15'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 2 de la Misión <i>Temor y Respeto</i>!<br>Lo mismo da el nene que el primo, ¡a mi me respetan mucho más!<br><br>Ganas +400 EXP. ¡Bien hecho!<br><br>Vuelve a la obra y podrás medirte al siguiente miembro de la familia Montoya.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n $box = \"¿Dónde me estoy metiendo? Aún ni me acerco a sus 9.000 puntos de Respeto\";\n }\n }\n \n if($etapaActual === '3'){ //16000 respeto\n $respeto = comprobarRespeto();\n if($respeto >= 16000){\n //Recojo Recompensa: +900exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 900 WHERE id = '$id'\";\n $db->query($sql);\n \n //Aumento el Progreso de Mision a 4\n $sql = \"UPDATE progresos SET progreso = 4 WHERE idP = '$id' AND idM = '15'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 3 de la Misión <i>Temor y Respeto</i>!<br>La madre no era mucho más poderosa que los nenes, ha sido fácil ponerla en su lugar.<br><br>Ganas +900 EXP. ¡Bien hecho!<br><br>Vuelve a la obra de El Pino para continuar desafiando a los Montoya.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n $box = \"A esa pava le tienen más respeto que a mí. Por ahora.\";\n }\n }\n \n if($etapaActual === '4'){ //25000\n $respeto = comprobarRespeto();\n if($respeto >= 25000){\n //Recojo Recompensa: +1600exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 1600 WHERE id = '$id'\";\n $db->query($sql);\n \n //Aumento el Progreso de Mision a 5\n $sql = \"UPDATE progresos SET progreso = 5 WHERE idP = '$id' AND idM = '15'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 4 de la Misión <i>Terror y Respeto</i>!<br>La verdad es que debes ser ya de las personas más respetadas de todo Puertollano.<br><br>Ganas +1600 EXP. ¡Bien hecho!<br><br>Vuelve a la obra para vértelas con el Patriarca de los Montoya.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n $box = \"Esta es poderosa. Aún me quedan muchas carteras que mangar para llegar a los 25.000 puntos de Respeto.\";\n }\n }\n \n if($etapaActual === '5'){ //40.000 respeto\n $respeto = comprobarRespeto();\n if($respeto >= 40000){\n //Recojo Recompensa: +100exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 100 WHERE id = '$id'\";\n $db->query($sql);\n \n //Recojo Recompensa: Macuto de Acampar\n $slotLibre = comprobarSlotLibre();\n if($slotLibre >=0){\n \n $sql = \"UPDATE inventario SET idO = 512 WHERE idP='$id' AND slot = '$slotLibre'\";\n $db->query($sql);\n $mensajeObjeto = \"\";\n }\n else{\n $mensajeObjeto = \"No tengo espacio libre\";\n }\n $sql = \"UPDATE personajes SET experiencia = experiencia + 2500 WHERE id = '$id'\";\n $db->query($sql);\n \n //Completo la Mision\n $sql = \"UPDATE progresos SET completada = 1 WHERE idP = '$id' AND idM = '15'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Misión <i>Temor y Respeto</i>!<br>Al derrotar al Patriarca, ya eres la persona más respetada de todo El Pino. Eso significa que terminaste con la tiranía de los Montoya. Ahora tú mandas aquí.<br><br>Ganas +2500 EXP. ¡Bien Hecho!','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n $box = \"El Patriarca es demasiado para mí. ¿Tú sabes cuántos ajustes de cuentas son 40.000 puntos de Respeto?\";\n }\n }\n }\n }\n else{ //Si NO tengo comenzada la mision\n //Insertarla en la lista de progresos\n $sql = \"INSERT INTO progresos (idP,idM,progreso,completada) VALUES('$id','15','1','0')\";\n $db->query($sql);\n \n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Aceptada','Acabas de aceptar la misión \\\"Temor y Respeto\\\". Dirígete al Solar en Obras situado en la barriada de El Pino para obtener más información.','misionAceptada.png')\";\n $db->query($sql);\n }\n break;\n \n //BAR EL BOMBA\n case 'misionBomba':\n $sql = \"SELECT * FROM progresos WHERE idP='$id' AND idM='6'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n if(isset($result[0])){ //Si ya tengo comenzada la mision\n if($result[0]['completada']==='0'){\n //Compruebo en que etapa me encuentro ahora mismo\n $etapaActual = $result[0]['progreso'];\n if($etapaActual === '1'){ //Si estoy en la 1a etapa, debo entregar una MASCARA BOMBA\n //Ver Objetos que llevo desequipados\n $objetosDesequipados = objetosDesequipados();\n foreach($objetosDesequipados as $cadaObjeto){\n if($cadaObjeto['id'] === '103'){//Si es una MASCARA BOMBA, la elimino y recojo recompensa y completo la mision y notifico mensaje mision\n //VER QUE SLOT QUEDA LIBRE EN EL INVENTARIO\n $sql = \"SELECT inventario.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot > 7 AND inventario.idO = '103'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n $slotLibre = $resultado[0]['slot'];\n\n //BORRAR EL OBJETO VENDIDO\n $sql = \"UPDATE inventario SET idO='0' WHERE (idP='$id' AND slot = '$slotLibre')\";\n $db->query($sql);\n \n //Recojo Recompensa: +300exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 300 WHERE id = '$id'\";\n $db->query($sql);\n \n //Recojo Recompensa: Recetario de Cocina\n $sql = \"UPDATE inventario SET idO = 309 WHERE (idP='$id' AND slot = '$slotLibre')\";\n $db->query($sql);\n \n //Completo la Mision\n $sql = \"UPDATE progresos SET completada = 1 WHERE idP = '$id' AND idM = '6'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Misión <i>Mi preciado Tesoro</i>!<br>Al recuperar la Máscara Bomba del cocinero le devolviste un objeto de enorme valor sentimental.Ganas +300 EXP y como agradecimiento te entrega también su Recetario de Cocina Manchega, un raro ejemplar. ¡Bien hecho!','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n \n break;\n \n }\n else{\n $box = \"No he encontrado aún tu Máscara Bomba, pero la traeré de vuelta.\";\n }\n }\n \n }\n }\n }\n else{\n //Insertar la Mision en el registro de Misiones\n $sql = \"INSERT INTO progresos (idP,idM,progreso,completada) VALUES('$id','6','1','0')\";\n $db->query($sql);\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Aceptada','Aceptaste la misión <i>Mi preciado Tesoro</i>. Vuelve a la Cocina del Bar El Bomba, situado en Gran Capitán, para conocer más detalles.','misionAceptada.png')\";\n $db->query($sql);\n }\n break;\n case 'roscaChurros':\n $coste = 25;\n $mejoraSalud = 3;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET salud = CASE WHEN salud + '$mejoraSalud' > 100 THEN 100 ELSE salud + '$mejoraSalud' END, cash = cash-$coste WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"No llevo dinero pa churros.\";\n }\n break; \n case 'migasManchegas':\n $coste = 25;\n $mejoraSalud = 3;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET salud = CASE WHEN salud + '$mejoraSalud' > 100 THEN 100 ELSE salud + '$mejoraSalud' END, cash = cash-$coste WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"¿Me lo dejas a fiar? Vale, vale, ya conozco la salida.\";\n }\n break;\n case 'bombaRellena':\n $coste = 25;\n $mejoraSalud = 3;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET salud = CASE WHEN salud + '$mejoraSalud' > 100 THEN 100 ELSE salud + '$mejoraSalud' END, cash = cash-$coste WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"Quizá otro día, cuando me toque la lotería.\";\n }\n break;\n //MISION Desde las Cenizas\n case 'misionCenizas':\n $sql = \"SELECT * FROM progresos WHERE idP='$id' AND idM='11'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n if(isset($result[0])){ //Si ya tengo comenzada la mision\n if($result[0]['completada']==='0'){\n //Compruebo en que etapa me encuentro ahora mismo\n $etapaActual = $result[0]['progreso'];\n if($etapaActual === '1'){ //Si estoy en la 1a etapa, debo pagarle 500 monedas\n $coste = 500;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n \n //Recojo Recompensa: +500exp -500monedas\n $sql = \"UPDATE personajes SET experiencia = experiencia + 50, cash = cash - 500 WHERE id = '$id'\";\n $db->query($sql);\n \n //Progreso en la mision\n $sql = \"UPDATE progresos SET progreso = 2 WHERE idP = '$id' AND idM = '11'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 1 de la Misión <i>Desde las Cenizas</i>!<br><br>Al prestar esas 500 monedas estás ayudando a ese desconocido a recuperar su licencia de explotación.<br>Ganas +50 EXP y la gratitud de ese hombre que ahora mismo es la persona más feliz del mundo. ¡Bien hecho!<br>Vuelve a hablar con él en el Mercadillo situado en el Recinto Ferial para seguir ayudándole a recuperar su imperio.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n $box = \"¡¿500 monedas?! Estamos locos.\";\n } \n }\n if($etapaActual === '2'){ //Si estoy en la 1a etapa, debo entregarle madera (Remo)\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n //Ver Objetos que llevo desequipados\n $objetosDesequipados = objetosDesequipados();\n foreach($objetosDesequipados as $cadaObjeto){\n if($cadaObjeto['id'] === '300'){//Si es un Remo, la elimino y recojo recompensa y progreso en la mision a la siguiente etapa y notifico mensaje mision\n //VER QUE SLOT QUEDA LIBRE EN EL INVENTARIO\n $sql = \"SELECT inventario.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot > 7 AND inventario.idO = '300'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n $slotLibre = $resultado[0]['slot'];\n\n //BORRAR EL OBJETO VENDIDO\n $sql = \"UPDATE inventario SET idO='0' WHERE (idP='$id' AND slot = '$slotLibre')\";\n $db->query($sql);\n\n //Recojo Recompensa: +100exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 100 WHERE id = '$id'\";\n $db->query($sql);\n\n //Progreso Mision\n $sql = \"UPDATE progresos SET progreso = 3 WHERE idP = '$id' AND idM = '11'\";\n $db->query($sql);\n\n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 2 de la misión <i>Desde las Cenizas</i>!<br><br>Manos a la obra. Con este tablón de madera se pueden hacer varios apaños y reconstruir el chiringuito.<br><br>Ganas +100 EXP. ¡Bien hecho! Vuelve a charlar con este hombre en el Mercadillo del Recinto Ferial para continuar con las tareas de reconstrucción.','etapa.png')\";\n $db->query($sql);\n\n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n $box = \"\";\n break;\n }\n else{\n $box = \"Una vez quemé un Remo para encender la barbacoa.\";\n }\n } \n }\n else{\n $box = \"Aún no estoy libre de mi última acción.\";\n } \n \n }\n if($etapaActual === '3'){ //Si estoy en la 1a etapa, debo entregarle una Pistola de Bolas\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n //Ver Objetos que llevo desequipados\n $objetosDesequipados = objetosDesequipados();\n foreach($objetosDesequipados as $cadaObjeto){\n if($cadaObjeto['id'] === '312'){//Si es una Pistola de Bolas, la elimino y recojo recompensa y progreso en la mision a la siguiente etapa y notifico mensaje mision\n //VER QUE SLOT QUEDA LIBRE EN EL INVENTARIO\n $sql = \"SELECT inventario.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot > 7 AND inventario.idO = '312'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n $slotLibre = $resultado[0]['slot'];\n\n //BORRAR EL OBJETO VENDIDO\n $sql = \"UPDATE inventario SET idO='0' WHERE (idP='$id' AND slot = '$slotLibre')\";\n $db->query($sql);\n\n //Recojo Recompensa: +200exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 200 WHERE id = '$id'\";\n $db->query($sql);\n\n //Progreso Mision\n $sql = \"UPDATE progresos SET progreso = 4 WHERE idP = '$id' AND idM = '11'\";\n $db->query($sql);\n\n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 3 de la misión <i>Desde las Cenizas</i>!<br><br>Has armado al vendedor con una Pistola de Bolas que es igualita a la original. Fijo que con ella asusta a todo el que intente volver a meterse con él.<br><br>Ganas +200 EXP. ¡Bien hecho! Vuelve a charlar con este hombre en el Mercadillo del Recinto Ferial para continuar mejorando su negocio.','etapa.png')\";\n $db->query($sql);\n\n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n $box = \"\";\n break;\n }\n else{\n $box = \"Mejor volver cuando consiga una Pistola de Bolas.\";\n }\n } \n }\n else{\n $box = \"Aún no estoy libre de mi última acción.\";\n } \n \n }\n if($etapaActual === '4'){ //Si estoy en la 4a etapa, debo entregarle unas Luces de LED\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n //Ver Objetos que llevo desequipados\n $objetosDesequipados = objetosDesequipados();\n foreach($objetosDesequipados as $cadaObjeto){\n if($cadaObjeto['id'] === '927'){//Si es una Luces de LED, la elimino y recojo recompensa y progreso en la mision a la siguiente etapa y notifico mensaje mision\n //VER QUE SLOT QUEDA LIBRE EN EL INVENTARIO\n $sql = \"SELECT inventario.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot > 7 AND inventario.idO = '927'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n $slotLibre = $resultado[0]['slot'];\n\n //BORRAR EL OBJETO VENDIDO\n $sql = \"UPDATE inventario SET idO='0' WHERE (idP='$id' AND slot = '$slotLibre')\";\n $db->query($sql);\n\n //Recojo Recompensa: +400exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 400 WHERE id = '$id'\";\n $db->query($sql);\n\n //Progreso Mision\n $sql = \"UPDATE progresos SET completada = 1 WHERE idP = '$id' AND idM = '11'\";\n $db->query($sql);\n\n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la misión <i>Desde las Cenizas</i>!<br><br>¡Ya está listo el puesto! Con esas Luces LED y todo el curro que ha habido detrás, fijo que este negocio arrasa en el Mercadillo. El vendedor te estará eternamente agradecido.<br><br>Ganas +400 EXP. ¡Bien hecho!','etapa.png')\";\n $db->query($sql);\n\n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n $box = \"\";\n break;\n }\n else{\n $box = \"A ver si primero le encuentro unas Luces LED bien chulas.\";\n }\n } \n }\n else{\n $box = \"Aún no estoy libre de mi última acción.\";\n } \n \n }\n }\n else{\n $box = \"Ya completaste esta misión.\";\n }\n }\n else{\n //Insertar la Mision en el registro de Misiones\n $sql = \"INSERT INTO progresos (idP,idM,progreso,completada) VALUES('$id','11','1','0')\";\n $db->query($sql);\n \n //Envio mensaje de Aceptar Mision\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Aceptada','¡Has aceptado la Misión <i>Desde las Cenizas</i>!<br>Tendrás que ayudar a este hombre a recuperar el negocio familiar que un día lo petó, pero que al final terminó siendo reducido a cenizas por el sabotaje que llevaron a cabo sus adversarios.','etapa.png')\";\n $db->query($sql);\n }\n \n break;\n \n //MISION Magic Money\n case 'misionMagia':\n $sql = \"SELECT * FROM progresos WHERE idP='$id' AND idM='14'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n if(isset($result[0])){ //Si ya tengo comenzada la mision\n if($result[0]['completada']==='0'){\n //Compruebo en que etapa me encuentro ahora mismo\n $etapaActual = $result[0]['progreso'];\n if($etapaActual === '1'){ //Si estoy en la 1a etapa, debo tener 25000 monedas en cash\n $sql = \"SELECT cash FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n $cash = $habilidades[0]['cash'];\n if($cash >=25000){\n $sql = \"UPDATE personajes SET accion= ADDTIME(NOW(), '0:59:59') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //Miro que tenga algun slot libre en el inventario\n $slotDondeGuardo = comprobarSlotLibre();\n $mensajeObjeto = \"\";\n if($slotDondeGuardo === -1){\n $mensajeObjeto = $mensajeObjeto . \". No puedo llevarme el botín porque mi inventario está lleno.\";\n $box = \"Tengo la sensación de que sería mejor llevar 1 hueco libre en mi mochila.\";\n }\n else{\n //AÑADIR AL INVENTARIO\n $idObjetoObtenido = 1001;\n $sql = \"UPDATE inventario SET idO = '$idObjetoObtenido' WHERE idP='$id' AND slot = '$slotDondeGuardo'\";\n $db->query($sql);\n \n $sql = \"INSERT INTO coleccionismo (idP,idO,imagen) VALUES('$id','$idObjetoObtenido','$idObjetoObtenido.png')\";\n $db->query($sql);\n \n //Recojo Recompensa: +500 exp + Avioneta Halcon Milenario\n $sql = \"UPDATE personajes SET experiencia = experiencia + 500 WHERE id = '$id'\";\n $db->query($sql);\n \n //Progreso en la mision\n $sql = \"UPDATE progresos SET completada = 1 WHERE idP = '$id' AND idM = '14'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Misión <i>Magic Money</i>!<br><br>Pasas 1 hora contando monedas: 24.998, 24.999 y... ¡25.000! El mago mete todo el dinero en un saquito, chapurrea unas palabras mágicas y te pide que lo sostengas. Mientras tanto, su ayudante le trae una espada bien afilada. La empuña. Te mira. Lo miras con cara de susto. Corre hacia ti y da un corte limpio a la bolsa de la que ¡no caen monedas! En su lugar, lo que sale de la bolsa es una réplica del Halcón Milenario de Star Wars. La nave está realmente muy conseguida, hasta el más mínimo detalle.<br>El mago toca su bolsillo y empieza a sacar monedas y monedas, hasta 25.000. ¡Guau!<br><br>Ganas +500 EXP y además de recuperar tu dinero, el mago te regala la réplica del Halcón Milenario que es toda una reliquia\" . $mensajeObjeto . \"','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n \n \n }\n else{\n $box = \"¡Ouch, me he perdido! De todas formas no llegaba a 25.000 ni de coña.\";\n } \n }\n \n }\n else{\n $box = \"Ya completaste esta misión.\";\n }\n }\n else{\n //Insertar la Mision en el registro de Misiones\n $sql = \"INSERT INTO progresos (idP,idM,progreso,completada) VALUES('$id','14','1','0')\";\n $db->query($sql);\n \n //Envio mensaje de Aceptar Mision\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Aceptada','¡Has aceptado la Misión <i>Magic Money</i>!<br>Saldrás al escenario para jugar en el truco de Magia. Cuando te hayas preparado, díselo al Mago que está actuando en el Club Social Los Juncos, situado en la Ciudad Jardín.','etapa.png')\";\n $db->query($sql);\n }\n \n break;\n \n case 'cronoTerri':\n $agotamiento = 60;\n $coste = 0;\n $puedoHacerlo = comprobarEnergia($agotamiento);\n if($puedoHacerlo === 1){\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n //Consulta para hacer el informe\n $sql = \"SELECT agilidad,resistencia FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n \n $agilidadPrevia = $habilidades[0]['agilidad'];\n $resistenciaPrevia = $habilidades[0]['resistencia'];\n \n $sql = \"UPDATE personajes SET cash = cash - $coste, energia = energia-$agotamiento, agilidad = agilidad + $mejoraSecundariaAlta/personajes.agilidad, resistencia = resistencia + $mejoraPrincipalAlta/personajes.resistencia, accion = ADDTIME(NOW(), '0:45:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //INFORME DE ENTRENAMIENTO\n $sql = \"SELECT agilidad,resistencia FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n \n $agilidadPosterior = $habilidades[0]['agilidad'];\n $resistenciaPosterior = $habilidades[0]['resistencia'];\n \n $mejoraAgilidad = round($agilidadPosterior - $agilidadPrevia, 2, PHP_ROUND_HALF_DOWN);\n $mejoraResistencia = round($resistenciaPosterior - $resistenciaPrevia, 2, PHP_ROUND_HALF_DOWN);\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Mejora de Habilidad','¡De aquí a subir el Tourmalet! He mejorado $mejoraResistencia puntos de Resistencia y también $mejoraAgilidad puntos de Agilidad.','entrenamiento.png')\";\n $db->query($sql);\n }\n else{\n $box = \"¿Y si me multan por ir tan rápido? Mejor reunir algo de dinero antes\";\n }\n }else{\n $box = \"Mejor dedicarme a la cronosiesta y descansar un rato.\";\n }\n break;\n \n case 'empanadilla':\n $coste = 40;\n $mejoraSalud = 10;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET salud = CASE WHEN salud + '$mejoraSalud' > 100 THEN 100 ELSE salud + '$mejoraSalud' END, cash = cash-$coste WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"No puedo pagar eso\";\n }\n break;\n case 'hotDog':\n $coste = 150;\n $mejoraSalud = 50;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET salud = CASE WHEN salud + '$mejoraSalud' > 100 THEN 100 ELSE salud + '$mejoraSalud' END, cash = cash-$coste WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"No puedo pagar eso\";\n }\n break;\n \n //MISION Danza del Agua\n case 'misionDanza':\n $sql = \"SELECT * FROM progresos WHERE idP='$id' AND idM='13'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n if(isset($result[0])){ //Si ya tengo comenzada la mision\n if($result[0]['completada']==='0'){\n //Compruebo en que etapa me encuentro ahora mismo\n $etapaActual = $result[0]['progreso'];\n if($etapaActual === '1'){ //Si estoy en la 1a etapa, debo tener DES 3 FUE 3\n $sql = \"SELECT * FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n $destreza = $habilidades[0]['destreza'];\n $fuerza = $habilidades[0]['fuerza'];\n \n $sql = \"UPDATE personajes SET accion= ADDTIME(NOW(), '0:10:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n if($destreza >=3 && $fuerza >=3){\n //Recojo Recompensa: +150 exp + 200 monedas\n $sql = \"UPDATE personajes SET experiencia = experiencia + 150, cash = cash + 200 WHERE id = '$id'\";\n $db->query($sql);\n \n //Progreso en la mision\n $sql = \"UPDATE progresos SET progreso = 2 WHERE idP = '$id' AND idM = '13'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 1 de la Misión <i>Danza del Agua</i>!<br><br>Logras moverte sigilosa como Abuela que da un billete a su nieto. Atacar feroz como mano a bandeja de croquetas. Vamos, ¡que golpeas al Maestro de Espadas!<br>Ganas +150 EXP y como premio te entrega 200 monedas para irte a celebrar o a seguir entrenando para una revancha. ¡Bien hecho!<br>Vuelve a hablar con él en el Patio de Entrenamiento situado en el PAU y esta vez te lo pondrá más complicado.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Fallida','¡Eres flojo, como culo de vieja! Ay qué paliza, qué dolor.<br>Tendrás que seguir entrenando tu Destreza y Fuerza para poder batir al Maestro de Espadas. Vuelve a retarle en el Patio de Entrenamientos situado en el PAU cuando te veas mejor preparado.','misionFallida.png')\";\n $db->query($sql);\n } \n }\n if($etapaActual === '2'){ //Si estoy en la 2a etapa, DES: 7, FUE: 5\n $sql = \"SELECT * FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n $destreza = $habilidades[0]['destreza'];\n $fuerza = $habilidades[0]['fuerza'];\n \n $sql = \"UPDATE personajes SET accion= ADDTIME(NOW(), '0:10:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n if($destreza >=7 && $fuerza >=5){\n //Recojo Recompensa: +400 exp + 600 monedas\n $sql = \"UPDATE personajes SET experiencia = experiencia + 400, cash = cash + 600 WHERE id = '$id'\";\n $db->query($sql);\n \n //Progreso en la mision\n $sql = \"UPDATE progresos SET progreso = 3 WHERE idP = '$id' AND idM = '13'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 2 de la Misión <i>Danza del Agua</i>!<br><br>Incluso con Dos Espadas consigues ser temible, como un \\\"tenemos que hablar\\\" dicho por tu novia. ¡Qué nivel!<br>Ganas +400 EXP y, como premio, el Maestro de Espadas te entrega 600 monedas que puedes fundir en el bar o para seguir entrenando y darle una revancha. ¡Bien hecho!<br>Vuelve a hablar con él en el Patio de Entrenamiento situado en el PAU y esta vez te lo pondrá más complicado.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Fallida','¡Eres impreciso, como Vinicius en mano a mano! Ay qué paliza, qué dolor.<br>Tendrás que seguir entrenando tu Destreza y Fuerza para poder batir al Maestro de Espadas. Vuelve a retarle en el Patio de Entrenamientos situado en el PAU cuando te veas mejor preparado.','misionFallida.png')\";\n $db->query($sql);\n } \n }\n if($etapaActual === '3'){ //Si estoy en la 2a etapa, DES: 10, FUE: 7\n $sql = \"SELECT * FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n $destreza = $habilidades[0]['destreza'];\n $fuerza = $habilidades[0]['fuerza'];\n \n $sql = \"UPDATE personajes SET accion= ADDTIME(NOW(), '0:10:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n if($destreza >=10 && $fuerza >=7){\n //Recojo Recompensa: +1000 exp + 1500 monedas\n $sql = \"UPDATE personajes SET experiencia = experiencia + 1000, cash = cash + 1500 WHERE id = '$id'\";\n $db->query($sql);\n \n //Progreso en la mision\n $sql = \"UPDATE progresos SET completada = 1 WHERE idP = '$id' AND idM = '13'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Misión <i>Danza del Agua</i>!<br><br>El Acero tampoco tiene secretos para tí, como el Kamasutra. ¡Bestial!<br>Ganas +1000 EXP y, como premio, el Maestro de Espadas te entrega 1500 monedas que da para celebrar con unas pocas jarras de cerveza. ¡Bien hecho!','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Fallida','¡Te has cortado, como toalla de Eduardo Manostijeras! Ay qué paliza, qué dolor.<br>Tendrás que seguir entrenando tu Destreza y Fuerza para poder batir al Maestro de Espadas. Vuelve a retarle en el Patio de Entrenamientos situado en el PAU cuando te veas mejor preparado.','misionFallida.png')\";\n $db->query($sql);\n } \n }\n }\n else{\n $box = \"Ya completaste esta misión.\";\n }\n }\n else{\n //Insertar la Mision en el registro de Misiones\n $sql = \"INSERT INTO progresos (idP,idM,progreso,completada) VALUES('$id','13','1','0')\";\n $db->query($sql);\n \n //Envio mensaje de Aceptar Mision\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Aceptada','¡Has aceptado la Misión <i>Danza del Agua</i>!<br>Para derrotar al Maestro no sólo tendrás que golpear con tu espada, sino Observar como vieja detrás de un visillo, moverte Veloz como pisando arena a 40 grados y lanzarte Feroz como gato que le tocas la panza.','etapa.png')\";\n $db->query($sql);\n }\n \n break;\n \n //MISION EOI: Escuela Oficial de Idiomas\n case 'misionEOI':\n $sql = \"SELECT * FROM progresos WHERE idP='$id' AND idM='19'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n if(isset($result[0])){ //Si ya tengo comenzada la mision\n if($result[0]['completada']==='0'){\n //Compruebo en que etapa me encuentro ahora mismo\n $etapaActual = $result[0]['progreso'];\n if($etapaActual === '1'){ //Si estoy en la 1a etapa, debo tener PER 4\n $sql = \"SELECT * FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n $percepcion = $habilidades[0]['percepcion'];\n \n $sql = \"UPDATE personajes SET accion= ADDTIME(NOW(), '0:10:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n if($percepcion >=4){\n //Recojo Recompensa: +250 exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 250 WHERE id = '$id'\";\n $db->query($sql);\n \n //Progreso en la mision\n $sql = \"UPDATE progresos SET progreso = 2 WHERE idP = '$id' AND idM = '19'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 1 de la Misión <i>Veo-veo</i>!<br><br>Has leído el panel de arriba a abajo sin equivocarte en nada: Primero lo que parecía ser una letra O, pero con un palito oblícuo abajo de la derecha. Después ha salido una herradura en forma de U, luego un poste vertical, seguido del símbolo del euro y tras ello una letra Ene. Encima de ese panel habia otro que también has leído sin dificultad: Primero una foto de una pista de tenis donde las líneas se cruzaban en forma de Te, luego un círculo pequeñito, después la señal de peligro por curvas entrelazadas, otra vez la foto de la Te y otro círculo más pequeño aún. Y por último has leído un tercer panel abajo del todo donde parecía poner \\\"Lola\\\", aunque te has fijado bien y había una letra E justo delante de la última letra.<br>Ganas +250 EXP ¡Bien hecho!<br>Vuelve a la Enfermería de la Escuela de Idiomas Pozo Norte para continuar con la prueba de nivel de Percepción.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Fallida','Lo has intentado, pero aún no tienes la Percepción suficiente para leer todo el panel sin equivocarte.<br>Entrena un poco tu Percepción y vuelve a la Escuela de Idiomas para volver a examinarte.','misionFallida.png')\";\n $db->query($sql);\n } \n }\n if($etapaActual === '2'){ //Si estoy en la 2a etapa, PER 7\n $sql = \"SELECT * FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n $percepcion = $habilidades[0]['percepcion'];\n \n $sql = \"UPDATE personajes SET accion= ADDTIME(NOW(), '0:10:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n if($percepcion>=7){\n //Recojo Recompensa: +500 exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 500 WHERE id = '$id'\";\n $db->query($sql);\n \n //Progreso en la mision\n $sql = \"UPDATE progresos SET progreso = 3 WHERE idP = '$id' AND idM = '19'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 2 de la Misión <i>Veo-veo</i>!<br><br>Claramente las manchas de tinta que se ven en las tarjetas corresponden a:<br>1-Persona haciendo un calvo.<br>2-Oveja tumbada en una hamaca.<br>3-Bebé subido a un monociclo haciendo malabares con cuchillos.<br>4-El monumento al Minero con Puertollano al fondo.<br><br>Ganas +500 EXP. ¡Bien hecho!','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Fallida','Lo has intentado, pero aún no tienes la Percepción suficiente para hacerle frente a ese tipo de pruebas. Entrena un poco y vuelve a la Escuela Oficial de Idiomas Pozo Norte para examinarte de nuevo.','misionFallida.png')\";\n $db->query($sql);\n } \n }\n if($etapaActual === '3'){ //Si estoy en la 3a etapa, PER 10\n $sql = \"SELECT * FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n $percepcion = $habilidades[0]['percepcion'];\n \n $sql = \"UPDATE personajes SET accion= ADDTIME(NOW(), '0:10:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n if($percepcion>=10){\n //Recojo Recompensa: +500 exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 750 WHERE id = '$id'\";\n $db->query($sql);\n \n //Progreso en la mision\n $sql = \"UPDATE progresos SET progreso = 4 WHERE idP = '$id' AND idM = '19'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 3 de la Misión <i>Veo-veo</i>!<br><br>Ahora te han colocado un antifaz para anular tu sentido de la vista, pero todavía tienes 4 sentidos más para tocar, oler, oir y hasta catar una serie de objetos que aciertas sin mucho esfuerzo. Claramente eran:<br>1-Cangrejo cabreado.<br>2-Huevos podridos.<br>3-Ácido Corrosivo.<br><br>Ganas +750 EXP. ¡Bien hecho!','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Fallida','Lo has intentado, pero aún no tienes la Percepción suficiente para hacerle frente a ese tipo de pruebas. Entrena un poco y vuelve a la Escuela Oficial de Idiomas Pozo Norte para examinarte de nuevo.','misionFallida.png')\";\n $db->query($sql);\n } \n }\n if($etapaActual === '4'){ //Si estoy en la 4a etapa, PER 12\n $sql = \"SELECT * FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n $percepcion = $habilidades[0]['percepcion'];\n \n $sql = \"UPDATE personajes SET accion= ADDTIME(NOW(), '0:10:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n if($percepcion>=12){\n //Recojo Recompensa: +1000 exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 500 WHERE id = '$id'\";\n $db->query($sql);\n \n //Progreso en la mision\n $sql = \"UPDATE progresos SET completada = 1 WHERE idP = '$id' AND idM = '19'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Misión <i>Veo-veo</i>!<br><br>En realidad no has entendido ni papa de la grabación en alemán que te han puesto, pero sí que has pillado que era una conversación de bar y deduciendo un poco pues das con que la traducción sería algo tal que así:<br>\\\"-Una cerveza, fría por favor. ¿Has visto mis nuevas chanclas? Adidas. Me las pongo con calcetines porque lo está petando aquí en Mallorca, soy el puto Kaiser. Quiero otra cerveza más. Viva la Merkel\\\".<br><br>Ganas +1000 EXP. ¡Bien hecho!','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Fallida','Lo has intentado, pero aún no tienes la Percepción suficiente para hacerle frente a un C1 de Alemán. Entrena un poco y vuelve a la Escuela Oficial de Idiomas Pozo Norte para examinarte de nuevo.','misionFallida.png')\";\n $db->query($sql);\n } \n }\n \n }\n else{\n $box = \"Ya completaste esta misión.\";\n }\n }\n else{\n //Insertar la Mision en el registro de Misiones\n $sql = \"INSERT INTO progresos (idP,idM,progreso,completada) VALUES('$id','19','1','0')\";\n $db->query($sql);\n \n //Envio mensaje de Aceptar Mision\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Aceptada','¡Has aceptado la Misión <i>Veo-veo</i>!<br>Entrena tu Percepción si hace falta y vuelve rápido a la Escuela Oficial de Idiomas Pozo Norte para comenzar a examinarte.','etapa.png')\";\n $db->query($sql);\n }\n \n break;\n \n //MISION Sin Respiro. EL CARMEN\n case 'misionRespiro':\n $sql = \"SELECT * FROM progresos WHERE idP='$id' AND idM='20'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n if(isset($result[0])){ //Si ya tengo comenzada la mision\n if($result[0]['completada']==='0'){\n //Compruebo en que etapa me encuentro ahora mismo\n $etapaActual = $result[0]['progreso'];\n if($etapaActual === '1'){ //Si estoy en la 1a etapa, debo tener RES 4\n $sql = \"SELECT * FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n $resistencia = $habilidades[0]['resistencia'];\n \n $sql = \"UPDATE personajes SET accion= ADDTIME(NOW(), '0:01:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n if($resistencia >=4){\n //Recojo Recompensa: +250 exp +300 monedas\n $sql = \"UPDATE personajes SET experiencia = experiencia + 250, cash = cash + 300 WHERE id = '$id'\";\n $db->query($sql);\n \n //Progreso en la mision\n $sql = \"UPDATE progresos SET progreso = 2 WHERE idP = '$id' AND idM = '20'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 1 de la Misión <i>Sin Respiro</i>!<br><br>Ahora te das cuenta de lo buena que fue aquella decisión de dejar de fumar. Si me lo llegas a pedir unos años antes, no aguanto 1 Minuto ni de coña.<br>Ganas +250 EXP y como recompensa te llevas +300 monedas. ¡Bien hecho!<br><br>Vuelve a la Chocolatería del barrio El Carmen para seguir demostrando tu Resistencia.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Fallida','Lo has intentado, pero a los pocos segundos te ha entrado la risilla y la has cagado del todo.','misionFallida.png')\";\n $db->query($sql);\n } \n }\n if($etapaActual === '2'){ //Si estoy en la 2a etapa, RES 7\n $sql = \"SELECT * FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n $resistencia = $habilidades[0]['resistencia'];\n \n $sql = \"UPDATE personajes SET accion= ADDTIME(NOW(), '0:03:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n if($resistencia>=7){\n //Recojo Recompensa: +500 exp + 600 monedas\n $sql = \"UPDATE personajes SET experiencia = experiencia + 500, cash = cash + 600 WHERE id = '$id'\";\n $db->query($sql);\n \n //Progreso en la mision\n $sql = \"UPDATE progresos SET progreso = 3 WHERE idP = '$id' AND idM = '20'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 2 de la Misión <i>Sin Respiro</i>!<br><br>No es nada fácil aguantar 3 minutos seguidos sin respirar, pero cabezonería tienes un rato y cuando te pones te pones.<br><br>Ganas +500 EXP. Además, como recompensa te llevas +600 monedas ¡Bien hecho!<br><br>Para seguir demostrando tu Resistencia sólo tienes que volver a la Chocolatería de El Carmen.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Fallida','Empezaste bien, pero a partir del Minuto 2 te pusiste de color azul y al final tienes que rendirte. Entrena un poco más tu Resistencia y vuelve a la Chocolatería de El Carmen para intentarlo de nuevo.','misionFallida.png')\";\n $db->query($sql);\n } \n }\n if($etapaActual === '3'){ //Si estoy en la 3a etapa, RES 10\n $sql = \"SELECT * FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n $resistencia = $habilidades[0]['resistencia'];\n \n $sql = \"UPDATE personajes SET accion= ADDTIME(NOW(), '0:05:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n if($resistencia>=10){\n //Recojo Recompensa: +750 exp +1000 monedas\n $sql = \"UPDATE personajes SET experiencia = experiencia + 750, cash = cash + 1000 WHERE id = '$id'\";\n $db->query($sql);\n \n //Progreso en la mision\n $sql = \"UPDATE progresos SET progreso = 4 WHERE idP = '$id' AND idM = '20'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 3 de la Misión <i>Sin Respiro</i>!<br><br>Cuando aceptaste el reto no confiabas ni tú, pero coges todo el aire de la sala en tus pulmones y aguantas los 5 minutos como un campeón.<br><br>Ganas +750 EXP y como premio te llevas unas suculentas +1.000 monedas. ¡Bien hecho!<br><br>Si tienes lo que hay que tener, vuelve a la Chocolatería de El Carmen para intentar el reto definitivo.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Fallida','Por muy resistente que te veas, 5 minutos sin respirar son mucho tiempo. Entrena un poco más antes de volver a la Chocolatería de El Carmen para intentarlo de nuevo.','misionFallida.png')\";\n $db->query($sql);\n } \n }\n if($etapaActual === '4'){ //Si estoy en la 4a etapa, RES 12\n $sql = \"SELECT * FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n $resistencia = $habilidades[0]['resistencia'];\n \n $sql = \"UPDATE personajes SET accion= ADDTIME(NOW(), '0:10:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n if($resistencia>=12){\n //Recojo Recompensa: +1000 exp +2000 monedas\n $sql = \"UPDATE personajes SET experiencia = experiencia + 1000, cash = cash + 2000 WHERE id = '$id'\";\n $db->query($sql);\n \n //Progreso en la mision\n $sql = \"UPDATE progresos SET completada = 1 WHERE idP = '$id' AND idM = '20'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Misión <i>Sin Respiro</i>!<br><br>¡Dobles Dígitos! Has aguantado 10 minutacos sin respirar. Eso sólo lo había conseguido antes Guybrush Threepwood y fue en un videojuego.<br><br>Ganas +1000 EXP y la recompensa es grande: +2.000 monedas. ¡Bien hecho!','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Fallida','Lo has intentado, pero no te quedas fiambre de milagro. Debes entrenar tu Resistencia un poco más si quieres superar este reto.','misionFallida.png')\";\n $db->query($sql);\n } \n }\n \n }\n else{\n $box = \"Ya completaste esta misión.\";\n }\n }\n else{\n //Insertar la Mision en el registro de Misiones\n $sql = \"INSERT INTO progresos (idP,idM,progreso,completada) VALUES('$id','20','1','0')\";\n $db->query($sql);\n \n //Envio mensaje de Aceptar Mision\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Aceptada','¡Has aceptado la Misión <i>Sin Respiro</i>!<br>Entrena tu Resistencia si hace falta y vuelve rápido a la Chocolatería de El Carmen para empezar con los juegos de aguantar la respiración.','etapa.png')\";\n $db->query($sql);\n }\n \n break;\n \n //MISION BODA: SALESIANOS\n case 'misionBoda':\n $sql = \"SELECT * FROM progresos WHERE idP='$id' AND idM='18'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n if(isset($result[0])){ //Si ya tengo comenzada la mision\n if($result[0]['completada']==='0'){\n //Compruebo en que etapa me encuentro ahora mismo\n $etapaActual = $result[0]['progreso'];\n if($etapaActual === '1'){ //Si estoy en la 1a etapa, debo tener ESP 4\n $sql = \"SELECT * FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n $espiritu = $habilidades[0]['espiritu'];\n \n $sql = \"UPDATE personajes SET accion= ADDTIME(NOW(), '0:10:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n if($espiritu >=4){\n //Recojo Recompensa: +400exp +200monedas\n $sql = \"UPDATE personajes SET experiencia = experiencia + 400, cash = cash + 200 WHERE id = '$id'\";\n $db->query($sql);\n \n //Progreso en la mision\n $sql = \"UPDATE progresos SET progreso = 2 WHERE idP = '$id' AND idM = '18'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 1 de la Misión <i>Boda Express</i>!<br><br>Por el poder que me otorga el Espíritu, le leo al novio todos los términos y condiciones de unirse en matrimonio con la pivita que tiene enfrente. Me responde que sí, que quiere.<br>Ganas +400 EXP y como premio te llevas una comisión del regalo de bodas de la familia del novio: +150 monedas. ¡Bien hecho!<br>Vuelve a la Parroquia de los Salesianos para hablarle ahora a la novia y terminar el trabajo.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Fallida','Lo has intentado, pero aún no tienes el Espíritu suficiente para meterte en esta clase de líos, por favor. Entrena un poco tu Espíritu y vuelve a la Parroquia para terminar tu trabajo.','misionFallida.png')\";\n $db->query($sql);\n } \n }\n if($etapaActual === '2'){ //Si estoy en la 2a etapa, ESP 7\n $sql = \"SELECT * FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $habilidades = $stmt->fetchAll();\n $espiritu = $habilidades[0]['espiritu'];\n \n $sql = \"UPDATE personajes SET accion= ADDTIME(NOW(), '0:10:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n if($espiritu>=7){\n //Recojo Recompensa: +900 exp + 350 monedas\n $sql = \"UPDATE personajes SET experiencia = experiencia + 900, cash = cash + 350 WHERE id = '$id'\";\n $db->query($sql);\n \n //Progreso en la mision\n $sql = \"UPDATE progresos SET completada = 1 WHERE idP = '$id' AND idM = '18'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Misión <i>Boda Express</i>!<br><br>Tras el SÍ del novio, ahora toca el turno de la novia. ¡Qué tensión! Le lees los términos y condiciones de casarse con el vago que tiene al lado pero ella ni te escucha, está loca por dar el SÍ. Los declaro Marido y Mujer. Puede besar a la novia y subir la foto a las stories de su red social favorita.<br><br>Ganas +900 EXP y, como comisión del regalo de bodas de la familia de la novia ganas +350 monedas más. ¡Vivan los novios!','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Fallida','Lo has intentado, pero aún no tienes el Espíritu suficiente para hacerle ese tipo de preguntas a la novia, por favor. Entrena un poco tu Espíritu y vuelve a la Parroquia para terminar tu trabajo.','misionFallida.png')\";\n $db->query($sql);\n } \n }\n \n }\n else{\n $box = \"Ya completaste esta misión.\";\n }\n }\n else{\n //Insertar la Mision en el registro de Misiones\n $sql = \"INSERT INTO progresos (idP,idM,progreso,completada) VALUES('$id','18','1','0')\";\n $db->query($sql);\n \n //Envio mensaje de Aceptar Mision\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Aceptada','¡Has aceptado la Misión <i>Boda Express</i>!<br>Entrena tu Espíritu si hace falta y vuelve rápido a la Parroquia de los Salesianos para oficiar la boda entre unos novios impacientes.','etapa.png')\";\n $db->query($sql);\n }\n \n break;\n \n //MISION 666: BAR LONGINOS SAN JOSE\n case 'mision666':\n $sql = \"SELECT * FROM progresos WHERE idP='$id' AND idM='17'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n if(isset($result[0])){ //Si ya tengo comenzada la mision\n if($result[0]['completada']==='0'){\n //Compruebo en que etapa me encuentro ahora mismo\n $etapaActual = $result[0]['progreso'];\n if($etapaActual === '1'){ //Si estoy en la 1a etapa, debo derrotar 6 Monstruos (ID 31, 32, 33)\n $derrotados = get666Derrotados($id, 1);\n if($derrotados >= 6){ //Si supero el objetivo\n \n //Recojo Recompensa: +400exp +500monedas\n $sql = \"UPDATE personajes SET experiencia = experiencia + 400, cash = cash + 500 WHERE id = '$id'\";\n $db->query($sql);\n \n //Progreso en la Mision\n $sql = \"UPDATE progresos SET progreso = 2 WHERE idP = '$id' AND idM = '17'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 1 de la Misión <i>Triple 6</i>!<br><br>Al silenciar a 6 de esas criaturas ruidosas, los vecinos podrán dormir ahora más tranquilos por las noches.<br>Ganas +400 EXP y recibes la recompensa de +500 monedas por tu gran labor. ¡Bien hecho!<br>Vuelve a mirar el Muro de anuncios del Bar Longinos si te ves con ganas de seguir silenciando monstruos.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n $quedan = 6 - $derrotados;\n $box = \"Todavía me quedan \" . $quedan . \" criaturas por derrotar.\";\n } \n }\n if($etapaActual === '2'){ //Si estoy en la 1a etapa, debo derrotar 6 Monstruos (ID 34, 35, 36)\n $derrotados = get666Derrotados($id, 2);\n if($derrotados >= 6){ //Si supero el objetivo\n \n //Recojo Recompensa: +900exp +1500monedas\n $sql = \"UPDATE personajes SET experiencia = experiencia + 900, cash = cash + 1500 WHERE id = '$id'\";\n $db->query($sql);\n \n //Progreso en la Mision\n $sql = \"UPDATE progresos SET progreso = 3 WHERE idP = '$id' AND idM = '17'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 2 de la Misión <i>Triple 6</i>!<br><br>Qué tranquilidad se queda después de silenciar a 6 bichos de esos.<br>Ganas +900 EXP y recibes la recompensa de +1500 monedas por tu gran labor. ¡Bien hecho!<br>Aún puedes visitar el muro de anuncios del Bar Longinos para afrontar otro encargo de este tipo.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n $quedan = 6 - $derrotados;\n $box = \"Todavía me quedan \" . $quedan . \" criaturas por derrotar.\";\n } \n }\n if($etapaActual === '3'){ //Si estoy en la 1a etapa, debo derrotar 6 Monstruos (ID 37, 38, 39)\n $derrotados = get666Derrotados($id, 3);\n if($derrotados >= 6){ //Si supero el objetivo\n \n //Recojo Recompensa: +1600exp +2500monedas\n $sql = \"UPDATE personajes SET experiencia = experiencia + 1600, cash = cash + 2500 WHERE id = '$id'\";\n $db->query($sql);\n \n //Progreso en la Mision\n $sql = \"UPDATE progresos SET completada = 1 WHERE idP = '$id' AND idM = '17'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Misión <i>Triple 6</i>!<br><br>Ahora sí que nos hemos quedado a gusto. Más que un niño en brazos.<br>Ganas +1600 EXP y recibes la recompensa de +2500 monedas por tu gran labor. ¡Bien hecho!','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n $quedan = 6 - $derrotados;\n $box = \"Todavía me quedan \" . $quedan . \" criaturas por derrotar.\";\n } \n }\n }\n else{\n $box = \"Ya completaste esta misión.\";\n }\n }\n else{\n //Insertar la Mision en el registro de Misiones\n $sql = \"INSERT INTO progresos (idP,idM,progreso,completada) VALUES('$id','17','1','0')\";\n $db->query($sql);\n \n //Envio mensaje de Aceptar Mision\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Aceptada','¡Has aceptado la Misión <i>Triple 6</i>!<br>Tendrás que silenciar a 6 Mujeres Chillonas, Enfermeras o Nubes de Polillas que rondan por los alrededores de San José y amenazan la tranquilidad de todo el vecindario.','etapa.png')\";\n $db->query($sql);\n }\n \n break;\n \n //MISION OKUDA: PARA LA FOTO\n case 'misionOkuda':\n $sql = \"SELECT * FROM progresos WHERE idP='$id' AND idM='12'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n if(isset($result[0])){ //Si ya tengo comenzada la mision\n if($result[0]['completada']==='0'){\n //Compruebo en que etapa me encuentro ahora mismo\n $etapaActual = $result[0]['progreso'];\n if($etapaActual === '1'){ //Si estoy en la 1a etapa, debo derrotar 10 Jabalies (ID 91, 94, 96, 99)\n //Ver jabalies derrotados\n $derrotados = getJabaliesDerrotados($id);\n if($derrotados >= 10){ //Si supero el objetivo\n \n //Recojo Recompensa: +500exp +500monedas\n $sql = \"UPDATE personajes SET experiencia = experiencia + 500, cash = cash + 500 WHERE id = '$id'\";\n $db->query($sql);\n \n //Completo la Mision\n $sql = \"UPDATE progresos SET completada = 1 WHERE idP = '$id' AND idM = '12'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Misión <i>Para la Foto</i>!<br><br>Al asustar a 10 Jabalíes, el Mural de Okuda ya está libre para que venga la Alcaldesa a echarse sus fotos de inauguración.<br>Ganas +500 EXP y la Alcaldesa te premia con +500 monedas por tu gran labor. ¡Bien hecho!','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n $quedan = 10 - $derrotados;\n $box = \"Todavía me quedan \" . $quedan . \" jabalíes por derrotar.\";\n } \n }\n }\n else{\n $box = \"Ya completaste esta misión.\";\n }\n }\n else{\n //Insertar la Mision en el registro de Misiones\n $sql = \"INSERT INTO progresos (idP,idM,progreso,completada) VALUES('$id','12','1','0')\";\n $db->query($sql);\n \n //Envio mensaje de Aceptar Mision\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Aceptada','¡Has aceptado la Misión <i>Para la Foto</i>!<br>Tendrás que asustar a 10 Jabalíes que rondan por La Copa y amenazan con arruinar la foto de inauguración del Mural de Okuda.','etapa.png')\";\n $db->query($sql);\n }\n \n break;\n \n //MISION TAURO: HUELE A CERRAO\n case 'misionCerrao':\n $sql = \"SELECT * FROM progresos WHERE idP='$id' AND idM='16'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n if(isset($result[0])){ //Si ya tengo comenzada la mision\n if($result[0]['completada']==='0'){\n //Compruebo en que etapa me encuentro ahora mismo\n $etapaActual = $result[0]['progreso'];\n if($etapaActual === '1'){ //Si estoy en la 1a etapa, debo derrotar 20 criaturas (ID 81 - 90, 208)\n //Ver jabalies derrotados\n $derrotados = getTauroDerrotados($id);\n if($derrotados >= 20){ //Si supero el objetivo\n \n //Recojo Recompensa: +500exp +500monedas\n $sql = \"UPDATE personajes SET experiencia = experiencia + 1000, cash = cash + 3000 WHERE id = '$id'\";\n $db->query($sql);\n \n //Completo la Mision\n $sql = \"UPDATE progresos SET completada = 1 WHERE idP = '$id' AND idM = '16'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Misión <i>Huele a Cerrao</i>!<br><br>Al acabar con 20 Monstruos, las Galerías del Edificio Tauro se ven mucho más limpias y ventiladas.<br>Ganas +1000 EXP y la recompensa de +3.000 monedas por tu gran labor. ¡Bien hecho!','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n $quedan = 20 - $derrotados;\n $box = \"Todavía me quedan \" . $quedan . \" monstruos por derrotar.\";\n } \n }\n }\n else{\n $box = \"Ya completaste esta misión.\";\n }\n }\n else{\n //Insertar la Mision en el registro de Misiones\n $sql = \"INSERT INTO progresos (idP,idM,progreso,completada) VALUES('$id','16','1','0')\";\n $db->query($sql);\n \n //Envio mensaje de Aceptar Mision\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Aceptada','¡Has aceptado la Misión <i>Huele a Cerrao</i>!<br>O lo que es lo mismo, has aceptado el encargo de ventilarte a 20 monstruos en las Galerías del Edificio Tauro. ¡Buena Suerte!','etapa.png')\";\n $db->query($sql);\n }\n break;\n \n //MISION COLEGIO SEVERO OCHOA QUE ESCANDALO\n case 'misionColegio':\n $sql = \"SELECT * FROM progresos WHERE idP='$id' AND idM='7'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n if(isset($result[0])){ //Si ya tengo comenzada la mision\n if($result[0]['completada']==='0'){\n //Compruebo en que etapa me encuentro ahora mismo\n $etapaActual = $result[0]['progreso'];\n if($etapaActual === '1'){ //Si estoy en la 1a etapa, debo superar un 60% Popularidad en el Hospital(id 155)\n //Ver mi popularidad en 155\n $miPop = getPopularidadSpot(155);\n if($miPop > 60){ //Si supero a Ashley T.\n \n //Recojo Recompensa: +250exp +250monedas\n $sql = \"UPDATE personajes SET experiencia = experiencia + 250, cash = cash + 250 WHERE id = '$id'\";\n $db->query($sql);\n \n //Aumento el Progreso de Mision a 2\n $sql = \"UPDATE progresos SET progreso = 2 WHERE idP = '$id' AND idM = '7'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 1 de la Misión <i>Qué Escándalo</i>!<br>Al superar la Popularidad de Ashley T. entras automáticamente en el selecto grupo de Ashleys ocupando la cuarta posición.<br>Ganas +250 EXP y las Ashleys te premian con +250 monedas por tu ingreso al club. ¡Bien hecho! Vuelve a hablar con ellas para continuar escalando posiciones.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n $box = \"Todavía no soy lo suficiente Popular en la zona de Las 600 como para desafiar a Ashley T.\";\n }\n \n }\n elseif($etapaActual === '2'){ //Si estoy en la 2a etapa, debo superar un 60% en Gran Capitan (22)\n //Ver mi popularidad en 22\n $miPop = getPopularidadSpot(22);\n if($miPop > 60){ //Si supero a Ashley Q.\n \n //Recojo Recompensa: +500exp +500monedas\n $sql = \"UPDATE personajes SET experiencia = experiencia + 500, cash = cash + 500 WHERE id = '$id'\";\n $db->query($sql);\n \n //Aumento el Progreso de Mision a 3\n $sql = \"UPDATE progresos SET progreso = 3 WHERE idP = '$id' AND idM = '7'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 2 de la Misión <i>Qué Escándalo</i>!<br>Cerraste toda la boca a Ashley Q. superándole en popularidad. Escalas en el selecto grupo de Ashleys ocupando ahora la tercera posición.<br>Ganas +500 EXP y las Ashleys te premian con +500 monedas por tu ascenso dentro del club. ¡Bien hecho! Vuelve a hablar con ellas para continuar escalando posiciones.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n $box = \"Aún no puedo competir en Popularidad contra Ashley Q. en la zona de Gran Capitán\";\n }\n \n }\n elseif($etapaActual === '3'){ //Si estoy en la 1a etapa, debo superar un 75% en Recinto Ferial (id 175)\n //Ver mi popularidad en 175\n $miPop = getPopularidadSpot(175);\n if($miPop > 75){ //Si supero a Ashley B.\n \n //Recojo Recompensa: +750exp +750monedas\n $sql = \"UPDATE personajes SET experiencia = experiencia + 750, cash = cash + 750 WHERE id = '$id'\";\n $db->query($sql);\n \n //Aumento el Progreso de Mision a 4\n $sql = \"UPDATE progresos SET progreso = 4 WHERE idP = '$id' AND idM = '7'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 3 de la Misión <i>Qué Escándalo</i>!<br>La pobre Ashley B. todavía sigue llorando desde que se enteró que le arrebataste la Popularidad. Ya estas en segunda posición dentro del selecto grupo de Ashleys.<br>Ganas +750 EXP y las Ashleys te premian con +750 monedas por llegar a la vicepresidencia. ¡Bien hecho! Vuelve a hablar con ellas para asaltar el Primer Puesto.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n $box = \"Mi Popularidad aún no da para discutirle el puesto a Ashley B. en la zona del Recinto Ferial.\";\n } \n }\n elseif($etapaActual === '4'){\n //Ver mi popularidad en 85\n $miPop = getPopularidadSpot(85);\n if($miPop > 75){ //Si supero a Ashley A.\n \n //Recojo Recompensa: +1000exp +1000monedas\n $sql = \"UPDATE personajes SET experiencia = experiencia + 1000, cash = cash + 1000 WHERE id = '$id'\";\n $db->query($sql);\n \n //Completo la Mision\n $sql = \"UPDATE progresos SET completada = 1 WHERE idP = '$id' AND idM = '7'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Misión <i>Qué Escándalo</i>!<br>Pateaste el culo de Ashley A y de todas ellas, superándoles en popularidad. Escalas a la cima del selecto grupo de Ashleys ocupando ahora la primera posición.<br>Ganas +1000 EXP y las Ashleys te premian con +1000 monedas por tu coronación. ¡Bien hecho!','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n }\n else{\n $box = \"Tengo que currarme aún más mi Popularidad si quiero quitar la corona a Ashley Armbruster.\";\n }\n }\n }\n else{\n $box = \"Ya completaste esta misión.\";\n }\n }\n else{\n //Insertar la Mision en el registro de Misiones\n $sql = \"INSERT INTO progresos (idP,idM,progreso,completada) VALUES('$id','7','1','0')\";\n $db->query($sql);\n \n //Envio mensaje de Aceptar Mision\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Aceptada','¡Has aceptado la Misión <i>Qué Escándalo</i>!<br>Tendrás que superar la Popularidad de esas niñas engreídas para demostrar quién manda en Puertollano.','etapa.png')\";\n $db->query($sql);\n }\n \n break;\n \n // EVENTO ALTAR DE SACRIFICIOS \n case 'misionMaimonides':\n $sql = \"SELECT * FROM progresos WHERE idP='$id' AND idM='1'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n if(isset($result[0])){ //Si ya tengo comenzada la mision\n if($result[0]['completada']==='0'){\n //Compruebo en que etapa me encuentro ahora mismo\n $etapaActual = $result[0]['progreso'];\n if($etapaActual === '1'){ //Si estoy en la 1a etapa, debo entregar una chocolatina\n //Ver Objetos que llevo desequipados\n $objetosDesequipados = objetosDesequipados();\n foreach($objetosDesequipados as $cadaObjeto){\n if($cadaObjeto['id'] === '920'){//Si es una chocolatina derretida, la elimino y recojo recompensa y progreso en la mision a la siguiente etapa y notifico mensaje mision\n //VER QUE SLOT QUEDA LIBRE EN EL INVENTARIO\n $sql = \"SELECT inventario.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot > 7 AND inventario.idO = '920'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n $slotLibre = $resultado[0]['slot'];\n\n //BORRAR EL OBJETO VENDIDO\n $sql = \"UPDATE inventario SET idO='0' WHERE (idP='$id' AND slot = '$slotLibre')\";\n $db->query($sql);\n \n //Recojo Recompensa: +100exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 100 WHERE id = '$id'\";\n $db->query($sql);\n \n //Aumento el Progreso de Mision a 2\n $sql = \"UPDATE progresos SET progreso = 2 WHERE idP = '$id' AND idM = '1'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 1 de la Misión <i>El Proverbio de Maimónides</i>!<br>Al entregar esa Chocolatina al Mendigo, ganas +100 EXP. ¡Bien hecho! Vuelve a hablar con él para continuar con la misión.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n \n break;\n \n }\n else{\n $box = \"¡Oops, me comí todas las <i>chocolatinas</i>! No tengo ninguna más para darle.\";\n }\n }\n \n }\n elseif($etapaActual === '2'){ //Si estoy en la 1a etapa, debo entregar un abrigo\n //Ver Objetos que llevo desequipados\n $objetosDesequipados = objetosDesequipados();\n foreach($objetosDesequipados as $cadaObjeto){\n if($cadaObjeto['id'] === '207'){//Si es un Abrigo Polar, lo elimino y recojo recompensa y progreso en la mision a la siguiente etapa y notifico mensaje mision\n //VER QUE SLOT QUEDA LIBRE EN EL INVENTARIO\n $sql = \"SELECT inventario.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot > 7 AND inventario.idO = '207'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n $slotLibre = $resultado[0]['slot'];\n\n //BORRAR EL OBJETO VENDIDO\n $sql = \"UPDATE inventario SET idO='0' WHERE (idP='$id' AND slot = '$slotLibre')\";\n $db->query($sql);\n \n //Recojo Recompensa: +100exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 200 WHERE id = '$id'\";\n $db->query($sql);\n \n //Aumento el Progreso de Mision a 2\n $sql = \"UPDATE progresos SET progreso = 3 WHERE idP = '$id' AND idM = '1'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado la Etapa 2 de la Misión <i>El Proverbio de Maimónides</i>!<br>Al entregar ese Abrigo Polar al Mendigo, ganas +200 EXP. ¡Bien hecho! Vuelve a hablar con él para continuar con la misión.','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n \n break;\n \n }\n else{\n $box = \"No tengo ese <i>Abrigo Polar</i> que dice. ¡¿Tienes idea de cuánto cuesta uno de esos?!\";\n }\n }\n \n }\n elseif($etapaActual === '3'){ //Si estoy en la 1a etapa, debo entregar una Caña de Pescar\n //Ver Objetos que llevo desequipados\n $objetosDesequipados = objetosDesequipados();\n foreach($objetosDesequipados as $cadaObjeto){\n if($cadaObjeto['id'] === '307'){//Si es una Caña de Pesca, lo elimino y recojo recompensa y progreso en la mision a la siguiente etapa y notifico mensaje mision\n //VER QUE SLOT QUEDA LIBRE EN EL INVENTARIO\n $sql = \"SELECT inventario.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot > 7 AND inventario.idO = '307'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n $slotLibre = $resultado[0]['slot'];\n\n //BORRAR EL OBJETO VENDIDO\n $sql = \"UPDATE inventario SET idO='0' WHERE (idP='$id' AND slot = '$slotLibre')\";\n $db->query($sql);\n \n //EN ESE LUGAR PONER EL OBJETO RECOMPENSA\n $sql = \"UPDATE inventario SET idO='302' WHERE (idP='$id' AND slot = '$slotLibre')\";\n $db->query($sql);\n \n //COMO DICHO OBJETO ES UNA RELIQUIA, INSERTARLO EN coleccionismo Y GENERAR UNA NOTIFICACION\n $sql = \"INSERT INTO coleccionismo (idP,idO,imagen) VALUES('$id','302','302.png')\";\n $db->query($sql);\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Reliquia Encontrada','¡Has conseguido el Callejero de Puertollano, ¡toda una reliquia! Tiene todas las calles y sitios de interés, así que te será de enorme ayuda a la hora de desplazarte más rápido entre zonas.', 'reliquia.png')\";\n $db->query($sql);\n \n //Recojo Recompensa: +400exp\n $sql = \"UPDATE personajes SET experiencia = experiencia + 400 WHERE id = '$id'\";\n $db->query($sql);\n \n //Completo la Mision\n $sql = \"UPDATE progresos SET completada = 1 WHERE idP = '$id' AND idM = '1'\";\n $db->query($sql);\n \n //Genero un informe de Mision Cumplida\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Cumplida','¡Has completado todas las etapas de la Misión <i>El Proverbio de Maimónides</i>!<br>Al entregar esa Caña de Pesca al Mendigo, ganas +400 EXP y como recompensa te regala un Callejero de Puertollano. ¡Bien hecho!','etapa.png')\";\n $db->query($sql);\n \n //Comprobar si subo de nivel\n $sql = \"SELECT nivel FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $personaje = $stmt->fetchAll();\n $nuevoNivel = comprobarSuboNivel($id);\n if($nuevoNivel != $personaje[0]['nivel'] ){ //sube de nivel\n $avances = 5;\n //Mirar si lleva algun objeto con la especialidad AVANCE EXTRA\n $sql = \"SELECT objetos.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot <= 7\";\n $stmt = $db->query($sql);\n $objetosEquipados = $stmt->fetchAll();\n\n foreach ($objetosEquipados as $cadaObjeto) {\n if($cadaObjeto['especial']==='avance extra'){\n $avances = $avances + 1;\n } \n }\n\n $sql = \"UPDATE personajes SET nivel = personajes.nivel+1, avances = personajes.avances + $avances WHERE id='$id'\";\n $db->query($sql);\n //Generar mensaje del informe de la subida de nivel\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Subiste de Nivel','¡Enhorabuena! Acabas de subir a Nivel $nuevoNivel. <br> Obtienes $avances Avances para mejorar habilidades en la ventana de Personaje.','subirNivel.png')\";\n $db->query($sql);\n }\n \n break;\n \n }\n else{\n $box = \"Eso que llevo ahí no es una <i>Caña de Pesca</i>, es sólo que me alegro de verte.\";\n }\n }\n \n }\n }\n else{\n $box = \"Ya completaste esta misión.\";\n }\n }\n else{\n //Insertar la Mision en el registro de Misiones\n $sql = \"INSERT INTO progresos (idP,idM,progreso,completada) VALUES('$id','1','1','0')\";\n $db->query($sql);\n \n //Envio mensaje de Aceptar Mision\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Misión Aceptada','¡Has aceptado la Misión <i>El Proverbio de Maimónides</i>!<br><br>Habla con el Vagabundo que se refugia en el Altar de Sacrificios de San José para ver cómo puedes ayudarle.','etapa.png')\";\n $db->query($sql);\n }\n \n break;\n \n case 'sacrificio':\n $costeSalud = 40;\n $tengoVida = comprobarSalud($costeSalud);\n if($tengoVida === 1){\n $mejoraEnergia = 20;\n $sql = \"UPDATE personajes SET energia = CASE WHEN energia + '$mejoraEnergia' > 100 THEN 100 ELSE energia + '$mejoraEnergia' END, salud = salud-$costeSalud WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"¡Ojo! Que puedo quedarme tieso ahí.\";\n }\n break;\n \n case 'barraLibre':\n $costeSalud = 90;\n $tengoVida = comprobarSalud($costeSalud);\n if($tengoVida === 1){\n $mejoraEnergia = 50;\n $sql = \"UPDATE personajes SET energia = CASE WHEN energia + '$mejoraEnergia' > 100 THEN 100 ELSE energia + '$mejoraEnergia' END, salud = salud-$costeSalud WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"Me pides esto yendo a tope de Salud o me estás pidiendo morir ahí, eh?\";\n }\n break;\n \n // FIESTAS DE LA BARRIADA EL ABULAGAR \n case 'pregon':\n $sql = \"SELECT * FROM popularidad WHERE idP='$id'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n foreach ($result as $cadaSpot){\n $mejoraPuntos = rand(0,10);\n $cadaSpotID = $cadaSpot['idS'];\n $sql = \"UPDATE popularidad SET puntos = CASE WHEN puntos + '$mejoraPuntos' > 100 THEN 100 ELSE puntos + '$mejoraPuntos' END WHERE idP='$id' AND idS='$cadaSpotID'\";\n $stmt = $db->query($sql);\n }\n //Ver mi nueva popularidad, actualizarla, meter el contador de tiempo de accion y Generar mensaje\n $sql = \"SELECT AVG(puntos) FROM popularidad WHERE idP = '$id'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n\n $popularidadAVG = round($result[0]['AVG(puntos)'], 2, PHP_ROUND_HALF_DOWN);\n \n $sql = \"UPDATE personajes SET popularidad = $popularidadAVG, accion= ADDTIME(NOW(), '0:30:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Popularidad','El Pregón ha sido todo un éxito y los habitantes de todo Puertollano hablan mejor de mí ahora mismo.<br>Mi Popularidad asciende un poquito en cada zona de Puertollano. Tengo un $popularidadAVG% de valoración positiva.','popularidad.png')\";\n $db->query($sql);\n header(\"location: ?page=mensajes\");\n \n break;\n \n case 'chocolatada':\n $coste = 40;\n $mejoraSalud = 10;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET salud = CASE WHEN salud + '$mejoraSalud' > 100 THEN 100 ELSE salud + '$mejoraSalud' END, cash = cash-$coste WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"No puedo pagarme el trago de Vino\";\n }\n break;\n \n case 'postre':\n $coste = 150;\n $mejoraSalud = 50;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET salud = CASE WHEN salud + '$mejoraSalud' > 100 THEN 100 ELSE salud + '$mejoraSalud' END, cash = cash-$coste WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"No me quedan monedas suficientes\";\n }\n break;\n \n // Krater Rock City Concierto \n case 'telonero':\n $sql = \"SELECT * FROM popularidad WHERE idP='$id'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n \n foreach ($result as $cadaSpot){\n $mejoraPuntos = rand(0,10);\n $cadaSpotID = $cadaSpot['idS'];\n $sql = \"UPDATE popularidad SET puntos = CASE WHEN puntos + '$mejoraPuntos' > 100 THEN 100 ELSE puntos + '$mejoraPuntos' END WHERE idP='$id' AND idS='$cadaSpotID'\";\n $stmt = $db->query($sql);\n }\n //Ver mi nueva popularidad, actualizarla, meter el contador de tiempo de accion y Generar mensaje\n $sql = \"SELECT AVG(puntos) FROM popularidad WHERE idP = '$id'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n\n $popularidadAVG = round($result[0]['AVG(puntos)'], 2, PHP_ROUND_HALF_DOWN);\n \n $sql = \"UPDATE personajes SET popularidad = $popularidadAVG, accion= ADDTIME(NOW(), '0:30:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Popularidad','Me llueven flashes y tangas. Cuando bajo del escenario me abro paso entre la multitud enfervorecida, firmando autógrafos y posando para los selfies. Al llegar a la puerta de mi camerino hay una periodista esperando para entrevistarme. Esto va a dar un subidón a mi Popularidad en todo Puertollano.<br>¡Un éxito! Ahora tengo un $popularidadAVG% de valoración positiva.','popularidad.png')\";\n $db->query($sql);\n header(\"location: ?page=mensajes\");\n \n break;\n \n case 'jarraCerveza':\n $coste = 40;\n $mejoraSalud = 10;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET salud = CASE WHEN salud + '$mejoraSalud' > 100 THEN 100 ELSE salud + '$mejoraSalud' END, cash = cash-$coste WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"No puedo pagarme el trago de Vino\";\n }\n break;\n \n case 'chupitos':\n $coste = 150;\n $mejoraSalud = 50;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET salud = CASE WHEN salud + '$mejoraSalud' > 100 THEN 100 ELSE salud + '$mejoraSalud' END, cash = cash-$coste WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"No me quedan monedas suficientes\";\n }\n break;\n \n //EVENTO: Maestre Trapichero\n case 'vinoSueño':\n $coste = 150;\n $mejoraEnergia = 50;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET energia = CASE WHEN energia + '$mejoraEnergia' > 100 THEN 100 ELSE energia + '$mejoraEnergia' END, cash = cash-$coste WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"No me quedan monedas suficientes\";\n }\n break;\n \n case 'lecheAmapola':\n $coste = 150;\n $mejoraEnergia = 100;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET energia = CASE WHEN energia + '$mejoraEnergia' > 100 THEN 100 ELSE energia + '$mejoraEnergia' END, cash = cash-$coste WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"No me quedan monedas suficientes\";\n }\n break;\n \n case 'bramidoDioses':\n $coste = 500;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET sexo = CASE WHEN personajes.sexo = 'Hombre' THEN 'Mujer' ELSE 'Hombre' END, cash = cash-$coste WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $box = \"No me quedan monedas suficientes\";\n }\n break;\n //TRABAJO: CRIBA DE ORO\n case 'ratito':\n $agotamiento = 10;\n $salario = 15;\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n $puedoHacerlo = comprobarEnergia($agotamiento);\n if($puedoHacerlo === 1){\n //Consulta para hacer el informe\n $sql = \"SELECT cash FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $dinero = $stmt->fetchAll();\n\n $cashPrevio = $dinero[0]['cash'];\n //HACER EL PAGO\n if($recaudador === 1){\n $sql = \"UPDATE personajes SET cash = cash+$salario*1.50, energia = energia-$agotamiento, accion = ADDTIME(NOW(), '0:15:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $sql = \"UPDATE personajes SET cash = cash+$salario, energia = energia-$agotamiento, accion = ADDTIME(NOW(), '0:15:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n //GENERAR EL INFORME DE COBRO\n $sql = \"SELECT cash FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $dinero = $stmt->fetchAll();\n\n $cashPosterior = $dinero[0]['cash'];\n \n $mejoraCash = round($cashPosterior - $cashPrevio, 2, PHP_ROUND_HALF_DOWN);\n \n\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cobro','¡Aquí está el cobro por 15 minutos de duro trabajo! Ahora mi bolsillo pesa un poco más, exactamente $mejoraCash monedas más.','cobro.png')\";\n $db->query($sql);\n \n }else{\n $box = \"¿Tú quieres que me muera ahí al sol? Mejor descansar un poco.\";\n }\n }\n else{\n $box = \"Aún no he descansado de mi ultima acción\";\n }\n break; \n \n case 'solasol':\n $agotamiento = 10;\n $salario = 15;\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n $puedoHacerlo = comprobarEnergia($agotamiento);\n if($puedoHacerlo === 1){\n //Consulta para hacer el informe\n $sql = \"SELECT cash FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $dinero = $stmt->fetchAll();\n\n $cashPrevio = $dinero[0]['cash'];\n //HACER EL PAGO\n if($recaudador === 1){\n $sql = \"UPDATE personajes SET cash = cash+$salario*1.50, energia = energia-$agotamiento, accion = ADDTIME(NOW(), '0:15:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $sql = \"UPDATE personajes SET cash = cash+$salario, energia = energia-$agotamiento, accion = ADDTIME(NOW(), '0:15:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n //GENERAR EL INFORME DE COBRO\n $sql = \"SELECT cash FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $dinero = $stmt->fetchAll();\n\n $cashPosterior = $dinero[0]['cash'];\n \n $mejoraCash = round($cashPosterior - $cashPrevio, 2, PHP_ROUND_HALF_DOWN);\n \n\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cobro','¡Aquí está el cobro por 15 minutos de duro trabajo! Ahora mi bolsillo pesa un poco más, exactamente $mejoraCash monedas más.','cobro.png')\";\n $db->query($sql);\n \n }else{\n $box = \"¿Tú quieres que me muera ahí al sol? Mejor descansar un poco.\";\n }\n }\n else{\n $box = \"Aún no he descansado de mi ultima acción\";\n }\n break; \n \n \n //TRABAJO: VIGILANTE DE OBRA\n case 'qualy':\n $agotamiento = 10;\n $salario = 15;\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n $puedoHacerlo = comprobarEnergia($agotamiento);\n if($puedoHacerlo === 1){\n //Consulta para hacer el informe\n $sql = \"SELECT cash FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $dinero = $stmt->fetchAll();\n\n $cashPrevio = $dinero[0]['cash'];\n //HACER EL PAGO\n if($recaudador === 1){\n $sql = \"UPDATE personajes SET cash = cash+$salario*1.50, energia = energia-$agotamiento, accion = ADDTIME(NOW(), '0:15:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $sql = \"UPDATE personajes SET cash = cash+$salario, energia = energia-$agotamiento, accion = ADDTIME(NOW(), '0:15:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n //GENERAR EL INFORME DE COBRO\n $sql = \"SELECT cash FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $dinero = $stmt->fetchAll();\n\n $cashPosterior = $dinero[0]['cash'];\n \n $mejoraCash = round($cashPosterior - $cashPrevio, 2, PHP_ROUND_HALF_DOWN);\n \n\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cobro','¡Aquí está el cobro por 15 minutos de duro trabajo! Ahora mi bolsillo pesa un poco más, exactamente $mejoraCash monedas más.','cobro.png')\";\n $db->query($sql);\n \n }else{\n $box = \"¿Tú quieres que me muera ahí al sol? Mejor descansar un poco.\";\n }\n }\n else{\n $box = \"Aún no he descansado de mi ultima acción\";\n }\n break; \n \n \n //TRABAJO: CORREDOR DE APUESTAS\n case 'vigilarRato':\n $agotamiento = 10;\n $salario = 15;\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n $puedoHacerlo = comprobarEnergia($agotamiento);\n if($puedoHacerlo === 1){\n //Consulta para hacer el informe\n $sql = \"SELECT cash FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $dinero = $stmt->fetchAll();\n\n $cashPrevio = $dinero[0]['cash'];\n //HACER EL PAGO\n if($recaudador === 1){\n $sql = \"UPDATE personajes SET cash = cash+$salario*1.50, energia = energia-$agotamiento, accion = ADDTIME(NOW(), '0:15:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $sql = \"UPDATE personajes SET cash = cash+$salario, energia = energia-$agotamiento, accion = ADDTIME(NOW(), '0:15:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n //GENERAR EL INFORME DE COBRO\n $sql = \"SELECT cash FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $dinero = $stmt->fetchAll();\n\n $cashPosterior = $dinero[0]['cash'];\n \n $mejoraCash = round($cashPosterior - $cashPrevio, 2, PHP_ROUND_HALF_DOWN);\n \n\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cobro','La seguridad hoy en día es muy importante y los obreros saben lo que les conviene. Aceptan pagarte por 15 minutos de vigilancia, exactamente $mejoraCash monedas.','cobro.png')\";\n $db->query($sql);\n \n }else{\n $box = \"Tengo más cansancio que Falete corriendo una maratón. Así no intimidaré a ningún obrero.\";\n }\n }\n else{\n $box = \"Aún no he descansado de mi ultima acción\";\n }\n break; \n case 'vigilarNoche':\n $agotamiento = 40;\n $salario = 100;\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n $puedoHacerlo = comprobarEnergia($agotamiento);\n if($puedoHacerlo === 1){\n //Consulta para hacer el informe\n $sql = \"SELECT cash FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $dinero = $stmt->fetchAll();\n\n $cashPrevio = $dinero[0]['cash'];\n //HACER EL PAGO\n if($recaudador === 1){\n $sql = \"UPDATE personajes SET cash = cash+$salario*1.50, energia = energia-$agotamiento, accion = ADDTIME(NOW(), '0:59:59') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $sql = \"UPDATE personajes SET cash = cash+$salario, energia = energia-$agotamiento, accion = ADDTIME(NOW(), '0:59:59') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n //GENERAR EL INFORME DE COBRO\n $sql = \"SELECT cash FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $dinero = $stmt->fetchAll();\n\n $cashPosterior = $dinero[0]['cash'];\n \n $mejoraCash = round($cashPosterior - $cashPrevio, 2, PHP_ROUND_HALF_DOWN);\n \n\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cobro','Los obreros aceptan a regañadientes que te quedes vigilando esta noche, pero aceptan. A cambio, recibes $mejoraCash monedas.','cobro.png')\";\n $db->query($sql);\n \n }else{\n $box = \"Estoy más molío que el botón de correr en el PES.\";\n }\n }\n else{\n $box = \"Aún no he descansado de mi ultima acción\";\n }\n break;\n \n case 'carrera':\n $agotamiento = 20;\n $salario = 40;\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n $puedoHacerlo = comprobarEnergia($agotamiento);\n if($puedoHacerlo === 1){\n //Consulta para hacer el informe\n $sql = \"SELECT cash FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $dinero = $stmt->fetchAll();\n\n $cashPrevio = $dinero[0]['cash'];\n //HACER EL PAGO\n if($recaudador === 1){\n $sql = \"UPDATE personajes SET cash = cash+$salario*1.50, energia = energia-$agotamiento, accion = ADDTIME(NOW(), '0:30:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $sql = \"UPDATE personajes SET cash = cash+$salario, energia = energia-$agotamiento, accion = ADDTIME(NOW(), '0:30:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n //GENERAR EL INFORME DE COBRO\n $sql = \"SELECT cash FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $dinero = $stmt->fetchAll();\n\n $cashPosterior = $dinero[0]['cash'];\n \n $mejoraCash = round($cashPosterior - $cashPrevio, 2, PHP_ROUND_HALF_DOWN);\n \n\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cobro','¡Aquí está el cobro por 30 minutos de duro trabajo! Ahora mi bolsillo pesa un poco más, exactamente $mejoraCash monedas más.','cobro.png')\";\n $db->query($sql);\n \n }else{\n $box = \"Uff.. no aguanto yo ahora mismo ahí fuera como no me tumbe antes un rato.\";\n }\n }\n else{\n $box = \"Aún no he descansado de mi ultima acción\";\n }\n break;\n \n case 'series':\n $agotamiento = 40;\n $salario = 100;\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n $puedoHacerlo = comprobarEnergia($agotamiento);\n if($puedoHacerlo === 1){\n //Consulta para hacer el informe\n $sql = \"SELECT cash FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $dinero = $stmt->fetchAll();\n\n $cashPrevio = $dinero[0]['cash'];\n //HACER EL PAGO\n if($recaudador === 1){\n $sql = \"UPDATE personajes SET cash = cash+$salario*1.50, energia = energia-$agotamiento, accion = ADDTIME(NOW(), '1:0:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $sql = \"UPDATE personajes SET cash = cash+$salario, energia = energia-$agotamiento, accion = ADDTIME(NOW(), '1:0:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n //GENERAR EL INFORME DE COBRO\n $sql = \"SELECT cash FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $dinero = $stmt->fetchAll();\n\n $cashPosterior = $dinero[0]['cash'];\n \n $mejoraCash = round($cashPosterior - $cashPrevio, 2, PHP_ROUND_HALF_DOWN);\n \n\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cobro','¡Aquí está el cobro por 1 hora de duro trabajo! Ahora mi bolsillo pesa un poco más, exactamente $mejoraCash monedas más.','cobro.png')\";\n $db->query($sql);\n \n }else{\n $box = \"¿1 Hora? Con tan poca energía no aguantaría ahora mismo ni 1 Minuto.\";\n }\n }\n else{\n $box = \"Aún no he descansado de mi ultima acción\";\n }\n break;\n \n //TRABAJO: EL MURO, GUARDIA DE LA NOCHE\n case 'guardiaNoche':\n $agotamiento = 10;\n $salario = 100;\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n $puedoHacerlo = comprobarEnergia($agotamiento);\n if($puedoHacerlo === 1){\n //Consulta para hacer el informe\n $sql = \"SELECT cash FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $dinero = $stmt->fetchAll();\n\n $cashPrevio = $dinero[0]['cash'];\n //HACER EL PAGO\n if($recaudador === 1){\n $sql = \"UPDATE personajes SET cash = cash+$salario*1.50, energia = energia-$agotamiento, accion = ADDTIME(NOW(), '1:0:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n else{\n $sql = \"UPDATE personajes SET cash = cash+$salario, energia = energia-$agotamiento, accion = ADDTIME(NOW(), '1:0:0') WHERE id='$id'\";\n $stmt = $db->query($sql);\n }\n //GENERAR EL INFORME DE COBRO\n $sql = \"SELECT cash FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $dinero = $stmt->fetchAll();\n\n $cashPosterior = $dinero[0]['cash'];\n \n $mejoraCash = round($cashPosterior - $cashPrevio, 2, PHP_ROUND_HALF_DOWN);\n \n\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cobro','¡Aquí está el cobro por 1 hora de duro trabajo! Ahora mi bolsillo pesa un poco más, exactamente $mejoraCash monedas más.','cobro.png')\";\n $db->query($sql);\n \n }else{\n $box = \"No tengo fuerzas. Como me quede dormido quizá me devoren los Salvajes del Norte.\";\n }\n }\n else{\n $box = \"Aún no he descansado de mi ultima acción\";\n }\n break; \n \n //HOTELES : DESCANSO ENERGIA\n case 'habitacionSantaEulalia':\n $coste = 50;\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET cash = cash-$coste, energia = 100, accion = ADDTIME(NOW(), '0:30:0') WHERE id='$id'\";\n $db->query($sql);\n }\n else{\n $box = \"No tengo dinero para pagar eso.\";\n }\n }\n else{\n $box = \"Aún no he descansado de la ultima acción.\";\n }\n break;\n \n case 'suiteSantaEulalia':\n $coste = 300;\n $puedoPagar = comprobarCoste($coste);\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n if($puedoPagar === 1){\n $sql = \"UPDATE personajes SET cash = cash-$coste, energia = 100, accion = ADDTIME(NOW(), '0:5:0') WHERE id='$id'\";\n $db->query($sql);\n }\n else{\n $box = \"No tengo dinero para pagar eso.\";\n }\n }\n else{\n $box = \"Aún no he descansado de la última acción,\";\n }\n break;\n \n case 'clasicoElPaisano':\n $coste = 50;\n $puedoPagar = comprobarCoste($coste);\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n if($puedoPagar === 1){\n //Consulta para hacer el informe\n $sql = \"SELECT estilo FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $estilo = $stmt->fetchAll();\n\n $estiloPrevio = $estilo[0]['estilo'];\n \n $sql = \"UPDATE personajes SET cash = cash-$coste, estilo = estilo + $mejoraPrincipalMedia/personajes.estilo, accion = ADDTIME(NOW(), '0:15:0') WHERE id='$id'\";\n $db->query($sql);\n \n //GENERAR EL INFORME DE COBRO\n $sql = \"SELECT estilo FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $estilo = $stmt->fetchAll();\n\n $estiloPosterior = $estilo[0]['estilo'];\n \n $mejoraEstilo = round($estiloPosterior - $estiloPrevio, 2, PHP_ROUND_HALF_DOWN);\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Mejora de Habilidad','¡Yeah! Qué obra de arte, me encanta el nuevo corte. Mi estilo sube $mejoraEstilo puntos.','estilo.png')\";\n $db->query($sql);\n }\n else{\n $box = \"No tengo dinero para pagarle al Hudy.\";\n }\n }\n else{\n $box = \"Aún no he descansado de la última acción,\";\n }\n break;\n \n case 'hudyElPaisano':\n $coste = 200;\n $puedoPagar = comprobarCoste($coste);\n $estoyLibre = comprobarEspera();\n if($estoyLibre === 1){\n if($puedoPagar === 1){\n //Consulta para hacer el informe\n $sql = \"SELECT estilo FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $estilo = $stmt->fetchAll();\n\n $estiloPrevio = $estilo[0]['estilo'];\n $sql = \"UPDATE personajes SET cash = cash-$coste, estilo = estilo + $mejoraPrincipalMuyAlta/personajes.estilo, accion = ADDTIME(NOW(), '0:30:0') WHERE id='$id'\";\n $db->query($sql);\n \n //GENERAR EL INFORME DE COBRO\n $sql = \"SELECT estilo FROM personajes WHERE id='$id'\";\n $stmt = $db->query($sql);\n $estilo = $stmt->fetchAll();\n\n $estiloPosterior = $estilo[0]['estilo'];\n \n $mejoraEstilo = round($estiloPosterior - $estiloPrevio, 2, PHP_ROUND_HALF_DOWN);\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Mejora de Habilidad','¡Mi peinado es ahora el del mismísimo Hudy! Algún día contaré esto a mis nietos. Mi estilo sube $mejoraEstilo puntos.','estilo.png')\";\n $db->query($sql);\n }\n else{\n $box = \"No tengo dinero para pagarle al Hudy.\";\n }\n }\n else{\n $box = \"Aún no he descansado de la última acción,\";\n }\n break;\n \n //CERRAJERIAS y EXPOLIADOR: ABRIR \n case '900':\n $coste = 20;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n \n //Calculo que objeto hay dentro (respetando el nivel)\n $sql = \"SELECT * FROM objetos WHERE nivelMin >= '21' AND nivelMin <= '21'\";\n $stmt = $db->query($sql);\n $objetosCandidatos = $stmt->fetchAll();\n \n $sql = \"SELECT COUNT(*) FROM objetos WHERE (nivelMin >= '21' AND nivelMin <= '21')\";\n $stmt = $db->query($sql);\n $cuenta = $stmt->fetchAll();\n $tope = $cuenta[0]['COUNT(*)']; //cantidad de objetos candidatos\n \n $indiceObjetoEncontrado = rand(0,$tope-1); //indice del objeto encontrado\n $objetoEncontrado = $objetosCandidatos[$indiceObjetoEncontrado]['id']; //id del objeto encontrado\n\n //Le paso el objeto encontrado al slot que ha quedado libre en el inventario\n $sql = \"UPDATE inventario SET idO = '$objetoEncontrado' WHERE idP='$id' AND idO='900' ORDER BY idO LIMIT 1\";\n $stmt = $db->query($sql);\n \n //Actualizo el dinero\n $sql = \"UPDATE personajes SET cash = cash - '$coste' WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //GENERAR EL INFORME DE OBJETO ENCONTRADO\n $sql = \"SELECT * FROM objetos WHERE id= '$objetoEncontrado'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n \n $nombreObjetoEncontrado = $resultado[0]['nombre'];\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cerrajería','Una cajita tan oxidada podría deshacerse al minimo contacto, espero que la trate con delicadeza. El dependiente mira la caja bloqueada... parece estar pensando. Al fin entra a la trastienda a por sus herramientas y un instante después, vuelve con una maza. ¡¡POMMM!! la cajita se abre ante tus ojos. Consigues su contenido : $nombreObjetoEncontrado','cerrajeria.png')\";\n $db->query($sql);\n \n }else{\n $box = \"No tengo dinero para pagar eso.\";\n }\n \n break; \n \n case 'G900':\n $coste = 0;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n \n //Calculo que objeto hay dentro (respetando el nivel)\n $sql = \"SELECT * FROM objetos WHERE nivelMin >= '21' AND nivelMin <= '21'\";\n $stmt = $db->query($sql);\n $objetosCandidatos = $stmt->fetchAll();\n \n $sql = \"SELECT COUNT(*) FROM objetos WHERE (nivelMin >= '21' AND nivelMin <= '21')\";\n $stmt = $db->query($sql);\n $cuenta = $stmt->fetchAll();\n $tope = $cuenta[0]['COUNT(*)']; //cantidad de objetos candidatos\n \n $indiceObjetoEncontrado = rand(0,$tope-1); //indice del objeto encontrado\n $objetoEncontrado = $objetosCandidatos[$indiceObjetoEncontrado]['id']; //id del objeto encontrado\n\n //Le paso el objeto encontrado al slot que ha quedado libre en el inventario\n $sql = \"UPDATE inventario SET idO = '$objetoEncontrado' WHERE idP='$id' AND idO='900' ORDER BY idO LIMIT 1\";\n $stmt = $db->query($sql);\n \n //Actualizo el dinero\n $sql = \"UPDATE personajes SET cash = cash - '$coste' WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //GENERAR EL INFORME DE OBJETO ENCONTRADO\n $sql = \"SELECT * FROM objetos WHERE id= '$objetoEncontrado'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n \n $nombreObjetoEncontrado = $resultado[0]['nombre'];\n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cerrajería','Una cajita tan oxidada podría deshacerse al minimo contacto, espero que la trate con delicadeza. El dependiente mira la caja bloqueada... parece estar pensando. Al fin entra a la trastienda a por sus herramientas y un instante después, vuelve con una maza. ¡¡POMMM!! la cajita se abre ante tus ojos. Consigues su contenido : $nombreObjetoEncontrado','cerrajeria.png')\";\n\n $db->query($sql);\n\n \n }else{\n $box = \"No tengo dinero para pagar eso.\";\n }\n break;\n case '901':\n $coste = 40;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n \n //Calculo que objeto hay dentro (respetando el nivel)\n $sql = \"SELECT * FROM objetos WHERE nivelMin >= '21' AND nivelMin <= '22'\";\n $stmt = $db->query($sql);\n $objetosCandidatos = $stmt->fetchAll();\n \n $sql = \"SELECT COUNT(*) FROM objetos WHERE (nivelMin >= '21' AND nivelMin <= '22')\";\n $stmt = $db->query($sql);\n $cuenta = $stmt->fetchAll();\n $tope = $cuenta[0]['COUNT(*)']; //cantidad de objetos candidatos\n \n $indiceObjetoEncontrado = rand(0,$tope-1); //indice del objeto encontrado\n $objetoEncontrado = $objetosCandidatos[$indiceObjetoEncontrado]['id']; //id del objeto encontrado\n\n //Le paso el objeto encontrado al slot que ha quedado libre en el inventario\n $sql = \"UPDATE inventario SET idO = '$objetoEncontrado' WHERE idP='$id' AND idO='901' ORDER BY idO LIMIT 1\";\n $stmt = $db->query($sql);\n \n //Actualizo el dinero\n $sql = \"UPDATE personajes SET cash = cash - '$coste' WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //GENERAR EL INFORME DE OBJETO ENCONTRADO\n $sql = \"SELECT * FROM objetos WHERE id= '$objetoEncontrado'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n \n $nombreObjetoEncontrado = $resultado[0]['nombre'];\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cerrajería','Te preguntas, ¿cómo va a hacer para abrir la caja? De repente saca un hacha, apunta sobre la cerradura y... ¡CRASH! la cajita ya no está bloqueada. Consigues su contenido : $nombreObjetoEncontrado','cerrajeria.png')\";\n $db->query($sql);\n \n }else{\n $box = \"No tengo dinero para pagar eso.\";\n }\n break; \n \n case 'G901':\n $coste = 0;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n \n //Calculo que objeto hay dentro (respetando el nivel)\n $sql = \"SELECT * FROM objetos WHERE nivelMin >= '21' AND nivelMin <= '22'\";\n $stmt = $db->query($sql);\n $objetosCandidatos = $stmt->fetchAll();\n \n $sql = \"SELECT COUNT(*) FROM objetos WHERE (nivelMin >= '21' AND nivelMin <= '22')\";\n $stmt = $db->query($sql);\n $cuenta = $stmt->fetchAll();\n $tope = $cuenta[0]['COUNT(*)']; //cantidad de objetos candidatos\n \n $indiceObjetoEncontrado = rand(0,$tope-1); //indice del objeto encontrado\n $objetoEncontrado = $objetosCandidatos[$indiceObjetoEncontrado]['id']; //id del objeto encontrado\n\n //Le paso el objeto encontrado al slot que ha quedado libre en el inventario\n $sql = \"UPDATE inventario SET idO = '$objetoEncontrado' WHERE idP='$id' AND idO='901' ORDER BY idO LIMIT 1\";\n $stmt = $db->query($sql);\n \n //Actualizo el dinero\n $sql = \"UPDATE personajes SET cash = cash - '$coste' WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //GENERAR EL INFORME DE OBJETO ENCONTRADO\n $sql = \"SELECT * FROM objetos WHERE id= '$objetoEncontrado'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n \n $nombreObjetoEncontrado = $resultado[0]['nombre'];\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cerrajería','Te preguntas, ¿cómo va a hacer para abrir la caja? De repente saca un hacha, apunta sobre la cerradura y... ¡CRASH! la cajita ya no está bloqueada. Consigues su contenido : $nombreObjetoEncontrado','cerrajeria.png')\";\n $db->query($sql);\n\n \n }else{\n $box = \"No tengo dinero para pagar eso.\";\n }\n break;\n case '902':\n $coste = 60;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n \n //Calculo que objeto hay dentro (respetando el nivel)\n $sql = \"SELECT * FROM objetos WHERE nivelMin >= '21' AND nivelMin <= '23'\";\n $stmt = $db->query($sql);\n $objetosCandidatos = $stmt->fetchAll();\n \n $sql = \"SELECT COUNT(*) FROM objetos WHERE (nivelMin >= '21' AND nivelMin <= '23')\";\n $stmt = $db->query($sql);\n $cuenta = $stmt->fetchAll();\n $tope = $cuenta[0]['COUNT(*)']; //cantidad de objetos candidatos\n \n $indiceObjetoEncontrado = rand(0,$tope-1); //indice del objeto encontrado\n $objetoEncontrado = $objetosCandidatos[$indiceObjetoEncontrado]['id']; //id del objeto encontrado\n\n //Le paso el objeto encontrado al slot que ha quedado libre en el inventario\n $sql = \"UPDATE inventario SET idO = '$objetoEncontrado' WHERE idP='$id' AND idO='902' ORDER BY idO LIMIT 1\";\n $stmt = $db->query($sql);\n \n //Actualizo el dinero\n $sql = \"UPDATE personajes SET cash = cash - '$coste' WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //GENERAR EL INFORME DE OBJETO ENCONTRADO\n $sql = \"SELECT * FROM objetos WHERE id= '$objetoEncontrado'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n \n $nombreObjetoEncontrado = $resultado[0]['nombre'];\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cerrajería','Una caja de hierro sólido no debe ser fácil de abrir. ¿Cómo se las va a apañar? Oyes un chisporroteo, es la mecha de lo que parece ¡¿un cartucho de dinamita!?... ¡¡¡BOOOOM!!! la cajita ya no está bloqueada. Consigues su contenido : $nombreObjetoEncontrado','cerrajeria.png')\";\n $db->query($sql);\n \n }else{\n $box = \"No tengo dinero para pagar eso.\";\n }\n break; \n \n case 'G902':\n $coste = 0;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n \n //Calculo que objeto hay dentro (respetando el nivel)\n $sql = \"SELECT * FROM objetos WHERE nivelMin >= '21' AND nivelMin <= '23'\";\n $stmt = $db->query($sql);\n $objetosCandidatos = $stmt->fetchAll();\n \n $sql = \"SELECT COUNT(*) FROM objetos WHERE (nivelMin >= '21' AND nivelMin <= '23')\";\n $stmt = $db->query($sql);\n $cuenta = $stmt->fetchAll();\n $tope = $cuenta[0]['COUNT(*)']; //cantidad de objetos candidatos\n \n $indiceObjetoEncontrado = rand(0,$tope-1); //indice del objeto encontrado\n $objetoEncontrado = $objetosCandidatos[$indiceObjetoEncontrado]['id']; //id del objeto encontrado\n\n //Le paso el objeto encontrado al slot que ha quedado libre en el inventario\n $sql = \"UPDATE inventario SET idO = '$objetoEncontrado' WHERE idP='$id' AND idO='902' ORDER BY idO LIMIT 1\";\n $stmt = $db->query($sql);\n \n //Actualizo el dinero\n $sql = \"UPDATE personajes SET cash = cash - '$coste' WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //GENERAR EL INFORME DE OBJETO ENCONTRADO\n $sql = \"SELECT * FROM objetos WHERE id= '$objetoEncontrado'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n \n $nombreObjetoEncontrado = $resultado[0]['nombre'];\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cerrajería','Una caja de hierro sólido no debe ser fácil de abrir. ¿Cómo se las va a apañar? Oyes un chisporroteo, es la mecha de lo que parece ¡¿un cartucho de dinamita!?... ¡¡¡BOOOOM!!! la cajita ya no está bloqueada. Consigues su contenido : $nombreObjetoEncontrado','cerrajeria.png')\";\n $db->query($sql);\n\n \n }else{\n $box = \"No tengo dinero para pagar eso.\";\n }\n break;\n case '903':\n $coste = 80;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n \n //Calculo que objeto hay dentro (respetando el nivel)\n $sql = \"SELECT * FROM objetos WHERE nivelMin >= '22' AND nivelMin <= '24'\";\n $stmt = $db->query($sql);\n $objetosCandidatos = $stmt->fetchAll();\n \n $sql = \"SELECT COUNT(*) FROM objetos WHERE (nivelMin >= '22' AND nivelMin <= '24')\";\n $stmt = $db->query($sql);\n $cuenta = $stmt->fetchAll();\n $tope = $cuenta[0]['COUNT(*)']; //cantidad de objetos candidatos\n \n $indiceObjetoEncontrado = rand(0,$tope-1); //indice del objeto encontrado\n $objetoEncontrado = $objetosCandidatos[$indiceObjetoEncontrado]['id']; //id del objeto encontrado\n\n //Le paso el objeto encontrado al slot que ha quedado libre en el inventario\n $sql = \"UPDATE inventario SET idO = '$objetoEncontrado' WHERE idP='$id' AND idO='903' ORDER BY idO LIMIT 1\";\n $stmt = $db->query($sql);\n \n //Actualizo el dinero\n $sql = \"UPDATE personajes SET cash = cash - '$coste' WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //GENERAR EL INFORME DE OBJETO ENCONTRADO\n $sql = \"SELECT * FROM objetos WHERE id= '$objetoEncontrado'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n \n $nombreObjetoEncontrado = $resultado[0]['nombre'];\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cerrajería','El cofrecito está tan oxidado que cuando el dependiente lo lanza contra la pared, se abre con facilidad. Consigues su contenido : $nombreObjetoEncontrado','cerrajeria.png')\";\n $db->query($sql);\n \n }else{\n $box = \"No tengo dinero para pagar eso.\";\n }\n break; \n \n case 'G903':\n $coste = 0;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n \n //Calculo que objeto hay dentro (respetando el nivel)\n $sql = \"SELECT * FROM objetos WHERE nivelMin >= '22' AND nivelMin <= '24'\";\n $stmt = $db->query($sql);\n $objetosCandidatos = $stmt->fetchAll();\n \n $sql = \"SELECT COUNT(*) FROM objetos WHERE (nivelMin >= '22' AND nivelMin <= '24')\";\n $stmt = $db->query($sql);\n $cuenta = $stmt->fetchAll();\n $tope = $cuenta[0]['COUNT(*)']; //cantidad de objetos candidatos\n \n $indiceObjetoEncontrado = rand(0,$tope-1); //indice del objeto encontrado\n $objetoEncontrado = $objetosCandidatos[$indiceObjetoEncontrado]['id']; //id del objeto encontrado\n\n //Le paso el objeto encontrado al slot que ha quedado libre en el inventario\n $sql = \"UPDATE inventario SET idO = '$objetoEncontrado' WHERE idP='$id' AND idO='903' ORDER BY idO LIMIT 1\";\n $stmt = $db->query($sql);\n \n //Actualizo el dinero\n $sql = \"UPDATE personajes SET cash = cash - '$coste' WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //GENERAR EL INFORME DE OBJETO ENCONTRADO\n $sql = \"SELECT * FROM objetos WHERE id= '$objetoEncontrado'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n \n $nombreObjetoEncontrado = $resultado[0]['nombre'];\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cerrajería','El cofrecito está tan oxidado que cuando el dependiente lo lanza contra la pared, se abre con facilidad. Consigues su contenido : $nombreObjetoEncontrado','cerrajeria.png')\";\n $db->query($sql);\n\n \n }else{\n $box = \"No tengo dinero para pagar eso.\";\n }\n break;\n case '904':\n $coste = 100;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n \n //Calculo que objeto hay dentro (respetando el nivel)\n $sql = \"SELECT * FROM objetos WHERE nivelMin >= '23' AND nivelMin <= '25'\";\n $stmt = $db->query($sql);\n $objetosCandidatos = $stmt->fetchAll();\n \n $sql = \"SELECT COUNT(*) FROM objetos WHERE (nivelMin >= '23' AND nivelMin <= '25')\";\n $stmt = $db->query($sql);\n $cuenta = $stmt->fetchAll();\n $tope = $cuenta[0]['COUNT(*)']; //cantidad de objetos candidatos\n \n $indiceObjetoEncontrado = rand(0,$tope-1); //indice del objeto encontrado\n $objetoEncontrado = $objetosCandidatos[$indiceObjetoEncontrado]['id']; //id del objeto encontrado\n\n //Le paso el objeto encontrado al slot que ha quedado libre en el inventario\n $sql = \"UPDATE inventario SET idO = '$objetoEncontrado' WHERE idP='$id' AND idO='904' ORDER BY idO LIMIT 1\";\n $stmt = $db->query($sql);\n \n //Actualizo el dinero\n $sql = \"UPDATE personajes SET cash = cash - '$coste' WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //GENERAR EL INFORME DE OBJETO ENCONTRADO\n $sql = \"SELECT * FROM objetos WHERE id= '$objetoEncontrado'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n \n $nombreObjetoEncontrado = $resultado[0]['nombre'];\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cerrajería','El dependiente mira al cofre de madera con la misma cara que yo miraría a un cubo de rubik. Mejor me lo llevo a otro sitio, este tío no tiene ni id.... ¡Ostras! ¡¿Acaba de sacar una sierra?!... Lo es. ¡Cofre abierto! Consigues su contenido : $nombreObjetoEncontrado','cerrajeria.png')\";\n $db->query($sql);\n \n }else{\n $box = \"No tengo dinero para pagar eso.\";\n }\n break; \n \n case 'G904':\n $coste = 0;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n \n //Calculo que objeto hay dentro (respetando el nivel)\n $sql = \"SELECT * FROM objetos WHERE nivelMin >= '23' AND nivelMin <= '25'\";\n $stmt = $db->query($sql);\n $objetosCandidatos = $stmt->fetchAll();\n \n $sql = \"SELECT COUNT(*) FROM objetos WHERE (nivelMin >= '23' AND nivelMin <= '25')\";\n $stmt = $db->query($sql);\n $cuenta = $stmt->fetchAll();\n $tope = $cuenta[0]['COUNT(*)']; //cantidad de objetos candidatos\n \n $indiceObjetoEncontrado = rand(0,$tope-1); //indice del objeto encontrado\n $objetoEncontrado = $objetosCandidatos[$indiceObjetoEncontrado]['id']; //id del objeto encontrado\n\n //Le paso el objeto encontrado al slot que ha quedado libre en el inventario\n $sql = \"UPDATE inventario SET idO = '$objetoEncontrado' WHERE idP='$id' AND idO='904' ORDER BY idO LIMIT 1\";\n $stmt = $db->query($sql);\n \n //Actualizo el dinero\n $sql = \"UPDATE personajes SET cash = cash - '$coste' WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //GENERAR EL INFORME DE OBJETO ENCONTRADO\n $sql = \"SELECT * FROM objetos WHERE id= '$objetoEncontrado'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n \n $nombreObjetoEncontrado = $resultado[0]['nombre'];\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cerrajería','El dependiente mira al cofre de madera con la misma cara que yo miraría a un cubo de rubik. Mejor me lo llevo a otro sitio, este tío no tiene ni id.... ¡Ostras! ¡¿Acaba de sacar una sierra?!... Lo es. ¡Cofre abierto! Consigues su contenido : $nombreObjetoEncontrado','cerrajeria.png')\";\n $db->query($sql);\n\n \n }else{\n $box = \"No tengo dinero para pagar eso.\";\n }\n break;\n case '905':\n $coste = 120;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n \n //Calculo que objeto hay dentro (respetando el nivel)\n $sql = \"SELECT * FROM objetos WHERE nivelMin >= '24' AND nivelMin <= '26'\";\n $stmt = $db->query($sql);\n $objetosCandidatos = $stmt->fetchAll();\n \n $sql = \"SELECT COUNT(*) FROM objetos WHERE (nivelMin >= '24' AND nivelMin <= '26')\";\n $stmt = $db->query($sql);\n $cuenta = $stmt->fetchAll();\n $tope = $cuenta[0]['COUNT(*)']; //cantidad de objetos candidatos\n \n $indiceObjetoEncontrado = rand(0,$tope-1); //indice del objeto encontrado\n $objetoEncontrado = $objetosCandidatos[$indiceObjetoEncontrado]['id']; //id del objeto encontrado\n\n //Le paso el objeto encontrado al slot que ha quedado libre en el inventario\n $sql = \"UPDATE inventario SET idO = '$objetoEncontrado' WHERE idP='$id' AND idO='905' ORDER BY idO LIMIT 1\";\n $stmt = $db->query($sql);\n \n //Actualizo el dinero\n $sql = \"UPDATE personajes SET cash = cash - '$coste' WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //GENERAR EL INFORME DE OBJETO ENCONTRADO\n $sql = \"SELECT * FROM objetos WHERE id= '$objetoEncontrado'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n \n $nombreObjetoEncontrado = $resultado[0]['nombre'];\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cerrajería','Me dicen que un cofre de metal está listo para darse su bañito en ácido nítrico. ¡Cofre abierto! Consigues su contenido : $nombreObjetoEncontrado','cerrajeria.png')\";\n $db->query($sql);\n \n }else{\n $box = \"No tengo dinero para pagar eso.\";\n }\n break; \n \n case 'G905':\n $coste = 0;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n \n //Calculo que objeto hay dentro (respetando el nivel)\n $sql = \"SELECT * FROM objetos WHERE nivelMin >= '24' AND nivelMin <= '26'\";\n $stmt = $db->query($sql);\n $objetosCandidatos = $stmt->fetchAll();\n \n $sql = \"SELECT COUNT(*) FROM objetos WHERE (nivelMin >= '24' AND nivelMin <= '26')\";\n $stmt = $db->query($sql);\n $cuenta = $stmt->fetchAll();\n $tope = $cuenta[0]['COUNT(*)']; //cantidad de objetos candidatos\n \n $indiceObjetoEncontrado = rand(0,$tope-1); //indice del objeto encontrado\n $objetoEncontrado = $objetosCandidatos[$indiceObjetoEncontrado]['id']; //id del objeto encontrado\n\n //Le paso el objeto encontrado al slot que ha quedado libre en el inventario\n $sql = \"UPDATE inventario SET idO = '$objetoEncontrado' WHERE idP='$id' AND idO='905' ORDER BY idO LIMIT 1\";\n $stmt = $db->query($sql);\n \n //Actualizo el dinero\n $sql = \"UPDATE personajes SET cash = cash - '$coste' WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //GENERAR EL INFORME DE OBJETO ENCONTRADO\n $sql = \"SELECT * FROM objetos WHERE id= '$objetoEncontrado'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n \n $nombreObjetoEncontrado = $resultado[0]['nombre'];\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cerrajería','Me dicen que un cofre de metal está listo para darse su bañito en ácido nítrico. ¡Cofre abierto! Consigues su contenido : $nombreObjetoEncontrado','cerrajeria.png')\";\n $db->query($sql);\n\n \n }else{\n $box = \"No tengo dinero para pagar eso.\";\n }\n break;\n case '906':\n $coste = 140;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n \n //Calculo que objeto hay dentro (respetando el nivel)\n $sql = \"SELECT * FROM objetos WHERE nivelMin >= '25' AND nivelMin <= '27'\";\n $stmt = $db->query($sql);\n $objetosCandidatos = $stmt->fetchAll();\n \n $sql = \"SELECT COUNT(*) FROM objetos WHERE (nivelMin >= '25' AND nivelMin <= '27')\";\n $stmt = $db->query($sql);\n $cuenta = $stmt->fetchAll();\n $tope = $cuenta[0]['COUNT(*)']; //cantidad de objetos candidatos\n \n $indiceObjetoEncontrado = rand(0,$tope-1); //indice del objeto encontrado\n $objetoEncontrado = $objetosCandidatos[$indiceObjetoEncontrado]['id']; //id del objeto encontrado\n\n //Le paso el objeto encontrado al slot que ha quedado libre en el inventario\n $sql = \"UPDATE inventario SET idO = '$objetoEncontrado' WHERE idP='$id' AND idO='906' ORDER BY idO LIMIT 1\";\n $stmt = $db->query($sql);\n \n //Actualizo el dinero\n $sql = \"UPDATE personajes SET cash = cash - '$coste' WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //GENERAR EL INFORME DE OBJETO ENCONTRADO\n $sql = \"SELECT * FROM objetos WHERE id= '$objetoEncontrado'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n \n $nombreObjetoEncontrado = $resultado[0]['nombre'];\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cerrajería','¡Vaya! Este cofre es grandote. El dependiente te pide ayuda para entre los dos poner un buen cinturón de petardos que enseguida volarán esa cerradura. ¡Cofre abierto! Consigues su contenido : $nombreObjetoEncontrado','cerrajeria.png')\";\n $db->query($sql);\n \n }else{\n $box = \"No tengo dinero para pagar eso.\";\n }\n break; \n \n case 'G906':\n $coste = 0;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n \n //Calculo que objeto hay dentro (respetando el nivel)\n $sql = \"SELECT * FROM objetos WHERE nivelMin >= '25' AND nivelMin <= '27'\";\n $stmt = $db->query($sql);\n $objetosCandidatos = $stmt->fetchAll();\n \n $sql = \"SELECT COUNT(*) FROM objetos WHERE (nivelMin >= '25' AND nivelMin <= '27')\";\n $stmt = $db->query($sql);\n $cuenta = $stmt->fetchAll();\n $tope = $cuenta[0]['COUNT(*)']; //cantidad de objetos candidatos\n \n $indiceObjetoEncontrado = rand(0,$tope-1); //indice del objeto encontrado\n $objetoEncontrado = $objetosCandidatos[$indiceObjetoEncontrado]['id']; //id del objeto encontrado\n\n //Le paso el objeto encontrado al slot que ha quedado libre en el inventario\n $sql = \"UPDATE inventario SET idO = '$objetoEncontrado' WHERE idP='$id' AND idO='906' ORDER BY idO LIMIT 1\";\n $stmt = $db->query($sql);\n \n //Actualizo el dinero\n $sql = \"UPDATE personajes SET cash = cash - '$coste' WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //GENERAR EL INFORME DE OBJETO ENCONTRADO\n $sql = \"SELECT * FROM objetos WHERE id= '$objetoEncontrado'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n \n $nombreObjetoEncontrado = $resultado[0]['nombre'];\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cerrajería','¡Vaya! Este cofre es grandote. El dependiente te pide ayuda para entre los dos poner un buen cinturón de petardos que enseguida volarán esa cerradura. ¡Cofre abierto! Consigues su contenido : $nombreObjetoEncontrado','cerrajeria.png')\";\n $db->query($sql);\n\n \n }else{\n $box = \"No tengo dinero para pagar eso.\";\n }\n break;\n case '907':\n $coste = 160;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n \n //Calculo que objeto hay dentro (respetando el nivel)\n $sql = \"SELECT * FROM objetos WHERE nivelMin >= '26' AND nivelMin <= '28'\";\n $stmt = $db->query($sql);\n $objetosCandidatos = $stmt->fetchAll();\n \n $sql = \"SELECT COUNT(*) FROM objetos WHERE (nivelMin >= '26' AND nivelMin <= '28')\";\n $stmt = $db->query($sql);\n $cuenta = $stmt->fetchAll();\n $tope = $cuenta[0]['COUNT(*)']; //cantidad de objetos candidatos\n \n $indiceObjetoEncontrado = rand(0,$tope-1); //indice del objeto encontrado\n $objetoEncontrado = $objetosCandidatos[$indiceObjetoEncontrado]['id']; //id del objeto encontrado\n\n //Le paso el objeto encontrado al slot que ha quedado libre en el inventario\n $sql = \"UPDATE inventario SET idO = '$objetoEncontrado' WHERE idP='$id' AND idO='907' ORDER BY idO LIMIT 1\";\n $stmt = $db->query($sql);\n \n //Actualizo el dinero\n $sql = \"UPDATE personajes SET cash = cash - '$coste' WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //GENERAR EL INFORME DE OBJETO ENCONTRADO\n $sql = \"SELECT * FROM objetos WHERE id= '$objetoEncontrado'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n \n $nombreObjetoEncontrado = $resultado[0]['nombre'];\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cerrajería','Mucha madera es igual a un buen festín para las termitas que tiene como mascotas el dependiente. ¡Cofre abierto! Consigues su contenido : $nombreObjetoEncontrado','cerrajeria.png')\";\n $db->query($sql);\n \n }else{\n $box = \"No tengo dinero para pagar eso.\";\n }\n break; \n \n case 'G907':\n $coste = 0;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n \n //Calculo que objeto hay dentro (respetando el nivel)\n $sql = \"SELECT * FROM objetos WHERE nivelMin >= '26' AND nivelMin <= '28'\";\n $stmt = $db->query($sql);\n $objetosCandidatos = $stmt->fetchAll();\n \n $sql = \"SELECT COUNT(*) FROM objetos WHERE (nivelMin >= '26' AND nivelMin <= '28')\";\n $stmt = $db->query($sql);\n $cuenta = $stmt->fetchAll();\n $tope = $cuenta[0]['COUNT(*)']; //cantidad de objetos candidatos\n \n $indiceObjetoEncontrado = rand(0,$tope-1); //indice del objeto encontrado\n $objetoEncontrado = $objetosCandidatos[$indiceObjetoEncontrado]['id']; //id del objeto encontrado\n\n //Le paso el objeto encontrado al slot que ha quedado libre en el inventario\n $sql = \"UPDATE inventario SET idO = '$objetoEncontrado' WHERE idP='$id' AND idO='907' ORDER BY idO LIMIT 1\";\n $stmt = $db->query($sql);\n \n //Actualizo el dinero\n $sql = \"UPDATE personajes SET cash = cash - '$coste' WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //GENERAR EL INFORME DE OBJETO ENCONTRADO\n $sql = \"SELECT * FROM objetos WHERE id= '$objetoEncontrado'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n \n $nombreObjetoEncontrado = $resultado[0]['nombre'];\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cerrajería','Mucha madera es igual a un buen festín para las termitas que tiene como mascotas el dependiente. ¡Cofre abierto! Consigues su contenido : $nombreObjetoEncontrado','cerrajeria.png')\";\n $db->query($sql);\n\n \n }else{\n $box = \"No tengo dinero para pagar eso.\";\n }\n break;\n case '908':\n $coste = 180;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n \n //Calculo que objeto hay dentro (respetando el nivel)\n $sql = \"SELECT * FROM objetos WHERE nivelMin >= '27' AND nivelMin <= '29'\";\n $stmt = $db->query($sql);\n $objetosCandidatos = $stmt->fetchAll();\n \n $sql = \"SELECT COUNT(*) FROM objetos WHERE (nivelMin >= '27' AND nivelMin <= '29')\";\n $stmt = $db->query($sql);\n $cuenta = $stmt->fetchAll();\n $tope = $cuenta[0]['COUNT(*)']; //cantidad de objetos candidatos\n \n $indiceObjetoEncontrado = rand(0,$tope-1); //indice del objeto encontrado\n $objetoEncontrado = $objetosCandidatos[$indiceObjetoEncontrado]['id']; //id del objeto encontrado\n\n //Le paso el objeto encontrado al slot que ha quedado libre en el inventario\n $sql = \"UPDATE inventario SET idO = '$objetoEncontrado' WHERE idP='$id' AND idO='908' ORDER BY idO LIMIT 1\";\n $stmt = $db->query($sql);\n \n //Actualizo el dinero\n $sql = \"UPDATE personajes SET cash = cash - '$coste' WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //GENERAR EL INFORME DE OBJETO ENCONTRADO\n $sql = \"SELECT * FROM objetos WHERE id= '$objetoEncontrado'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n \n $nombreObjetoEncontrado = $resultado[0]['nombre'];\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cerrajería','Al construir este gran cofre ahorraron en material y su calidad es pésima. Puedo deformarlo usando calor... ¡Cofre abierto! Consigues su contenido : $nombreObjetoEncontrado','cerrajeria.png')\";\n $db->query($sql);\n \n }else{\n $box = \"No tengo dinero para pagar eso.\";\n }\n break; \n \n case 'G908':\n $coste = 0;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n \n //Calculo que objeto hay dentro (respetando el nivel)\n $sql = \"SELECT * FROM objetos WHERE nivelMin >= '27' AND nivelMin <= '29'\";\n $stmt = $db->query($sql);\n $objetosCandidatos = $stmt->fetchAll();\n \n $sql = \"SELECT COUNT(*) FROM objetos WHERE (nivelMin >= '27' AND nivelMin <= '29')\";\n $stmt = $db->query($sql);\n $cuenta = $stmt->fetchAll();\n $tope = $cuenta[0]['COUNT(*)']; //cantidad de objetos candidatos\n \n $indiceObjetoEncontrado = rand(0,$tope-1); //indice del objeto encontrado\n $objetoEncontrado = $objetosCandidatos[$indiceObjetoEncontrado]['id']; //id del objeto encontrado\n\n //Le paso el objeto encontrado al slot que ha quedado libre en el inventario\n $sql = \"UPDATE inventario SET idO = '$objetoEncontrado' WHERE idP='$id' AND idO='908' ORDER BY idO LIMIT 1\";\n $stmt = $db->query($sql);\n \n //Actualizo el dinero\n $sql = \"UPDATE personajes SET cash = cash - '$coste' WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //GENERAR EL INFORME DE OBJETO ENCONTRADO\n $sql = \"SELECT * FROM objetos WHERE id= '$objetoEncontrado'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n \n $nombreObjetoEncontrado = $resultado[0]['nombre'];\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cerrajería','Al construir este gran cofre ahorraron en material y su calidad es pésima. Puedo deformarlo usando calor... ¡Cofre abierto! Consigues su contenido : $nombreObjetoEncontrado','cerrajeria.png')\";\n $db->query($sql);\n \n }else{\n $box = \"No tengo dinero para pagar eso.\";\n }\n break; \n case '909':\n $coste = 200;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n \n //Calculo que objeto hay dentro (respetando el nivel)\n $sql = \"SELECT * FROM objetos WHERE nivelMin >= '28' AND nivelMin <= '30'\";\n $stmt = $db->query($sql);\n $objetosCandidatos = $stmt->fetchAll();\n \n $sql = \"SELECT COUNT(*) FROM objetos WHERE (nivelMin >= '28' AND nivelMin <= '30')\";\n $stmt = $db->query($sql);\n $cuenta = $stmt->fetchAll();\n $tope = $cuenta[0]['COUNT(*)']; //cantidad de objetos candidatos\n \n $indiceObjetoEncontrado = rand(0,$tope-1); //indice del objeto encontrado\n $objetoEncontrado = $objetosCandidatos[$indiceObjetoEncontrado]['id']; //id del objeto encontrado\n\n //Le paso el objeto encontrado al slot que ha quedado libre en el inventario\n $sql = \"UPDATE inventario SET idO = '$objetoEncontrado' WHERE idP='$id' AND idO='909' ORDER BY idO LIMIT 1\";\n $stmt = $db->query($sql);\n \n //Actualizo el dinero\n $sql = \"UPDATE personajes SET cash = cash - '$coste' WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //GENERAR EL INFORME DE OBJETO ENCONTRADO\n $sql = \"SELECT * FROM objetos WHERE id= '$objetoEncontrado'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n \n $nombreObjetoEncontrado = $resultado[0]['nombre'];\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cerrajería','¡Cuánta pedrería! Este es sin duda un trabajo para mi mujer. ¡MARÍAAAA, ven pa acá! Al cabo de un rato viene la mujer, que empieza a quitar las piedras preciosas como si no hubiera un mañana. Con tanta ansia araña la María que hace un agujero en la estructura del cofre. ¡Cofre abierto! Consigues su contenido : $nombreObjetoEncontrado','cerrajeria.png')\";\n $db->query($sql);\n \n }else{\n $box = \"No tengo dinero para pagar eso.\";\n }\n break; \n \n case 'G909':\n $coste = 0;\n $puedoPagar = comprobarCoste($coste);\n if($puedoPagar === 1){\n \n //Calculo que objeto hay dentro (respetando el nivel)\n $sql = \"SELECT * FROM objetos WHERE nivelMin >= '28' AND nivelMin <= '30'\";\n $stmt = $db->query($sql);\n $objetosCandidatos = $stmt->fetchAll();\n \n $sql = \"SELECT COUNT(*) FROM objetos WHERE (nivelMin >= '28' AND nivelMin <= '30')\";\n $stmt = $db->query($sql);\n $cuenta = $stmt->fetchAll();\n $tope = $cuenta[0]['COUNT(*)']; //cantidad de objetos candidatos\n \n $indiceObjetoEncontrado = rand(0,$tope-1); //indice del objeto encontrado\n $objetoEncontrado = $objetosCandidatos[$indiceObjetoEncontrado]['id']; //id del objeto encontrado\n\n //Le paso el objeto encontrado al slot que ha quedado libre en el inventario\n $sql = \"UPDATE inventario SET idO = '$objetoEncontrado' WHERE idP='$id' AND idO='909' ORDER BY idO LIMIT 1\";\n $stmt = $db->query($sql);\n \n //Actualizo el dinero\n $sql = \"UPDATE personajes SET cash = cash - '$coste' WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //GENERAR EL INFORME DE OBJETO ENCONTRADO\n $sql = \"SELECT * FROM objetos WHERE id= '$objetoEncontrado'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n \n $nombreObjetoEncontrado = $resultado[0]['nombre'];\n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Cerrajería','¡Cuánta pedrería! Este es sin duda un trabajo para mi mujer. ¡MARÍAAAA, ven pa acá! Al cabo de un rato viene la mujer, que empieza a quitar las piedras preciosas como si no hubiera un mañana. Con tanta ansia araña la María que hace un agujero en la estructura del cofre. ¡Cofre abierto! Consigues su contenido : $nombreObjetoEncontrado','cerrajeria.png')\";\n $db->query($sql);\n \n }else{\n $box = \"No tengo dinero para pagar eso.\";\n }\n break; \n//Mascaras VENDEDOR DE MASCARAS\n case 'mascaraConejo':\n $coste = 1000;\n $puedoPagar = comprobarCoste($coste);\n $slotLibre = comprobarSlotLibre();\n if($puedoPagar === 1){\n if($slotLibre >=0){\n $sql = \"UPDATE personajes SET cash = cash - $coste WHERE id='$id'\";\n $db->query($sql); \n \n $sql = \"UPDATE inventario SET idO = 102 WHERE idP='$id' AND slot = '$slotLibre'\";\n $db->query($sql); \n \n }\n else{\n $box = \"No tengo espacio libre\";\n }\n \n }\n else{\n $box = \"No puedo pagar eso\";\n }\n break;\n \n case 'mascaraBomba':\n $coste = 1000;\n $puedoPagar = comprobarCoste($coste);\n $slotLibre = comprobarSlotLibre();\n if($puedoPagar === 1){\n if($slotLibre >=0){\n $sql = \"UPDATE personajes SET cash = cash - $coste WHERE id='$id'\";\n $db->query($sql); \n \n $sql = \"UPDATE inventario SET idO = 103 WHERE idP='$id' AND slot = '$slotLibre'\";\n $db->query($sql);\n \n }\n else{\n $box = \"No tengo espacio libre\";\n }\n \n }\n else{\n $box = \"No puedo pagar eso\";\n }\n break;\n \n case 'mascaraMejora':\n $coste = 1000;\n $puedoPagar = comprobarCoste($coste);\n $slotLibre = comprobarSlotLibre();\n if($puedoPagar === 1){\n if($slotLibre >=0){\n $sql = \"UPDATE personajes SET cash = cash - $coste WHERE id='$id'\";\n $db->query($sql); \n \n $sql = \"UPDATE inventario SET idO = 104 WHERE idP='$id' AND slot = '$slotLibre'\";\n $db->query($sql); \n \n //Reliquia\n $sql = \"INSERT INTO coleccionismo (idP, idO, imagen) VALUES ('$id', '104', '104.png')\";\n $db->query($sql); \n \n $sql = \"INSERT INTO mensajes (idP,asunto,contenido,imagen) VALUES('$id','Reliquia Encontrada','Al llegar a casa me pruebo esa máscara que compré hace un rato. Hago tonterías delante del espejo y... espera, hay algo grabado en su interior: \\\"Made in Hyrule\\\"','reliquiaEncontrada.png')\"; \n $db->query($sql); \n \n }\n else{\n $box = \"No tengo espacio libre\";\n }\n \n }\n else{\n $box = \"No puedo pagar eso\";\n }\n break;\n //Todo Para Tu Mascota \n case 'Pez':\n $coste = 10;\n $puedoPagar = comprobarCoste($coste);\n $slotLibre = comprobarSlotLibre();\n if($puedoPagar === 1){\n if($slotLibre >=0){\n $sql = \"UPDATE personajes SET cash = cash - $coste WHERE id='$id'\";\n $db->query($sql); \n \n $sql = \"UPDATE inventario SET idO = 1 WHERE idP='$id' AND slot = '$slotLibre'\";\n $db->query($sql); \n \n }\n else{\n $box = \"No tengo espacio libre\";\n }\n \n }\n else{\n $box = \"No puedo pagar eso\";\n }\n break;\n \n case 'Hámster':\n $coste = 30;\n $puedoPagar = comprobarCoste($coste);\n $slotLibre = comprobarSlotLibre();\n if($puedoPagar === 1){\n if($slotLibre >=0){\n $sql = \"UPDATE personajes SET cash = cash - $coste WHERE id='$id'\";\n $db->query($sql); \n \n $sql = \"UPDATE inventario SET idO = 2 WHERE idP='$id' AND slot = '$slotLibre'\";\n $db->query($sql); \n \n }\n else{\n $box = \"No tengo espacio libre\";\n }\n \n }\n else{\n $box = \"No puedo pagar eso\";\n }\n break;\n \n case 'Gallo':\n $coste = 36;\n $puedoPagar = comprobarCoste($coste);\n $slotLibre = comprobarSlotLibre();\n if($puedoPagar === 1){\n if($slotLibre >=0){\n $sql = \"UPDATE personajes SET cash = cash - $coste WHERE id='$id'\";\n $db->query($sql); \n \n $sql = \"UPDATE inventario SET idO = 3 WHERE idP='$id' AND slot = '$slotLibre'\";\n $db->query($sql); \n \n }\n else{\n $box = \"No tengo espacio libre\";\n }\n \n }\n else{\n $box = \"No puedo pagar eso\";\n }\n break;\n //Euroel\n case 'pulseraLuminosa':\n $coste = 300;\n $puedoPagar = comprobarCoste($coste);\n $slotLibre = comprobarSlotLibre();\n if($puedoPagar === 1){\n if($slotLibre >=0){\n $sql = \"UPDATE personajes SET cash = cash - $coste WHERE id='$id'\";\n $db->query($sql); \n \n $sql = \"UPDATE inventario SET idO = 314 WHERE idP='$id' AND slot = '$slotLibre'\";\n $db->query($sql); \n \n }\n else{\n $box = \"No tengo espacio libre\";\n }\n \n }\n else{\n $box = \"No puedo pagar eso\";\n }\n break;\n case 'linterna':\n $coste = 800;\n $puedoPagar = comprobarCoste($coste);\n $slotLibre = comprobarSlotLibre();\n if($puedoPagar === 1){\n if($slotLibre >=0){\n $sql = \"UPDATE personajes SET cash = cash - $coste WHERE id='$id'\";\n $db->query($sql); \n \n $sql = \"UPDATE inventario SET idO = 313 WHERE idP='$id' AND slot = '$slotLibre'\";\n $db->query($sql); \n \n }\n else{\n $box = \"No tengo espacio libre\";\n }\n \n }\n else{\n $box = \"No puedo pagar eso\";\n }\n break;\n case 'lucesLED':\n $coste = 2000;\n $puedoPagar = comprobarCoste($coste);\n $slotLibre = comprobarSlotLibre();\n if($puedoPagar === 1){\n if($slotLibre >=0){\n $sql = \"UPDATE personajes SET cash = cash - $coste WHERE id='$id'\";\n $db->query($sql); \n \n $sql = \"UPDATE inventario SET idO = 927 WHERE idP='$id' AND slot = '$slotLibre'\";\n $db->query($sql); \n \n }\n else{\n $box = \"No tengo espacio libre\";\n }\n \n }\n else{\n $box = \"No puedo pagar eso\";\n }\n break;\n //PescaBass\n case 'cañaPesca':\n $coste = 130;\n $puedoPagar = comprobarCoste($coste);\n $slotLibre = comprobarSlotLibre();\n if($puedoPagar === 1){\n if($slotLibre >=0){\n $sql = \"UPDATE personajes SET cash = cash - $coste WHERE id='$id'\";\n $db->query($sql); \n \n $sql = \"UPDATE inventario SET idO = 307 WHERE idP='$id' AND slot = '$slotLibre'\";\n $db->query($sql); \n \n }\n else{\n $box = \"No tengo espacio libre\";\n }\n \n }\n else{\n $box = \"No puedo pagar eso\";\n }\n break;\n \n case 'sombreroPescador':\n $coste = 100;\n $puedoPagar = comprobarCoste($coste);\n $slotLibre = comprobarSlotLibre();\n if($puedoPagar === 1){\n if($slotLibre >=0){\n $sql = \"UPDATE personajes SET cash = cash - $coste WHERE id='$id'\";\n $db->query($sql); \n \n $sql = \"UPDATE inventario SET idO = 109 WHERE idP='$id' AND slot = '$slotLibre'\";\n $db->query($sql); \n \n }\n else{\n $box = \"No tengo espacio libre\";\n }\n \n }\n else{\n $box = \"No puedo pagar eso\";\n }\n break;\n \n case 'botasPescador':\n $coste = 100;\n $puedoPagar = comprobarCoste($coste);\n $slotLibre = comprobarSlotLibre();\n if($puedoPagar === 1){\n if($slotLibre >=0){\n $sql = \"UPDATE personajes SET cash = cash - $coste WHERE id='$id'\";\n $db->query($sql); \n \n $sql = \"UPDATE inventario SET idO = 407 WHERE idP='$id' AND slot = '$slotLibre'\";\n $db->query($sql); \n \n }\n else{\n $box = \"No tengo espacio libre\";\n }\n \n }\n else{\n $box = \"No puedo pagar eso\";\n }\n break;\n \n //VENTAS\n case 'vPez':\n $sql = \"SELECT precioVenta FROM objetos WHERE objetos.id = '1'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n $recibo = $result[0]['precioVenta'];\n \n $sql = \"UPDATE personajes SET cash = cash+ '$recibo' WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //VER QUE SLOT QUEDA LIBRE EN EL INVENTARIO\n $sql = \"SELECT inventario.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot > 7 AND inventario.idO = '1'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n $slotLibre = $resultado[0]['slot'];\n \n //BORRAR EL OBJETO VENDIDO\n $sql = \"UPDATE inventario SET idO='0' WHERE (idP='$id' AND slot = '$slotLibre')\";\n $stmt = $db->query($sql);\n break;\n \n case 'vHámster':\n $sql = \"SELECT precioVenta FROM objetos WHERE objetos.id = '2'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n $recibo = $result[0]['precioVenta'];\n \n $sql = \"UPDATE personajes SET cash = cash+ '$recibo' WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //VER QUE SLOT QUEDA LIBRE EN EL INVENTARIO\n $sql = \"SELECT inventario.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot > 7 AND inventario.idO = '2'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n $slotLibre = $resultado[0]['slot'];\n \n //BORRAR EL OBJETO VENDIDO\n $sql = \"UPDATE inventario SET idO='0' WHERE (idP='$id' AND slot = '$slotLibre')\";\n $stmt = $db->query($sql);\n break;\n \n case 'vGallo':\n $sql = \"SELECT precioVenta FROM objetos WHERE objetos.id = '3'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n $recibo = $result[0]['precioVenta'];\n \n $sql = \"UPDATE personajes SET cash = cash+ '$recibo' WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //VER QUE SLOT QUEDA LIBRE EN EL INVENTARIO\n $sql = \"SELECT inventario.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot > 7 AND inventario.idO = '3'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n $slotLibre = $resultado[0]['slot'];\n \n //BORRAR EL OBJETO VENDIDO\n $sql = \"UPDATE inventario SET idO='0' WHERE (idP='$id' AND slot = '$slotLibre')\";\n $stmt = $db->query($sql);\n break;\n \n case 'vZapatillas deportivas':\n $sql = \"SELECT precioVenta FROM objetos WHERE objetos.id = '401'\";\n $stmt = $db->query($sql);\n $result = $stmt->fetchAll();\n $recibo = $result[0]['precioVenta'];\n \n $sql = \"UPDATE personajes SET cash = cash+ '$recibo' WHERE id='$id'\";\n $stmt = $db->query($sql);\n \n //VER QUE SLOT QUEDA LIBRE EN EL INVENTARIO\n $sql = \"SELECT inventario.* FROM inventario JOIN objetos ON inventario.idO = objetos.id WHERE inventario.idP = '$id' AND inventario.slot > 7 AND inventario.idO = '401'\";\n $stmt = $db->query($sql);\n $resultado = $stmt->fetchAll();\n $slotLibre = $resultado[0]['slot'];\n \n //BORRAR EL OBJETO VENDIDO\n $sql = \"UPDATE inventario SET idO='0' WHERE (idP='$id' AND slot = '$slotLibre')\";\n $stmt = $db->query($sql);\n break;\n \n \n default :\n $box = 'Debes marcar una de las Opciones'. $box;\n }\n header(\"location: ?page=zona&message=$box\");\n}", "function OGSPlugin_Traitement_Galaxie(){\r\n\tglobal $db, $fp, $is_ogsplugin, $pub_galaxy, $pub_system, $pub_content, $pub_who, $who, $pub_what, $what, $plug_handlegalaxyviews, $ogspy_server_version, $log_logogsgalview, $system, $galaxy;\r\n\tglobal $ogs_set_system;\r\n\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"galaxyview...\\n\"); // ligne débug , commentaire si pas utile\r\n\t\t//\r\n\t\t/////////////////////////////////////////\r\n\t\t// VERIFICATION DROIT IMPORTER GALAXIE //\r\n\t\t/////////////////////////////////////////\r\n\t\t//\r\n\t\t//if (!OGSplugin_controle_droit('system')) SendHttpStatusCode(\"704\"); // ligne chapodepay\r\n\t\tif (!$ogs_set_system) SendHttpStatusCode(\"704\");\r\n\t\t// test handle galaxy view on server - mod option\r\n\t\tif (!$plug_handlegalaxyviews) SendHttpStatusCode(\"780\");\r\n\t\t//\r\n\t\t/////////////////\r\n\t\t// GALAXY VIEW //\r\n\t\t/////////////////\r\n\t\t//\r\n\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"données de galaxy en traitement\\n\");\r\n\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"données brutes: \".$pub_content.\"\\n\");\r\n\t\t//\r\n\t\t$galaxy = (int)$pub_galaxy;\r\n\t\t$system = (int)$pub_system;\r\n\t\t$galaxies_array = explode(\"<==||==>\",utf8_decode($pub_content));\r\n\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"\\n______________________________________________________________________________\\n\");\r\n\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"\\n==>Split tampon galaxies en \".count($galaxies_array).\" éléments\\n\");\r\n\t\t$numbuffer_iter = 0;\r\n\t\tforeach($galaxies_array as $curr_gal_buf) { // découpage du tampon\r\n\t\t\t//\r\n\t\t\t$gv_source = str_replace(\"&nbsp;\",\" \",stripslashes($curr_gal_buf));\r\n\t\t\t$gv_array = explode(\"\\n\",$gv_source);\r\n\t\t\t$solarstring = $gv_array[0];\r\n\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\"))\r\n\t\t\t\tfwrite($fp,\"\\n=>chaîne brute système solaire: \".$solarstring.\"\\n\");\r\n\t\t\tif (preg_match(\"#.*?\\s([0-9]):([0-9]{1,3})#\", $solarstring, $solarstring_array)){\r\n\t\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"parse ss: \".$solarstring_array[1].\"-\".$solarstring_array[2].\"\\n\");\r\n\t\t\t $galaxy = (int)$solarstring_array[1];\r\n\t\t\t $system = (int)$solarstring_array[2];\r\n\t\t\t}\r\n\t\t\tunset ($gv_array[1]);\r\n\t\t\tunset ($gv_array[0]);\r\n\t\t\t//\r\n\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\"))\r\n\t\t\t\tfwrite($fp,\"array count: \".count($gv_array).\"...\\n\"); // ligne débug , commentaire si pas utile\r\n\t\t\t//\r\n\t\t\t//===========================================================================================\r\n\t\t\t// Enregistrement des données de champ de ruine - test de l'existence des champs cible\r\n\t\t\t$ruincols_exist = OGSPlugin_DoDBColumnExists(TABLE_UNIVERSE, 'ruin_metal');\r\n\t\t\t$res_sql_error = $db->sql_error();\r\n\r\n\t\t\tif ($ruincols_exist) {\r\n\r\n\t\t\t if (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"Res test colone `ruin_metal` TABLE_UNIVERSE OK! (\".$res_sql_error[\"code\"].\")\\n\");\r\n\t\t\t} else {\r\n if (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"Res test colone `ruin_metal` TABLE_UNIVERSE échoué! (\".$res_sql_error[\"code\"].\")\\n\");\r\n\t\t\t}\r\n\t\t\t//===========================================================================================\r\n\t\t\t//\r\n\t\t\t$totalinserted = 0;\r\n\t\t\t$totalupdated = 0;\r\n\t\t\t$galcdr_num = $galcdr_added = 0; // vars champs de ruine\r\n\t\t\tforeach ($gv_array as $gv_row) {\r\n\t\t\t\t$gv_entries = explode(\"|\",$gv_row);\r\n\t\t\t\t// determine moonsize\r\n\t\t\t\t$moon = ($gv_entries[2] > 0) ? 1 : 0;\r\n\t\t\t\t//\r\n\t\t\t\t$playerstatus = $gv_entries[6];\r\n\t\t\t\t//\r\n\t\t\t\tif ($gv_entries[0] > 0 && $gv_entries[0] < 16)\t{\r\n\t\t\t\t\t//\r\n\t\t\t\t\t/////////////////////////////\r\n\t\t\t\t\t// PREPARATION DES DONNEES //\r\n\t\t\t\t\t/////////////////////////////\r\n\t\t\t\t\t//\r\n $position = (int)$gv_entries[0];\r\n\r\n // préparation données pour envoie vers ogs::galaxy_add_system(includes...)\r\n\t\t\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,$galaxy.\":\".$system.\":\".$position.\"||\".date(\"Y-m-d\").\" \".date(\"H:i:s\").\"||\".$planetname.\"||\".$moon.\"||\".$playername.\"||\".$allyname.\"<|>\".\"\\n\");\r\n\t\t\t\t\t//\r\n\t\t\t\t\t// CONCATENATION SOUS FORME DE BLOC\r\n\t\t\t\t\t// vérification ligne / pb conflit foxgame\r\n\t\t\t\t\tif ((trim($playername)!='') && (trim($planetname)=='')) {\r\n\t\t\t\t\t\t// send http header -> partial update\r\n\t\t\t\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\"))\tfwrite($fp,\"foxgame conflict...\\n\"); // ligne débug , commentaire si pas utile\r\n\t\t\t\t\t\tSendHttpStatusCode(\"792\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//\r\n\t\t\t\t\t$timestamp = mktime(); // utilisation date et heure en cours // fonction ogs\r\n\t\t\t\t\t//\r\n\t\t\t\t\t//////////////////////////////////////////\r\n\t\t\t\t\t// INSERTION LIGNE DANS BASE DE DONNEES //\r\n\t\t\t\t\t//////////////////////////////////////////\r\n\t\t\t\t\t//\r\n\t\t\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"juste avant galaxy_add_system...\\n\");\r\n\t\t\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"=> vars galaxy_add_system: gal:\".$galaxy.\"-sys:\".$system.\"-pos:\".$position.\"-moon:\". $moon.\"-planetname:\". $planetname.\"-\". $allyname.\"-\". $playername.\"-stats\". $playerstats.\"-\". $timestamp.\"\\n\");\r\n\t\t\t\t\t// au cas où\r\n\t\t\t\t\t// SendHttpStatusCode(\"702\", true, false);\r\n\t\t\t\t\t//\r\n\t\t\t\t\t\r\n \t\t\t// test existence champ moon dans table universe : si non -> unispy\r\n \t\t\t$testcolmoon = OGSPlugin_DoDBColumnExists(TABLE_UNIVERSE, 'moon');\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($testcolmoon) {\r\n \t\t\t\t\t// utf8_decode des champs $gv_entries[1] mis en début de fonction sur $pub_content\r\n \t\t\t\t\t$result = galaxy_add_system ($galaxy, $system, $gv_entries[0], $moon, trim($gv_entries[1]), trim($gv_entries[7]),trim($gv_entries[5]), $playerstatus, $timestamp, true);\r\n\t\t\t\t\t} else { // unispy\r\n\t\t\t\t\t $result = galaxy_add_system ($galaxy, $system, $gv_entries[0], trim($gv_entries[1]), trim($gv_entries[7]),trim($gv_entries[5]), $playerstatus, $timestamp, true);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//\r\n\t\t\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"retour func galaxy_add_system \\n\");\r\n\t\t\t\t\tif (isset($result)) { // pas forcément que des insertions, sinon des mises à jour !!!\r\n\t\t\t\t\t\tlist($inserted, $updated, $canceled) = $result; // $result -> gas_result test\r\n\t\t\t\t\t\tif ($inserted) $totalinserted++;\r\n\t\t\t\t\t\tif ($updated) $totalupdated++;\r\n\t\t\t\t\t\tif ($canceled) $totalcanceled++;\r\n\t\t\t\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"-> ajout ligne réussie : totalinserted: \".$totalinserted.\"(inserted: \".$inserted.\"-updated: \".$updated.\"- canceled\".$canceled.\"\\n\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$totalfailed++;\r\n\t\t\t\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"-> ajout ligner annulé\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n // on vérifie que le module champ de ruine existe\r\n $ruin_metal = ($gv_entries[3] != '' ? intval($gv_entries[3]): 0); // 0 par défaut si champ vide (pas de champ de ruine)\r\n $ruin_cristal = ($gv_entries[4] != '' ? intval($gv_entries[4]): 0); // 0 par défaut si champ vide (pas de champ de ruine)\r\n\r\n if ($ruincols_exist) {\r\n if (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"=> Demande de mise à jour des champs de ruine\\n\");\r\n if (OGSPlugin_MajChampdeRuine($galaxy, $system, $gv_entries[0], $ruin_metal, $ruin_cristal)==false) {\r\n if (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"-> mise à jour des champs de ruine réussie\\n\");\r\n }\r\n \r\n }\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t} // fin test valeur position\r\n\t\t\t}// FIn foreach()\r\n\t\t\t//log_plugin_(\"load_system_OGS\", array($totalplanet, $totalinserted, $totalupdated, $totalcanceled, $totalfailed, $totaltime));\r\n\r\n // mise à jour des alliances et des status joueurs\r\n galaxy_add_system_ally();\r\n\r\n // Enregistrement dans le journal\r\n if ($log_logogsgalview=='1')\r\n\t\t\t\t log_plugin_(\"load_system_OGS\".($cdr_maj==true? \"_cdr\":\"\"), array($galaxy.\":\".$system, ($totalinserted+$totalupdated)));\r\n\t\t\t $numbuffer_iter++;\r\n \t\t} // fin foreach\r\n\t\t//\r\n\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"all entries finished... ->\".$totalinserted.\"+\".$totalupdated.\"\\n\");\r\n\t\tif (($totalinserted+$updated) > 0) {\r\n\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"numinserted+updated: \".$totalinserted.\"+\".$totalupdated.\"\\n\");\r\n\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"gv updated...\\n\"); // ligne débug , commentaire si pas utile\r\n\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"______________________________________________________\\n\");\r\n\t\t\t//\r\n\t\t\t// send http header\r\n\t\t\tif ($numbuffer_iter>1) SendHttpStatusCode(\"705\");\r\n\t\t\telse SendHttpStatusCode(\"701\");\r\n\t\t} else {\r\n\t\t\tif ($numbuffer_iter>1) SendHttpStatusCode(\"706\");\r\n\t\t\t SendHttpStatusCode(\"702\");\r\n\t\t}\r\n\t\t/* if (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"positions wrong...\\n\");\r\n\t\tob_end_clean();\r\n\t\t// send http header\r\n\t\theader(\"HTTP/1.0 602 no update\");\r\n\t\texit(); */\r\n}", "public function changeToOrdine()\n {\n\n //crea la tabella degli ordini verso i fornitori\n //Rielabora\n $preventivatore = $this->getPreventivatore();\n $result = $preventivatore->elabora();\n $imponibile = $result['prezzo_cliente_senza_iva'];\n $iva = $result['prezzo_cliente_con_iva'] - $result['prezzo_cliente_senza_iva'];\n $importo_trasportatore = $result['costo_trazione'];\n $importo_depositario = $result['deposito'];\n $importo_traslocatore_partenza = $result['costo_scarico_totale'] ;\n $importo_traslocatore_destinazione = $result['costo_salita_piano_totale'] + $result['costo_montaggio_totale'] + $result['costo_scarico_ricarico_hub_totale'];\n\n $totali = array();\n $totali[$this->id_trasportatore] = 0;\n $totali[$this->id_depositario] = 0;\n $totali[$this->id_traslocatore_destinazione] = 0;\n $totali[$this->id_traslocatore_partenza] = 0;\n\n $totaliMC = array();\n $totaliMC[$this->id_trasportatore] = 0;\n $totaliMC[$this->id_depositario] = 0;\n $totaliMC[$this->id_traslocatore_destinazione] = 0;\n $totaliMC[$this->id_traslocatore_partenza] = 0;\n\n\n $totali[$this->id_trasportatore] = $totali[$this->id_trasportatore] + $importo_trasportatore;\n $totali[$this->id_depositario] = $totali[$this->id_depositario] + $importo_depositario;\n $totali[$this->id_traslocatore_partenza] = $totali[$this->id_traslocatore_partenza] + $importo_traslocatore_partenza;\n $totali[$this->id_traslocatore_destinazione] = $totali[$this->id_traslocatore_destinazione] + $importo_traslocatore_destinazione;\n\n\n $mc = $preventivatore->getMC();\n\n $totaliMC[$this->id_trasportatore] = $totaliMC[$this->id_trasportatore] + $mc;\n $totaliMC[$this->id_depositario] = $totaliMC[$this->id_depositario] + $mc;\n $totaliMC[$this->id_traslocatore_destinazione] = $totaliMC[$this->id_traslocatore_destinazione] + $mc;\n $totaliMC[$this->id_traslocatore_partenza] = $totaliMC[$this->id_traslocatore_partenza] + $mc;\n\n $imponibile = round($totali[$this->id_trasportatore]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_trasportatore] - $imponibile,2);\n\n $ordine_trasportatore = new OrdineFornitore($this->id_preventivo, $this->id_trasportatore, $totali[$this->id_trasportatore], $imponibile, $iva, $totaliMC[$this->id_trasportatore], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_TRASPORTO);\n $ordine_trasportatore->save();\n\n $imponibile = round($totali[$this->id_traslocatore_partenza]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_traslocatore_partenza] - $imponibile,2);\n\n $ordine_traslocatore_partenza = new OrdineFornitore($this->id_preventivo, $this->id_traslocatore_partenza, $totali[$this->id_traslocatore_partenza], $imponibile, $iva, $totaliMC[$this->id_traslocatore_destinazione], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_TRASLOCO_PARTENZA);\n $ordine_traslocatore_partenza->save();\n\n $imponibile = round($totali[$this->id_traslocatore_destinazione]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_traslocatore_destinazione] - $imponibile,2);\n $ordine_traslocatore_destinazione = new OrdineFornitore($this->id_preventivo, $this->id_traslocatore_destinazione, $totali[$this->id_traslocatore_destinazione], $imponibile, $iva, $totaliMC[$this->id_traslocatore_partenza], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_TRASLOCO_DESTINAZIONE);\n $ordine_traslocatore_destinazione->save();\n\n if ($this->giorni_deposito>10) {\n $imponibile = round($totali[$this->id_depositario]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_depositario] - $imponibile,2);\n\n $ordine_depositario = new OrdineFornitore($this->id_preventivo, $this->id_depositario, $totali[$this->id_depositario], $imponibile, $iva, $totaliMC[$this->id_depositario], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_DEPOSITO);\n $ordine_depositario->save();\n }\n\n\n\n $data_ordine = date('Y-m-d');\n $con = DBUtils::getConnection();\n $sql =\"UPDATE preventivi SET tipo=\".OrdineBusiness::TIPO_ORDINE.\" , data='\".$data_ordine.\"' ,\n importo_commessa_trasportatore ='\".$totali[$this->id_trasportatore].\"',\n importo_commessa_traslocatore_partenza ='\".$totali[$this->id_traslocatore_partenza].\"',\n importo_commessa_traslocatore_destinazione ='\".$totali[$this->id_traslocatore_destinazione].\"',\n importo_commessa_depositario ='\".$totali[$this->id_depositario].\"',\n imponibile ='\".$imponibile.\"',\n iva ='\".$iva.\"'\n WHERE id_preventivo=\".$this->id_preventivo;\n\n $res = mysql_query($sql);\n //echo \"\\nSQL: \".$sql;\n DBUtils::closeConnection($con);\n\n return new OrdineCliente($this->id_preventivo);\n }", "public function MenuInventaire(){\n\t\t\tparent::view('Home/Menu3');\n\t\t}", "public function elso()\n {\n }", "public function run()\n {\n // Creando el sorteo\n $sort = new Sort();\n $sort->description = 'Lotto Activo';\n $sort->pay_per_100 = 3000;\n $sort->folder = 'lottoActivo';\n $sort->daily_limit = 10000;\n $sort->save();\n\n // Cargando los animales\n $animal = new Animal();\n $animal->name = 'Delfín';\n $animal->number = '0';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Ballena';\n $animal->number = '00';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Carnero';\n $animal->number = '1';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Toro';\n $animal->number = '2';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Ciempies';\n $animal->number = '3';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Alacrán';\n $animal->number = '4';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'León';\n $animal->number = '5';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Rana';\n $animal->number = '6';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Perico';\n $animal->number = '7';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Ratón';\n $animal->number = '8';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Águila';\n $animal->number = '9';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Tigre';\n $animal->number = '10';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Gato';\n $animal->number = '11';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Caballo';\n $animal->number = '12';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Mono';\n $animal->number = '13';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Paloma';\n $animal->number = '14';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Zorro';\n $animal->number = '15';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Oso';\n $animal->number = '16';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Pavo';\n $animal->number = '17';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Burro';\n $animal->number = '18';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Chivo';\n $animal->number = '19';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Cerdo';\n $animal->number = '20';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Gallo';\n $animal->number = '21';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Camello';\n $animal->number = '22';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Cebra';\n $animal->number = '23';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Iguana';\n $animal->number = '24';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Gallina';\n $animal->number = '25';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Vaca';\n $animal->number = '26';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Perro';\n $animal->number = '27';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Zamuro';\n $animal->number = '28';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Elefante';\n $animal->number = '29';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Caimán';\n $animal->number = '30';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Lapa';\n $animal->number = '31';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Ardilla';\n $animal->number = '32';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Pez';\n $animal->number = '33';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Venado';\n $animal->number = '34';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Jirafa';\n $animal->number = '35';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Culebra';\n $animal->number = '36';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n // Creando el sorteo\n $sort = new Sort();\n $sort->description = 'La granjita';\n $sort->pay_per_100 = 3000;\n $sort->folder = 'lottoActivo';\n $sort->daily_limit = 10000;\n $sort->save();\n\n // Cargando los animales\n $animal = new Animal();\n $animal->name = 'Delfín';\n $animal->number = '0';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Ballena';\n $animal->number = '00';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Carnero';\n $animal->number = '1';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Toro';\n $animal->number = '2';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Ciempies';\n $animal->number = '3';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Alacrán';\n $animal->number = '4';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'León';\n $animal->number = '5';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Rana';\n $animal->number = '6';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Perico';\n $animal->number = '7';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Ratón';\n $animal->number = '8';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Águila';\n $animal->number = '9';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Tigre';\n $animal->number = '10';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Gato';\n $animal->number = '11';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Caballo';\n $animal->number = '12';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Mono';\n $animal->number = '13';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Paloma';\n $animal->number = '14';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Zorro';\n $animal->number = '15';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Oso';\n $animal->number = '16';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Pavo';\n $animal->number = '17';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Burro';\n $animal->number = '18';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Chivo';\n $animal->number = '19';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Cerdo';\n $animal->number = '20';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Gallo';\n $animal->number = '21';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Camello';\n $animal->number = '22';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Cebra';\n $animal->number = '23';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Iguana';\n $animal->number = '24';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Gallina';\n $animal->number = '25';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Vaca';\n $animal->number = '26';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Perro';\n $animal->number = '27';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Zamuro';\n $animal->number = '28';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Elefante';\n $animal->number = '29';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Caimán';\n $animal->number = '30';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Lapa';\n $animal->number = '31';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Ardilla';\n $animal->number = '32';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Pez';\n $animal->number = '33';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Venado';\n $animal->number = '34';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Jirafa';\n $animal->number = '35';\n $animal->sort_id = $sort->id;\n $animal->save();\n\n $animal = new Animal();\n $animal->name = 'Culebra';\n $animal->number = '36';\n $animal->sort_id = $sort->id;\n $animal->save();\n }", "function eventclass_offeraride()\n\t{\n\t\t$this->events[\"BeforeMoveNextList\"]=true;\n\n\n//\tonscreen events\n\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 dispatch($vue, $modele, $tabParametres) {\n $tab = $modele->getVoiture()->getImmat();\n $vue->getVoiture()->afficheFormSuppressionVoiture($tab);\n \n}", "private function desplegarBoxes(){\n $sql = '\n SELECT box.id_box,\n box.id_tipo_grafico,\n tipo_grafico.nombre,\n box.titulo,\n box.eje_x,\n box.eje_y,\n box.activo\n FROM dashboard.box as box\n INNER JOIN dashboard.tipo_grafico as tipo_grafico\n on tipo_grafico.id_tipo_grafico = box.id_tipo_grafico\n WHERE box.activo = 1;';\n $respuesta = $this->ejecutarSelect($sql);\n $tr = '';\n foreach ($respuesta as $temp) {\n if ($temp['activo'] == 1) {\n $activo = '<i class=\"fa fa-check-circle-o\" aria-hidden=\"true\"></i>';\n } else {\n $activo = '<i class=\"fa fa-times\" aria-hidden=\"true\"></i>';\n }\n $tr .= '<tr>\n <td>1</td>\n <td>'.$temp['nombre'].'</td>\n <td>'.$temp['titulo'].'</td>\n <td>'.$temp['eje_x'].'</td>\n <td>'.$temp['eje_y'].'</td>\n <td><a href=\"#\" class=\"ver_un_box\" data-id=\"'.$temp['id_box'].'\"><i class=\"fa fa-file-text\" aria-hidden=\"true\"></i></a></td>\n <td><i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i></td>\n </tr>';\n }\n return $tr;\n\n }", "public function interventionListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Intervention\");//type array\n\t}", "function allevents_widget() {\n\t\tparent::__construct( false, 'Row Seats Events' );\n\t}" ]
[ "0.5566882", "0.5496649", "0.54746664", "0.5375615", "0.5344453", "0.5328371", "0.5321867", "0.52935296", "0.5274244", "0.5267512", "0.5235252", "0.52338487", "0.52092093", "0.5199769", "0.5146239", "0.51418406", "0.51378053", "0.51377666", "0.51308686", "0.5085394", "0.5053686", "0.5036917", "0.5034237", "0.5027525", "0.5015978", "0.50126904", "0.50079674", "0.5007038", "0.49819383", "0.4977035", "0.49729037", "0.49645332", "0.49581763", "0.49581763", "0.49413234", "0.49395669", "0.4931446", "0.4928177", "0.49223027", "0.49160922", "0.49160922", "0.49001902", "0.4899505", "0.4894473", "0.48903596", "0.48824567", "0.48816344", "0.4878085", "0.4877342", "0.48760742", "0.48517847", "0.48429775", "0.4830837", "0.48287997", "0.48155984", "0.48144653", "0.4810745", "0.48076668", "0.48013154", "0.47994155", "0.4793029", "0.47865188", "0.47831377", "0.47749048", "0.47736096", "0.47667837", "0.47637227", "0.476342", "0.47605363", "0.47585565", "0.47555748", "0.47526762", "0.47526532", "0.47526422", "0.4748845", "0.47487876", "0.4747974", "0.47425973", "0.47382167", "0.4735509", "0.47217888", "0.47209522", "0.47199875", "0.4716503", "0.47085986", "0.4708383", "0.47067624", "0.46967193", "0.4695735", "0.46944925", "0.46937805", "0.46885574", "0.46872145", "0.4681264", "0.46781301", "0.46708786", "0.46684077", "0.466794", "0.4666747", "0.46661663", "0.46605206" ]
0.0
-1
/ Gestion des Stades
function insertStade ($tab) { $con = connexion (); if($con != null) { $requete = "insert into stade values (null,'".$tab['nom']."','".$tab['ville']."','".$tab['idequipe']."');"; mysqli_query($con, $requete); deconnexion($con); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getEstadisticaDetallado() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $usr;\n\n\t\t# Variables para eventos especiales marcados por el cliente codigo 9.\n\t\t$event = new Event;\n\t\t$usr = new Usuario($current_usuario_id);\n\t\t$usr->__Usuario();\n\t\t$graficoSvg = new GraficoSVG();\n\n\n\t\t$timeZoneId = $usr->zona_horaria_id;\n\t\t$arrTime = Utiles::getNameZoneHor($timeZoneId); \t\t\n\t\t$timeZone = $arrTime[$timeZoneId];\n\t\t$tieneEvento = 'false';\n\t\t$arrayDateStart = array();\t\t\n\t\t$nameFunction = 'EstadisticaDet';\n\t\t$data = null;\n\t\t$ids = null;\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'comparativo_resumen.tpl');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TITULO_HORARIOS', 'bloque_titulo_horarios');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_MONITOR', 'es_primero_monitor');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_TOTAL', 'es_primero_total');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TABLA', 'bloque_tabla');\n\n\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\t\t# Variables para mantenimiento.\n\t\t$T->setVar('__path_jquery_ui', REP_PATH_JQUERY_UI);\n\t\n\t\t$horarios = array($usr->getHorario($this->horario_id));\n\t\tif ($this->horario_id != 0) {\n\t\t\t$horarios[] = $usr->getHorario(0);\n\t\t}\n\n\t\t$orden = 1;\n\t\t$T->setVar('bloque_titulo_horarios', '');\n\t\tforeach ($horarios as $horario) {\n\n\t\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t\t$sql = \"SELECT * FROM reporte.comparativo_resumen_parcial(\".\n\t\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n\t\t\t\t\tpg_escape_string($horario->horario_id).\",' \".\n\t\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\t\t\t$res =& $mdb2->query($sql);\n// \t\t\tprint($sql);\n\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$row = $res->fetchRow();\n\t\t\t$dom = new DomDocument();\n\t\t\t$dom->preserveWhiteSpace = false;\n\t\t\t$dom->loadXML($row[\"comparativo_resumen_parcial\"]);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"comparativo_resumen_parcial\"]);\n\n\t\t\tif ($xpath->query('//detalle[@paso_orden]/estadisticas/estadistica')->length == 0) {\n\t\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$conf_objetivo = $xpath->query('/atentus/resultados/propiedades/objetivos/objetivo')->item(0);\n\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\t\t\t$conf_nodos = $xpath->query('//nodos/nodo');\n\n\t\t\tif(count($horarios) > 1) {\n\t\t\t\t$T->setVar('__item_horario', $this->extra[\"item_orden\"]);\n\t\t\t\t$T->setVar('__horario_orden', $orden);\n\t\t\t\t$T->setVar('__horario_nombre',$horario->nombre);\n\t\t\t\t$T->parse('bloque_titulo_horarios', 'BLOQUE_TITULO_HORARIOS', false);\n\t\t\t}\n\n\t\t\t\n\t\t\t# Obtención de los eventos especiales marcados por el cliente\n\t\t\tforeach ($xpath->query(\"/atentus/resultados/detalles_marcado/detalle/marcado\") as $tag_marcado) {\n\t\t\t$ids = $ids.','.$tag_marcado->getAttribute('mantenimiento_id');\n\t\t\t$marcado = true;\n\t\t\t}\t\t\n\t\t\t\n\t\t\t# Verifica que exista marcado evento cliente.\n\t\t\tif ($marcado == true) {\n\n\t\t\t\t$dataMant = $event->getData(substr($ids, 1), $timeZone);\n\t\t\t\t$character = array(\"{\", \"}\");\n\t\t\t\t$objetives = explode(',',str_replace($character,\"\",($dataMant[0]['objetivo_id'])));\n\t\t\t\t$tieneEvento = 'true';\n\t\t\t\t$encode = json_encode($dataMant);\n\t\t\t\t$nodoId = (string)0;\n\t\t\t\t$T->setVar('__tiene_evento', $tieneEvento);\n\t\t\t\t$T->setVar('__name', $nameFunction);\n\n\t\t\t}\n\n\t\t\t/* LISTA DE MONITORES */\n\t\t\t$linea = 1;\n\t\t\t$T->setVar('lista_pasos', '');\n\t\t\tforeach($conf_nodos as $conf_nodo) {\n\t\t\t\t$primero = true;\n\t\t\t\t$tag_nodo = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/estadisticas/estadistica')->item(0);\n\n\t\t\t\t/* LISTA DE PASOS */\n\t\t\t\tforeach($conf_pasos as $conf_paso) {\n\t\t\t\t\t$tag_dato = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/detalles/detalle[@paso_orden='.$conf_paso->getAttribute('paso_orden').']/estadisticas/estadistica')->item(0);\n\t\t\t\t\tif($tag_dato != null) {\n\t\t\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\n\t\t\t\t\t\t$T->setVar('es_primero_monitor', '');\n\t\t\t\t\t\t$T->setVar('es_primero_total', '');\n\t\t\t\t\t\tif ($primero) {\n\t\t\t\t\t\t\t$T->setVar('__monitor_nombre', $conf_nodo->getAttribute('nombre'));\n\t\t\t\t\t\t\t$T->setVar('__monitor_rowspan', $conf_pasos->length);\n\t\t\t\t\t\t\t$T->setVar('__monitor_total_monitoreo', $tag_nodo->getAttribute('cantidad'));\n\t\t\t\t\t\t\t$T->parse('es_primero_monitor', 'ES_PRIMERO_MONITOR', false);\n\t\t\t\t\t\t\t$T->parse('es_primero_total', 'ES_PRIMERO_TOTAL', false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute(\"nombre\"));\n\t\t\t\t\t\t$T->setVar('__paso_minimo', number_format($tag_dato->getAttribute('tiempo_min'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_maximo', number_format($tag_dato->getAttribute('tiempo_max'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_promedio', number_format($tag_dato->getAttribute('tiempo_prom'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_uptime', number_format($tag_dato->getAttribute('uptime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_downtime', number_format($tag_dato->getAttribute('downtime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_no_monitoreo', number_format($tag_dato->getAttribute('sin_monitoreo'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_evento_especial', number_format($tag_dato->getAttribute('marcado_cliente'), 3, ',', ''));\n\n\t\t\t\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n\t\t\t\t\t\t$primero = false;\n\t\t\t\t\t\t$linea++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$T->parse('bloque_tabla', 'BLOQUE_TABLA', true);\n\t\t\t$orden++;\n\t\t}\n\t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\n\t\t# Agrega el acordeon cuando existan eventos.\n\t\tif (count($dataMant)>0){\n\t\t\t$this->resultado.= $graficoSvg->getAccordion($encode,$nameFunction);\n\t\t}\n\t\treturn $this->resultado;\n\t}", "function evt__3__salida()\n\t{\n\t\t$this->dependencia('eventos')->limpiar_seleccion();\n\t}", "public function run() {\n \n \t$acre \t\t\t\t\t= new Estados();\n \t$acre->nome \t\t\t= 'Acre';\n \t$acre->uf \t\t\t\t= 'AC';\n \t$acre->save();\n\n \t$alagoas \t\t\t\t= new Estados();\n \t$alagoas->nome \t\t\t= 'Alagoas';\n \t$alagoas->uf \t\t\t= 'AL';\n \t$alagoas->save();\n\n \t$amapa \t\t\t\t\t= new Estados();\n \t$amapa->nome \t\t\t= 'Amapá';\n \t$amapa->uf \t\t\t\t= 'AP';\n \t$amapa->save();\n\n \t$amazonas \t\t\t\t= new Estados();\n \t$amazonas->nome \t\t= 'Amazonas';\n \t$amazonas->uf \t\t\t= 'AM';\n \t$amazonas->save();\n\n \t$bahia \t\t\t\t\t= new Estados();\n \t$bahia->nome \t\t\t= 'Bahia';\n \t$bahia->uf \t\t\t\t= 'BA';\n \t$bahia->save();\n\n \t$ceara \t\t\t\t\t= new Estados();\n \t$ceara->nome \t\t\t= 'Ceará';\n \t$ceara->uf \t\t\t\t= 'CE';\n \t$ceara->save();\n\n \t$distFederal \t\t\t= new Estados();\n \t$distFederal->nome \t\t= 'Distrito Federal';\n \t$distFederal->uf \t\t= 'DF';\n \t$distFederal->save();\n\n \t$espSanto \t\t\t\t= new Estados();\n \t$espSanto->nome \t\t= 'Espírito Santo';\n \t$espSanto->uf \t\t\t= 'ES';\n \t$espSanto->save();\n\n \t$goias \t\t\t\t\t= new Estados();\n \t$goias->nome \t\t\t= 'Goiás';\n \t$goias->uf \t\t\t\t= 'GO';\n \t$goias->save();\n\n \t$maranhao \t\t\t\t= new Estados();\n \t$maranhao->nome \t\t= 'Maranhão';\n \t$maranhao->uf \t\t\t= 'MA';\n \t$maranhao->save();\n\n \t$mtSul \t\t\t\t\t= new Estados();\n \t$mtSul->nome \t\t\t= 'Mato Grosso do Sul';\n \t$mtSul->uf \t\t\t\t= 'MS';\n \t$mtSul->save();\n\n \t$mt \t\t\t\t\t= new Estados();\n \t$mt->nome \t\t\t\t= 'Mato Grosso';\n \t$mt->uf \t\t\t\t= 'MT';\n \t$mt->save();\n\n \t$minasGerais \t\t\t= new Estados();\n \t$minasGerais->nome \t\t= 'Minas Gerais';\n \t$minasGerais->uf \t\t= 'MG';\n \t$minasGerais->save();\n\n \t$parana \t\t\t\t= new Estados();\n \t$parana->nome \t\t\t= 'Paraná';\n \t$parana->uf \t\t\t= 'PR';\n \t$parana->save();\n\n \t$paraiba \t\t\t\t= new Estados();\n \t$paraiba->nome \t\t\t= 'Paraíba';\n \t$paraiba->uf \t\t\t= 'PB';\n \t$paraiba->save();\n\n \t$para \t\t\t\t\t= new Estados();\n \t$para->nome \t\t\t= 'Pará';\n \t$para->uf \t\t\t\t= 'PA';\n \t$para->save();\n\n \t$pernambuco \t\t\t= new Estados();\n \t$pernambuco->nome \t\t= 'Pernambuco';\n \t$pernambuco->uf \t\t= 'PE';\n \t$pernambuco->save();\n\n \t$piaui \t\t\t\t\t= new Estados();\n \t$piaui->nome \t\t\t= 'Piauí';\n \t$piaui->uf \t\t\t\t= 'PI';\n \t$piaui->save();\n\n \t$rJaneiro \t\t\t\t= new Estados();\n \t$rJaneiro->nome \t\t= 'Rio de Janeiro';\n \t$rJaneiro->uf \t\t\t= 'RJ';\n \t$rJaneiro->save();\n\n \t$rNorte \t\t\t\t= new Estados();\n \t$rNorte->nome \t\t\t= 'Rio Grande do Norte';\n \t$rNorte->uf \t\t\t= 'RN';\n \t$rNorte->save();\n\n \t$rSul \t\t\t\t\t= new Estados();\n \t$rSul->nome \t\t\t= 'Rio Grande do Sul';\n \t$rSul->uf \t\t\t\t= 'RS';\n \t$rSul->save();\n\n \t$rondonia \t\t\t\t= new Estados();\n \t$rondonia->nome \t\t= 'Rondônia';\n \t$rondonia->uf \t\t\t= 'RO';\n \t$rondonia->save();\n\n \t$roraima \t\t\t\t= new Estados();\n \t$roraima->nome \t\t\t= 'Roraima';\n \t$roraima->uf \t\t\t= 'RR';\n \t$roraima->save();\n\n \t$sCatarina \t\t\t\t= new Estados();\n \t$sCatarina->nome \t\t= 'Santa Catarina';\n \t$sCatarina->uf \t\t\t= 'SC';\n \t$sCatarina->save();\n\n \t$sergipe \t\t\t\t= new Estados();\n \t$sergipe->nome \t\t\t= 'Sergipe';\n \t$sergipe->uf \t\t\t= 'SE';\n \t$sergipe->save();\n\n \t$sp \t\t\t\t\t= new Estados();\n \t$sp->nome \t\t\t\t= 'São Paulo';\n \t$sp->uf \t\t\t\t= 'SP';\n \t$sp->save();\n\n \t$tocantins \t\t\t\t= new Estados();\n \t$tocantins->nome \t\t= 'Tocantins';\n \t$tocantins->uf \t\t\t= 'TO';\n \t$tocantins->save();\n\n }", "public function run()\n {\n $sucursal = new Sucursal();\n $sucursal->codigo = 'S001';\n $sucursal->nombre = 'Casa Central';\n $sucursal->direccion = '25 de Mayo casi Antequera - Asunción';\n $sucursal->codigo_punto_expedicion = '001';\n $sucursal->save();\n\n $sucursal = new Sucursal();\n $sucursal->codigo = 'S002';\n $sucursal->nombre = 'Sucursal Fdo de la Mora';\n $sucursal->direccion = 'Eusebio Ayala casi Calle Ultima - Fernando de la Mora';\n $sucursal->codigo_punto_expedicion = '003';\n $sucursal->activo = false;\n $sucursal->save();\n\n $sucursal = new Sucursal();\n $sucursal->codigo = 'S003';\n $sucursal->nombre = 'Sucursal SanBer';\n $sucursal->direccion = 'Calle Mcal Lopez 1024 - San Bernardino';\n $sucursal->codigo_punto_expedicion = '004';\n $sucursal->save();\n\n $sucursal = new Sucursal();\n $sucursal->codigo = 'S004';\n $sucursal->nombre = 'Sucursal San Lorenzo';\n $sucursal->direccion = '10 de Agosto casi Saturio Ríos - San Lorenzo';\n $sucursal->codigo_punto_expedicion = '002';\n $sucursal->save();\n }", "public function actividadesPorSegmento()\n {\n //\n }", "public function allStaff()\n {\n }", "public function updateSportive()\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('scoringsystem', Bn::getValue('scoringsystem'));\r\n\t\t$oEvent->setVal('ranksystem', Bn::getValue('ranksystem'));\r\n\t\t$oEvent->setVal('catage', Bn::getValue('catage'));\r\n\t\t$oEvent->setVal('nature', Bn::getValue('nature'));\r\n\t\t$oEvent->setVal('level', Bn::getValue('level'));\r\n\t\t$type = $oEvent->getVal('type');\r\n\t\tif (!$oEvent->isIc())\r\n\t\t{\r\n\t\t\t$oEvent->setVal('nbdrawmax', Bn::getValue('nbdrawmax'));\r\n\t\t\t$oEvent->save();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$weight = Bn::getValue('teamweight');\r\n\t\t\tif ($weight != $oEvent->getVal('teamweight'))\r\n\t\t\t{\r\n\t\t\t\t$oEvent->setVal('teamweight', Bn::getValue('teamweight'));\r\n\t\t\t\t$oEvent->save();\r\n\t\t\t\t$teamIds = $oEvent->getTeams();\r\n\t\t\t\tforeach($teamIds as $teamId)\r\n\t\t\t\t{\r\n\t\t\t\t\t$oTeam = new Oteam($teamId);\r\n\t\t\t\t\t$points = $oTeam->weight();\r\n\t\t\t\t\tunset($oTeam);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t}\r\n\r\n\t\t// Message de fin\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_SPORTIVE);\r\n\t\techo Bn::toJson($res);\r\n\t}", "public function pageSportive()\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$oExtras = new Oeventextra($eventId);\r\n\t\t$type = $oEvent->getVal('type');\r\n\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\t\t// Preparer les champs de saisie\r\n\t\t$body = new Body();\r\n\r\n\t\t// Titres\r\n\t\t$t = $body->addP('', '', 'bn-title-2');\r\n\t\t$t->addBalise('span', '', LOC_ITEM_SPORTIVE);\r\n\t\tif ( $oEvent->isIc() ) $body->addP('', LOC_EVENT_TYPE_IC, 'bn-title-4');\r\n\t\telse $body->addP('', LOC_EVENT_TYPE_INDIVIDUAL, 'bn-title-4');\r\n\r\n\t\t// Formulaire\r\n\t\t$form = $body->addForm('frmSportive', BPREF_UPDATE_SPORTIVE, 'targetDlg');\r\n\t\t$form->getForm()->addMetadata('success', \"updated\");\r\n\t\t$form->getForm()->addMetadata('dataType', \"'json'\");\r\n\r\n\t\t//------- Zones de saisies\r\n\t\t$div = $form->addDiv('', 'bn-div-line');\r\n\t\t$cbo = $div->addSelect('nature', LOC_LABEL_EVENT_NATURE);\r\n\t\t$types = Oevent::getLovNature($type);\r\n\t\t$cbo->addOptions($types, $oEvent->getVal('nature', OEVENT_NATURE_OTHER) );\r\n\r\n\t\t$cbo = $div->addSelect('level', LOC_LABEL_EVENT_LEVEL);\r\n\t\t$levels = Oevent::getLovLevel();\r\n\t\t$cbo->addOptions($levels, $oEvent->getVal('level', OEVENT_LEVEL_REG));\r\n\r\n\t\t$div = $form->addDiv('', 'bn-div-line');\r\n\t\t$scorings = Oevent::getLovScoringSystem();\r\n\t\t$select = $div->addSelect('scoringsystem', LOC_LABEL_EVENT_SCORING);\r\n\t\t$select->addOptions($scorings, $oEvent->getVal('scoringsystem'));\r\n\t\t\t\r\n\t\t$systems = Oevent::getLovRankSystem();\r\n\t\t$select = $div->addSelect('ranksystem', LOC_LABEL_EVENT_RANKSYSTEM);\r\n\t\t$select->addOptions($systems, $oEvent->getVal('ranksystem'));\r\n\r\n\r\n\t\t$isSquash = Bn::getConfigValue('squash', 'params');\r\n\t\tif ( $isSquash ) \r\n\t\t{\r\n\t\t\t$div = $form->addDiv('', 'bn-div-line');\r\n\t\t\t$catage = $oEvent->getVal('evntcatage');\r\n\t\t\t$div = $form->addDiv('', 'bn-div-line bn-div-clear');\r\n\t\t\t$div->addRadio('catage', 'catageadult', 'Adulte', OEVENT_CATAGE_ADULT, $catage==OEVENT_CATAGE_ADULT);\r\n\t\t\t$div->addRadio('catage', 'catageyoung', 'Jeune', OEVENT_CATAGE_YOUNG, $catage==OEVENT_CATAGE_YOUNG);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$div->addHidden('catage', OEVENT_CATAGE_BOTH);\r\n\t\t\tif ( !$oEvent->isIc() ) $div->addEdit('nbdrawmax', LOC_LABEL_EVENT_NBDRAW, $oEvent->getVal('nbdrawmax'));\r\n\t\t}\r\n\t\t\r\n\t\tif ( !$oEvent->isIc() )\r\n\t\t{\r\n\t\t\t$weight = array('---' => '---') + Oevent::getLovWeights();\r\n\t\t\t$select = $div->addSelect('teamweight', LOC_LABEL_EVENT_TEAMWEIGHT);\r\n\t\t\t$select->addOptions($weight, $oEvent->getVal('teamweight'));\r\n\t\t\t$div->addDiv('divWeight', 'bn-div-clear', BPREF_PAGE_WEIGHT);\r\n\t\t}\r\n\t\t\r\n\t\t$div->addBreak();\r\n\r\n\t\t$d = $form->addDiv('', 'bn-div-btn');\r\n\t\t$d->addButtonValid('', LOC_BTN_UPDATE);\r\n\r\n\t\t// Envoi au navigateur\r\n\t\t$body->addJqReady('pageSportive();');\r\n\t\t$body->display();\r\n\t\treturn false;\r\n\t}", "function index_sede()\n\t{\n\t\t$this->paginate = array('limit'=>20, 'order' => array('nombre_sede' => 'asc'));\n\t\t$this->set('sede',$this->paginate('Sede'));\n\t}", "public function GuardarEstado()\n\t{\n\t\t$query=\"INSERT INTO estado (idpais,estado,descripcion) VALUES ($this->id_pais,'$this->estado','$this->descripcion')\";\n\t\t$resp=$this->db->consulta($query);\n\t\t$this->id_estado = $this->db->id_ultimo();\n\t\t\n\t\t\n\t\t\n\t}", "public function gestores(){\n\t\t$gestores = $this->query(\"SELECT id, Nombre, Clave, supervisor FROM gestors AS Gestor WHERE Activo=1\");\n\t\treturn $gestores;\n\t}", "public function sdmtd()\n {\n\n session_start();\n if (!isset($_SESSION[\"Super_admin\"])) {\n\n herder(\"Location:\" . RUTA_URL . \"/inicio\");\n } else {\n\n $this->vista('superAdministrador/menu');\n }\n }", "public function studiengang_details() {\r\n\r\n //Sprachen rausfinden:\r\n $this->sprachen = StgProfil::getPossibleLanguages();\r\n //Abschlüsse suchen:\r\n $this->abschlusssuche = new SQLSearch(\"SELECT abschluss_id, name FROM abschluss WHERE name LIKE :input\", _(\"Abschluss eingeben\"));\r\n //zulassungsvoraussetzung:\r\n $this->moeglicheZulassungsvoraussetzungen_wise = DBHelper::getEnumOptions(\"stg_profil\", \"zulassungsvoraussetzung_wise\");\r\n $this->moeglicheZulassungsvoraussetzungen_sose = DBHelper::getEnumOptions(\"stg_profil\", \"zulassungsvoraussetzung_sose\");\r\n //Typen von Studiengängen:\r\n $this->moeglicheStgTypen = StgProfil::getMoeglicheTypen();\r\n\r\n $this->studiengaenge = PersonalRechte::meineStudiengaenge(null, true);\r\n $this->abschluesse = Abschluss::findAllUsed();\r\n $this->profile = StgProfil::getMeineProfile(null, Request::get(\"studiengang_id\"), Request::get(\"abschluss_id\"));\r\n\r\n //Neuen Eintrag in stg_profil erstellen\r\n if (Request::get(\"item_id\") === \"neu\" && !Request::get(\"studiengang_id\")) {\r\n //$this->profil = new StgProfil();\r\n $this->fachsuche = new SQLSearch(\"SELECT studiengang_id, name FROM studiengaenge WHERE name LIKE :input OR beschreibung LIKE :input \", _(\"Studiengang eingeben\"));\r\n $this->render_template('zsb_studiengang/details_studiengang', $this->layout);\r\n return;\r\n }\r\n\r\n $this->profil = new StgProfil(Request::get(\"studienprofil_id\") !== \"neu\" ? Request::get(\"studienprofil_id\") : null);\r\n if (!$this->profil->hasPermission()) {\r\n throw new AccessDeniedException(_(\"Sie dürfen diesen Studiengang nicht bearbeiten\"));\r\n }\r\n if (Request::get(\"delete_x\") && Request::get(\"item_id\") && Request::get(\"type\") === \"dokument\") {\r\n $this->profil->deleteDoku(Request::get(\"item_id\"));\r\n $this->flash_now(\"success\", _(\"Dokumentenzuordnung gelöscht\"));\r\n }\r\n if (Request::get(\"addDocument\")) {\r\n $this->profil->addDoku(Request::get(\"addDocument\"));\r\n $this->flash_now(\"success\", _(\"Dokumentenzuordnung hinzugefügt\"));\r\n }\r\n //Profil ändern, falls Informationen gesendet worden sind:\r\n if (Request::submitted(\"absenden\")) {\r\n if (Request::get(\"studiengang_id\")) {\r\n //Neuen Eintrag in stg_profil machen:\r\n $this->profil['fach_id'] = Request::get(\"studiengang_id\");\r\n $this->profil->store(); //Nachher wird noch einmal gestored, aber jetzt wollen wir IDs bekommen.\r\n }\r\n if (Request::submitted('informationen')) {\r\n $this->profil->setInformation(Request::getArray(\"informationen\"));\r\n }\r\n if (Request::submitted(\"abschluss_id\")) {\r\n $this->profil['abschluss_id'] = Request::get(\"abschluss_id\");\r\n }\r\n if (Request::submitted('settings')) {\r\n $settings = Request::getArray(\"settings\");\r\n foreach ($settings as $key => $value) {\r\n $this->profil[$key] = $value;\r\n }\r\n if (!$settings['sichtbar']) {\r\n $this->profil['sichtbar'] = 0;\r\n }\r\n }\r\n if (Request::submitted(\"zielvereinbarung\")) {\r\n $this->profil['zielvereinbarung'] = Request::get(\"zielvereinbarung\");\r\n }\r\n if (Request::submitted(\"einleitungstext\")) {\r\n $this->profil['einleitungstext'] = Request::get(\"einleitungstext\");\r\n }\r\n if (Request::submitted('typen')) {\r\n $this->profil->setTypen(Request::getArray(\"typen\"));\r\n }\r\n $this->profil->store();\r\n\r\n if (Request::submitted('textcombination')) {\r\n $textcombinations = (array) @$_REQUEST['textcombination'];\r\n Textbaustein::removeCombination($this->profil->getId());\r\n foreach ($textcombinations as $code => $ids) {\r\n Textbaustein::addCombination($this->profil->getId(), $code, $ids);\r\n }\r\n }\r\n\r\n $this->flash_now(\"success\", _(\"Änderungen wurden übernommen\"));\r\n if (Request::get(\"neues_dokument\")) {\r\n $dokument = new StgFile();\r\n if ($_GET['qqfile'] || isset($_FILES['qqfile'])) {\r\n ob_start();\r\n $dokument->upload();\r\n ob_clean();\r\n }\r\n $dokument['name'] = Request::get(\"neues_dokument_name\");\r\n $dokument['sichtbar'] = Request::get(\"neues_dokument_sichtbar\") ? '1' : '0';\r\n $dokument['jahr'] = Request::get(\"neues_dokument_jahr\");\r\n $dokument['doku_typ_id'] = Request::get(\"neues_dokument_doku_typ_id\");\r\n $dokument['quick_link'] = Request::get(\"neues_dokument_quick_link\");\r\n $dokument['user_id'] = $GLOBALS['user']->id;\r\n $dokument->store();\r\n $dokument->setTags(Request::get(\"neues_dokument_tags\"));\r\n $this->profil->addDoku($dokument->getId());\r\n if ($dokument->isPublic()) {\r\n $this->flash_now(\"success\", _(\"Neues Dokument angelegt und hinzugefügt\"));\r\n } else {\r\n $this->flash_now(\"success\", _(\"Neues internes Dokument angelegt und hinzugefügt. Es kann unter Akkreditierung gefunden werden.\"));\r\n }\r\n }\r\n if (Request::get(\"neuer_ansprechpartner\")) {\r\n $kontakt = new StgAnsprechpartner();\r\n $kontakt['range_typ'] = Request::get(\"range_typ\");\r\n $kontakt['range_id'] = Request::get(\"range_typ\") && Request::get(\"range_id\") ? Request::get(\"range_id\") : \"\";\r\n\r\n if (Request::get(\"ansprechpartner_typ_id\")) {\r\n $typen = StgAnsprechpartner::getAnsprechpartnerTypen();\r\n foreach ($typen as $typ) {\r\n if ($typ['ansprechpartner_typ_id'] === Request::get(\"ansprechpartner_typ_id\")) {\r\n $kontakt['ansprechpartner_typ_id'] = Request::get(\"ansprechpartner_typ_id\");\r\n }\r\n }\r\n }\r\n $kontakt['freitext_name'] = Request::get(\"freitext_name\");\r\n $kontakt['freitext_mail'] = Request::get(\"freitext_mail\");\r\n $kontakt['freitext_telefon'] = Request::get(\"freitext_telefon\");\r\n $kontakt['freitext_homepage'] = Request::get(\"freitext_homepage\");\r\n if ($kontakt->store()) {\r\n $this->profil->addAnsprechpartner($kontakt->getId());\r\n $this->flash_now(\"success\", _(\"Neuer Ansprechpartner angelegt und hinzugefügt\"));\r\n }\r\n }\r\n }\r\n\r\n //Informationen:\r\n $this->informationen = $this->profil->getInformation();\r\n\r\n //Verlaufspläne\r\n $this->verlaufsplaene = $this->profil->getVerlaufsplaene();\r\n\r\n //Dateien:\r\n $this->dateien = StgFile::getByStgProfil($this->profil->getId());\r\n $this->dokumentensuche = $this->getDokumentensuche();\r\n\r\n //Kontakte:\r\n $this->kontakte = StgAnsprechpartner::getByStgProfil($this->profil->getId());\r\n usort($this->kontakte, function ($a, $b) {\r\n return strcmp($a->getName('no_title_rev'), $b->getName('no_title_rev'));\r\n });\r\n $this->kontakt_neu = new StgAnsprechpartner();\r\n $this->ansprechpartnertypen = StgAnsprechpartner::getAnsprechpartnerTypen();\r\n\r\n\r\n //Aufbaustudiengänge:\r\n $this->mutterstudiengaenge = $this->profil->getAufbauendeStudiengaenge();\r\n $this->profilsuche = $this->getProfilSuche();\r\n\r\n\r\n // Textbausteine\r\n $this->textbausteine = array(\r\n 'de' => Textbaustein::loadAll('de'),\r\n 'en' => Textbaustein::loadAll('en'),\r\n );\r\n $this->textcombinations = Textbaustein::loadCombination($this->profil->getId());\r\n\r\n $this->ansprechpartnersuche = $this->getAnsprechpartnersuche();\r\n $this->datei_url = $this->link_for(\"zsb_dateien/download_file\");\r\n $this->render_template('zsb_studiengang/details_studiengang', $this->layout);\r\n //hiernach wird nichts weiter ausgegeben\r\n }", "public function possederListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Posseder\");//type array\n\t}", "function salida_por_traspaso(){\n\t\t$e= new Salida();\n\t\t$e->usuario_id=$GLOBALS['usuarioid'];\n\t\t$e->empresas_id=$GLOBALS['empresaid'];\n\t\t$related = $e->from_array($_POST);\n\t\t//if($e->costo_unitario=='undefined') $e->costo_unitario=0;\n\t\t$e->espacios_fisicos_id=$GLOBALS['espacios_fisicos_id'];\n\t\t$e->costo_total=($e->cantidad * $e->costo_unitario);\n\t\t$e->cclientes_id=1;\n\t\t$e->fecha=date(\"Y-m-d H:i:s\");\n\t\tif($e->id==0)\n\t\t\tunset($e->id);\n\t\tif($e->save($related)) {\n\t\t\techo $e->id;\n\t\t} else\n\t\t\techo 0;\n\t}", "public function stampaDipendenti() {\n echo '<p> Nome: ' . $this->nome . '</p>';\n echo '<p> Cognome: ' . $this->cognome . '</p>';\n echo '<p> Software utilizzati: ' . $this->software . '</p>';\n }", "public function run()\n {\n $estado = new State();\n $estado->name = 'Chiapas';\n $estado->save();\n\n $estado = new State();\n $estado->name = 'Tamaulipas';\n $estado->save();\n\n $estado = new State();\n $estado->name = 'Michoacán';\n $estado->save();\n\n /* sucursales */\n $sucursal = new Branch();\n $sucursal->state_id = 1; //chiapas\n $sucursal->sucursal = 'SNTE 7';\n $sucursal->mounth_rate = 3.50;\n $sucursal->save();\n\n $sucursal = new Branch();\n $sucursal->state_id = 2; //tamaulipas\n $sucursal->sucursal = 'Gobierno';\n $sucursal->mounth_rate = 3.30;\n $sucursal->save();\n\n $sucursal = new Branch();\n $sucursal->state_id = 2;\n $sucursal->sucursal = 'Salud';\n $sucursal->mounth_rate = 3.50;\n $sucursal->save();\n\n $sucursal = new Branch();\n $sucursal->state_id = 2;\n $sucursal->sucursal = 'Policias';\n $sucursal->mounth_rate = 3.80;\n $sucursal->save();\n\n $sucursal = new Branch();\n $sucursal->state_id = 3; //michoacan\n $sucursal->sucursal = 'SNTE 18';\n $sucursal->mounth_rate = 3.30;\n $sucursal->save();\n\n }", "private function getStudent(){\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire.sql\";\n\n\t\t$this->result[\"liste_stagiaire\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire_techno_carousel.sql\";\n\n\t\t$this->result[\"liste_techno\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire_rs.sql\";\n\n\t\t$this->result[\"liste_rs\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire_doc.sql\";\n\n\t\t$this->result[\"liste_doc\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t}", "public function insertStatAndRoyalitiesAction(){\n \n }", "static function salva(){\n if(!CUtente::verificalogin())header('Location: /Progetto/Utente/homepagedef');\n else{\n session_start();\n if($_SERVER['REQUEST_METHOD'] == \"POST\"){\n $nome=$_POST['nome'];\n $descrizione=$_POST['descrizione'];\n if($_POST['accessibilità']=='Privato')$pubblico=false;\n else $pubblico=true;\n $w=new EWatchlist($nome,$descrizione,$pubblico,$_SESSION['utente']->getUsername());\n if(isset($_POST['serie'])){\n if(!empty($_POST['serie'])){\n foreach ($_POST['serie'] as $serie){\n $s=FPersistentManager::load('id',$serie,'FSerieTv');\n $w->AggiungiSerie(clone ($s[0]));\n }\n }\n }\n\n\n\n FPersistentManager::store($w);\n $u=FPersistentManager::load('username',$_SESSION['utente']->getUsername(),'FUtente');\n $_SESSION['utente']=clone($u[0]);\n $_SESSION['watchlist']= $_SESSION['utente']->getWatchlist();\n\n\n header('Location: /Progetto/Utente/user?id='.$_SESSION['utente']->getUsername());\n\n }\n else header('Location: /Progetto/Utente/homepagedef');\n }\n }", "public function show(Estudiantes $estudiantes)\n {\n //\n }", "public function getEstudiantes()\n {\n return EstudianteDao::getEstudiantes();\n }", "private function getEstados()\n {\n //Solicita os dados dos idiomas\n $recordset = $this->Delegator('ConcreteCadastro', 'getEstados');\n\n //Associa os dados na view\n $this->View()->assign('estados', $recordset);\n }", "function act_tipo_salida(){\n\t\t$u= new Tipo_salida();\n\t\t$related = $u->from_array($_POST);\n\n\t\t// save with the related objects\n\t\tif($u->save($related))\n\t\t{\n\t\t\techo \"<html> <script>alert(\\\"Se han actualizado los datos del Tipo de Salida.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/\".$GLOBALS['ruta'].\"/menu';</script></html>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tshow_error(\"\".$u->error->string);\n\t\t}\n\t}", "private function getEstados(){\n\n\t\t//Solicita os dados dos idiomas\n\t\t$recordset = $this->Delegator('ConcreteCadastro', 'getEstados');\n\t\t\n\t\t//Associa os dados na view\n\t\t$this->View()->assign('estados',$recordset);\n\t}", "function usuarios_estados_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"usuarios_estados\";\n\t\t$this->campoClave=\"Id\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"Id\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Estado\",2);\n$this->agregarVariable2($v);\n\n\t}", "public function listAction()\n {\n \n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u=new Sedes($this->dbAdapter);\n $valores=array\n (\n \"titulo\" => \"Sedes\",\n \"datos\" => $u->getRegistro(), \n \"ttablas\" => \"Sedes,Direccion,A,E\",\n \"lin\" => $this->lin\n ); \n return new ViewModel($valores);\n }", "public function gestionPedidos(){\n Utils::isAdmin();\n $gestion = true;\n\n $oPedido = new Pedido();\n $pedidos = $oPedido->getAll();\n\n require_once 'views/pedido/mis_pedidos.php';\n }", "function index()\n {\n $data['semestre'] = $this->Semestre_model->get_all_semestre();\n \n $data['_view'] = 'semestre/index';\n $this->load->view('layouts/main',$data);\n }", "public function getidEstudiante()\n {\n return $this->id_est;\n }", "public function run() {\n\n\t Enseignant::create([\n\t \t\"nom\" => \"COULAND\",\n\t \t\"prenom\" => \"Quentin\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\n\t Enseignant::create([\n\t \t\"nom\" => \"VESVARD\",\n\t \t\"prenom\" => \"Vincent\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\n\t Enseignant::create([\n\t \t\"nom\" => \"MARFISI\",\n\t \t\"prenom\" => \"Iza\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\n\t Enseignant::create([\n\t \t\"nom\" => \"NGOUAGNA\",\n\t \t\"prenom\" => \"Merlin\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\n\t Enseignant::create([\n\t \t\"nom\" => \"BARRE\",\n\t \t\"prenom\" => \"Vincent\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\n\t Enseignant::create([\n\t \t\"nom\" => \"CORBIERE\",\n\t \t\"prenom\" => \"Alain\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\t \n\t Enseignant::create([\n\t \t\"nom\" => \"KIEFFER BEN MERZOUGA\",\n\t \t\"prenom\" => \"Jean-Jacques\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\n\t Enseignant::create([\n\t \t\"nom\" => \"MEGHIRBI\",\n\t \t\"prenom\" => \"Cyril\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\n\t Enseignant::create([\n\t \t\"nom\" => \"HAMON\",\n\t \t\"prenom\" => \"Ludovic\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\n\t Enseignant::create([\n\t \t\"nom\" => \"BROCHARD\",\n\t \t\"prenom\" => \"Emmanuel\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\n\t Enseignant::create([\n\t \t\"nom\" => \"GEORGE\",\n\t \t\"prenom\" => \"Sébastien\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\n\t Enseignant::create([\n\t \t\"nom\" => \"LAFORCADE\",\n\t \t\"prenom\" => \"Pierre\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\n\t Enseignant::create([\n\t \t\"nom\" => \"LOISEAU\",\n\t \t\"prenom\" => \"Esteban\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\n\t Enseignant::create([\n\t \t\"nom\" => \"LOUP\",\n\t \t\"prenom\" => \"Guillaume\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\n\t Enseignant::create([\n\t \t\"nom\" => \"KAROUI\",\n\t \t\"prenom\" => \"Aous\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\n\t Enseignant::create([\n\t \t\"nom\" => \"OUBAHSSI\",\n\t \t\"prenom\" => \"Lahcen\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\n\t Enseignant::create([\n\t \t\"nom\" => \"WALKOWIAK\",\n\t \t\"prenom\" => \"Yann\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\n\t Enseignant::create([\n\t \t\"nom\" => \"LUCAS\",\n\t \t\"prenom\" => \"Cécile\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\n\t Enseignant::create([\n\t \t\"nom\" => \"DUMONT\",\n\t \t\"prenom\" => \"Jonathan\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\n\t Enseignant::create([\n\t \t\"nom\" => \"KOUMTANI\",\n\t \t\"prenom\" => \"Mohamed\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\n\t Enseignant::create([\n\t \t\"nom\" => \"JALLAIS\",\n\t \t\"prenom\" => \"Simon\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\n\t Enseignant::create([\n\t \t\"nom\" => \"VIEILLARD\",\n\t \t\"prenom\" => \"Nathalie\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\n\t Enseignant::create([\n\t \t\"nom\" => \"FOUCAULT\",\n\t \t\"prenom\" => \"Adeline\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\n\t Enseignant::create([\n\t \t\"nom\" => \"LESTEVEN\",\n\t \t\"prenom\" => \"Jerome\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\n\t Enseignant::create([\n\t \t\"nom\" => \"CADITAZI\",\n\t \t\"prenom\" => \"Tawfiq\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\n\t Enseignant::create([\n\t \t\"nom\" => \"PIAU-TOFFOLON\",\n\t \t\"prenom\" => \"Claudine\",\n\t \t\"statut\" => \"PERMANENT\",\n\t \t\"departement_id\" => 1\n\t ]);\n\t }", "public function run()\n {\n $estado=new Estado();\n $estado->estado='Aguscalientes';\n $estado->abreviacion='Ags';\n $estado->save();\n\n $estado=new Estado();\n $estado->estado='Baja California';\n $estado->abreviacion='BC';\n $estado->save();\n\n $estado=new Estado();\n $estado->estado='Baja California Sur';\n $estado->abreviacion='BCS';\n $estado->save();\n }", "public function run()\n {\n\n $detail = new Detail();\n $detail->name = 'Sin Gestion';\n $detail->status_id = 1;\n $detail->save();\n\n // Potencial Cliente = 1\n\n $detail = new Detail();\n $detail->name = 'En Gestion';\n $detail->status_id = 1;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'Positivo con Correo';\n $detail->status_id = 1;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'Positivo sin Correo';\n $detail->status_id = 1;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'No Contesta';\n $detail->status_id = 1;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'Solicitud de Muestras';\n $detail->status_id = 1;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'Agregado';\n $detail->status_id = 1;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'Correo por Confirmar';\n $detail->status_id = 1;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'Devuelto';\n $detail->status_id = 1;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'Envia lista de Precio';\n $detail->status_id = 1;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'Envio de Catalogo';\n $detail->status_id = 1;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'Futuros Productos';\n $detail->status_id = 1;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'Posible';\n $detail->status_id = 1;\n $detail->save();\n\n\n\n // Muestras = 2\n\n\n $detail = new Detail();\n $detail->name = 'Sin Contactar';\n $detail->status_id = 2;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'Por Concretar Venta';\n $detail->status_id = 2;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'En Seguimiento';\n $detail->status_id = 2;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'Muestras';\n $detail->status_id = 2;\n $detail->save();\n\n // Rechazos = 3\n $detail = new Detail();\n $detail->name = 'Usan Tomates Naturales';\n $detail->status_id = 3;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'Precio';\n $detail->status_id = 3;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'Usan Salsa para Pizza';\n $detail->status_id = 3;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'Usan Concentrado';\n $detail->status_id = 3;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'Usan otro Producto';\n $detail->status_id = 3;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'Presetacion';\n $detail->status_id = 3;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'Rechazado';\n $detail->status_id = 3;\n $detail->save();\n\n\n // Clientes Activos = 4\n\n $detail = new Detail();\n $detail->name = 'Baja';\n $detail->status_id = 4;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'Promesa de Compra';\n $detail->status_id = 4;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'Venta';\n $detail->status_id = 4;\n $detail->save();\n\n\n // Bajas = 5\n\n\n $detail = new Detail();\n $detail->name = 'Precio';\n $detail->status_id = 5;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'Motivos Administrativos';\n $detail->status_id = 5;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'Falta de Seguimiento';\n $detail->status_id = 5;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'Calidad del Producto';\n $detail->status_id = 5;\n $detail->save();\n\n $detail = new Detail();\n $detail->name = 'Otros';\n $detail->status_id = 5;\n $detail->save();\n\n }", "public function indexHistorialEstudiante()\n { \n $username = $this->getRequest()->getSession()->read('id'); //obtiene el nombre de usuario actualmente logueado\n \n /*Inicia seguridad*/\n $seguridad = $this->loadModel('Seguridad');\n $carne = $this->request->getSession()->read('id');\n $rolActual = $seguridad->getRol($carne);\n if ($carne != ''){\n $resultado = $seguridad->getPermiso($carne,13);\n if($resultado != 1 || $rolActual != 4){\n return $this->redirect(['controller' => 'Inicio','action' => 'fail']);\n }\n }\n else{\n return $this->redirect(['controller' => 'Inicio','action' => 'fail']);\n\n }\n /*Cierra la seguridad*/\n \n $idActual = $this->Solicitudes->getIDUsuario($username); //obtiene el id de usuario actualmente logueado\n \n $todo = $this->Solicitudes->getIndexValuesEstudiante($idActual[0][0]); //carga el index con todas las solicitudes del estudiante actualmente logueado \n \n \n $this->paginate = [\n 'contain' => ['Usuarios', 'Grupos']\n ];\n $estado = $this->get_estado_ronda();\n $this->set(compact('todo','estado'));\n $this->set('rolActual',$rolActual);\n }", "public function show(Estados $estados)\n {\n \n }", "public function run()\n {\n DB::table('seguirs')->insert([\n 'cant_monedas' => 5,\n 'created_at' => now(),\n ]);\n // tiendas seguidas por clientes\n DB::table('seguir_tiendas')->insert([\n 'id_cliente' => 1,\n 'id_tienda' => 1,\n 'id_seguir' => 1,\n 'created_at' => now(),\n ]);\n DB::table('seguir_tiendas')->insert([\n 'id_cliente' => 1,\n 'id_tienda' => 2,\n 'id_seguir' => 1,\n 'created_at' => now(),\n ]);\n DB::table('seguir_tiendas')->insert([\n 'id_cliente' => 2,\n 'id_tienda' => 1,\n 'id_seguir' => 1,\n 'created_at' => now(),\n ]);\n DB::table('seguir_tiendas')->insert([\n 'id_cliente' => 3,\n 'id_tienda' => 3,\n 'id_seguir' => 1,\n 'created_at' => now(),\n ]);\n DB::table('seguir_tiendas')->insert([\n 'id_cliente' => 3,\n 'id_tienda' => 2,\n 'id_seguir' => 1,\n 'created_at' => now(),\n ]);\n }", "public function listeSoutenances()\n {\n $result = $this->Theses->find('all')->toArray();\n return $result;\n }", "public function Detalle()\n {\n $this->vista = 2;\n //formeamos las fechas de inicio y fin\n $fi = Carbon::parse($this->fecha_ini)->format('Y-m-d').' 00:00:00';\n $ff = Carbon::parse($this->fecha_fin)->format('Y-m-d').' 23:59:59';\n //si no se selecciono ningin paciente emitimos un mensaje de error;\n if($this->pacienteselected == 0)\n\t\t{\n $this->emit('msg-error', 'Seleccione un paciente');\n }else {\n //buscamos al paciente\n $paciente = Paciente::where('id',$this->pacienteselected)->get();\n //iteramos para asignar a las variables declaradas\n foreach ($paciente as $p) {\n $this->nombre = $p->name.' '.$p->last_name;\n $this->ci = $p->nro_ci;\n $this->edad = Carbon::parse($p->date_nac)->age;\n }\t\n //buscamos las solicitudes del paciente en dichas fechas\n $this->solicitudes = Solicitud::where('pacient',$this->pacienteselected)->whereBetween('created_at',[$fi,$ff])->get();\n //Sacamos el total de ingresos por pacient\n $this->total = Solicitud::where('pacient',$this->pacienteselected)->whereBetween('created_at',[$fi,$ff])->sum('pago');\n //sacamos la solicitud y su detalle agrupando por id solicitud, nombre de examen, precio\n $this->detalleSolicitud = Solicitud::with([\"solicitud_details\" => function($q){\n $q->leftjoin('examenes','examenes.id','solicitud_details.exam');\n $q->select('solicitud_details.solicitud','examenes.name','solicitud_details.price');\n $q->groupBy('solicitud_details.solicitud','examenes.name','solicitud_details.price');\n }])->where('pacient',$this->pacienteselected)\n ->whereBetween('solicitudes.created_at',[$fi,$ff])\n ->get();\n \n }\n }", "public function listaVisitantes(){\n \n }", "public function admin_index() {\r\n \r\n $sucursales = $this->Sucursal->find(\"all\");\r\n $this->set(compact('sucursales'));\r\n \r\n }", "private static function Estante()\n {\n //Obtenemos los valores por metodo post\n $fila = $_POST[\"sala\"];\n $topo = $_POST[\"sala_fila\"];\n\n $con = mysqli_connect('localhost', 'root', '', 'bd_documentacion');\n\n if (! $con) {\n die('Error no se pudo conectar : '.mysqli_error($con));\n }\n\n mysqli_select_db($con, \"ajax_demo\");\n $a = \"<h4 class=\\\"card-title\\\" id=\\\"caraA\\\"> \n <a onclick=\\\"addestan('caraA', \".$topo.\");\\\"> \n <span class=\\\" btn btn-primary\\\" ><i class=\\\"icon-plus\\\"> Agregar estante </i></span>\n </a> \n </h4>\";\n\n $topo1 = $topo + 1;\n\n $b = \"<h4 class=\\\"card-title\\\" id=\\\"carab\\\">\n <a onclick=\\\"addestan('carab',\".$topo1.\");\\\"> \n <span class=\\\" btn btn-primary\\\" ><i class=\\\"icon-plus\\\"> Agregar estante </i></span>\n </a> \n </h4>\";\n\n /* $sql=\"SELECT sala_fila. ,fila_estante.Estante_idEstante FROM fila_estante WHERE fila_estante.sala_fila_idsala_fila=\".$fila;\n $con->set_charset(\"utf8\");\n $result2 = mysqli_query($con,$sql);\n\n while($row1 = mysqli_fetch_array($result2)) {\n\n $idestante=$row1[\"Cara_Estante_idCara_Estante\"];\n */\n $sql = \"SELECT fila_estante.idfila_estante, estante.idEstante, estante.Nombre FROM fila_estante LEFT JOIN estante ON fila_estante.Estante_idEstante = estante.idEstante WHERE fila_estante.sala_fila_idsala_fila=\".$topo;\n $con->set_charset(\"utf8\");\n $result = mysqli_query($con, $sql);\n\n while ($row = mysqli_fetch_array($result)) {\n\n $Nombre = $row['Nombre'];\n $fila_estante = $row['idfila_estante'];\n if ($Nombre == \"\") {\n\n } else {\n $a .= ' \n <div class=\"col-lg-3 col-md-6 col-sm-6 animated fadeIn\">\n <div class=\"card card-stats\">\n <div class=\"card-header\" data-background-color=\"blue\">\n <span style=\"font-size: 8px\"><i class=\"icon-tags\"></i></span>\n </div>\n <br>\n <br>\n <div class=\"card-content\">\n <p class=\"category\"></p>\n <h6 class=\"card-title\">'.$Nombre.'</h6>\n </div>\n <div class=\"card-footer\">\n <button type=\"button\"\n onclick=\"showbaldas('.$fila_estante.')\"\n rel=\"tooltip\" title=\"Ver Baldas\"\n class=\"btn btn-primary btn-simple btn-xs hvr-bounce-in hvr-radial-out \">\n <span style=\"font-size: 10px\"><i class=\"icon-table\"></i> ver Baldas</span>\n </button>\n </div>\n </div>\n </div>\n </div>';\n }\n }\n\n $selecet = \"SELECT fila_estante.idfila_estante, estante.idEstante, estante.Nombre FROM fila_estante LEFT JOIN estante ON fila_estante.Estante_idEstante = estante.idEstante WHERE fila_estante.sala_fila_idsala_fila=\".$topo1;\n\n $con->set_charset(\"utf8\");\n $estantes = mysqli_query($con, $selecet);\n\n while ($row2 = mysqli_fetch_array($estantes)) {\n $Nombre = $row2['Nombre'];\n $fila_estante = $row2['idfila_estante'];\n if ($Nombre == \"\") {\n\n } else {\n $b .= '\n <div class=\"col-lg-3 col-md-6 col-sm-6 animated fadeIn\">\n <div class=\"card card-stats\">\n <div class=\"card-header\" data-background-color=\"blue\">\n <span style=\"font-size: 8px\"><i class=\"icon-tags\"></i></span>\n </div>\n <br>\n <br>\n <div class=\"card-content\">\n <p class=\"category\"></p>\n <h6 class=\"card-title\">'.$Nombre.'</h6>\n </div>\n <div class=\"card-footer\">\n <button type=\"button\"\n onclick=\"showbaldas('.$fila_estante.')\"\n rel=\"tooltip\" title=\"Ver Baldas\"\n class=\"btn btn-primary btn-simple btn-xs hvr-bounce-in hvr-radial-out \">\n <span style=\"font-size: 10px\"><i class=\"icon-table\"></i> ver Baldas</span>\n </button>\n </div>\n </div>\n </div>\n </div>';\n }\n }\n\n $arr = [\"0\" => $a, \"1\" => $b];\n\n /*\n }*/\n mysqli_close($con);\n\n echo json_encode($arr);\n }", "public function tratarDados(){\r\n\t\r\n\t\r\n }", "public function run()\n {\n $est = new Estado();\n $est->nombre = 'Activo';\n $est->save();\n\n $est = new Estado();\n $est->nombre = 'Retirado';\n $est->save();\n\n $est = new Estado();\n $est->nombre = 'Graduado';\n $est->save();\n\n }", "public function show(Estudiante $estudiante)\n {\n //\n }", "function sobreMeSalvar() {\n \n $usuario = new Estado_pessoal();\n $api = new ApiUsuario();\n $usuario->codgusuario = $_SESSION['unia']->codgusario;\n $this->dados = $api->Listar_detalhe_usuario($usuario);\n if (empty($this->dados->codgusuario) && $this->dados->codgusuario == NULL) {\n \n $this->dados = array('dados'=>$api->Insert_sobreMe(new Estado_pessoal ('POST')) );\n header(\"Location:\" .APP_ADMIN.'usuario/detalhe_usuario');\n } else {\n $this->dados = array('dados'=>$api->Actualizar_sobreMe(new Estado_pessoal ('POST')) );\n header(\"Location:\" .APP_ADMIN.'usuario/detalhe_usuario');\n }\n \n }", "public function index()\n {\n $user = Auth::user();\n $semestres = Semestres::all()->sortByDesc('created_at');\n return view('semestre.index', compact('semestres', 'user'));\n }", "function superAdministration() \n {\n echo \"<div class='newFahrt'>\";\n \n $this->eventNavigation();\n echo \"<h2>Event Management</h2>\";\n echo \"<p>Hier können Events angelegt und verwaltet werden</p>\";\n\n \n $this->listAllEvents();\n\n if (isset($_SESSION['eventid'])) {\n $this->showManageCountdowns($_SESSION['eventid']);\n $this->showInviteCodes($_SESSION['eventid']);\n $this->showEventMembers($_SESSION['eventid']);\n }\n echo \"</div>\"; // newFahrt END\n }", "public function show(SalleDemandeSalle $salleDemandeSalle)\n {\n //\n }", "public function salidaAction()\n {\n \n }", "public function index() {\n $se = new Service();\n $user_id = $_SESSION['current_user_id'];\n $userStocks = $se->getSaldosByUserId($user_id);\n $firm_names = array();\n $stocks = array();\n foreach($userStocks as $user_stock) {\n //da bi u view-u imali imena firmi jer je to prirodnije za pokazat\n //ovdje spremam u polje p[stock_id]=ime_firme\n $firm = $se->getFirmsById($user_stock->firm_id);\n $firm_names[$user_stock->firm_id] = $firm->name;\n if($user_stock->total_amount > 0){\n $stocks[] = $user_stock;\n }\n }\n $this->registry->template->userStocks = $stocks;\n $this->registry->template->firm_names = $firm_names;\n $this->registry->template->show('saldos_index');\n }", "function eventclass_staff_info()\n\t{\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\n//\tonscreen events\n\n\n\t}", "public function index()\n {\n $count_estudiante = Estudiante::select('id')->count();\n $count_coord = User::where('rol_id','2')->select('id')->count();\n $count_dir = User::where('rol_id','2')->select('id')->count();\n $count_asis = User::where('rol_id','3')->select('id')->count();\n //dd((Auth::user()->id));\n if(Auth::user()->roles->first()->id == 4){\n $student = Estudiante::where('user_id',Auth::user()->id)->first();\n if($student){\n return redirect()->route('estudiantes.show',$student->id);\n }else{\n return redirect()->route('estudiantes.create');\n }\n\n }else{\n return view('home', compact('count_estudiante','count_coord','count_asis','count_dir'));\n }\n\n }", "public function AddFraisHorsForfait()\r\n {\r\n $frais = new Frais();\r\n //Get le mois\r\n $mois = $this->GetMois(date('m'));\r\n //Ajoute a LigneFraisHorsForfait les données suivantes\r\n $frais->AddLigneFraisHorsForfait($_SESSION['uid'],$mois,$_POST['nom'],$_POST['prix'],$_POST['date']);\r\n \r\n $this->MainPage();\r\n }", "public function show(EstabelecimentoSaude $estabelecimentoSaude)\n {\n //\n }", "private function ofertas() {\n\t\t$data = date ( 'Y/m/d' );\n\t\t$params = array (\n\t\t\t\t'OffersUser' => array (\n\t\t\t\t\t\t'conditions' => array (\n\t\t\t\t\t\t\t\t'user_id' => $this->Session->read ( 'userData.User.id' ),\n\t\t\t\t\t\t\t\t'Offer.status' => 'ACTIVE',\n\t\t\t\t\t\t\t\t'Offer.begins_at <= ' => $data,\n\t\t\t\t\t\t\t\t'Offer.ends_at >= ' => $data \n\t\t\t\t\t\t) \n\t\t\t\t),\n\t\t\t\t'Offer' \n\t\t);\n\t\t$contador = $this->Utility->urlRequestToGetData ( 'offers', 'count', $params );\n\t\t\n\t\tif ($this->Session->check ( 'ofertasIds' )) {\n\t\t\t$this->Session->write ( 'HomeOfertas', 'desejos' );\n\t\t} else if (! $contador > 0 && ! $this->Session->check ( 'Ofertas-Assinaturas' )) {\n\t\t\t$this->Session->write ( 'HomeOfertas', 'publico' );\n\t\t} else {\n\t\t\t$this->Session->write ( 'HomeOfertas', 'personalizado' );\n\t\t}\n\t}", "public function show(Estudiante $estudiante)\n {\n\n }", "public function run()\n {\n //esto es para que limpie la tabla antes de insertar los registros\n Gestion::truncate();\n\n $gestion = new Gestion;\n $gestion->nombre = \"Rectoría\";\n $gestion->save();\n\n $gestion = new Gestion;\n $gestion->nombre = \"Dirección de Finanzas\";\n $gestion->save();\n\n $gestion = new Gestion;\n $gestion->nombre = \"Dirección Administrativa\";\n $gestion->save();\n\n $gestion = new Gestion;\n $gestion->nombre = \"Dirección Preescolar\";\n $gestion->save();\n\n $gestion = new Gestion;\n $gestion->nombre = \"Dirección Primaria\";\n $gestion->save();\n\n $gestion = new Gestion;\n $gestion->nombre = \"Dirección Secundaria\";\n $gestion->save();\n\n $gestion = new Gestion;\n $gestion->nombre = \"Dirección Bachillerato\";\n $gestion->save();\n\n $gestion = new Gestion;\n $gestion->nombre = \"Dirección Formación Ignaciana\";\n $gestion->save();\n\n $gestion = new Gestion;\n $gestion->nombre = \"Coordinación General Académica\";\n $gestion->save();\n\n $gestion = new Gestion;\n $gestion->nombre = \"Coordinación de Deportes\";\n $gestion->save();\n\n $gestion = new Gestion;\n $gestion->nombre = \"Coordinación de Comunicación\";\n $gestion->save();\n\n $gestion = new Gestion;\n $gestion->nombre = \"Coordinación de Idiomas\";\n $gestion->save();\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $stades = $em->getRepository('AppBundle:Stade')->findAll();\n\n return $this->render('stade/index.html.twig', array(\n 'stades' => $stades,\n ));\n }", "function liste_evenements($id_agenda, $T_debut_periode, $T_fin_periode, $journee_order_by=true, $type_sortie=\"lecture\")\r\n{\r\n\t////\tPériode simple : début dans la période || fin dans la période || debut < periode < fin\r\n\t$date_debut\t\t= strftime(\"%Y-%m-%d %H:%M:00\", $T_debut_periode);\r\n\t$date_fin\t\t= strftime(\"%Y-%m-%d %H:%M:59\", $T_fin_periode);\r\n\t$sql_periode\t= \"((T1.date_debut between '\".$date_debut.\"' and '\".$date_fin.\"') OR (T1.date_fin between '\".$date_debut.\"' and '\".$date_fin.\"') OR (T1.date_debut < '\".$date_debut.\"' and T1.date_fin > '\".$date_fin.\"'))\";\r\n\t////\tPériodicité des événements : type périodicité spécifié && debut déjà commencé && fin pas spécifié/arrivé && date pas dans les exceptions && périodicité jour/semaine/mois/annee\r\n\t$period_date_fin = strftime(\"%Y-%m-%d\", $T_fin_periode);\r\n\t$date_ymd\t\t= strftime(\"%Y-%m-%d\", $T_debut_periode);\r\n\t$jour_semaine\t= str_replace(\"0\",\"7\",strftime(\"%w\",$T_debut_periode)); // de 1 à 7 (lundi à dimanche)\r\n\t$mois\t\t\t= strftime(\"%m\",$T_debut_periode); // mois de l'annee en numérique => 01 à 12\r\n\t$jour_mois\t\t= strftime(\"%d\",$T_debut_periode); // jour du mois en numérique => 01 à 31\r\n\t$jour_annee\t\t= strftime(\"%m-%d\", $T_debut_periode);\r\n\t$periodicite\t= \"(T1.periodicite_type is not null AND T1.date_debut<'\".$date_debut.\"' AND (T1.period_date_fin is null or '\".$period_date_fin.\"'<=T1.period_date_fin) AND (T1.period_date_exception is null or period_date_exception not like '%\".$date_ymd.\"%') AND ((T1.periodicite_type='jour_semaine' and T1.periodicite_valeurs like '%\".$jour_semaine.\"%') OR (T1.periodicite_type='jour_mois' and T1.periodicite_valeurs like '%\".$jour_mois.\"%') OR (T1.periodicite_type='mois' and T1.periodicite_valeurs like '%\".$mois.\"%' and DATE_FORMAT(T1.date_debut,'%d')='\".$jour_mois.\"') OR (T1.periodicite_type='annee' and DATE_FORMAT(T1.date_debut,'%m-%d')='\".$jour_annee.\"')))\";\r\n\t////\tRécupère la liste des evenements ($order_by_sql==\"heure_debut\" si on récup les évenements d'1 jour, pour pouvoir bien intégrer les evenements récurents)\r\n\t$order_by_sql = ($journee_order_by==true) ? \"DATE_FORMAT(T1.date_debut,'%H')\" : \"T1.date_debut\";\r\n\t$liste_evenements_tmp = db_tableau(\"SELECT T1.* FROM gt_agenda_evenement T1, gt_agenda_jointure_evenement T2 WHERE T1.id_evenement=T2.id_evenement AND T2.id_agenda='\".intval($id_agenda).\")' AND T2.confirme='1' AND (\".$sql_periode.\" OR \".$periodicite.\") ORDER BY \".$order_by_sql.\" asc\");\r\n\r\n\t////\tCree le tableau de sortie (en ajoutant le droit d'accès, masquant les libellés si besoin, etc.)\r\n\tglobal $objet;\r\n\t$liste_evenements = array();\r\n\tforeach($liste_evenements_tmp as $key_evt => $evt_tmp)\r\n\t{\r\n\t\t$droit_acces = droit_acces($objet[\"evenement\"], $evt_tmp, false);\r\n\t\tif($type_sortie==\"tout\" || ($type_sortie==\"lecture\" && $droit_acces>0))\r\n\t\t{\r\n\t\t\t// Ajoute l'evenement au tableau de sortie avec son droit d'accès\r\n\t\t\t$liste_evenements[$key_evt] = $evt_tmp;\r\n\t\t\t$liste_evenements[$key_evt][\"droit_acces\"] = $droit_acces;\r\n\t\t\t// masque les détails si besoin : \"evt public mais détails masqués\"\r\n\t\t\tif($type_sortie==\"lecture\") $liste_evenements[$key_evt] = masque_details_evt($liste_evenements[$key_evt]);\r\n\t\t}\r\n\t}\r\n\treturn $liste_evenements;\r\n}", "public function store(Request $request)\n {\n\n $difdayin = Carbon::parse($request->fecha_desde);\n $difdayout = Carbon::parse($request->fecha_hasta);\n\n if($request->fecha_hasta == NULL ){\n $lista = semestre::where('fecha_ini', '<=',$difdayin)->where('fecha_term','>=',$difdayin)->first();\n\n\n }else{\n $lista = semestre::where('fecha_ini', '<=',$difdayin)\n ->where('fecha_term','>=',$difdayout)->first();\n }\n\n\n if(!$lista){\n\n return back()->with('info','Semestre no esta creado, revise la fechas ingresadas')->withInput();\n }\n\n\n if($request->fecha_hasta === null){\n $options = [\n 'rut' => $request->rut,\n 'detalle' => $request->detalle,\n 'fecha_desde' => $difdayin,\n 'fecha_hasta' => $difdayout,\n 'reemplazo' => $request->reemplazo,\n 'cantidad_dias' => '1',\n 'semestre' => $lista->name,\n 'ss' => $request->ss\n ];\n $request->cantidad_dias = '1';\n }else{\n $options = [\n 'rut' => $request->rut,\n 'detalle' => $request->detalle,\n 'fecha_desde' => $difdayin,\n 'fecha_hasta' => $difdayout,\n 'reemplazo' => $request->reemplazo,\n 'cantidad_dias' => $difdayin->diffInWeekdays($difdayout)+1,\n 'semestre' => $lista->name,\n 'ss' => $request->ss\n ];\n $request->cantidad_dias = $difdayin->diffInWeekdays($difdayout)+1;\n }\n\n\n\n if(RecordSolicitud::create($options )){\n //Busco el usuario con rol de director para enviar el correo con\n //las solicitud de permiso\n $dire_email = User::whereHas(\"roles\", function($q){ $q->where(\"name\", \"Director\"); })->get('email');\n\n\n\n Mail::to($dire_email)\n ->cc(auth()->user()->email)\n ->send(new SendMessage($request));\n\n\n return redirect('/solicitud')\n ->with('info','Solicitud creada con exito ');\n\n }else{\n return view('pages.new_solicitud');\n\n }\n\n }", "public function cambioEstado($servicios) {\n $hoy = getdate();\n $fecha = $hoy['year'] . '-' . $hoy['mon'] . '-' . $hoy['mday'] . ' ' . $hoy['hours'] . ':' . $hoy['minutes'] . ':' . $hoy['seconds'];\n $fecha = strtotime($fecha);\n $servicios_por_recoger = collect([]);\n if (count($servicios) > 0) {\n foreach ($servicios as $item) {\n $fecha_servicio = strtotime($item->fechafin);\n if ($fecha >= $fecha_servicio) {\n if ($item->estado == 'ENTREGADO') {\n $item->estado = \"RECOGER\";\n $item->save();\n }\n\n $horas = abs(($fecha - strtotime($item->fechafin)) / 3600);\n $operacion = $horas / 24;\n $dia = floor($operacion);\n $operacion = ($operacion - $dia) * 24;\n $horas = floor($operacion);\n $operacion = ($operacion - $horas) * 60;\n $minutos = floor($operacion);\n $str = '';\n if ($dia > 0) {\n $str = '<strong>' . $dia . '</strong> Dia(s) </br>';\n }\n\n if ($horas > 0) {\n $str .= '<strong>' . $horas . '</strong> Hora(s)</br>';\n }\n if ($minutos > 0) {\n $str .= '<strong>' . $minutos . '</strong> Minuto(s)</br>';\n }\n\n $item->tiempo = $str;\n\n $servicios_por_recoger[] = $item;\n } elseif ($item->estado == \"RECOGER\") {\n// $horas = abs(($fecha - strtotime($item->fechafin)) / 3600);\n// $minutos = '0.' . explode(\".\", $horas)[1];\n// $horas = floor($horas);\n// $minutos = floor($minutos * 60);\n $item->tiempo = \"Tiene permiso para recoger antes de tiempo\";\n $servicios_por_recoger[] = $item;\n }\n }\n }\n return $servicios_por_recoger;\n }", "public function index()\n {\n //\n return EstabelecimentoSaudeResource::collection(EstabelecimentoSaude::get());\n }", "public function index()\n {\n $sedes = \\App\\Sede::All(); //Variable que relaciona con el modelo, trae todo por el ::All\n return view('sede.index', compact('sedes'));\n }", "public function index()\n {\n // $tahunajaran = TahunAjaran::where('status', true)->first();\n // $tglSekarang = Carbon::now(); \n // if ($tahunajaran->tgl_start < $tahunajaran->tgl_end) {\n // $siswas = Siswa::all()\n // foreach ($siswas as $siswa) {\n // Siswa::where('id', $siswa->id)->update([\n // 'kelas_sekarang' => $kelas->id\n // ])\n // }\n // }\n return view('home');\n }", "public function run()\n {\n DB::table('semestres')->insert([\n 'rotulo' => '2018/1',\n 'inicio' => Carbon::create('2018', '03', '12'),\n 'fim' => Carbon::create('2018', '07', '21')\n ]);\n\n DB::table('semestres')->insert([\n 'rotulo' => '2018/2',\n 'inicio' => Carbon::create('2018', '08', '13'),\n 'fim' => Carbon::create('2018', '12', '22')\n ]);\n\n // $Semestre = new Semestre();\n // $Semestre->rotulo = '2018/1';\n // $Semestre->inicio = Carbon::create('2018', '03', '12');\n // $Semestre->fim = Carbon::create('2018', '07', '21');\n // $Semestre->save();\n }", "public function run()\n {\n //Lista de subastas para poder mostrar\n\n //Subasta para inscribirse en BERA. En periodo de inscripcion\n DB::table('subastas')->insert([\n \t'id' => '1',\n \t'monto_base' => '14000',\n 'id_hospedaje' => '1',\n 'fecha_inicio' => '2020-06-15',\n 'fecha_fin' => '2020-06-21',\n 'fecha_inicio_inscripcion' => '2019-06-15',\n 'fecha_inicio_subasta' => '2019-12-12',\n 'fecha_fin_subasta' => '2019-12-15',\n ]);\n\n //Para mostrar que al cerrar la subasta igual no se puede modificar en LA PLATA\n DB::table('subastas')->insert([\n 'id' => '2',\n 'monto_base' => '15000',\n 'id_hospedaje' => '2',\n 'fecha_inicio' => '2019-12-16',\n 'fecha_fin' => '2019-12-22',\n 'fecha_inicio_inscripcion' => '2018-12-16',\n 'fecha_inicio_subasta' => '2019-06-13',\n 'fecha_fin_subasta' => '2019-06-16',\n ]);\n\n\n //La subasta 3 y 4 son para mostrar que no puede ganar en la misma semana EN LA PLATA\n DB::table('subastas')->insert([\n 'id' => '3',\n 'monto_base' => '12000',\n 'id_hospedaje' => '2',\n 'fecha_inicio' => '2019-12-09',\n 'fecha_fin' => '2019-12-15',\n 'fecha_inicio_inscripcion' => '2018-12-09',\n 'fecha_inicio_subasta' => '2019-06-06',\n 'fecha_fin_subasta' => '2019-06-09',\n ]);\n\n //EN BERA\n DB::table('subastas')->insert([\n 'id' => '4',\n 'monto_base' => '20000',\n 'id_hospedaje' => '1',\n 'fecha_inicio' => '2019-12-09',\n 'fecha_fin' => '2019-12-15',\n 'fecha_inicio_inscripcion' => '2018-12-09',\n 'fecha_inicio_subasta' => '2019-06-06',\n 'fecha_fin_subasta' => '2019-06-09',\n ]);\n\n\n //Para mostrar que aunque haya pujador puede no haber ganador EN QUILMES\n DB::table('subastas')->insert([\n 'id' => '5',\n 'monto_base' => '6000',\n 'id_hospedaje' => '3',\n 'fecha_inicio' => '2019-12-09',\n 'fecha_fin' => '2019-12-15',\n 'fecha_inicio_inscripcion' => '2018-12-09',\n 'fecha_inicio_subasta' => '2019-06-06',\n 'fecha_fin_subasta' => '2019-06-09',\n ]);\n\n\n //Para poder pujar y mostrar que se muestra en el perfil EN QUILMES\n DB::table('subastas')->insert([\n 'id' => '6',\n 'monto_base' => '5000',\n 'id_hospedaje' => '3',\n 'fecha_inicio' => '2019-12-23',\n 'fecha_fin' => '2019-12-29',\n 'fecha_inicio_inscripcion' => '2018-12-23',\n 'fecha_inicio_subasta' => '2019-06-20',\n 'fecha_fin_subasta' => '2019-06-23',\n ]);\n\n\n //Para poder mostrar que se puede pujar el monto base EN LA PLATA\n DB::table('subastas')->insert([\n 'id' => '7',\n 'monto_base' => '24000',\n 'id_hospedaje' => '2',\n 'fecha_inicio' => '2019-12-23',//ENTRADA\n 'fecha_fin' => '2019-12-29',//SALIDA\n 'fecha_inicio_inscripcion' => '2018-12-23',//INSCRIPCION\n 'fecha_inicio_subasta' => '2019-06-20',//SUBASTA\n 'fecha_fin_subasta' => '2019-06-23',\n ]);\n\n //En periodo de puja 15/07 hasta 18/07. En Bera\n DB::table('subastas')->insert([\n 'id' => '8',\n 'monto_base' => '20000',\n 'id_hospedaje' => '1',\n 'fecha_inicio' => '2020-01-20',//ENTRADA\n 'fecha_fin' => '2020-01-27',//SALIDA\n 'fecha_inicio_inscripcion' => '2019-01-20',//INSCRIPCION\n 'fecha_inicio_subasta' => '2019-07-17',//SUBASTA\n 'fecha_fin_subasta' => '2019-07-20',\n ]);\n\n //Subasta para inscribirse en BERA. En periodo de inscripcion\n DB::table('subastas')->insert([\n \t'id' => '9',\n \t'monto_base' => '19000',\n 'id_hospedaje' => '3',\n 'fecha_inicio' => '2020-03-15',\n 'fecha_fin' => '2020-03-21',\n 'fecha_inicio_inscripcion' => '2019-03-15',\n 'fecha_inicio_subasta' => '2019-09-12',\n 'fecha_fin_subasta' => '2019-09-15',\n ]);\n\n\n }", "public function obtenerViajesplus();", "public function run()\n {\n DB::table('statuss')->insert([\n 'name' => 'Vendido',\n // 'shop_id' => 1,\n 'created_at' => '2019-01-01 16:00:00',\n 'updated_at' => '2019-01-01 16:00:00',\n ]);\n DB::table('statuss')->insert([\n 'name' => 'Existente',\n // 'shop_id' => 1,\n 'created_at' => '2019-01-01 16:00:00',\n 'updated_at' => '2019-01-01 16:00:00',\n ]);\n DB::table('statuss')->insert([\n 'name' => 'Traspaso',\n // 'shop_id' => 1,\n 'created_at' => '2019-01-01 16:00:00',\n 'updated_at' => '2019-01-01 16:00:00',\n ]);\n DB::table('statuss')->insert([\n 'name' => 'Dañado',\n // 'shop_id' => 1,\n 'created_at' => '2019-01-01 16:00:00',\n 'updated_at' => '2019-01-01 16:00:00',\n ]);\n DB::table('statuss')->insert([\n 'name' => 'Faltante',\n 'created_at' => '2019-01-01 16:00:00',\n 'updated_at' => '2019-01-01 16:00:00',\n ]);\n }", "public function activeStaff()\n {\n $staffList = Staff::select('staff_id','staff_no', 'staff_name', 'staff_dob', 'staff_mobile_work', 'staff_mobile_private', 'staff_email_private', 'staff_id_no', 'staff_join_date', 'staff_wenxin_work')\n ->where('staff_status', '=', '1')\n ->get();\n\n //get total active staff count\n $staffCount = Staff::count();\n\n //get department list\n $departments = Department::all();\n\n //get maxId of departments for front end to list all the depart (for loop)\n $departmentsMaxId = Department::all()->max('id');\n\n //get all the positions\n $positions = Position::all();\n\n //get maxId of positions for the front end to list all the position (for loop)\n $positionsMaxId = Position::all()->max('id');\n\n //get list of managers which staff is greater than 0\n $managers = Staff::where('staff_level', \">\", 0)->get();\n\n //display the page\n return view('admin/hr/index', ['departments' => $departments, 'departmentsMaxId' => $departmentsMaxId, 'positions' => $positions, 'positionsMaxId' => $positionsMaxId, 'managers' => $managers, 'staffList' => $staffList, 'staffCount' => $staffCount]);\n }", "public function show(Estaciones $estaciones)\n {\n //\n }", "public function bestellenAction()\r\n {\r\n $user=$this->getServiceLocator()->get('AuthService')->getStorage()->read();\r\n var_dump($user);\r\n echo \"<br>\";\r\n echo $user['Name'];\r\n echo $user['Rolle'];\r\n $veranstalter = $this->getUserMapper()->getUserobject($user['Rolle'], $user['Name']);\r\n echo \"<br>\";\r\n //†berprŸfen ob der user auch ein Veranstalter ist\r\n if($user['Rolle'] != \"ve\")\r\n {\r\n $this->flashMessenger()->addMessage('Nur Veranstaltern ist es erlaubt die Artikel aus dem Warenbuch verbindlich zu bestellen');\r\n // Redirect to list of tasks\r\n return $this->redirect()->toRoute('shop', array('action' => 'index'));\r\n }\r\n \r\n //€ndern des Status von 0(Warenkorb) auf 1(Bestellungen)\r\n //Finaler Preis wird durch den Betreiber bestimmt und erst dann gann gebucht werden\r\n $mapper = $this->getBestellungMapper();\r\n $mapper->bestellen($veranstalter->getId());\r\n \r\n $artikel = $this->getShopMapper();\r\n \r\n $this->flashMessenger()->addMessage('Bestellung wurde erfolgreich abgeschickt. Die genauen Preise werden ihnen per E-Mailvom Betreiber mitgeteilt');\r\n \r\n \r\n return $this->redirect()->toRoute('shop', array(\r\n 'action' => 'bestellungen', 'artikel' => $artikel ,'bestellungen' => $mapper->fetchBestellungen($veranstalter->getId()\r\n )));\r\n }", "public function run()\n {\n $pais = new Paise();\n $pais->nombre = \"Argentina\";\n $pais->nombreCorto = \"ARG\";\n $pais->capital = \"Buenos Aires\";\n $pais->nacionalidad = \"Argentina\";\n $pais->idiomas = \"Espaniol\";\n $pais->save();\n\n $persona = new Persona();\n $persona->documento = rand(1,100);\n $persona->nombre = \"Tomas\";\n $persona->direccion = \"Mitre 323\";\n $persona->foto = \"acaHayUnaFoto\";\n $persona->save();\n\n $empleado = new Empleado();\n $empleado->cargo = \"supervisor\";\n $empleado->sector = \"Clientes\";\n $empleado->save();\n\n $sectore = new Sectore();\n $sectore->nombreSector = \"Clientes\";\n $sectore->codigoSector = \"111\";\n $sectore->responsableSector = 1;\n $sectore->save();\n\n $cliente = new Cliente();\n $cliente->categoria = \"ORO\";\n $cliente->empleado_id = 1;\n $cliente->numeroPais_id = 1;\n $cliente->save();\n\n $duenio = new Duenio();\n $duenio->numeroPais = \"ARG\";\n $duenio->verificaciónFinanciera = \"si\";\n $duenio->verificaciónJudicial = \"si\";\n $duenio->calificacionRiesgo = 1;\n $duenio->verificador = 1;\n $duenio->save();\n\n $subastador = new Subastadore();\n $subastador->matricula = \"3245432\";\n $subastador->region = \"Sur\";\n $subastador->persona_id = 1;\n $subastador->save();\n\n $subasta = new Subasta();\n $subasta->ubicacion = \"Alvear 239\";\n $subasta->fecha = \"2021-06-07\";\n $subasta->horaInicio = \"10:35\";\n $subasta->horaFin = \"18:25\";\n $subasta->estado = \"abierta\";\n $subasta->capacidadAsistentes = 2;\n $subasta->tieneDeposito = \"si\";\n $subasta->seguridadPropia = \"si\";\n $subasta->categoria = \"comun\";\n $subasta->subastador_id = 1;\n $subasta->save();\n\n $producto = new Producto();\n $producto->fecha = \"2021-06-07\";\n $producto->disponible = \"si\";\n $producto->descripcionCatalogo = \"esto es una descripcion\";\n $producto->descripcionCompleta = \"esto es una descripcion\";\n $producto->cantidad = \"cantidad\";\n $producto->artista_obra = \"artista_obra\";\n $producto->fecha_obra = \"25/06/1956\";\n $producto->historia_obra = \"historia_obra\";\n $producto->revisor_id = 1;\n $producto->duenio_id = 1;\n $producto->save();\n\n $foto = new Foto();\n $foto->foto = \"acaHayUnaFoto\";\n $foto->producto_id = 1;\n $foto->save();\n\n $catalogo = new Catalogo();\n $catalogo->descripcion = \"descripcion\";\n $catalogo->responsable_id = 1;\n $catalogo->subasta_id = 1;\n $catalogo->save();\n\n $itemscatalogo = new ItemsCatalogo();\n $itemscatalogo->precioBase = 45;\n $itemscatalogo->comision = 3;\n $itemscatalogo->subastado = \"si\";\n $itemscatalogo->catalogo_id = 1;\n $itemscatalogo->producto_id = 1;\n $itemscatalogo->save();\n\n $asistente = new Asistente();\n $asistente->numeroPostor = 1;\n $asistente->cliente_id = 1;\n $asistente->subasta_id = 1;\n $asistente->save();\n\n $pujo = new Pujo();\n $pujo->asistente_id = 1;\n $pujo->item_id = 1;\n $pujo->save();\n\n $registrodesubasta = new RegistroDeSubasta();\n $registrodesubasta->importe = 5000;\n $registrodesubasta->comision = 10;\n $registrodesubasta->subasta_id = 1;\n $registrodesubasta->duenio_id = 1;\n $registrodesubasta->producto_id = 1;\n $registrodesubasta->cliente_id = 1;\n $registrodesubasta->save();\n\n // //\\App\\Models\\User::factory()->count(5)->create(); \n // //\\App\\Models\\Persona::factory()->count(5)->create();\n // // \\App\\Models\\Catalogo::factory()->count(5)->create(); \n // // \\App\\Models\\Cliente::factory()->count(5)->create(); \n // // \\App\\Models\\Subasta::factory()->count(5)->create(); \n // // \\App\\Models\\ItemsCatalogo::factory()->count(5)->create();\n }", "public function societeListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Societe\");//type array\n\t}", "public function created(Siswa $siswa)\n {\n //\n }", "function organismes()\n\t{\n\t\tglobal $gCms;\n\t\t$ping = cms_utils::get_module('Ping'); \n\t\t$db = cmsms()->GetDb();\n\t\t$designation = '';\n\t\t$tableau = array('F','Z','L','D');\n\t\t//on instancie la classe servicen\n\t\t$service = new Servicen();\n\t\t$page = \"xml_organisme\";\n\t\tforeach($tableau as $valeur)\n\t\t{\n\t\t\t$var = \"type=\".$valeur;\n\t\t\t//echo $var;\n\t\t\t$scope = $valeur;\n\t\t\t//echo \"la valeur est : \".$valeur;\n\t\t\t$lien = $service->GetLink($page,$var);\n\t\t\t//echo $lien;\n\t\t\t$xml = simplexml_load_string($lien, 'SimpleXMLElement', LIBXML_NOCDATA);\n\t\t\t\n\t\t\tif($xml === FALSE)\n\t\t\t{\n\t\t\t\t$designation.= \"service coupé\";\n\t\t\t\t$now = trim($db->DBTimeStamp(time()), \"'\");\n\t\t\t\t$status = 'Echec';\n\t\t\t\t$action = 'retrieve_ops';\n\t\t\t\tping_admin_ops::ecrirejournal($now,$status,$designation,$action);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$array = json_decode(json_encode((array)$xml), TRUE);\n\t\t\t\t///on initialise un compteur général $i\n\t\t\t\t$i=0;\n\t\t\t\t//on initialise un deuxième compteur\n\t\t\t\t$compteur=0;\n\t\t\t//\tvar_dump($xml);\n\n\t\t\t\t\tforeach($xml as $cle =>$tab)\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t$idorga = (isset($tab->id)?\"$tab->id\":\"\");\n\t\t\t\t\t\t$code = (isset($tab->code)?\"$tab->code\":\"\");\n\t\t\t\t\t\t$libelle = (isset($tab->libelle)?\"$tab->libelle\":\"\");\n\t\t\t\t\t\t// 1- on vérifie si cette épreuve est déjà dans la base\n\t\t\t\t\t\t$query = \"SELECT idorga FROM \".cms_db_prefix().\"module_ping_organismes WHERE idorga = ?\";\n\t\t\t\t\t\t$dbresult = $db->Execute($query, array($idorga));\n\n\t\t\t\t\t\t\tif($dbresult && $dbresult->RecordCount() == 0) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$query = \"INSERT INTO \".cms_db_prefix().\"module_ping_organismes (libelle, idorga, code, scope) VALUES (?, ?, ?, ?)\";\n\t\t\t\t\t\t\t\t//echo $query;\n\t\t\t\t\t\t\t\t$compteur++;\n\t\t\t\t\t\t\t\t$dbresultat = $db->Execute($query,array($libelle,$idorga,$code,$scope));\n\n\t\t\t\t\t\t\t\tif(!$dbresultat)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$designation.= $db->ErrorMsg();\t\t\t\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\n\n\t\t\t\t\t}// fin du foreach\n\n\t\t\t}\n\t\t\tunset($scope);\n\t\t\tunset($var);\n\t\t\tunset($lien);\n\t\t\tunset($xml);\n\t\t\tsleep(1);\n\t\t}//fin du premier foreach\n\t\t\n\n\t\t$designation.= $compteur.\" organisme(s) récupéré(s)\";\n\t\t$now = trim($db->DBTimeStamp(time()), \"'\");\n\t\t$status = 'Ok';\n\t\t$action = 'retrieve_ops';\n\t\tping_admin_ops::ecrirejournal($now,$status,$designation,$action);\n\n\t\t\t\n\t\t\n\t}", "public function getStationsWithSchedules();", "public function run()\n {\n $sexo = new Sexo();\n $sexo->concepto='mujer';\n $sexo->orden=1;\n $sexo->save();\n\n $sexo = new Sexo();\n $sexo->concepto='hombre';\n $sexo->orden=2;\n $sexo->save();\n }", "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 }", "function inscribirEstudiante($estudiante_id,$semestre_id,$dicta_id) {\n //Creamos la evaluacion\n leerClase('Evaluacion');\n $evaluacion = new Evaluacion();\n $evaluacion->estado = Objectbase::STATUS_AC;\n $evaluacion->save();\n \n $this->semestre_id = $semestre_id;\n $this->dicta_id = $dicta_id;\n $this->estudiante_id = $estudiante_id;\n $this->evaluacion_id = $evaluacion->id;\n $this->estado = Objectbase::STATUS_AC;\n $this->save();\n }", "public function newStadeAction()\n\t{\n\t\t$stade = new Stade();\n\t\t$form = $this->createForm(new StadeType(), $stade);\n\t\t\n\t\t$request = $this->get('request');\n\t\tif ($request->getMethod() == 'POST') {\n\t\t\t$form->bind($request);\n\t\t\t\t\n\t\t\tif ($form->isValid()) {\n\t\t\t\t$em = $this->getDoctrine()->getManager();\n\t\t\t\t$em->persist($stade);\n\t\t\t\t$em->flush();\n\t\t\t}\n\t\t\t\t\n\t\t\treturn $this->redirect($this->generateUrl('DFStadeBundle_listeStadeAdmin'));\n\t\t}\n\t\t\n\t\treturn $this->render('DFAdminBundle:Private:form.html.twig', array(\n\t\t\t'form' => $form->createView(),\n\t\t\t'titleCategorie' => 'Stades',\n\t\t\t'title' => 'Ajouter un stade',\n\t\t));\n\t}", "function evt__1__salida()\n\t{\n\t\t$this->dep('dependencias')->limpiar_seleccion();\n\t}", "public function index()\n\t{\n\t\t\t$papeleta= Papeleta::find(1);\n\t\t\t$noPapeleta= $papeleta->papeleta;\n\t\t\t$papeleta->papeleta = $noPapeleta+1;\n\t\t\t$papeleta->save();\n\t\t\t$reservacion = new Reservation;\n\t\t\t$reservacion->papeleta= $noPapeleta;\n\t\t\t$reservacion->tipo = 'RentaAuto';\n\t\t\t$reservacion->estado = 'Activa';\n\t\t\tif ($reservacion->save()) {\n\n\t\t\t$autosrentas = new Autosrenta;\n\t\t\t//\t$autosrentas->papeleta = $noPapeleta;\n\t\t\t//\t$autosrentas->save();\n\t\t\t\treturn Redirect::to('autobuses/edit/'.$noPapeleta);\n\n\t\t\t}else {\n\t\t\t\tSession::flash('message','Ha ocurrido un error!');\n\t\t\t\tSession::flash('class','danger');\n\t\t\t\treturn Redirect::to('consultas');\n\t\t\t}\n\t}", "public function admin_view(){\n\n\n\t\t$dt = new DateTime('now', new DateTimezone('Asia/Dhaka'));\n $today = $dt->format('Y-m-d');\n\t\t////////////////////////// Morning ///////////////////////////////////\n\t\t$morning = array();\n $morning_shift_members_query = \t\"SELECT shift_member \n\t\t\t\t\t\t\t\t\tFROM `daytable` \n\t\t\t\t\t\t\t\t\tJOIN shifttable ON shifttable.shift_id = daytable.shift_id \n\t\t\t\t\t\t\t\t\tWHERE shifttable.shift_date = '\".$today.\"'\";\n\n\t\t$morning_shift_members = \\DB::select(\\DB::raw($morning_shift_members_query));\n\n\t\t$morning_person = \"\";\n\n\t\tforeach ($morning_shift_members as $row) {\n\t\t\t$morning_person .= $row->shift_member.\",\";\n\t\t}\n\n\t\t$morning_person = rtrim($morning_person,\",\");\n\t\t$morning = explode(\",\",$morning_person);\n\t\t$morning_person = \"\";\n\t\tforeach ($morning as $person) {\n\t\t\t$morning_person .= \"'\".$person.\"',\";\n\t\t}\n\t\t$morning_person = rtrim($morning_person,\",\");\n\n\t\t$morning_shift_address_query = \"SELECT * FROM rosterdb.emp_address_table WHERE emp_id IN ($morning_person)\";\n\t\t$morning_address = \\DB::select(\\DB::raw($morning_shift_address_query));\n\t\t////////////////////////////////////////////////////////////////////////\n\n\n\t\t////////////////////////// Evening ///////////////////////////////////\n\t\t$evening = array();\n\n $evening_shift_members_query = \t\"SELECT shift_member \n\t\t\t\t\t\t\t\t\tFROM `eveningtable` \n\t\t\t\t\t\t\t\t\tJOIN shifttable ON shifttable.shift_id = eveningtable.shift_id \n\t\t\t\t\t\t\t\t\tWHERE shifttable.shift_date = '\".$today.\"'\";\n\n\t\t$evening_shift_members = \\DB::select(\\DB::raw($evening_shift_members_query));\n\n\t\t$evening_person = \"\";\n\n\t\tforeach ($evening_shift_members as $row) {\n\t\t\t$evening_person .= $row->shift_member.\",\";\n\t\t}\n\n\t\t$evening_person = rtrim($evening_person,\",\");\n\t\t$evening = explode(\",\",$evening_person);\n\t\t$evening_person = \"\";\n\t\tforeach ($evening as $person) {\n\t\t\t$evening_person .= \"'\".$person.\"',\";\n\t\t}\n\t\t$evening_person = rtrim($evening_person,\",\");\n\n\t\t$evening_shift_address_query = \"SELECT * FROM rosterdb.emp_address_table WHERE emp_id IN ($evening_person)\";\n\t\t$evening_address = \\DB::select(\\DB::raw($evening_shift_address_query));\n\t\t////////////////////////////////////////////////////////////////////////\n\n\n\t\t////////////////////////// Night ///////////////////////////////////\n\t\t$night = array();\n\n $night_shift_members_query = \"SELECT shift_member \n\t\t\t\t\t\t\t\t\tFROM `nighttable` \n\t\t\t\t\t\t\t\t\tJOIN shifttable ON shifttable.shift_id = nighttable.shift_id \n\t\t\t\t\t\t\t\t\tWHERE shifttable.shift_date = '\".$today.\"'\";\n\n\t\t$night_shift_members = \\DB::select(\\DB::raw($night_shift_members_query));\n\n\t\t$night_person = \"\";\n\n\t\tforeach ($night_shift_members as $row) {\n\t\t\t$night_person .= $row->shift_member.\",\";\n\t\t}\n\n\t\t$night_person = rtrim($night_person,\",\");\n\t\t$night = explode(\",\",$night_person);\n\t\t$night_person = \"\";\n\t\tforeach ($night as $person) {\n\t\t\t$night_person .= \"'\".$person.\"',\";\n\t\t}\n\t\t$night_person = rtrim($night_person,\",\");\n\n\t\t$night_shift_address_query = \"SELECT * FROM rosterdb.emp_address_table WHERE emp_id IN ($night_person)\";\n\t\t$night_address = \\DB::select(\\DB::raw($night_shift_address_query));\n\t\t////////////////////////////////////////////////////////////////////////\n\t\t\n\t\t// print_r($morning_address);\n\t\t// echo \"<br>\";\n\t\t// echo \"<br>\";\n\t\t// print_r($evening_address);\n\t\t// echo \"<br>\";\n\t\t// echo \"<br>\";\n\t\t// print_r($night_address);\n\n\n\n\n\t\t// return \"\";\n\n\n\n\n\n\n\n\n\n\n\t\t// $morning_shift_query = \"SELECT daytable.*,emp_address_table.*\n\t\t// \t\t\t\t\t\tFROM `daytable` \n\t\t// \t\t\t\t\t\tJOIN shifttable ON shifttable.shift_id = daytable.shift_id\n\t\t// \t\t\t\t\t\tJOIN emp_address_table ON daytable.shift_member = emp_address_table.emp_id\n\t\t// \t\t\t\t\t\tWHERE shifttable.shift_date = '\".$today.\"'\";\n\n\t\t// echo $morning_shift_query;\n\t\t// dd(\"Stop\");\t\t\t\t\t\t\t\n\n\t\t// $evening_shift_query = \"SELECT eveningtable.*,emp_address_table.*\n\t\t// \t\t\t\t\t\tFROM `eveningtable` \n\t\t// \t\t\t\t\t\tJOIN shifttable ON shifttable.shift_id = eveningtable.shift_id\n\t\t// \t\t\t\t\t\tJOIN emp_address_table ON eveningtable.shift_member = emp_address_table.emp_id\n\t\t// \t\t\t\t\t\tWHERE shifttable.shift_date = '\".$today.\"'\";\n\n\n\t\t// $night_shift_query = \t\"SELECT nighttable.*,emp_address_table.*\n\t\t// \t\t\t\t\t\tFROM `nighttable` \n\t\t// \t\t\t\t\t\tJOIN shifttable ON shifttable.shift_id = nighttable.shift_id\n\t\t// \t\t\t\t\t\tJOIN emp_address_table ON nighttable.shift_member = emp_address_table.emp_id\n\t\t// \t\t\t\t\t\tWHERE shifttable.shift_date = '\".$today.\"'\";\n\n\t\t// $morning = \\DB::select(\\DB::raw($morning_shift_query));\n\t\t// $evening = \\DB::select(\\DB::raw($evening_shift_query));\n\t\t// $night = \\DB::select(\\DB::raw($night_shift_query));\n\t\t\t\t\t\t\t\t\n\n\t\treturn view('admin_view.view_roster',compact('morning_address','evening_address','night_address','today'));\n\t}", "private function tbl_estados() {\r\n\t\t\t$this->estados = $this->esquema->createTable('ESTADOS');\r\n\t\t\t$this->estados->addColumn('ID', 'bigint', array(\r\n\t\t\t\t'notnull' => true,\r\n\t\t\t\t'autoincrement' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Estado'\r\n\t\t\t));\r\n\t\t\t$this->estados->addColumn('NOMBRE', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Nombre del Estado'\r\n\t\t\t));\r\n\t\t\t$this->estados->setPrimaryKey(array('ID'));\r\n\t\t}", "public function saison(){\n return $this->belongsTo(Saison::class, 'id_saison');\n }", "public function run()\n {\n State::create(['name'=>'Pendiente']);\n State::create(['name'=>'Solicitado']);\n State::create(['name'=>'Pagado']);\n }", "public function getStoriaAssegnazioniTrasportatori()\n {\n $con = DBUtils::getConnection();\n $sql =\"SELECT id FROM history_trasportatori WHERE id_preventivo=$this->id_preventivo\";\n //echo \"\\nSQL1: \".$sql.\"\\n\";\n $res = mysql_query($sql);\n $found = 0;\n $result = array();\n\n while ($row=mysql_fetch_object($res))\n {\n //crea l'oggetto Arredo\n\n $obj = new AssegnazioneTrasportatore();\n $obj->load($row->id);\n\n $result[] = $obj;\n }\n\n DBUtils::closeConnection($con);\n return $result;\n\n }", "public function run()\n {\n DB::table('estado')->insert([\n 'idEstado' => 'a',\n 'nombreEstado' => 'activo'\n ]);\n\n DB::table('estado')->insert([\n 'idEstado' => 'i',\n 'nombreEstado' => 'inactivo'\n ]);\n \n }", "public function news_and_events(){\n\n\t\t$this->data['nae'] = $this->file_maintenance_model->newsAndEventsList();\n\n\t\t$this->load->view('app/administrator/file_maintenance/news_and_events',$this->data);\n\n\t}", "public function run()\n {\n DB::table('secteurs')->insert([\n 'libelle' => 'secteur nord', \n ]);\n DB::table('secteurs')->insert([\n 'libelle' => 'secteur sud ', \n ]);\n \n DB::table('secteurs')->insert([\n 'libelle' => 'secteur est ', \n ]); \n \n DB::table('secteurs')->insert([\n 'libelle' => 'secteur ouest', \n ]);\n }", "public function run()\n {\n tiendas::insert([\n \t'name' => 'Informatica'\n ]);\n\n tiendas::insert([\n \t'name' => 'Comida'\n ]);\n\n tiendas::insert([\n \t'name' => 'Cacharros'\n ]);\n }", "static public function visAlle() {\n $alle_stikkord = array();\n\n try {\n $setning = self::$db->prepare(\"SELECT * FROM Stikkord\");\n $setning->execute();\n\n while ($stikkord = $setning->fetchObject('Stikkord') )\n {\n $alle_stikkord[] = $stikkord;\n\n }\n\n }\n catch (Exception $e) {\n print $e->getMessage() . PHP_EOL;\n }\n\n return $alle_stikkord;\n\n }", "public function indexsemana()\n {\n //Traendo partidos que no han sido terminados en esta semana\n $partidos=PartidoCalendario::with(\"EquipoCasaNombre\",\"EquipoVisitaNombre\",\"NombreLiga\")->orderBy('fecha_partido','ASC')->orderBy('hora_partido','ASC')->where('fecha_partido','>=',Carbon::today())->where('fecha_partido','<=',Carbon::today()->endOfWeek())->get();\n if(!$partidos){\n return response()->json(['mensaje' => 'No se encuentran partidos actualmente','codigo'=>404],404);\n }\n return response()->json(['datos' => $partidos],200);\n \n }", "public function stronyAction() {\n\t\t\t$db = Zend_Registry::get('db');\n\n\t\t\t$id = (int)$this->getRequest()->getParam('id');\n\t\t\t$this->view->inwestycja = $db->fetchRow($db->select()->from('inwestycje')->where('id = ?', $id));\n\t\t\t$this->view->strony = $db->fetchAll($db->select()->from('inwestycje_strony')->where('id_inwest =?', $id)->order('sort ASC'));\n\t\t}", "public function getSemestre()\n {\n return $this->semestre;\n }", "static function listaStilova(){\n\t\t$stilovi=\"\";\n\t\treturn $stilovi;\n\t}", "public function run()\n {\n\n $positionC = Position::where('position','Programmer')->first();\n if ($positionC === null) {\n Position::create([\n 'position' => 'Programmer'\n ]);\n Position::create([\n 'position' => 'Data Analysis'\n ]);\n }\n }", "public function index()\n\t{\n\t\treturn \"este es la pagina central dee cargar la de show estaciones\";\n\t}", "function getSTID(){\n return $this->STID;\n }", "public function run()\n {\n Semestre::create([\n \"ano\" => \"2020\",\n \"periodo\" => '2'\n ]);\n }" ]
[ "0.6088418", "0.59856385", "0.59390795", "0.5922934", "0.59163976", "0.58754456", "0.58735627", "0.5851471", "0.58136463", "0.5777737", "0.57670605", "0.57542133", "0.5744032", "0.57317495", "0.57314897", "0.56779456", "0.5669929", "0.56697184", "0.5630645", "0.5625856", "0.5624792", "0.56175226", "0.5591084", "0.55863386", "0.558614", "0.55697995", "0.5535702", "0.55318373", "0.55285895", "0.5527489", "0.5526525", "0.5518724", "0.55083114", "0.5493179", "0.5487831", "0.5482413", "0.547052", "0.54699624", "0.5464045", "0.54599816", "0.5451454", "0.5446534", "0.54457444", "0.54447085", "0.54357564", "0.54343534", "0.5426029", "0.5423157", "0.54230505", "0.5422486", "0.54203486", "0.5418458", "0.5418323", "0.5418255", "0.54096067", "0.54076374", "0.54071164", "0.5397667", "0.5395634", "0.5393617", "0.5385782", "0.5384861", "0.53826976", "0.5382451", "0.53822714", "0.5380497", "0.5371092", "0.5368222", "0.53668666", "0.5358972", "0.5356103", "0.53549874", "0.5353767", "0.535365", "0.53528994", "0.535028", "0.53500557", "0.5349097", "0.53457093", "0.5345386", "0.53453094", "0.53384984", "0.5335231", "0.53330046", "0.5331583", "0.53309965", "0.533045", "0.5328941", "0.53280014", "0.5324911", "0.5324086", "0.5319618", "0.53172034", "0.5312767", "0.5311191", "0.5310081", "0.5309908", "0.53090066", "0.53083855", "0.5308299" ]
0.5323718
91
/ Gestion des Matchs
function insertMatch ($tab) { $con = connexion (); if($con != null) { $requete = "insert into matchs values (null,'".$tab['nomdom']."','".$tab['nomext']."','".$tab['dateM']."','".$tab['stadeM']."','".$tab['idequipe']."');"; mysqli_query($con, $requete); deconnexion($con); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateMatch(){\n\t\t\n\t\t}", "public function getMatch();", "function show_round()\n{\n $bdd = DB_connect();\n\n // On récupère de la table matches les informations sur la partie\n $req_match = $bdd->query('SELECT * FROM matches WHERE id = \\''.$_SESSION['match']['id'].'\\'');\n $data_match = $req_match->fetch();\n\n // On récupère de la table rounds tous les rounds de la partie\n $req_round = $bdd->query('SELECT * FROM rounds WHERE match_id = \\''.$_SESSION['match']['id'].'\\'');\n while($data_round = $req_round->fetch())\n $tab[$data_round['id']] = $data_round;\n // On sélectionne le dernier round en mémoire du match\n $round = $tab[max(array_keys($tab))];\n\n $_SESSION['match']['previous_user'] = $round['actual_user'];\n\n // On détermine si l'on est le user1 ou le user2 dans la partie\n if ($data_match['user1_id'] == $_SESSION['user']['id'])\n {\n $_SESSION['match']['user_me'] = 1;\n $_SESSION['match']['user_me_id'] = $data_match['user1_id'];\n $_SESSION['match']['user_me_score'] = $round['user1_score'];\n $_SESSION['match']['user_enemy'] = 2;\n $_SESSION['match']['user_enemy_id'] = $data_match['user2_id'];\n $_SESSION['match']['user_enemy_score'] = $round['user2_score'];\n }\n else\n {\n $_SESSION['match']['user_me'] = 2;\n $_SESSION['match']['user_me_id'] = $data_match['user2_id'];\n $_SESSION['match']['user_me_score'] = $round['user2_score'];\n $_SESSION['match']['user_enemy'] = 1;\n $_SESSION['match']['user_enemy_id'] = $data_match['user1_id'];\n $_SESSION['match']['user_enemy_score'] = $round['user1_score'];\n }\n\n // Si la partie est finie, on n'affiche pas la map\n if ($data_match['end'])\n {\n echo '<h3>La partie est finie !</h3>';\n if ($_SESSION['match']['user_me_score'] > $_SESSION['match']['user_enemy_score'])\n {\n echo '<h3>Bravo ! Tu as GAGNÉ.</h3>';\n }\n else if ($_SESSION['match']['user_me_score'] < $_SESSION['match']['user_enemy_score'])\n {\n echo '<h3>Dommage ! Tu as PERDU.</h3>';\n }\n else\n {\n echo '<h3>Bravo ! Vous êtes arrivés EX AEQUO.</h3>';\n }\n return (0);\n }\n\n // On enregistre la map dans le $_SESSION\n $map = string_to_map($round['map']);\n $_SESSION['match']['map'] = $map;\n\n // On affiche la map à jour\n echo '<table id=\"map\">';\n echo '<tr>';\n for ($j = 0; $j <= 6; $j++)\n {\n if ($j == 0)\n echo '<td></td>';\n else\n echo '<td>'.$j.'</td>';\n }\n echo '</tr>';\n for ($i = 'A'; isset($map[$i]); $i++)\n {\n echo '<tr>';\n for ($j = 0; $j <= 6; $j++)\n {\n if ($j == 0)\n echo '<td>'.$i.'</td>';\n else\n {\n if ($map[$i][$j] == 3)\n $background_color = 'red';\n else if ($map[$i][$j] == 4)\n $background_color = 'green';\n else\n $background_color = 'white';\n echo \"<td style='background-color:$background_color'></td>\";\n }\n }\n echo '</tr>';\n }\n echo '</table>';\n\n if ($round['actual_user'] == $_SESSION['match']['user_me'] ||\n ($round['actual_user'] == 0 && $_SESSION['match']['user_me'] != 1))\n {\n // On récupère le nom de l'ennemi dans la table users\n $req_enemy_login = $bdd->query('SELECT login FROM users WHERE id = \\''.$_SESSION['match']['user_enemy_id'].'\\'');\n $data_enemy_login = $req_enemy_login->fetch();\n\n echo '<h3>C\\'est au tour de '.$data_enemy_login['login'].'</h3>';\n echo '<form method=\"POST\" action=\"game.php\">\n <input type=\"submit\" name=\"reload_submit\" value=\"↻ Rafraîchir\">\n </form>';\n return (1);\n }\n else\n {\n echo '<h3>C\\'est à ton tour !</h3>\n <form method=\"POST\" action=\"#\">\n <br>\n <input type=\"text\" name=\"coord\" placeholder=\"Case\" required><br><br>\n <input type=\"submit\" value=\"Jouer\">\n </form>';\n return (0);\n }\n}", "function _assignMatchesDo() {\n\t\tdefined('_JEXEC') or die( 'Invalid Token' );\n\n\t\t// Turnierdaten!\n\t\t$tournament = new CLMTournament($this->id, true);\n\t\t// $tournament->data->typ\n\n\t\tif (($tournament->data->tl != clm_core::$access->getJid() AND $clmAccess->access('BE_tournament_edit_round') !== true) OR $clmAccess->access('BE_tournament_edit_round') === false) {\n\t\t\t$this->app->enqueueMessage( JText::_('TOURNAMENT_NO_ACCESS'),'warning' );\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif ($tournament->data->typ == 2) {\n\t\t\t// Vollturnier nur via Rundenerstellung!\n\t\t\t$this->app->enqueueMessage( CLMText::errortext(JText::_('MATCHES_ASSIGN'), 'IMPOSSIBLE' ),'warning' );\n\t\t\treturn false;\n\t\t\n\t\t} elseif ($tournament->data->typ == 3) { // KO\n\t\t\t// maximal bestätige Runde holen - ist hier MIN(nr)\n\t\t\t$query = 'SELECT MIN(nr) FROM #__clm_turniere_rnd_termine'\n\t\t\t\t. ' WHERE turnier = '.$this->id.' AND tl_ok = 1';\n\t\t\t$this->_db->setQuery( $query );\n\t\t\tif ($tlokMin = $this->_db->loadResult()) {\n\t \t\t\t$roundToDraw = $tlokMin-1;\n\t \t\t} else {\n\t \t\t\t$roundToDraw = $tournament->data->runden;\n\t\t\t}\n\t\t\t// nächste zu vervollständigende Runde ermittelt\n\t\t\tif ($roundToDraw == 0) { // dann gibt es nichts mehr zu tun\n\t\t\t\t$this->app->enqueueMessage( JText::_('NO_ROUND_LEFT'),'warning' );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t// Frage: sind in dieser Runde schon Partien angesetzt?\n\t\t\t$query = 'SELECT COUNT(*)'\n\t\t\t\t\t. ' FROM #__clm_turniere_rnd_spl'\n\t\t\t\t\t. ' WHERE turnier = '.$this->id.' AND runde = '.$roundToDraw.' AND ((spieler >= 1 AND gegner >= 1) OR ergebnis = 8)';\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$matchesAssigned = $this->_db->loadResult();\n\t\t\t\n\t\t\tif ($matchesAssigned > 0) { // bereits Matches angelegt\n\t\t\t\t$this->app->enqueueMessage( JText::_('MATCHES_ASSIGNED_ALREADY'),'warning' );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t// OKay, jetzt kann angesetzt werden\n\t\t\t// alle Spieler, die 'in' sind holen\n\t\t\t$query = \"SELECT snr \"\n\t\t\t\t\t. \" FROM #__clm_turniere_tlnr\"\n\t\t\t\t\t. \" WHERE turnier = \".$this->id.\" AND koStatus = '1'\";\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$playersIn = $this->_db->loadAssocList('snr');\n\t\t\t\n\t\t\t// wieviele Matches werden benötigt? \n\t\t\t// Spielerzahl - (maximale Matches der Runde / 2)\n\t\t\t// maximale Matches der Runde: 2^Runde\n\t\t\t$neededMatches = (count($playersIn) - pow(2, $roundToDraw)/2);\n\t\t\t\n\t\t\t// TODO: Sicherheitscheck, ob diese Boards wirklich vorhanden!\n\t\t\t\n\t\t\t// jetzt setzen wir an jedes Board eine Zufallspaarung\n\t\t\t\n\t\t\t// Matches zusammenstellen\n\t\t\t$sid = $tournament->data->sid;\n\t\t\tfor ($m=1; $m<=$neededMatches; $m++) {\n\t\t\t\t// Spieler 1\n\t\t\t\t$player1 = array_rand($playersIn);\n\t\t\t\tunset($playersIn[$player1]);\n\t\t\t\t// Spieler 2\n\t\t\t\t$player2 = array_rand($playersIn);\n\t\t\t\tunset($playersIn[$player2]);\n\t\t\t\t// SQL\n\t\t\t\t$query = \"UPDATE #__clm_turniere_rnd_spl\"\n\t\t\t\t\t\t. \" SET tln_nr = \".$player1.\", spieler = \".$player1.\", gegner = \".$player2\n\t\t\t\t\t\t. \" WHERE turnier = \".$this->id.\" AND runde = \".$roundToDraw.\" AND brett = \".$m.\" AND heim = '1'\";\n//\t\t\t\t$this->_db->setQuery($query);\n//\t\t\t\tif (!$this->_db->query()) { \n\t\t\t\tif (!clm_core::$db->query($query)) { \n\t\t\t\t\t$this->app->enqueueMessage( JText::_('MATCH: ').$m.\": \".$this->_db->getErrorMsg(),'error' );\n\t\t\t\t}\n\n\t\t\t\t$query = \"UPDATE #__clm_turniere_rnd_spl\"\n\t\t\t\t\t\t. \" SET tln_nr = \".$player2.\", spieler = \".$player2.\", gegner = \".$player1\n\t\t\t\t\t\t. \" WHERE turnier = \".$this->id.\" AND runde = \".$roundToDraw.\" AND brett = \".$m.\" AND heim = '0'\";\n//\t\t\t\t$this->_db->setQuery($query);\n//\t\t\t\tif (!$this->_db->query()) { \n\t\t\t\tif (!clm_core::$db->query($query)) { \n\t\t\t\t\t$this->app->enqueueMessage( JText::_('MATCH: ').$m.\": \".$this->_db->getErrorMsg(),'error' );\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t$this->app->enqueueMessage( JText::_('ROUND_KO_'.$roundToDraw).\": \".JText::_('TOURNAMENT_MATCHES_ASSIGNED') );\n\t\n\t\t\t// Log\n\t\t\t$clmLog = new CLMLog();\n\t\t\t$clmLog->aktion = JText::_('ROUND_KO_'.$roundToDraw).\": \".JText::_('TOURNAMENT_MATCHES_ASSIGNED');\n\t\t\t$clmLog->params = array('sid' => $tournament->data->sid, 'tid' => $this->id, 'rnd' => $roundToDraw); // TurnierID wird als LigaID gespeichert\n\t\t\t$clmLog->write();\n\t\n\t\n\t\t} elseif ($tournament->data->typ == 1) { // CH\n\t\t\t$this->app->enqueueMessage( CLMText::errortext(JText::_('MATCHES_ASSIGN'), 'NOTIMPLEMENTED' ),'warning' );\n\t\t\treturn false;\n\t\t\n\t\t}\n\t\n\t}", "public function runMatch()\n {\n }", "public function GetMatch ();", "public function populateMatchStandings(){\n\t\t $team = new Application_Model_Mapper_Team();\n\t\t //cath all teams\n\t\t $teamList=$team->fetchAll();\n\t\t $prosGoal= null;\n\t\t $agaistGoal=null;\n\t\t if(count($teamList)>0){\n\t\t \t foreach($teamList as $row){\n\t\t \t \t //begin team statistics by 0\n\t\t \t \t $row->setWins(0);\n\t\t \t \t $row->setLosses(0);\n\t\t \t \t $row->setPoints(0);\n\t\t \t \t $row->setDraws(0);\n\t\t \t \t //catch all matches by team\n\t\t $championship = $this->seachMatchByTeam($row->getId());\n\t\t foreach ($championship as $match) {\n\t\t //if a team is a visitor team goals of visitor team it is\n\t\t \t $prosGoal=$match['goalVisitorTeam'];\n\t\t \t $agaistGoal=$match['goalHomeTeam'];\n\t\t \t //if a team is a home team goals of home team it is\n\t\t \t if($match['idHomeTeam']==$row->getId()){\n\t\t \t \t $prosGoal=$match['goalHomeTeam'];\n\t\t \t \t $agaistGoal=$match['goalVisitorTeam'];\n\t\t \t }\n\t\t \t //if team win\n\t\t \t if($agaistGoal<$prosGoal){\n\t\t \t \t$row->setWins($row->getWins()+1);\n\t\t \t \t$row->setPoints($row->getPoints()+3);\n\t\t \t }//if team lost\n\t\t \t elseif($agaistGoal>$prosGoal){\n\t\t \t \t$row->setLosses($row->getLosses()+1);\n\t\t \t }//if team draw\n\t\t \t else{\n\t\t \t \t$row->setDraws($row->getDraws()+1);\n\t\t \t \t$row->setPoints($row->getPoints()+1);\n\t\t \t }\n\t\t }\n\t\t //update table team\n\t\t $team->updateTeam($row);\n\t\t \t }\n\t\t }\n\t}", "public function getMatch()\n{\nreturn $this->match;\n}", "function played_matches() \n\t{\n\t\t$fecha=$this->weekStartEnd(mdate(\"%Y-%m-%d\",time()));\n\t\t$query=$this->db->query('SELECT mh . * , ma.aid, ma.aname, c.id, c.name\n\t\t\t\t\t\t FROM (SELECT m . * , t.id hid, t.name AS hname\n\t\t\t\t\t\t FROM matches AS m, matches_teams AS mt, teams AS t\n\t\t\t\t\t\t WHERE mt.match_id = m.id AND mt.team_id_home = t.id) AS mh, \n\t\t\t\t\t\t (SELECT m . * , t.id aid, t.name AS aname\n\t\t\t\t\t\t FROM matches AS m, matches_teams AS mt, teams AS t\n\t\t\t\t\t\t WHERE mt.match_id = m.id AND mt.team_id_away = t.id ) AS ma,\n\t\t\t\t\t\t championships as c, rounds as r, groups as g\n\t\t\t\t\t\t WHERE mh.id = ma.id AND mh.date_match <\"'.mdate(\"%Y-%m-%d %h:%i:%s\",time()).'\" AND mh.date_match > \"'.$fecha['start'].' 00:00:00\" AND mh.group_id = g.id AND g.round_id = r.id AND r.championship_id=c.id \n\t\t\t\t\t\t ORDER BY c.name, mh.date_match ASC');\n\t\treturn $query;\n\t}", "public function displayMatches()\n {\n echo \"<h1>List of matches found</h1>\";\n print_r($this->matches);\n }", "function last_matches($champ=0){\n\n\t\t\t$this->db->select('schedules.*,championships.name');\n\t\t\t$this->db->from('schedules');\n\t\t\t$this->db->join('championships','schedules.round_id=championships.active_round');\n\t\t\tif($champ>0)\n\t\t\t\t$this->db->where('championships.id',$champ);\n\t\t\t$this->db->order_by('schedules.round_id','asc');\n\t\t\t$this->db->order_by('schedules.position','asc');\n\t\t\t$schedules=$this->db->get();\n\n\t\t\t//Saco las ultimas fechas jugadas de el/los campeonatos\n\t\t\t$aux=0;\n\t\t\t$fechas=array();\n\t\t\tforeach($schedules->result() as $schedule){\n\t\t\t\tif($schedule->round_id != $aux){\n\t\t\t\t\t$fechas[]=$schedule->id;\n\t\t\t\t\t$aux=$schedule->round_id;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Saco todos los partidos en vivo de las fechas\n\t\t\t$this->db->select('*, UNIX_TIMESTAMP(date_match) as hour',false);\n\t\t\t$this->db->where('live','1');\n\t\t\t$this->db->where_in('state',array('0','8'));\n\t\t\t$this->db->where_in('schedule_id',$fechas);\n\t\t\t$this->db->order_by('date_match','desc');\n\t\t\t$matches=$this->db->get('matches');\n\n\t\t\tif($matches->num_rows()>0)\n\t\t\t\t$partidos=$this->data_matches($matches);\n\t\t\telse\n\t\t\t\t$partidos=false;\n\n\t\t\treturn $partidos;\n\t}", "public function seachMatchAll(){\n\t\t $query = $this->getDbTable()->select()\n\t\t ->from(array('b' => 'tbteam'),array('home'=>'b.team'))\n ->joinInner(array('a' => 'tbmatch'),'a.idHomeTeam=b.id',array('a.id','a.goalHomeTeam','a.goalVisitorTeam','a.date','a.round'))\n ->joinInner(array('c' => 'tbteam'),'c.id=a.idVisitorTeam',array('visitor'=>'c.team'))\n ->order('a.round')\n ->setIntegrityCheck(false);\n return $this->getDbTable()->fetchAll($query);\n\t}", "public function updatePoints(Match $match){\n\n if($match->played){\n dd($match);\n $match->updateMatch();\n }\n else{\n //update values\n //revert points?\n\n }\n }", "public function handleMatches(&$matches)\n {\n // Wir laufen jetzt über alle Spiele und legen einen Punktespeicher für jedes Team an\n foreach ($matches as $match) {\n if ($match->isDummy()) {\n continue;\n } // Ignore Dummy-Matches\n // Wie ist das Spiel ausgegangen?\n $toto = $match->getToto();\n tx_rnbase_util_Misc::callHook(\n 'cfc_league_fe',\n 'leagueTable_handleMatches',\n array('match' => &$match, 'teamdata' => &$this->_teamData),\n $this\n );\n\n // Die eigentliche Punktezählung richtet sich nach dem Typ der Tabelle\n // Daher rufen wir jetzt die passende Methode auf\n switch ($this->getTableProvider()->getTableType()) {\n case 1:\n $this->_countHome($match, $toto);\n\n break;\n case 2:\n $this->_countGuest($match, $toto);\n\n break;\n default:\n $this->_countStandard($match, $toto);\n }\n }\n unset($this->_teamData[0]); // Remove dummy data from teams without id\n }", "public function show(Match $match)\n {\n //\n }", "public function show(Match $match)\n {\n //\n }", "function month_matches($month){\n\t\t$this->db->select('name,active_round,id');\n\t\t$this->db->where('active_round >',0);\n\t\t$championships=$this->db->get('championships')->result();\n\t\t$active_rounds=array();\n\t\t$champs=array();\n\t\t$champs_complete=array();\n\t\tforeach($championships as $row){\n\t\t\t$active_rounds[]=$row->active_round;\n\t\t\t$champs[]=$row->id;\n\t\t\t$champs_complete[$row->active_round]=$row;\n\t\t}\n\t\t\n\t\t//SACO LOS GRUPOS ACTIVOS\n\t\t$this->db->select('id,round_id');\n\t\t$this->db->where_in('round_id',$active_rounds);\n\t\t$groups=$this->db->get('groups')->result();\n\t\t$active_groups=array();\n\t\t$groups_complete=array();\n\t\tforeach($groups as $row){\n\t\t\t$active_groups[]=$row->id;\n\t\t\t$groups_complete[$row->id]=$row->round_id;\n\t\t}\n\t\t\n\t\t//SACO LOS EQUIPOS POR CAMPEONATO ACTIVO\n\t\t$this->db->select('team_id');\n\t\t$this->db->where_in('championship_id',$champs);\n\t\t$championships_teams=$this->db->get('championships_teams')->result();\n\t\t$champs_teams=array();\n\t\tforeach($championships_teams as $row)\n\t\t\t$champs_teams[]=$row->team_id;\n\t\t\n\t\t//SACO EQUIPOS ACTIVOS POR CAMPEONATO ACTIVO\n\t\t$this->db->where_in('id',$champs_teams);\n\t\t$teams=$this->db->get('teams')->result();\n\t\t$champs_teams=array();\n\t\tforeach($teams as $row)\n\t\t\t$champs_teams[$row->id]=$row;\n\t\t\n\t\t//SACO PARTIDOS DE LOS GRUPOS ACTIVOS\n\t\t$this->db->where_in('group_id',$active_groups);\n\t\t$this->db->where('MONTH(date_match)',$month,FALSE);\n\t\t$this->db->where('YEAR(date_match)','YEAR(NOW())',FALSE);\n\t\t$this->db->order_by('date_match','asc');\n\t\t$this->db->join('matches_teams','matches.id = matches_teams.match_id');\n\t\t$mats=$this->db->get('matches')->result();\n\t\t\n\t\t$matches=array();\n\t\tforeach($mats as $key=>$match){\n\t\t\t$matches[$key]=$match;\n\t\t\t$matches[$key]->team_id_home=$champs_teams[$match->team_id_home];\n\t\t\t$matches[$key]->team_id_away=$champs_teams[$match->team_id_away];\n\t\t\t$matches[$key]->championship=$champs_complete[$groups_complete[$match->group_id]];\n\t\t}\n\t\t\n\t\treturn $matches;\n\t}", "public function run() {\n if (Match::count() > 48) {\n return;\n }\n\n $teams = Team::get();\n $stadiums = Stadium::get();\n $matches = [\n // 30th June\n [\n 'home_team_id' => $teams->where('name', 'France')->first()->id,\n 'away_team_id' => $teams->where('name', 'Argentina')->first()->id,\n 'stadium_id' => $stadiums->where('name', 'Kazan Arena')->first()->id,\n 'can_predict' => TRUE,\n 'is_ko_stage' => TRUE,\n 'date' => Carbon::create(2018, 6, 30, 17, 0, 0, 3)->timezone('UTC')->toDateTimeString(),\n ],\n [\n 'home_team_id' => $teams->where('name', 'Uruguay')->first()->id,\n 'away_team_id' => $teams->where('name', 'Portugal')->first()->id,\n 'stadium_id' => $stadiums->where('name', 'Fisht Olympic Stadium')->first()->id,\n 'can_predict' => TRUE,\n 'is_ko_stage' => TRUE,\n 'date' => Carbon::create(2018, 6, 30, 21, 0, 0, 3)->timezone('UTC')->toDateTimeString(),\n ],\n\n // 1st July\n [\n 'home_team_id' => $teams->where('name', 'Spain')->first()->id,\n 'away_team_id' => $teams->where('name', 'Russia')->first()->id,\n 'stadium_id' => $stadiums->where('name', 'Luzhniki Stadium')->first()->id,\n 'can_predict' => TRUE,\n 'is_ko_stage' => TRUE,\n 'date' => Carbon::create(2018, 7, 1, 17, 0, 0, 3)->timezone('UTC')->toDateTimeString(),\n ],\n [\n 'home_team_id' => $teams->where('name', 'Croatia')->first()->id,\n 'away_team_id' => $teams->where('name', 'Denmark')->first()->id,\n 'stadium_id' => $stadiums->where('name', 'Nizhny Novgorod Stadium')->first()->id,\n 'can_predict' => TRUE,\n 'is_ko_stage' => TRUE,\n 'date' => Carbon::create(2018, 7, 1, 21, 0, 0, 3)->timezone('UTC')->toDateTimeString(),\n ],\n\n // 2nd July\n [\n 'home_team_id' => $teams->where('name', 'Brazil')->first()->id,\n 'away_team_id' => $teams->where('name', 'Mexico')->first()->id,\n 'stadium_id' => $stadiums->where('name', 'Cosmos Arena')->first()->id,\n 'can_predict' => TRUE,\n 'is_ko_stage' => TRUE,\n 'date' => Carbon::create(2018, 7, 2, 17, 0, 0, 4)->timezone('UTC')->toDateTimeString(),\n ],\n [\n 'home_team_id' => $teams->where('name', 'Belgium')->first()->id,\n 'away_team_id' => $teams->where('name', 'Japan')->first()->id,\n 'stadium_id' => $stadiums->where('name', 'Rostov Arena')->first()->id,\n 'can_predict' => TRUE,\n 'is_ko_stage' => TRUE,\n 'date' => Carbon::create(2018, 7, 2, 21, 0, 0, 3)->timezone('UTC')->toDateTimeString(),\n ],\n\n // 3rd July\n [\n 'home_team_id' => $teams->where('name', 'Sweden')->first()->id,\n 'away_team_id' => $teams->where('name', 'Switzerland')->first()->id,\n 'stadium_id' => $stadiums->where('name', 'Krestovsky Stadium')->first()->id,\n 'can_predict' => TRUE,\n 'is_ko_stage' => TRUE,\n 'date' => Carbon::create(2018, 7, 3, 17, 0, 0, 3)->timezone('UTC')->toDateTimeString(),\n ],\n [\n 'home_team_id' => $teams->where('name', 'Colombia')->first()->id,\n 'away_team_id' => $teams->where('name', 'England')->first()->id,\n 'stadium_id' => $stadiums->where('name', 'Otkritie Arena')->first()->id,\n 'can_predict' => TRUE,\n 'is_ko_stage' => TRUE,\n 'date' => Carbon::create(2018, 7, 3, 21, 0, 0, 3)->timezone('UTC')->toDateTimeString(),\n ],\n\n ];\n\n foreach ($matches as $match) {\n Match::create($match);\n }\n }", "protected function handleGosuMatchScrape()\n {\n $source = $this->service->findSource(2);\n\n $matches = $this->params['matches'];\n\n $this->service\n ->addPageForMatches($source, $matches);\n }", "private function fetchPairsMatches()\n {\n\t\t$array = array();\n\t\t$matches = $this->model->getMatches()->where('played = ?', true)->order('date DESC');\n\t\tforeach ($matches as $match) {\n\t\t\t$array[$match->id] = '(' . $match->date . ') ' . $match->ref('team', 'home_id')->name . ' - ' . $match->ref('team', 'away_id')->name;\n\t\t}\n\n\t\treturn $array;\n }", "function matches_today($championship){\n\t\tif($championship!=FALSE)\n\t\t\t$this->db->where('championships.id',$championship);\n\n\t\t$this->db->select('rounds.*,championships.name as cname');\n\t\t$this->db->from('rounds');\n\t\t$this->db->join('championships','rounds.id=championships.active_round');\n\t\t$query=$this->db->get();\n\t\t$rounds=array();\n\t\t$championships=array();\n\t\tforeach($query->result() as $row){\n\t\t\t$rounds[$row->id]['name']=$row->name;\n\t\t\t$rounds[$row->id]['championship']['id']=$row->championship_id;\n\t\t\t$rounds[$row->id]['championship']['name']=$row->cname;\n\t\t\t$championships[$row->championship_id]=$row->cname;\n\t\t}\n\t\t$query->free_result();\n\t\t\n\t\t//Extraigo los equipos de los campeonatos\n\t\t$this->db->from('championships_teams');\n\t\t$this->db->join('teams','championships_teams.team_id=teams.id');\n\t\t$this->db->where_in('championships_teams.championship_id',array_keys($championships));\n\t\t$query=$this->db->get();\n\t\tforeach($query->result() as $row)\n\t\t\t$teams[$row->id]=$row->name;\n\t\t$query->free_result();\n\t\t\n\t\t//Extraigo los grupos de las rondas\n\t\t$this->db->where_in('round_id',array_keys($rounds));\n\t\t$query=$this->db->get('groups');\n\t\tforeach($query->result() as $row){\n\t\t\t$groups[$row->id]['name']=$row->name;\n\t\t\t$groups[$row->id]['round_id']=$row->round_id;\n\t\t\t$groups[$row->id]['round']=$rounds[$row->round_id];\n\t\t}\n\t\t$query->free_result();\n\t\t\n\t\t//Extraigo las fechas de las rondas\n\t\t$this->db->where_in('round_id',array_keys($rounds));\n\t\t$query=$this->db->get('schedules');\n\t\tforeach($query->result() as $row){\n\t\t\t$schedules[$row->id]['season']=$row->season;\n\t\t\t$schedules[$row->id]['position']=$row->position;\n\t\t}\n\t\t$query->free_result();\n\t\t\n\t\t//Extraigo los partidos de los grupos que se jueguen hoy dia\n\t\t$this->db->select('matches.*, UNIX_TIMESTAMP(matches.date_match) as dm, matches_teams.team_id_home, matches_teams.team_id_away');\n\t\t$this->db->from('matches');\n\t\t$this->db->join('matches_teams','matches_teams.match_id=matches.id');\n\t\t$this->db->where('DATE(matches.date_match)','CURDATE()',false);\n\t\t$this->db->where_in('group_id',array_keys($groups));\n\t\t$this->db->order_by('matches.group_id','asc');\n\t\t$this->db->order_by('matches.schedule_id','asc');\n\t\t$this->db->order_by('matches.date_match','desc');\n\t\t$query=$this->db->get();\n\t\t\n\t\t//echo $this->db->last_query();\n\t\t\n\t\t$matches=array();\n\t\tforeach($query->result() as $key=>$row){\n\t\t\t$matches[$key]=$row;\n\t\t\t$matches[$key]->cn=$groups[$row->group_id]['round']['championship']['name'];\n\t\t\t$matches[$key]->rn=$groups[$row->group_id]['round']['name'];\n\t\t\t$matches[$key]->rid=$groups[$row->group_id]['round_id'];\n\t\t\t$matches[$key]->gn=$groups[$row->group_id]['name'];\n\t\t\t$matches[$key]->sn=$schedules[$row->schedule_id]['season'];\n\t\t\t$matches[$key]->sp=$schedules[$row->schedule_id]['position'];\n\t\t\t$matches[$key]->hname=$teams[$row->team_id_home];\n\t\t\t$matches[$key]->aname=$teams[$row->team_id_away];\n\t\t}\n\n\t\treturn $matches;\n\t}", "private function saveMatchListMatches() {\n $matches = json_decode($this->matches, true);\n forEach($matches as $match_entry) {\n try {\n $matchFromDatabase = Match::where('gameId', (string)$match_entry['gameId'])->firstOrFail();\n } catch (ModelNotFoundException $e) {\n $apiMatch = $this->api->getMatch($match_entry['gameId'], false);\n\n $newMatch = new Match;\n $newMatch->seasonId = (isset($apiMatch['seasonId']) ? $apiMatch['seasonId'] : '');\n $newMatch->queueId = (isset($apiMatch['queueId']) ? $apiMatch['queueId'] : '');\n $newMatch->gameId = (string)$match_entry['gameId'];\n // make the participant identities\n forEach($apiMatch['participantIdentities'] as $pId) {\n if ($pId['player']['accountId'] != 0) {\n try {\n $findParticipantIdentity = MatchParticipantIdentities::where('matchId', (string)$match_entry['gameId'])->where('accountId', $pId['player']['currentAccountId'])->firstOrFail();\n } catch (ModelNotFoundException $pie) {\n $newPId = new MatchParticipantIdentities;\n $newPId->matchId = (string)$match_entry['gameId'];\n $newPId->currentPlatformId = (isset($pId['player']['currentPlatformId']) ? $pId['player']['currentPlatformId'] : '');\n $newPId->summonerName = $pId['player']['summonerName'];\n $newPId->matchHistoryUri = (isset($pId['player']['matchHistoryUri']) ? $pId['player']['matchHistoryUri'] : '');\n $newPId->platformId = (isset($pId['player']['platformId']) ? $pId['player']['platformId'] : '');\n $newPId->currentAccountId = $pId['player']['currentAccountId'];\n $newPId->profileIcon = (isset($pId['player']['profileIcon']));\n $newPId->summonerId = $pId['player']['summonerId'];\n $newPId->accountId = $pId['player']['accountId'];\n $newPId->participantId = (isset($pId['participantId']) ? $pId['participantId'] : '');\n $newPId->save();\n }\n }\n }\n\n $newMatch->gameVersion = (isset($apiMatch['gameVersion']) ? $apiMatch['gameVersion'] : '');\n $newMatch->platformId = (isset($apiMatch['platformId']) ? $apiMatch['platformId'] : '');\n $newMatch->gameMode = $apiMatch['gameMode'];\n $newMatch->mapId = $apiMatch['mapId'];\n $newMatch->gameType = $apiMatch['gameType'];\n // make the teams\n forEach($apiMatch['teams'] as $team) {\n $newTeam = new MatchTeam;\n $newTeam->matchId = (string)$match_entry['gameId'];\n $newTeam->firstDragon = (isset($team['firstDragon']) ? $team['firstDragon'] : '');\n $newTeam->bans = (isset($team['bans']) ? json_encode($team['bans']) : '');\n $newTeam->win = (isset($team['win']) ? $team['win'] : '');\n $newTeam->firstRiftHerald = (isset($team['firstRiftHerald']) ? $team['firstRiftHerald'] : '');\n $newTeam->firstBaron = (isset($team['firstBaron']) ? $team['firstBaron'] : '');\n $newTeam->firstInhibitor = (isset($team['firstInhibitor']) ? $team['firstInhibitor'] : '');\n $newTeam->baronKills = (isset($team['baronKills']) ? $team['baronKills'] : '');\n $newTeam->riftHeraldKills = (isset($team['riftHeraldKills']) ? $team['riftHeraldKills'] : '');\n $newTeam->firstBlood = $team['firstBlood'];\n $newTeam->teamId = $team['teamId'];\n $newTeam->firstTower = (isset($team['firstTower']) ? $team['firstTower'] : '');\n $newTeam->vilemawKills = (isset($team['vilemawKills']) ? $team['vilemawKills'] : '');\n $newTeam->inhibitorKills = (isset($team['inhibitorKills']) ? $team['inhibitorKills'] : '');\n $newTeam->towerKills = (isset($team['towerKills']) ? $team['towerKills'] : '');\n $newTeam->dominionVictoryScore = (isset($team['dominionVictoryScore']) ? $team['dominionVictoryScore'] : '');\n $newTeam->dragonKills = (isset($team['dragonKills']) ? $team['dragonKills'] : '');\n $newTeam->save();\n }\n // make the participants\n forEach($apiMatch['participants'] as $participant) {\n $newParticipant = new MatchParticipant;\n $newParticipant->matchId = (string)$match_entry['gameId'];\n $newParticipant->stats = json_encode($participant['stats']);\n $newParticipant->runes = (isset($participant['runes']) ? json_encode($participant['runes']) : '');\n $newParticipant->masteries = (isset($participant['masteries']) ? json_encode($participant['masteries']) : '');\n $newParticipant->timeline = (isset($participant['timeline']) ? json_encode($participant['timeline']) : '');\n $newParticipant->spell1Id = (isset($participant['spell1Id']) ? $participant['spell1Id'] : '');\n $newParticipant->spell2Id = (isset($participant['spell2Id']) ? $participant['spell2Id'] : '');\n $newParticipant->participantId = $participant['participantId'];\n $newParticipant->highestAchievedSeasonTier = (isset($participant['highestAchievedSeasonTier']) ? $participant['highestAchievedSeasonTier'] : '');\n $newParticipant->teamId = $participant['teamId'];\n $newParticipant->championId = $participant['championId'];\n $newParticipant->save();\n }\n $newMatch->gameDuration = $apiMatch['gameDuration'];\n $newMatch->gameCreation = (string)$apiMatch['gameCreation'];\n $newMatch->save();\n }\n }\n }", "private function completeMatch($match) {\r\n \t$match->isCompleted = TRUE;\r\n \t \r\n \tforeach ($this->_observers as $observer) {\r\n \t\t$observer->onMatchCompleted($match);\r\n \t}\r\n \t\r\n \t// trigger plug-ins\r\n \t$event = new MatchCompletedEvent($this->_websoccer, $this->_db, I18n::getInstance($this->_websoccer->getConfig('supported_languages')), \r\n \t\t\t$match);\r\n \tPluginMediator::dispatchEvent($event);\r\n }", "public function matchCreate()\n {\n $games = Game::all();\n $team1 = Teams::all();\n $team2 = Teams::all();\n return [$games, $team1, $team2];\n }", "public function matches()\n {\n return $this->routeObject->match;\n }", "private function save_matchday() {\r\n for ($i = 0; $i < count($this->teams_1); $i++) {\r\n if ($this->free_ticket || ($this->teams_1[$i] != $this->free_ticket_identifer &&\r\n $this->teams_2[$i] != $this->free_ticket_identifer))\r\n $matches_tmp[] = array($this->teams_1[$i], $this->teams_2[$i]);\r\n }\r\n $this->matches[] = $matches_tmp;\r\n return true;\r\n }", "public function dernierMatchAction()\n\t{\n\t\t$rep_matchs = $this->getDoctrine()->getRepository('DFMatchBundle:Matchs');\n\t\t$match = $rep_matchs->getDernierMatch();\n\t\t\n\t\treturn $this->render('DFMatchBundle:Public:dernierMatch.html.twig', array(\n\t\t\t'match' => $match\t\n\t\t));\n\t}", "function getMovesForMatch ()\r\n{\r\n\t//array of chess moves assuming a few things:\r\n\t/* \t- light/dark take turns \r\n\t\t- the moves are set up to take a piece and move it to another,\r\n\t\t\tso moving pawn e2 -> e4 would be stored as the first 2 elements in a multidimensional array.\r\n\t\t- there are many things that would need to be done to support algebraic chess notation, \r\n\t\t\tI didn't go into that here.\t\t\r\n\t\t\r\n\t*/\r\n\t$matchMoves = array();\r\n\t\r\n\t/*\r\n\t$matchMoves [0]['from'] = \"e2\";\r\n\t$matchMoves [0]['to'] \t= \"e4\";\r\n\t$matchMoves [1]['from'] = \"c7\";\r\n\t$matchMoves [1]['to']\t= \"c5\";\r\n\t\r\n\t$matchMoves [2]['from'] = \"g1\";\r\n\t$matchMoves\t[2]['to']\t= \"f3\";\r\n\t$matchMoves [3]['from'] = \"b8\";\r\n\t$matchMoves [3]['to']\t= \"c6\";\r\n\t\r\n\t//begin invalid off board examples\r\n\t$matchMoves [4]['from'] = \"c6\";\r\n\t$matchMoves [4]['to'] \t= \"c9\";\r\n\t\r\n\t$matchMoves [5]['from'] = \"c6\";\r\n\t$matchMoves [5]['to'] \t= \"c0\";\r\n\t\r\n\t$matchMoves [6]['from'] = \"c6\";\r\n\t$matchMoves [6]['to'] \t= \"z9\";\r\n\t*/\r\n\t//begin invalid examples for particular pieces\r\n\t\r\n\t//king =======================\r\n\t//bad move\r\n\t$matchMoves [7]['from'] = \"e8\";\r\n\t$matchMoves [7]['to'] \t= \"g7\";\r\n\t\r\n\t//bad move because pieces are in the way\r\n\t$matchMoves [8]['from'] = \"e8\";\r\n\t$matchMoves [8]['to'] \t= \"f7\";\r\n\t\r\n\t//rook =========================\r\n\t//bad move\r\n\t$matchMoves [9]['from'] = \"h8\";\r\n\t$matchMoves [9]['to'] \t= \"h5\";\r\n\t\r\n\t//move pawn first\r\n\t$matchMoves [10]['from'] = \"h7\";\r\n\t$matchMoves [10]['to'] \t = \"h6\";\t\r\n\t$matchMoves [11]['from'] = \"h6\";\r\n\t$matchMoves [11]['to'] \t = \"h5\";\r\n\t$matchMoves [12]['from'] = \"h5\";\r\n\t$matchMoves [12]['to'] \t = \"h4\";\r\n\t$matchMoves [13]['from'] = \"h8\";\r\n\t$matchMoves [13]['to'] \t = \"h5\";\r\n\t\r\n\t//bishop ========================\r\n\t//bad move\r\n\t$matchMoves [14]['from'] \t= \"c8\";\r\n\t$matchMoves [14]['to'] \t\t= \"b8\";\r\n\t\r\n\t//bad move because pieces are in the way\r\n\t$matchMoves [15]['from'] \t= \"c8\";\r\n\t$matchMoves [15]['to'] \t\t= \"c7\";\r\n\t\r\n\t//move pawn first\r\n\t$matchMoves [16]['from'] \t= \"b7\";\r\n\t$matchMoves [16]['to'] \t\t= \"b6\";\r\n\t$matchMoves [17]['from'] \t= \"c8\";\r\n\t$matchMoves [17]['to'] \t\t= \"a6\";\r\n\t\r\n\t//queen ==========================\r\n\t$matchMoves [18]['from'] \t= \"d8\";\r\n\t$matchMoves [18]['to'] \t\t= \"c8\";\r\n\t\r\n\t\t\r\n\t//setting up a check for between functions - rook\r\n\t$matchMoves [19]['from'] \t= \"f2\";\r\n\t$matchMoves [19]['to'] \t\t= \"f3\";\r\n\t$matchMoves [20]['from'] \t= \"f3\";\r\n\t$matchMoves [20]['to'] \t\t= \"f4\";\r\n\t$matchMoves [21]['from'] \t= \"f4\";\r\n\t$matchMoves [21]['to'] \t\t= \"f5\";\r\n\t\r\n\t$matchMoves [22]['from'] \t= \"h5\";\r\n\t$matchMoves [22]['to'] \t\t= \"e5\";\r\n\t\r\n\t//demonstrating capture move a pawn to capture\r\n\t$matchMoves [23]['from'] \t= \"f7\";\r\n\t$matchMoves [23]['to'] \t\t= \"f6\";\r\n\t$matchMoves [24]['from'] \t= \"g7\";\r\n\t$matchMoves [24]['to'] \t\t= \"g6\";\r\n\t$matchMoves [25]['from'] \t= \"f5\";\r\n\t$matchMoves [25]['to'] \t\t= \"g6\";\r\n\t\r\n\r\n\treturn ($matchMoves);\r\n}", "abstract public function getRouteMatch();", "public function matches( Match_Target $target );", "function playGame ($chessboard)\r\n{\r\n\t\r\n\t$matchMoves = getMovesForMatch();\r\n\t$count = count($matchMoves);\r\n\tprint (\"<br> Number of total moves: $count\");\r\n\t//display board changes\r\n\t//$chessboard -> resortDisplayBoard();\r\n\t//$pieces = $chessboard -> getDisplayBoard();\r\n\t//displayChessboard($pieces);\r\n\t\r\n\tforeach ($matchMoves as $mMove)\r\n\t{\r\n\t\t//check if from piece exists\r\n\t\t$fpiece = $chessboard->getPieceAtPosition($mMove['from']);\r\n\t\tif (!empty($fpiece))\r\n\t\t{\r\n\t\t\t//check if the to location is even on the board\r\n\t\t\tif ($chessboard->validPositionOnBoard ($mMove['to']))\r\n\t\t\t{\r\n\t\t\t\tprint (\"<br> Move: \" . $mMove['to'] . \" is valid on the board. <br>\");\r\n\t\t\t\tif ($chessboard->validateMove($mMove['from'], $mMove['to'], $fpiece, $chessboard))\r\n\t\t\t\t{\r\n\t\t\t\t\t//move the piece to new location \r\n\t\t\t\t\tprint (\"<BR> Current Position: \" . $mMove['from'] . \" </BR>\");\r\n\t\t\t\t\tprint (\"<BR> After Position: \" . $mMove['to'] . \" </BR>\");\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t//perfom captures/promotions (AI goes here to do this)\r\n\t\t\t\t\t\t//this would move appropriate pieces \"off the board\" by changing their \r\n\t\t\t\t\t\t//status $captured to true.\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//display board changes\r\n\t\t\t\t\t\t$chessboard->move($mMove['from'], $mMove['to']);\r\n\t\t\t\t\t\t$chessboard -> resortDisplayBoard();\r\n\t\t\t\t\t\t$pieces = $chessboard -> getDisplayBoard();\r\n\t\t\t\t\t\tdisplayChessboard($pieces);\r\n\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}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$type = strtolower($fpiece->getPieceType());\r\n\t\t\t\t\tprint(\"That is not a valid move for a $type, skipping move.\");\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tprint (\"<br> Move: \" . $mMove['to'] . \" is not on the board, skipping. <br>\");\r\n\t\t}\r\n\t\telse\r\n\t\t\tprint (\"<br>The piece you have selected does not exist\");\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t}\r\n}", "public function getMatchs(){\n return view('matchs.matchs',\n ['matchs' => Match::with('teams')->with('users')->orderBy('date', 'desc')->get(),\n 'referees' => User::all()]);\n }", "public function getMatchList()\n {\n return $this->match_list;\n }", "public function run()\n\t{\n\t\t\\DB::table('matches')->delete();\n \n\t\t\\DB::table('matches')->insert(array (\n\t\t\t0 => \n\t\t\tarray (\n\t\t\t\t'id' => 3146,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 181,\n\t\t\t\t'team_blue_id' => 2928,\n\t\t\t\t'team_red_id' => 3498,\n\t\t\t\t'team_winner_id' => 3498,\n\t\t\t\t'polldaddy_id' => 8451329,\n\t\t\t\t'date_time' => '2014-11-15 19:00:00',\n\t\t\t\t'url' => '/tourney/match/3146',\n\t\t\t\t'name' => 'Zenith eSports vs Final Five',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 7,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:00:50',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:32',\n\t\t\t),\n\t\t\t1 => \n\t\t\tarray (\n\t\t\t\t'id' => 3147,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 181,\n\t\t\t\t'team_blue_id' => 3494,\n\t\t\t\t'team_red_id' => 3502,\n\t\t\t\t'team_winner_id' => 3494,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2014-11-16 21:00:00',\n\t\t\t\t'url' => '/tourney/match/3147',\n\t\t\t\t'name' => 'Enemy Esports vs Noble Truth',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:00:50',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:32',\n\t\t\t),\n\t\t\t2 => \n\t\t\tarray (\n\t\t\t\t'id' => 3148,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 181,\n\t\t\t\t'team_blue_id' => 3495,\n\t\t\t\t'team_red_id' => 3501,\n\t\t\t\t'team_winner_id' => 3495,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2014-11-16 23:00:00',\n\t\t\t\t'url' => '/tourney/match/3148',\n\t\t\t\t'name' => 'Team Fusion vs Confusion Esports',\n\t\t\t\t'score_blue' => 10,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:00:50',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:32',\n\t\t\t),\n\t\t\t3 => \n\t\t\tarray (\n\t\t\t\t'id' => 3149,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 181,\n\t\t\t\t'team_blue_id' => 8,\n\t\t\t\t'team_red_id' => 3499,\n\t\t\t\t'team_winner_id' => 8,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2014-11-15 21:00:00',\n\t\t\t\t'url' => '/tourney/match/3149',\n\t\t\t\t'name' => 'compLexity White vs Monstar Kittenz',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:00:50',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:32',\n\t\t\t),\n\t\t\t4 => \n\t\t\tarray (\n\t\t\t\t'id' => 3150,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 181,\n\t\t\t\t'team_blue_id' => 5,\n\t\t\t\t'team_red_id' => 3503,\n\t\t\t\t'team_winner_id' => 5,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2014-11-15 23:00:00',\n\t\t\t\t'url' => '/tourney/match/3150',\n\t\t\t\t'name' => 'Team Coast vs Call Gaming',\n\t\t\t\t'score_blue' => 11,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:00:51',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:32',\n\t\t\t),\n\t\t\t5 => \n\t\t\tarray (\n\t\t\t\t'id' => 3151,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 181,\n\t\t\t\t'team_blue_id' => 1254,\n\t\t\t\t'team_red_id' => 3500,\n\t\t\t\t'team_winner_id' => 1254,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2014-11-16 19:00:00',\n\t\t\t\t'url' => '/tourney/match/3151',\n\t\t\t\t'name' => 'Team LolPro vs Fission Esports',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:00:51',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:32',\n\t\t\t),\n\t\t\t6 => \n\t\t\tarray (\n\t\t\t\t'id' => 3152,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 181,\n\t\t\t\t'team_blue_id' => 1148,\n\t\t\t\t'team_red_id' => 3498,\n\t\t\t\t'team_winner_id' => 3498,\n\t\t\t\t'polldaddy_id' => 8452048,\n\t\t\t\t'date_time' => '2014-11-22 21:00:00',\n\t\t\t\t'url' => '/tourney/match/3152',\n\t\t\t\t'name' => 'compLexity Black vs Final Five',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 7,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:00:51',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:32',\n\t\t\t),\n\t\t\t7 => \n\t\t\tarray (\n\t\t\t\t'id' => 3153,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 181,\n\t\t\t\t'team_blue_id' => 3494,\n\t\t\t\t'team_red_id' => 3495,\n\t\t\t\t'team_winner_id' => 3495,\n\t\t\t\t'polldaddy_id' => 8453436,\n\t\t\t\t'date_time' => '2014-11-23 23:00:00',\n\t\t\t\t'url' => '/tourney/match/3153',\n\t\t\t\t'name' => 'Enemy Esports vs Team Fusion',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 10,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:00:51',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:32',\n\t\t\t),\n\t\t\t8 => \n\t\t\tarray (\n\t\t\t\t'id' => 3154,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 181,\n\t\t\t\t'team_blue_id' => 1252,\n\t\t\t\t'team_red_id' => 8,\n\t\t\t\t'team_winner_id' => 1252,\n\t\t\t\t'polldaddy_id' => 8452060,\n\t\t\t\t'date_time' => '2014-11-22 23:00:00',\n\t\t\t\t'url' => '/tourney/match/3154',\n\t\t\t\t'name' => 'Curse Academy vs compLexity White',\n\t\t\t\t'score_blue' => 8,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:00:51',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:32',\n\t\t\t),\n\t\t\t9 => \n\t\t\tarray (\n\t\t\t\t'id' => 3155,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 181,\n\t\t\t\t'team_blue_id' => 5,\n\t\t\t\t'team_red_id' => 1254,\n\t\t\t\t'team_winner_id' => 5,\n\t\t\t\t'polldaddy_id' => 8453426,\n\t\t\t\t'date_time' => '2014-11-23 21:00:00',\n\t\t\t\t'url' => '/tourney/match/3155',\n\t\t\t\t'name' => 'Team Coast vs Team LolPro',\n\t\t\t\t'score_blue' => 11,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:00:51',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:32',\n\t\t\t),\n\t\t\t10 => \n\t\t\tarray (\n\t\t\t\t'id' => 3156,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 181,\n\t\t\t\t'team_blue_id' => 3498,\n\t\t\t\t'team_red_id' => 3495,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '1970-01-01 00:00:00',\n\t\t\t\t'url' => '/tourney/match/3156',\n\t\t\t\t'name' => 'Final Five vs Team Fusion',\n\t\t\t\t'score_blue' => 7,\n\t\t\t\t'score_red' => 10,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:00:51',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:32',\n\t\t\t),\n\t\t\t11 => \n\t\t\tarray (\n\t\t\t\t'id' => 3157,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 181,\n\t\t\t\t'team_blue_id' => 1252,\n\t\t\t\t'team_red_id' => 5,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '1970-01-01 00:00:00',\n\t\t\t\t'url' => '/tourney/match/3157',\n\t\t\t\t'name' => 'Curse Academy vs Team Coast',\n\t\t\t\t'score_blue' => 8,\n\t\t\t\t'score_red' => 11,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:00:51',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:32',\n\t\t\t),\n\t\t\t12 => \n\t\t\tarray (\n\t\t\t\t'id' => 3158,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 181,\n\t\t\t\t'team_blue_id' => 0,\n\t\t\t\t'team_red_id' => 0,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '1970-01-01 00:00:00',\n\t\t\t\t'url' => '/tourney/match/3158',\n\t\t\t\t'name' => 'TBD vs TBD',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:28',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:32',\n\t\t\t),\n\t\t\t13 => \n\t\t\tarray (\n\t\t\t\t'id' => 3178,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 186,\n\t\t\t\t'team_blue_id' => 3562,\n\t\t\t\t'team_red_id' => 71,\n\t\t\t\t'team_winner_id' => 71,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2014-11-22 18:30:00',\n\t\t\t\t'url' => '/tourney/match/3178',\n\t\t\t\t'name' => 'Ascension vs GIANTS',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 10,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:29',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:38',\n\t\t\t),\n\t\t\t14 => \n\t\t\tarray (\n\t\t\t\t'id' => 3179,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 186,\n\t\t\t\t'team_blue_id' => 1274,\n\t\t\t\t'team_red_id' => 1282,\n\t\t\t\t'team_winner_id' => 1274,\n\t\t\t\t'polldaddy_id' => 8465079,\n\t\t\t\t'date_time' => '2014-11-22 20:30:00',\n\t\t\t\t'url' => '/tourney/match/3179',\n\t\t\t\t'name' => 'Reason Gaming vs SK Gaming Prime',\n\t\t\t\t'score_blue' => 7,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:29',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:38',\n\t\t\t),\n\t\t\t15 => \n\t\t\tarray (\n\t\t\t\t'id' => 3180,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 186,\n\t\t\t\t'team_blue_id' => 3565,\n\t\t\t\t'team_red_id' => 3574,\n\t\t\t\t'team_winner_id' => 3574,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2014-11-23 16:00:00',\n\t\t\t\t'url' => '/tourney/match/3180',\n\t\t\t\t'name' => 'SPARTA vs Different Dimension',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:29',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:38',\n\t\t\t),\n\t\t\t16 => \n\t\t\tarray (\n\t\t\t\t'id' => 3181,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 186,\n\t\t\t\t'team_blue_id' => 3545,\n\t\t\t\t'team_red_id' => 3556,\n\t\t\t\t'team_winner_id' => 3545,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2014-11-23 18:00:00',\n\t\t\t\t'url' => '/tourney/match/3181',\n\t\t\t\t'name' => 'Meloncats vs Cyber Gaming',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:29',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:38',\n\t\t\t),\n\t\t\t17 => \n\t\t\tarray (\n\t\t\t\t'id' => 3182,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 186,\n\t\t\t\t'team_blue_id' => 1276,\n\t\t\t\t'team_red_id' => 3580,\n\t\t\t\t'team_winner_id' => 1276,\n\t\t\t\t'polldaddy_id' => 8465081,\n\t\t\t\t'date_time' => '2014-11-22 22:30:00',\n\t\t\t\t'url' => '/tourney/match/3182',\n\t\t\t\t'name' => 'Gamers2 vs Team Strix',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:29',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:38',\n\t\t\t),\n\t\t\t18 => \n\t\t\tarray (\n\t\t\t\t'id' => 3183,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 186,\n\t\t\t\t'team_blue_id' => 1880,\n\t\t\t\t'team_red_id' => 1887,\n\t\t\t\t'team_winner_id' => 1887,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2014-11-23 14:00:00',\n\t\t\t\t'url' => '/tourney/match/3183',\n\t\t\t\t'name' => 'Tricked Esport vs n!faculty',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:29',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:38',\n\t\t\t),\n\t\t\t19 => \n\t\t\tarray (\n\t\t\t\t'id' => 3184,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 186,\n\t\t\t\t'team_blue_id' => 1243,\n\t\t\t\t'team_red_id' => 71,\n\t\t\t\t'team_winner_id' => 71,\n\t\t\t\t'polldaddy_id' => 8469804,\n\t\t\t\t'date_time' => '2014-11-30 17:30:00',\n\t\t\t\t'url' => '/tourney/match/3184',\n\t\t\t\t'name' => 'Millenium vs GIANTS',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 10,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:29',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:38',\n\t\t\t),\n\t\t\t20 => \n\t\t\tarray (\n\t\t\t\t'id' => 3185,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 186,\n\t\t\t\t'team_blue_id' => 1274,\n\t\t\t\t'team_red_id' => 3574,\n\t\t\t\t'team_winner_id' => 1274,\n\t\t\t\t'polldaddy_id' => 8471167,\n\t\t\t\t'date_time' => '2014-11-29 15:30:00',\n\t\t\t\t'url' => '/tourney/match/3185',\n\t\t\t\t'name' => 'Reason Gaming vs Different Dimension',\n\t\t\t\t'score_blue' => 7,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:29',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:38',\n\t\t\t),\n\t\t\t21 => \n\t\t\tarray (\n\t\t\t\t'id' => 3186,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 186,\n\t\t\t\t'team_blue_id' => 1273,\n\t\t\t\t'team_red_id' => 3545,\n\t\t\t\t'team_winner_id' => 1273,\n\t\t\t\t'polldaddy_id' => 8471437,\n\t\t\t\t'date_time' => '2014-11-29 17:30:00',\n\t\t\t\t'url' => '/tourney/match/3186',\n\t\t\t\t'name' => 'H2k Gaming vs Meloncats',\n\t\t\t\t'score_blue' => 8,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:29',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:38',\n\t\t\t),\n\t\t\t22 => \n\t\t\tarray (\n\t\t\t\t'id' => 3187,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 186,\n\t\t\t\t'team_blue_id' => 1276,\n\t\t\t\t'team_red_id' => 1887,\n\t\t\t\t'team_winner_id' => 1887,\n\t\t\t\t'polldaddy_id' => 8471162,\n\t\t\t\t'date_time' => '2014-11-30 15:30:00',\n\t\t\t\t'url' => '/tourney/match/3187',\n\t\t\t\t'name' => 'Gamers2 vs n!faculty',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:29',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:38',\n\t\t\t),\n\t\t\t23 => \n\t\t\tarray (\n\t\t\t\t'id' => 3188,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 186,\n\t\t\t\t'team_blue_id' => 71,\n\t\t\t\t'team_red_id' => 1274,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '1970-01-01 00:00:00',\n\t\t\t\t'url' => '/tourney/match/3188',\n\t\t\t\t'name' => 'GIANTS vs Reason Gaming',\n\t\t\t\t'score_blue' => 10,\n\t\t\t\t'score_red' => 7,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:29',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:38',\n\t\t\t),\n\t\t\t24 => \n\t\t\tarray (\n\t\t\t\t'id' => 3189,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 186,\n\t\t\t\t'team_blue_id' => 1273,\n\t\t\t\t'team_red_id' => 1887,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '1970-01-01 00:00:00',\n\t\t\t\t'url' => '/tourney/match/3189',\n\t\t\t\t'name' => 'H2k Gaming vs n!faculty',\n\t\t\t\t'score_blue' => 8,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:29',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:38',\n\t\t\t),\n\t\t\t25 => \n\t\t\tarray (\n\t\t\t\t'id' => 3190,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 186,\n\t\t\t\t'team_blue_id' => 0,\n\t\t\t\t'team_red_id' => 0,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '1970-01-01 00:00:00',\n\t\t\t\t'url' => '/tourney/match/3190',\n\t\t\t\t'name' => 'TBD vs TBD',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:29',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:38',\n\t\t\t),\n\t\t\t26 => \n\t\t\tarray (\n\t\t\t\t'id' => 3290,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 895,\n\t\t\t\t'team_red_id' => 684,\n\t\t\t\t'team_winner_id' => 684,\n\t\t\t\t'polldaddy_id' => 8565535,\n\t\t\t\t'date_time' => '2015-01-07 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3290',\n\t\t\t\t'name' => 'Najin e-mFire vs SKtelecom T1',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 11,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t27 => \n\t\t\tarray (\n\t\t\t\t'id' => 3291,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 3641,\n\t\t\t\t'team_red_id' => 889,\n\t\t\t\t'team_winner_id' => 3641,\n\t\t\t\t'polldaddy_id' => 8565536,\n\t\t\t\t'date_time' => '2015-01-09 08:00:00',\n\t\t\t\t'url' => '/tourney/match/3291',\n\t\t\t\t'name' => 'GE Tigers vs Incredible Miracle',\n\t\t\t\t'score_blue' => 12,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t28 => \n\t\t\tarray (\n\t\t\t\t'id' => 3292,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 3642,\n\t\t\t\t'team_red_id' => 998,\n\t\t\t\t'team_winner_id' => 998,\n\t\t\t\t'polldaddy_id' => 8565537,\n\t\t\t\t'date_time' => '2015-01-09 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3292',\n\t\t\t\t'name' => 'Samsung Galaxy vs Jin Air Green Wings',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 7,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t29 => \n\t\t\tarray (\n\t\t\t\t'id' => 3293,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 895,\n\t\t\t\t'team_red_id' => 642,\n\t\t\t\t'team_winner_id' => 895,\n\t\t\t\t'polldaddy_id' => 8565538,\n\t\t\t\t'date_time' => '2015-01-10 08:00:00',\n\t\t\t\t'url' => '/tourney/match/3293',\n\t\t\t\t'name' => 'Najin e-mFire vs KT Rolster',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t30 => \n\t\t\tarray (\n\t\t\t\t'id' => 3294,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 684,\n\t\t\t\t'team_red_id' => 640,\n\t\t\t\t'team_winner_id' => 640,\n\t\t\t\t'polldaddy_id' => 8565539,\n\t\t\t\t'date_time' => '2015-01-10 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3294',\n\t\t\t\t'name' => 'SKtelecom T1 vs CJ ENTUS',\n\t\t\t\t'score_blue' => 11,\n\t\t\t\t'score_red' => 10,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t31 => \n\t\t\tarray (\n\t\t\t\t'id' => 3295,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 3641,\n\t\t\t\t'team_red_id' => 3642,\n\t\t\t\t'team_winner_id' => 3641,\n\t\t\t\t'polldaddy_id' => 8565540,\n\t\t\t\t'date_time' => '2015-01-14 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3295',\n\t\t\t\t'name' => 'GE Tigers vs Samsung Galaxy',\n\t\t\t\t'score_blue' => 12,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t32 => \n\t\t\tarray (\n\t\t\t\t'id' => 3296,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 642,\n\t\t\t\t'team_red_id' => 684,\n\t\t\t\t'team_winner_id' => 684,\n\t\t\t\t'polldaddy_id' => 8565541,\n\t\t\t\t'date_time' => '2015-01-16 08:00:00',\n\t\t\t\t'url' => '/tourney/match/3296',\n\t\t\t\t'name' => 'KT Rolster vs SKtelecom T1',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 11,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t33 => \n\t\t\tarray (\n\t\t\t\t'id' => 3297,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 640,\n\t\t\t\t'team_red_id' => 895,\n\t\t\t\t'team_winner_id' => 640,\n\t\t\t\t'polldaddy_id' => 8565542,\n\t\t\t\t'date_time' => '2015-01-16 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3297',\n\t\t\t\t'name' => 'CJ ENTUS vs Najin e-mFire',\n\t\t\t\t'score_blue' => 10,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t34 => \n\t\t\tarray (\n\t\t\t\t'id' => 3298,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 3642,\n\t\t\t\t'team_red_id' => 889,\n\t\t\t\t'team_winner_id' => 889,\n\t\t\t\t'polldaddy_id' => 8565543,\n\t\t\t\t'date_time' => '2015-01-17 08:00:00',\n\t\t\t\t'url' => '/tourney/match/3298',\n\t\t\t\t'name' => 'Samsung Galaxy vs Incredible Miracle',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t35 => \n\t\t\tarray (\n\t\t\t\t'id' => 3299,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 3641,\n\t\t\t\t'team_red_id' => 998,\n\t\t\t\t'team_winner_id' => 3641,\n\t\t\t\t'polldaddy_id' => 8565544,\n\t\t\t\t'date_time' => '2015-01-17 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3299',\n\t\t\t\t'name' => 'GE Tigers vs Jin Air Green Wings',\n\t\t\t\t'score_blue' => 12,\n\t\t\t\t'score_red' => 7,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t36 => \n\t\t\tarray (\n\t\t\t\t'id' => 3300,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 642,\n\t\t\t\t'team_red_id' => 640,\n\t\t\t\t'team_winner_id' => 640,\n\t\t\t\t'polldaddy_id' => 8565545,\n\t\t\t\t'date_time' => '2015-01-21 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3300',\n\t\t\t\t'name' => 'KT Rolster vs CJ ENTUS',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 10,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t37 => \n\t\t\tarray (\n\t\t\t\t'id' => 3301,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 889,\n\t\t\t\t'team_red_id' => 684,\n\t\t\t\t'team_winner_id' => 684,\n\t\t\t\t'polldaddy_id' => 8565546,\n\t\t\t\t'date_time' => '2015-01-23 08:00:00',\n\t\t\t\t'url' => '/tourney/match/3301',\n\t\t\t\t'name' => 'Incredible Miracle vs SKtelecom T1',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 11,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t38 => \n\t\t\tarray (\n\t\t\t\t'id' => 3302,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 998,\n\t\t\t\t'team_red_id' => 895,\n\t\t\t\t'team_winner_id' => 998,\n\t\t\t\t'polldaddy_id' => 8565547,\n\t\t\t\t'date_time' => '2015-01-23 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3302',\n\t\t\t\t'name' => 'Jin Air Green Wings vs Najin e-mFire',\n\t\t\t\t'score_blue' => 7,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t39 => \n\t\t\tarray (\n\t\t\t\t'id' => 3303,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 640,\n\t\t\t\t'team_red_id' => 3641,\n\t\t\t\t'team_winner_id' => 3641,\n\t\t\t\t'polldaddy_id' => 8565548,\n\t\t\t\t'date_time' => '2015-01-24 08:00:00',\n\t\t\t\t'url' => '/tourney/match/3303',\n\t\t\t\t'name' => 'CJ ENTUS vs GE Tigers',\n\t\t\t\t'score_blue' => 10,\n\t\t\t\t'score_red' => 12,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t40 => \n\t\t\tarray (\n\t\t\t\t'id' => 3304,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 3642,\n\t\t\t\t'team_red_id' => 642,\n\t\t\t\t'team_winner_id' => 642,\n\t\t\t\t'polldaddy_id' => 8565549,\n\t\t\t\t'date_time' => '2015-01-24 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3304',\n\t\t\t\t'name' => 'Samsung Galaxy vs KT Rolster',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t41 => \n\t\t\tarray (\n\t\t\t\t'id' => 3305,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 889,\n\t\t\t\t'team_red_id' => 998,\n\t\t\t\t'team_winner_id' => 889,\n\t\t\t\t'polldaddy_id' => 8565550,\n\t\t\t\t'date_time' => '2015-01-28 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3305',\n\t\t\t\t'name' => 'Incredible Miracle vs Jin Air Green Wings',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 7,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t42 => \n\t\t\tarray (\n\t\t\t\t'id' => 3306,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 640,\n\t\t\t\t'team_red_id' => 3642,\n\t\t\t\t'team_winner_id' => 640,\n\t\t\t\t'polldaddy_id' => 8565551,\n\t\t\t\t'date_time' => '2015-01-30 08:00:00',\n\t\t\t\t'url' => '/tourney/match/3306',\n\t\t\t\t'name' => 'CJ ENTUS vs Samsung Galaxy',\n\t\t\t\t'score_blue' => 10,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t43 => \n\t\t\tarray (\n\t\t\t\t'id' => 3307,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 3641,\n\t\t\t\t'team_red_id' => 642,\n\t\t\t\t'team_winner_id' => 3641,\n\t\t\t\t'polldaddy_id' => 8565552,\n\t\t\t\t'date_time' => '2015-01-30 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3307',\n\t\t\t\t'name' => 'GE Tigers vs KT Rolster',\n\t\t\t\t'score_blue' => 12,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t44 => \n\t\t\tarray (\n\t\t\t\t'id' => 3308,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 998,\n\t\t\t\t'team_red_id' => 684,\n\t\t\t\t'team_winner_id' => 998,\n\t\t\t\t'polldaddy_id' => 8565553,\n\t\t\t\t'date_time' => '2015-01-31 08:00:00',\n\t\t\t\t'url' => '/tourney/match/3308',\n\t\t\t\t'name' => 'Jin Air Green Wings vs SKtelecom T1',\n\t\t\t\t'score_blue' => 7,\n\t\t\t\t'score_red' => 11,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t45 => \n\t\t\tarray (\n\t\t\t\t'id' => 3309,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 889,\n\t\t\t\t'team_red_id' => 895,\n\t\t\t\t'team_winner_id' => 895,\n\t\t\t\t'polldaddy_id' => 8565554,\n\t\t\t\t'date_time' => '2015-01-31 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3309',\n\t\t\t\t'name' => 'Incredible Miracle vs Najin e-mFire',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t46 => \n\t\t\tarray (\n\t\t\t\t'id' => 3310,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 684,\n\t\t\t\t'team_red_id' => 3642,\n\t\t\t\t'team_winner_id' => 684,\n\t\t\t\t'polldaddy_id' => 8565555,\n\t\t\t\t'date_time' => '2015-02-04 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3310',\n\t\t\t\t'name' => 'SKtelecom T1 vs Samsung Galaxy',\n\t\t\t\t'score_blue' => 11,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t47 => \n\t\t\tarray (\n\t\t\t\t'id' => 3311,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 895,\n\t\t\t\t'team_red_id' => 3641,\n\t\t\t\t'team_winner_id' => 3641,\n\t\t\t\t'polldaddy_id' => 8565556,\n\t\t\t\t'date_time' => '2015-02-06 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3311',\n\t\t\t\t'name' => 'Najin e-mFire vs GE Tigers',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 12,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t48 => \n\t\t\tarray (\n\t\t\t\t'id' => 3312,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 998,\n\t\t\t\t'team_red_id' => 640,\n\t\t\t\t'team_winner_id' => 998,\n\t\t\t\t'polldaddy_id' => 8565557,\n\t\t\t\t'date_time' => '2015-02-07 08:00:00',\n\t\t\t\t'url' => '/tourney/match/3312',\n\t\t\t\t'name' => 'Jin Air Green Wings vs CJ ENTUS',\n\t\t\t\t'score_blue' => 7,\n\t\t\t\t'score_red' => 10,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t49 => \n\t\t\tarray (\n\t\t\t\t'id' => 3313,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 642,\n\t\t\t\t'team_red_id' => 889,\n\t\t\t\t'team_winner_id' => 889,\n\t\t\t\t'polldaddy_id' => 8565558,\n\t\t\t\t'date_time' => '2015-02-07 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3313',\n\t\t\t\t'name' => 'KT Rolster vs Incredible Miracle',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t50 => \n\t\t\tarray (\n\t\t\t\t'id' => 3314,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 889,\n\t\t\t\t'team_red_id' => 640,\n\t\t\t\t'team_winner_id' => 640,\n\t\t\t\t'polldaddy_id' => 8565559,\n\t\t\t\t'date_time' => '2015-02-11 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3314',\n\t\t\t\t'name' => 'Incredible Miracle vs CJ ENTUS',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 10,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t51 => \n\t\t\tarray (\n\t\t\t\t'id' => 3315,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 642,\n\t\t\t\t'team_red_id' => 998,\n\t\t\t\t'team_winner_id' => 642,\n\t\t\t\t'polldaddy_id' => 8565560,\n\t\t\t\t'date_time' => '2015-02-13 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3315',\n\t\t\t\t'name' => 'KT Rolster vs Jin Air Green Wings',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 7,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t52 => \n\t\t\tarray (\n\t\t\t\t'id' => 3316,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 895,\n\t\t\t\t'team_red_id' => 3642,\n\t\t\t\t'team_winner_id' => 895,\n\t\t\t\t'polldaddy_id' => 8565561,\n\t\t\t\t'date_time' => '2015-02-14 08:00:00',\n\t\t\t\t'url' => '/tourney/match/3316',\n\t\t\t\t'name' => 'Najin e-mFire vs Samsung Galaxy',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t53 => \n\t\t\tarray (\n\t\t\t\t'id' => 3317,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 684,\n\t\t\t\t'team_red_id' => 3641,\n\t\t\t\t'team_winner_id' => 3641,\n\t\t\t\t'polldaddy_id' => 8565562,\n\t\t\t\t'date_time' => '2015-02-14 10:00:00',\n\t\t\t\t'url' => '/tourney/match/3317',\n\t\t\t\t'name' => 'SK Telecom T1 vs GE Tigers',\n\t\t\t\t'score_blue' => 11,\n\t\t\t\t'score_red' => 12,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t54 => \n\t\t\tarray (\n\t\t\t\t'id' => 3318,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 684,\n\t\t\t\t'team_red_id' => 895,\n\t\t\t\t'team_winner_id' => 684,\n\t\t\t\t'polldaddy_id' => 8565564,\n\t\t\t\t'date_time' => '2015-02-25 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3318',\n\t\t\t\t'name' => 'SK Telecom T1 vs Najin e-mFire',\n\t\t\t\t'score_blue' => 11,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t55 => \n\t\t\tarray (\n\t\t\t\t'id' => 3319,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 998,\n\t\t\t\t'team_red_id' => 3642,\n\t\t\t\t'team_winner_id' => 998,\n\t\t\t\t'polldaddy_id' => 8565565,\n\t\t\t\t'date_time' => '2015-02-27 08:00:00',\n\t\t\t\t'url' => '/tourney/match/3319',\n\t\t\t\t'name' => 'Jin Air Green Wings vs Samsung Galaxy',\n\t\t\t\t'score_blue' => 7,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t56 => \n\t\t\tarray (\n\t\t\t\t'id' => 3320,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 889,\n\t\t\t\t'team_red_id' => 3641,\n\t\t\t\t'team_winner_id' => 3641,\n\t\t\t\t'polldaddy_id' => 8565566,\n\t\t\t\t'date_time' => '2015-02-27 10:00:00',\n\t\t\t\t'url' => '/tourney/match/3320',\n\t\t\t\t'name' => 'Incredible Miracle vs GE Tigers',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 12,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t57 => \n\t\t\tarray (\n\t\t\t\t'id' => 3321,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 640,\n\t\t\t\t'team_red_id' => 684,\n\t\t\t\t'team_winner_id' => 684,\n\t\t\t\t'polldaddy_id' => 8565567,\n\t\t\t\t'date_time' => '2015-02-28 08:00:00',\n\t\t\t\t'url' => '/tourney/match/3321',\n\t\t\t\t'name' => 'CJ ENTUS vs SK Telecom T1',\n\t\t\t\t'score_blue' => 10,\n\t\t\t\t'score_red' => 11,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t58 => \n\t\t\tarray (\n\t\t\t\t'id' => 3322,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 642,\n\t\t\t\t'team_red_id' => 895,\n\t\t\t\t'team_winner_id' => 895,\n\t\t\t\t'polldaddy_id' => 8565568,\n\t\t\t\t'date_time' => '2015-02-28 10:00:00',\n\t\t\t\t'url' => '/tourney/match/3322',\n\t\t\t\t'name' => 'KT Rolster vs Najin e-mFire',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t59 => \n\t\t\tarray (\n\t\t\t\t'id' => 3323,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 3642,\n\t\t\t\t'team_red_id' => 3641,\n\t\t\t\t'team_winner_id' => 3641,\n\t\t\t\t'polldaddy_id' => 8565569,\n\t\t\t\t'date_time' => '2015-03-04 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3323',\n\t\t\t\t'name' => 'Samsung Galaxy vs GE Tigers',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 12,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:44',\n\t\t\t),\n\t\t\t60 => \n\t\t\tarray (\n\t\t\t\t'id' => 3324,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 895,\n\t\t\t\t'team_red_id' => 640,\n\t\t\t\t'team_winner_id' => 640,\n\t\t\t\t'polldaddy_id' => 8565570,\n\t\t\t\t'date_time' => '2015-03-06 08:00:00',\n\t\t\t\t'url' => '/tourney/match/3324',\n\t\t\t\t'name' => 'Najin e-mFire vs CJ ENTUS',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 10,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:45',\n\t\t\t),\n\t\t\t61 => \n\t\t\tarray (\n\t\t\t\t'id' => 3325,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 684,\n\t\t\t\t'team_red_id' => 642,\n\t\t\t\t'team_winner_id' => 684,\n\t\t\t\t'polldaddy_id' => 8565571,\n\t\t\t\t'date_time' => '2015-03-06 10:00:00',\n\t\t\t\t'url' => '/tourney/match/3325',\n\t\t\t\t'name' => 'SK Telecom T1 vs KT Rolster',\n\t\t\t\t'score_blue' => 11,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:45',\n\t\t\t),\n\t\t\t62 => \n\t\t\tarray (\n\t\t\t\t'id' => 3326,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 998,\n\t\t\t\t'team_red_id' => 3641,\n\t\t\t\t'team_winner_id' => 3641,\n\t\t\t\t'polldaddy_id' => 8565572,\n\t\t\t\t'date_time' => '2015-03-07 08:00:00',\n\t\t\t\t'url' => '/tourney/match/3326',\n\t\t\t\t'name' => 'Jin Air Green Wings vs GE Tigers',\n\t\t\t\t'score_blue' => 7,\n\t\t\t\t'score_red' => 12,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:45',\n\t\t\t),\n\t\t\t63 => \n\t\t\tarray (\n\t\t\t\t'id' => 3327,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 889,\n\t\t\t\t'team_red_id' => 3642,\n\t\t\t\t'team_winner_id' => 3642,\n\t\t\t\t'polldaddy_id' => 8565573,\n\t\t\t\t'date_time' => '2015-03-07 10:00:00',\n\t\t\t\t'url' => '/tourney/match/3327',\n\t\t\t\t'name' => 'Incredible Miracle vs Samsung Galaxy',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:45',\n\t\t\t),\n\t\t\t64 => \n\t\t\tarray (\n\t\t\t\t'id' => 3328,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 640,\n\t\t\t\t'team_red_id' => 642,\n\t\t\t\t'team_winner_id' => 640,\n\t\t\t\t'polldaddy_id' => 8565574,\n\t\t\t\t'date_time' => '2015-03-18 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3328',\n\t\t\t\t'name' => 'CJ ENTUS vs KT Rolster',\n\t\t\t\t'score_blue' => 10,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:45',\n\t\t\t),\n\t\t\t65 => \n\t\t\tarray (\n\t\t\t\t'id' => 3329,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 895,\n\t\t\t\t'team_red_id' => 998,\n\t\t\t\t'team_winner_id' => 998,\n\t\t\t\t'polldaddy_id' => 8565575,\n\t\t\t\t'date_time' => '2015-03-20 08:00:00',\n\t\t\t\t'url' => '/tourney/match/3329',\n\t\t\t\t'name' => 'Najin e-mFire vs Jin Air Green Wings',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 7,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:45',\n\t\t\t),\n\t\t\t66 => \n\t\t\tarray (\n\t\t\t\t'id' => 3330,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 684,\n\t\t\t\t'team_red_id' => 889,\n\t\t\t\t'team_winner_id' => 684,\n\t\t\t\t'polldaddy_id' => 8565576,\n\t\t\t\t'date_time' => '2015-03-20 10:00:00',\n\t\t\t\t'url' => '/tourney/match/3330',\n\t\t\t\t'name' => 'SK Telecom T1 vs Incredible Miracle',\n\t\t\t\t'score_blue' => 11,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:45',\n\t\t\t),\n\t\t\t67 => \n\t\t\tarray (\n\t\t\t\t'id' => 3331,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 642,\n\t\t\t\t'team_red_id' => 3642,\n\t\t\t\t'team_winner_id' => 642,\n\t\t\t\t'polldaddy_id' => 8565577,\n\t\t\t\t'date_time' => '2015-03-21 08:00:00',\n\t\t\t\t'url' => '/tourney/match/3331',\n\t\t\t\t'name' => 'KT Rolster vs Samsung Galaxy',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:45',\n\t\t\t),\n\t\t\t68 => \n\t\t\tarray (\n\t\t\t\t'id' => 3332,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 3641,\n\t\t\t\t'team_red_id' => 640,\n\t\t\t\t'team_winner_id' => 3641,\n\t\t\t\t'polldaddy_id' => 8565578,\n\t\t\t\t'date_time' => '2015-03-21 10:00:00',\n\t\t\t\t'url' => '/tourney/match/3332',\n\t\t\t\t'name' => 'GE Tigers vs CJ ENTUS',\n\t\t\t\t'score_blue' => 12,\n\t\t\t\t'score_red' => 10,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:45',\n\t\t\t),\n\t\t\t69 => \n\t\t\tarray (\n\t\t\t\t'id' => 3333,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 998,\n\t\t\t\t'team_red_id' => 889,\n\t\t\t\t'team_winner_id' => 998,\n\t\t\t\t'polldaddy_id' => 8565579,\n\t\t\t\t'date_time' => '2015-03-25 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3333',\n\t\t\t\t'name' => 'Jin Air Green Wings vs Incredible Miracle',\n\t\t\t\t'score_blue' => 7,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:45',\n\t\t\t),\n\t\t\t70 => \n\t\t\tarray (\n\t\t\t\t'id' => 3334,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 642,\n\t\t\t\t'team_red_id' => 3641,\n\t\t\t\t'team_winner_id' => 642,\n\t\t\t\t'polldaddy_id' => 8565580,\n\t\t\t\t'date_time' => '2015-03-27 08:00:00',\n\t\t\t\t'url' => '/tourney/match/3334',\n\t\t\t\t'name' => 'KT Rolster vs GE Tigers',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 12,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:45',\n\t\t\t),\n\t\t\t71 => \n\t\t\tarray (\n\t\t\t\t'id' => 3335,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 3642,\n\t\t\t\t'team_red_id' => 640,\n\t\t\t\t'team_winner_id' => 640,\n\t\t\t\t'polldaddy_id' => 8565581,\n\t\t\t\t'date_time' => '2015-03-27 10:00:00',\n\t\t\t\t'url' => '/tourney/match/3335',\n\t\t\t\t'name' => 'Samsung Galaxy vs CJ ENTUS',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 10,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:45',\n\t\t\t),\n\t\t\t72 => \n\t\t\tarray (\n\t\t\t\t'id' => 3336,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 895,\n\t\t\t\t'team_red_id' => 889,\n\t\t\t\t'team_winner_id' => 895,\n\t\t\t\t'polldaddy_id' => 8565582,\n\t\t\t\t'date_time' => '2015-03-28 08:00:00',\n\t\t\t\t'url' => '/tourney/match/3336',\n\t\t\t\t'name' => 'Najin e-mFire vs Incredible Miracle',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:31',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:45',\n\t\t\t),\n\t\t\t73 => \n\t\t\tarray (\n\t\t\t\t'id' => 3337,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 684,\n\t\t\t\t'team_red_id' => 998,\n\t\t\t\t'team_winner_id' => 684,\n\t\t\t\t'polldaddy_id' => 8565583,\n\t\t\t\t'date_time' => '2015-03-28 10:00:00',\n\t\t\t\t'url' => '/tourney/match/3337',\n\t\t\t\t'name' => 'SK Telecom T1 vs Jin Air Green Wings',\n\t\t\t\t'score_blue' => 11,\n\t\t\t\t'score_red' => 7,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:32',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:45',\n\t\t\t),\n\t\t\t74 => \n\t\t\tarray (\n\t\t\t\t'id' => 3338,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 3641,\n\t\t\t\t'team_red_id' => 895,\n\t\t\t\t'team_winner_id' => 3641,\n\t\t\t\t'polldaddy_id' => 8565584,\n\t\t\t\t'date_time' => '2015-04-01 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3338',\n\t\t\t\t'name' => 'GE Tigers vs Najin e-mFire',\n\t\t\t\t'score_blue' => 12,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:32',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:45',\n\t\t\t),\n\t\t\t75 => \n\t\t\tarray (\n\t\t\t\t'id' => 3339,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 3642,\n\t\t\t\t'team_red_id' => 684,\n\t\t\t\t'team_winner_id' => 684,\n\t\t\t\t'polldaddy_id' => 8565585,\n\t\t\t\t'date_time' => '2015-04-03 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3339',\n\t\t\t\t'name' => 'Samsung Galaxy vs SK Telecom T1',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 11,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:32',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:45',\n\t\t\t),\n\t\t\t76 => \n\t\t\tarray (\n\t\t\t\t'id' => 3340,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 889,\n\t\t\t\t'team_red_id' => 642,\n\t\t\t\t'team_winner_id' => 642,\n\t\t\t\t'polldaddy_id' => 8565586,\n\t\t\t\t'date_time' => '2015-04-04 08:00:00',\n\t\t\t\t'url' => '/tourney/match/3340',\n\t\t\t\t'name' => 'Incredible Miracle vs KT Rolster',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:32',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:45',\n\t\t\t),\n\t\t\t77 => \n\t\t\tarray (\n\t\t\t\t'id' => 3341,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 640,\n\t\t\t\t'team_red_id' => 998,\n\t\t\t\t'team_winner_id' => 640,\n\t\t\t\t'polldaddy_id' => 8565587,\n\t\t\t\t'date_time' => '2015-04-04 10:00:00',\n\t\t\t\t'url' => '/tourney/match/3341',\n\t\t\t\t'name' => 'CJ ENTUS vs Jin Air Green Wings',\n\t\t\t\t'score_blue' => 10,\n\t\t\t\t'score_red' => 7,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:32',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:45',\n\t\t\t),\n\t\t\t78 => \n\t\t\tarray (\n\t\t\t\t'id' => 3342,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 998,\n\t\t\t\t'team_red_id' => 642,\n\t\t\t\t'team_winner_id' => 642,\n\t\t\t\t'polldaddy_id' => 8565588,\n\t\t\t\t'date_time' => '2015-04-08 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3342',\n\t\t\t\t'name' => 'Jin Air Green Wings vs KT Rolster',\n\t\t\t\t'score_blue' => 7,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:32',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:45',\n\t\t\t),\n\t\t\t79 => \n\t\t\tarray (\n\t\t\t\t'id' => 3343,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 640,\n\t\t\t\t'team_red_id' => 889,\n\t\t\t\t'team_winner_id' => 640,\n\t\t\t\t'polldaddy_id' => 8565589,\n\t\t\t\t'date_time' => '2015-04-10 09:00:00',\n\t\t\t\t'url' => '/tourney/match/3343',\n\t\t\t\t'name' => 'CJ ENTUS vs Incredible Miracle',\n\t\t\t\t'score_blue' => 10,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:32',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:45',\n\t\t\t),\n\t\t\t80 => \n\t\t\tarray (\n\t\t\t\t'id' => 3344,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 3641,\n\t\t\t\t'team_red_id' => 684,\n\t\t\t\t'team_winner_id' => 684,\n\t\t\t\t'polldaddy_id' => 8565590,\n\t\t\t\t'date_time' => '2015-04-11 08:00:00',\n\t\t\t\t'url' => '/tourney/match/3344',\n\t\t\t\t'name' => 'GE Tigers vs SK Telecom T1',\n\t\t\t\t'score_blue' => 12,\n\t\t\t\t'score_red' => 11,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:32',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:45',\n\t\t\t),\n\t\t\t81 => \n\t\t\tarray (\n\t\t\t\t'id' => 3345,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 194,\n\t\t\t\t'team_blue_id' => 3642,\n\t\t\t\t'team_red_id' => 895,\n\t\t\t\t'team_winner_id' => 3642,\n\t\t\t\t'polldaddy_id' => 8565591,\n\t\t\t\t'date_time' => '2015-04-11 10:00:00',\n\t\t\t\t'url' => '/tourney/match/3345',\n\t\t\t\t'name' => 'Samsung Galaxy vs Najin e-mFire',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:32',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:45',\n\t\t\t),\n\t\t\t82 => \n\t\t\tarray (\n\t\t\t\t'id' => 3682,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 949,\n\t\t\t\t'team_red_id' => 3676,\n\t\t\t\t'team_winner_id' => 949,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-01-08 11:00:00',\n\t\t\t\t'url' => '/tourney/match/3682',\n\t\t\t\t'name' => 'Ahq e-Sports Club vs Dream or Reality',\n\t\t\t\t'score_blue' => 12,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t83 => \n\t\t\tarray (\n\t\t\t\t'id' => 3683,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3676,\n\t\t\t\t'team_red_id' => 3677,\n\t\t\t\t'team_winner_id' => 3677,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-01-08 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3683',\n\t\t\t\t'name' => 'Dream or Reality vs Logitech Sniper',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 8,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t84 => \n\t\t\tarray (\n\t\t\t\t'id' => 3684,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 974,\n\t\t\t\t'team_red_id' => 949,\n\t\t\t\t'team_winner_id' => 974,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-01-08 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3684',\n\t\t\t\t'name' => 'Taipei Assassins vs Ahq e-Sports Club',\n\t\t\t\t'score_blue' => 16,\n\t\t\t\t'score_red' => 12,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t85 => \n\t\t\tarray (\n\t\t\t\t'id' => 3685,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3677,\n\t\t\t\t'team_red_id' => 3678,\n\t\t\t\t'team_winner_id' => 3678,\n\t\t\t\t'polldaddy_id' => 8571685,\n\t\t\t\t'date_time' => '2015-01-09 11:00:00',\n\t\t\t\t'url' => '/tourney/match/3685',\n\t\t\t\t'name' => 'Logitech Sniper vs Never Give Up',\n\t\t\t\t'score_blue' => 8,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t86 => \n\t\t\tarray (\n\t\t\t\t'id' => 3686,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3678,\n\t\t\t\t'team_red_id' => 949,\n\t\t\t\t'team_winner_id' => 949,\n\t\t\t\t'polldaddy_id' => 8571686,\n\t\t\t\t'date_time' => '2015-01-09 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3686',\n\t\t\t\t'name' => 'Never Give Up vs Ahq e-Sports Club',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 12,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t87 => \n\t\t\tarray (\n\t\t\t\t'id' => 3687,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3679,\n\t\t\t\t'team_red_id' => 3680,\n\t\t\t\t'team_winner_id' => 3680,\n\t\t\t\t'polldaddy_id' => 8571687,\n\t\t\t\t'date_time' => '2015-01-09 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3687',\n\t\t\t\t'name' => 'Midnight Sun e-Sports vs Hong Kong Esports',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 15,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t88 => \n\t\t\tarray (\n\t\t\t\t'id' => 3688,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3679,\n\t\t\t\t'team_red_id' => 1694,\n\t\t\t\t'team_winner_id' => 1694,\n\t\t\t\t'polldaddy_id' => 8571688,\n\t\t\t\t'date_time' => '2015-01-10 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3688',\n\t\t\t\t'name' => 'Midnight Sun e-Sports vs yoe Flash Wolves',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 20,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t89 => \n\t\t\tarray (\n\t\t\t\t'id' => 3689,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 1694,\n\t\t\t\t'team_red_id' => 974,\n\t\t\t\t'team_winner_id' => 974,\n\t\t\t\t'polldaddy_id' => 8571689,\n\t\t\t\t'date_time' => '2015-01-10 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3689',\n\t\t\t\t'name' => 'yoe Flash Wolves vs Taipei Assassins',\n\t\t\t\t'score_blue' => 20,\n\t\t\t\t'score_red' => 16,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t90 => \n\t\t\tarray (\n\t\t\t\t'id' => 3690,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3680,\n\t\t\t\t'team_red_id' => 3677,\n\t\t\t\t'team_winner_id' => 3680,\n\t\t\t\t'polldaddy_id' => 8571690,\n\t\t\t\t'date_time' => '2015-01-11 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3690',\n\t\t\t\t'name' => 'Hong Kong Esports vs Logitech Sniper',\n\t\t\t\t'score_blue' => 15,\n\t\t\t\t'score_red' => 8,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t91 => \n\t\t\tarray (\n\t\t\t\t'id' => 3691,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3679,\n\t\t\t\t'team_red_id' => 974,\n\t\t\t\t'team_winner_id' => 974,\n\t\t\t\t'polldaddy_id' => 8571691,\n\t\t\t\t'date_time' => '2015-01-11 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3691',\n\t\t\t\t'name' => 'Midnight Sun e-Sports vs Taipei Assassins',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 16,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t92 => \n\t\t\tarray (\n\t\t\t\t'id' => 3692,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3676,\n\t\t\t\t'team_red_id' => 1694,\n\t\t\t\t'team_winner_id' => 1694,\n\t\t\t\t'polldaddy_id' => 8571692,\n\t\t\t\t'date_time' => '2015-01-15 11:00:00',\n\t\t\t\t'url' => '/tourney/match/3692',\n\t\t\t\t'name' => 'Dream or Reality vs yoe Flash Wolves',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 20,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t93 => \n\t\t\tarray (\n\t\t\t\t'id' => 3693,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3680,\n\t\t\t\t'team_red_id' => 3676,\n\t\t\t\t'team_winner_id' => 3680,\n\t\t\t\t'polldaddy_id' => 8571693,\n\t\t\t\t'date_time' => '2015-01-15 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3693',\n\t\t\t\t'name' => 'Hong Kong Esports vs Dream or Reality',\n\t\t\t\t'score_blue' => 15,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t94 => \n\t\t\tarray (\n\t\t\t\t'id' => 3694,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 949,\n\t\t\t\t'team_red_id' => 3680,\n\t\t\t\t'team_winner_id' => 3680,\n\t\t\t\t'polldaddy_id' => 8571694,\n\t\t\t\t'date_time' => '2015-01-15 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3694',\n\t\t\t\t'name' => 'Ahq e-Sports Club vs Hong Kong Esports',\n\t\t\t\t'score_blue' => 12,\n\t\t\t\t'score_red' => 15,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t95 => \n\t\t\tarray (\n\t\t\t\t'id' => 3695,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 974,\n\t\t\t\t'team_red_id' => 3676,\n\t\t\t\t'team_winner_id' => 974,\n\t\t\t\t'polldaddy_id' => 8571695,\n\t\t\t\t'date_time' => '2015-01-16 11:00:00',\n\t\t\t\t'url' => '/tourney/match/3695',\n\t\t\t\t'name' => 'Taipei Assassins vs Dream or Reality',\n\t\t\t\t'score_blue' => 16,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t96 => \n\t\t\tarray (\n\t\t\t\t'id' => 3696,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3676,\n\t\t\t\t'team_red_id' => 3678,\n\t\t\t\t'team_winner_id' => 3678,\n\t\t\t\t'polldaddy_id' => 8571696,\n\t\t\t\t'date_time' => '2015-01-16 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3696',\n\t\t\t\t'name' => 'Dream or Reality vs Never Give Up',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t97 => \n\t\t\tarray (\n\t\t\t\t'id' => 3697,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3678,\n\t\t\t\t'team_red_id' => 974,\n\t\t\t\t'team_winner_id' => 974,\n\t\t\t\t'polldaddy_id' => 8571697,\n\t\t\t\t'date_time' => '2015-01-16 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3697',\n\t\t\t\t'name' => 'Never Give Up vs Taipei Assassins',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 16,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t98 => \n\t\t\tarray (\n\t\t\t\t'id' => 3698,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3677,\n\t\t\t\t'team_red_id' => 3679,\n\t\t\t\t'team_winner_id' => 3677,\n\t\t\t\t'polldaddy_id' => 8571698,\n\t\t\t\t'date_time' => '2015-01-17 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3698',\n\t\t\t\t'name' => 'Logitech Sniper vs Midnight Sun e-Sports',\n\t\t\t\t'score_blue' => 8,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t99 => \n\t\t\tarray (\n\t\t\t\t'id' => 3699,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3680,\n\t\t\t\t'team_red_id' => 974,\n\t\t\t\t'team_winner_id' => 974,\n\t\t\t\t'polldaddy_id' => 8571699,\n\t\t\t\t'date_time' => '2015-01-17 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3699',\n\t\t\t\t'name' => 'Hong Kong Esports vs Taipei Assassins',\n\t\t\t\t'score_blue' => 15,\n\t\t\t\t'score_red' => 16,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t100 => \n\t\t\tarray (\n\t\t\t\t'id' => 3700,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 949,\n\t\t\t\t'team_red_id' => 3679,\n\t\t\t\t'team_winner_id' => 949,\n\t\t\t\t'polldaddy_id' => 8571700,\n\t\t\t\t'date_time' => '2015-01-18 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3700',\n\t\t\t\t'name' => 'Ahq e-Sports Club vs Midnight Sun e-Sports',\n\t\t\t\t'score_blue' => 12,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t101 => \n\t\t\tarray (\n\t\t\t\t'id' => 3701,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3677,\n\t\t\t\t'team_red_id' => 949,\n\t\t\t\t'team_winner_id' => 949,\n\t\t\t\t'polldaddy_id' => 8571702,\n\t\t\t\t'date_time' => '2015-01-18 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3701',\n\t\t\t\t'name' => 'Logitech Sniper vs Ahq e-Sports Club',\n\t\t\t\t'score_blue' => 8,\n\t\t\t\t'score_red' => 12,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t102 => \n\t\t\tarray (\n\t\t\t\t'id' => 3702,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3679,\n\t\t\t\t'team_red_id' => 3676,\n\t\t\t\t'team_winner_id' => 3679,\n\t\t\t\t'polldaddy_id' => 8571703,\n\t\t\t\t'date_time' => '2015-01-22 11:00:00',\n\t\t\t\t'url' => '/tourney/match/3702',\n\t\t\t\t'name' => 'Midnight Sun e-Sports vs Dream or Reality',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t103 => \n\t\t\tarray (\n\t\t\t\t'id' => 3703,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 1694,\n\t\t\t\t'team_red_id' => 3678,\n\t\t\t\t'team_winner_id' => 1694,\n\t\t\t\t'polldaddy_id' => 8571704,\n\t\t\t\t'date_time' => '2015-01-22 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3703',\n\t\t\t\t'name' => 'yoe Flash Wolves vs Never Give Up',\n\t\t\t\t'score_blue' => 20,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t104 => \n\t\t\tarray (\n\t\t\t\t'id' => 3704,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 949,\n\t\t\t\t'team_red_id' => 1694,\n\t\t\t\t'team_winner_id' => 1694,\n\t\t\t\t'polldaddy_id' => 8571705,\n\t\t\t\t'date_time' => '2015-01-22 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3704',\n\t\t\t\t'name' => 'Ahq e-Sports Club vs yoe Flash Wolves',\n\t\t\t\t'score_blue' => 12,\n\t\t\t\t'score_red' => 20,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t105 => \n\t\t\tarray (\n\t\t\t\t'id' => 3705,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3680,\n\t\t\t\t'team_red_id' => 3678,\n\t\t\t\t'team_winner_id' => 3680,\n\t\t\t\t'polldaddy_id' => 8571706,\n\t\t\t\t'date_time' => '2015-01-23 11:00:00',\n\t\t\t\t'url' => '/tourney/match/3705',\n\t\t\t\t'name' => 'Hong Kong Esports vs Never Give Up',\n\t\t\t\t'score_blue' => 15,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t106 => \n\t\t\tarray (\n\t\t\t\t'id' => 3706,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3678,\n\t\t\t\t'team_red_id' => 3679,\n\t\t\t\t'team_winner_id' => 3678,\n\t\t\t\t'polldaddy_id' => 8571707,\n\t\t\t\t'date_time' => '2015-01-23 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3706',\n\t\t\t\t'name' => 'Never Give Up vs Midnight Sun e-Sports',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t107 => \n\t\t\tarray (\n\t\t\t\t'id' => 3707,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 974,\n\t\t\t\t'team_red_id' => 3677,\n\t\t\t\t'team_winner_id' => 974,\n\t\t\t\t'polldaddy_id' => 8571708,\n\t\t\t\t'date_time' => '2015-01-23 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3707',\n\t\t\t\t'name' => 'Taipei Assassins vs Logitech Sniper',\n\t\t\t\t'score_blue' => 16,\n\t\t\t\t'score_red' => 8,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t108 => \n\t\t\tarray (\n\t\t\t\t'id' => 3708,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3677,\n\t\t\t\t'team_red_id' => 1694,\n\t\t\t\t'team_winner_id' => 1694,\n\t\t\t\t'polldaddy_id' => 8571709,\n\t\t\t\t'date_time' => '2015-01-24 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3708',\n\t\t\t\t'name' => 'Logitech Sniper vs yoe Flash Wolves',\n\t\t\t\t'score_blue' => 8,\n\t\t\t\t'score_red' => 20,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t109 => \n\t\t\tarray (\n\t\t\t\t'id' => 3709,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 1694,\n\t\t\t\t'team_red_id' => 3680,\n\t\t\t\t'team_winner_id' => 1694,\n\t\t\t\t'polldaddy_id' => 8571710,\n\t\t\t\t'date_time' => '2015-01-24 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3709',\n\t\t\t\t'name' => 'yoe Flash Wolves vs Hong Kong Esports',\n\t\t\t\t'score_blue' => 20,\n\t\t\t\t'score_red' => 15,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t110 => \n\t\t\tarray (\n\t\t\t\t'id' => 3710,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3679,\n\t\t\t\t'team_red_id' => 949,\n\t\t\t\t'team_winner_id' => 3679,\n\t\t\t\t'polldaddy_id' => 8571711,\n\t\t\t\t'date_time' => '2015-02-14 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3710',\n\t\t\t\t'name' => 'Midnight Sun e-Sports vs Ahq e-Sports Club',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 12,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t111 => \n\t\t\tarray (\n\t\t\t\t'id' => 3711,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 949,\n\t\t\t\t'team_red_id' => 3677,\n\t\t\t\t'team_winner_id' => 949,\n\t\t\t\t'polldaddy_id' => 8571712,\n\t\t\t\t'date_time' => '2015-02-25 11:00:00',\n\t\t\t\t'url' => '/tourney/match/3711',\n\t\t\t\t'name' => 'Ahq e-Sports Club vs Logitech Sniper',\n\t\t\t\t'score_blue' => 12,\n\t\t\t\t'score_red' => 8,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t112 => \n\t\t\tarray (\n\t\t\t\t'id' => 3712,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3677,\n\t\t\t\t'team_red_id' => 3680,\n\t\t\t\t'team_winner_id' => 3680,\n\t\t\t\t'polldaddy_id' => 8571713,\n\t\t\t\t'date_time' => '2015-02-12 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3712',\n\t\t\t\t'name' => 'Logitech Sniper vs Hong Kong Esports',\n\t\t\t\t'score_blue' => 8,\n\t\t\t\t'score_red' => 15,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t113 => \n\t\t\tarray (\n\t\t\t\t'id' => 3713,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 974,\n\t\t\t\t'team_red_id' => 3679,\n\t\t\t\t'team_winner_id' => 974,\n\t\t\t\t'polldaddy_id' => 8571714,\n\t\t\t\t'date_time' => '2015-02-12 11:00:00',\n\t\t\t\t'url' => '/tourney/match/3713',\n\t\t\t\t'name' => 'Taipei Assassins vs Midnight Sun e-Sports',\n\t\t\t\t'score_blue' => 16,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t114 => \n\t\t\tarray (\n\t\t\t\t'id' => 3714,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 1694,\n\t\t\t\t'team_red_id' => 3679,\n\t\t\t\t'team_winner_id' => 1694,\n\t\t\t\t'polldaddy_id' => 8571715,\n\t\t\t\t'date_time' => '2015-02-25 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3714',\n\t\t\t\t'name' => 'yoe Flash Wolves vs Midnight Sun e-Sports',\n\t\t\t\t'score_blue' => 20,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t115 => \n\t\t\tarray (\n\t\t\t\t'id' => 3715,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 974,\n\t\t\t\t'team_red_id' => 1694,\n\t\t\t\t'team_winner_id' => 1694,\n\t\t\t\t'polldaddy_id' => 8571716,\n\t\t\t\t'date_time' => '2015-02-12 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3715',\n\t\t\t\t'name' => 'Taipei Assassins vs yoe Flash Wolves',\n\t\t\t\t'score_blue' => 16,\n\t\t\t\t'score_red' => 20,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t116 => \n\t\t\tarray (\n\t\t\t\t'id' => 3716,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 949,\n\t\t\t\t'team_red_id' => 3676,\n\t\t\t\t'team_winner_id' => 949,\n\t\t\t\t'polldaddy_id' => 8571717,\n\t\t\t\t'date_time' => '2015-01-25 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3716',\n\t\t\t\t'name' => 'Ahq e-Sports Club vs Dream or Reality',\n\t\t\t\t'score_blue' => 12,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t117 => \n\t\t\tarray (\n\t\t\t\t'id' => 3717,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3678,\n\t\t\t\t'team_red_id' => 1694,\n\t\t\t\t'team_winner_id' => 1694,\n\t\t\t\t'polldaddy_id' => 8571718,\n\t\t\t\t'date_time' => '2015-02-11 11:00:00',\n\t\t\t\t'url' => '/tourney/match/3717',\n\t\t\t\t'name' => 'Never Give Up vs yoe Flash Wolves',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 20,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t118 => \n\t\t\tarray (\n\t\t\t\t'id' => 3718,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 1694,\n\t\t\t\t'team_red_id' => 3677,\n\t\t\t\t'team_winner_id' => 1694,\n\t\t\t\t'polldaddy_id' => 8571719,\n\t\t\t\t'date_time' => '2015-02-26 11:00:00',\n\t\t\t\t'url' => '/tourney/match/3718',\n\t\t\t\t'name' => 'yoe Flash Wolves vs Logitech Sniper',\n\t\t\t\t'score_blue' => 20,\n\t\t\t\t'score_red' => 8,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t119 => \n\t\t\tarray (\n\t\t\t\t'id' => 3719,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3678,\n\t\t\t\t'team_red_id' => 3680,\n\t\t\t\t'team_winner_id' => 3680,\n\t\t\t\t'polldaddy_id' => 8571720,\n\t\t\t\t'date_time' => '2015-02-27 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3719',\n\t\t\t\t'name' => 'Never Give Up vs Hong Kong Esports',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 15,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t120 => \n\t\t\tarray (\n\t\t\t\t'id' => 3720,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3679,\n\t\t\t\t'team_red_id' => 3678,\n\t\t\t\t'team_winner_id' => 3679,\n\t\t\t\t'polldaddy_id' => 8571721,\n\t\t\t\t'date_time' => '2015-02-27 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3720',\n\t\t\t\t'name' => 'Midnight Sun e-Sports vs Never Give Up',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t121 => \n\t\t\tarray (\n\t\t\t\t'id' => 3721,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 974,\n\t\t\t\t'team_red_id' => 3677,\n\t\t\t\t'team_winner_id' => 974,\n\t\t\t\t'polldaddy_id' => 8571722,\n\t\t\t\t'date_time' => '2015-03-01 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3721',\n\t\t\t\t'name' => 'Taipei Assassins vs Logitech Sniper',\n\t\t\t\t'score_blue' => 16,\n\t\t\t\t'score_red' => 8,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t122 => \n\t\t\tarray (\n\t\t\t\t'id' => 3722,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3679,\n\t\t\t\t'team_red_id' => 3677,\n\t\t\t\t'team_winner_id' => 3677,\n\t\t\t\t'polldaddy_id' => 8571723,\n\t\t\t\t'date_time' => '2015-02-15 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3722',\n\t\t\t\t'name' => 'Midnight Sun e-Sports vs Logitech Sniper',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 8,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t123 => \n\t\t\tarray (\n\t\t\t\t'id' => 3723,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 974,\n\t\t\t\t'team_red_id' => 3680,\n\t\t\t\t'team_winner_id' => 974,\n\t\t\t\t'polldaddy_id' => 8571724,\n\t\t\t\t'date_time' => '2015-02-26 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3723',\n\t\t\t\t'name' => 'Taipei Assassins vs Hong Kong Esports',\n\t\t\t\t'score_blue' => 16,\n\t\t\t\t'score_red' => 15,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t124 => \n\t\t\tarray (\n\t\t\t\t'id' => 3724,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 1694,\n\t\t\t\t'team_red_id' => 949,\n\t\t\t\t'team_winner_id' => 1694,\n\t\t\t\t'polldaddy_id' => 8571725,\n\t\t\t\t'date_time' => '2015-02-27 11:00:00',\n\t\t\t\t'url' => '/tourney/match/3724',\n\t\t\t\t'name' => 'yoe Flash Wolves vs Ahq e-Sports Club',\n\t\t\t\t'score_blue' => 20,\n\t\t\t\t'score_red' => 12,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t125 => \n\t\t\tarray (\n\t\t\t\t'id' => 3725,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3680,\n\t\t\t\t'team_red_id' => 1694,\n\t\t\t\t'team_winner_id' => 1694,\n\t\t\t\t'polldaddy_id' => 8571726,\n\t\t\t\t'date_time' => '2015-02-26 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3725',\n\t\t\t\t'name' => 'Hong Kong Esports vs yoe Flash Wolves',\n\t\t\t\t'score_blue' => 15,\n\t\t\t\t'score_red' => 20,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t126 => \n\t\t\tarray (\n\t\t\t\t'id' => 3726,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3676,\n\t\t\t\t'team_red_id' => 949,\n\t\t\t\t'team_winner_id' => 949,\n\t\t\t\t'polldaddy_id' => 8571727,\n\t\t\t\t'date_time' => '2015-02-28 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3726',\n\t\t\t\t'name' => 'Dream or Reality vs Ahq e-Sports Club',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 12,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t127 => \n\t\t\tarray (\n\t\t\t\t'id' => 3727,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3676,\n\t\t\t\t'team_red_id' => 3677,\n\t\t\t\t'team_winner_id' => 3677,\n\t\t\t\t'polldaddy_id' => 8571728,\n\t\t\t\t'date_time' => '2015-01-25 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3727',\n\t\t\t\t'name' => 'Dream or Reality vs Logitech Sniper',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 8,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:34',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t128 => \n\t\t\tarray (\n\t\t\t\t'id' => 3728,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 949,\n\t\t\t\t'team_red_id' => 974,\n\t\t\t\t'team_winner_id' => 974,\n\t\t\t\t'polldaddy_id' => 8571729,\n\t\t\t\t'date_time' => '2015-02-07 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3728',\n\t\t\t\t'name' => 'Ahq e-Sports Club vs Taipei Assassins',\n\t\t\t\t'score_blue' => 12,\n\t\t\t\t'score_red' => 16,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t129 => \n\t\t\tarray (\n\t\t\t\t'id' => 3729,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3678,\n\t\t\t\t'team_red_id' => 3677,\n\t\t\t\t'team_winner_id' => 3677,\n\t\t\t\t'polldaddy_id' => 8571730,\n\t\t\t\t'date_time' => '2015-02-07 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3729',\n\t\t\t\t'name' => 'Never Give Up vs Logitech Sniper',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 8,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t130 => \n\t\t\tarray (\n\t\t\t\t'id' => 3730,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 949,\n\t\t\t\t'team_red_id' => 3678,\n\t\t\t\t'team_winner_id' => 949,\n\t\t\t\t'polldaddy_id' => 8571731,\n\t\t\t\t'date_time' => '2015-02-08 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3730',\n\t\t\t\t'name' => 'Ahq e-Sports Club vs Never Give Up',\n\t\t\t\t'score_blue' => 12,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t131 => \n\t\t\tarray (\n\t\t\t\t'id' => 3731,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3680,\n\t\t\t\t'team_red_id' => 3679,\n\t\t\t\t'team_winner_id' => 3680,\n\t\t\t\t'polldaddy_id' => 8571732,\n\t\t\t\t'date_time' => '2015-02-08 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3731',\n\t\t\t\t'name' => 'Hong Kong Esports vs Midnight Sun e-Sports',\n\t\t\t\t'score_blue' => 15,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t132 => \n\t\t\tarray (\n\t\t\t\t'id' => 3732,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 1694,\n\t\t\t\t'team_red_id' => 3676,\n\t\t\t\t'team_winner_id' => 1694,\n\t\t\t\t'polldaddy_id' => 8571733,\n\t\t\t\t'date_time' => '2015-02-11 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3732',\n\t\t\t\t'name' => 'yoe Flash Wolves vs Dream or Reality',\n\t\t\t\t'score_blue' => 20,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t133 => \n\t\t\tarray (\n\t\t\t\t'id' => 3733,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3676,\n\t\t\t\t'team_red_id' => 3680,\n\t\t\t\t'team_winner_id' => 3680,\n\t\t\t\t'polldaddy_id' => 8571734,\n\t\t\t\t'date_time' => '2015-02-11 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3733',\n\t\t\t\t'name' => 'Dream or Reality vs Hong Kong Esports',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 15,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t134 => \n\t\t\tarray (\n\t\t\t\t'id' => 3734,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3678,\n\t\t\t\t'team_red_id' => 3676,\n\t\t\t\t'team_winner_id' => 3678,\n\t\t\t\t'polldaddy_id' => 8571735,\n\t\t\t\t'date_time' => '2015-02-13 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3734',\n\t\t\t\t'name' => 'Never Give Up vs Dream or Reality',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t135 => \n\t\t\tarray (\n\t\t\t\t'id' => 3735,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3680,\n\t\t\t\t'team_red_id' => 949,\n\t\t\t\t'team_winner_id' => 949,\n\t\t\t\t'polldaddy_id' => 8571736,\n\t\t\t\t'date_time' => '2015-02-13 11:00:00',\n\t\t\t\t'url' => '/tourney/match/3735',\n\t\t\t\t'name' => 'Hong Kong Esports vs Ahq e-Sports Club',\n\t\t\t\t'score_blue' => 15,\n\t\t\t\t'score_red' => 12,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t136 => \n\t\t\tarray (\n\t\t\t\t'id' => 3736,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3676,\n\t\t\t\t'team_red_id' => 974,\n\t\t\t\t'team_winner_id' => 974,\n\t\t\t\t'polldaddy_id' => 8571737,\n\t\t\t\t'date_time' => '2015-02-13 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3736',\n\t\t\t\t'name' => 'Dream or Reality vs Taipei Assassins',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 16,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t137 => \n\t\t\tarray (\n\t\t\t\t'id' => 3737,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 974,\n\t\t\t\t'team_red_id' => 3678,\n\t\t\t\t'team_winner_id' => 974,\n\t\t\t\t'polldaddy_id' => 8571739,\n\t\t\t\t'date_time' => '2015-02-14 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3737',\n\t\t\t\t'name' => 'Taipei Assassins vs Never Give Up',\n\t\t\t\t'score_blue' => 16,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t138 => \n\t\t\tarray (\n\t\t\t\t'id' => 3738,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3679,\n\t\t\t\t'team_red_id' => 3678,\n\t\t\t\t'team_winner_id' => 3679,\n\t\t\t\t'polldaddy_id' => 8571740,\n\t\t\t\t'date_time' => '2015-03-21 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3738',\n\t\t\t\t'name' => 'Midnight Sun e-Sports vs Never Give Up',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t139 => \n\t\t\tarray (\n\t\t\t\t'id' => 3739,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 1694,\n\t\t\t\t'team_red_id' => 3676,\n\t\t\t\t'team_winner_id' => 1694,\n\t\t\t\t'polldaddy_id' => 8571741,\n\t\t\t\t'date_time' => '2015-03-05 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3739',\n\t\t\t\t'name' => 'yoe Flash Wolves vs Dream or Reality',\n\t\t\t\t'score_blue' => 20,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t140 => \n\t\t\tarray (\n\t\t\t\t'id' => 3740,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3680,\n\t\t\t\t'team_red_id' => 3676,\n\t\t\t\t'team_winner_id' => 3680,\n\t\t\t\t'polldaddy_id' => 8571742,\n\t\t\t\t'date_time' => '2015-03-05 11:00:00',\n\t\t\t\t'url' => '/tourney/match/3740',\n\t\t\t\t'name' => 'Hong Kong Esports vs Dream or Reality',\n\t\t\t\t'score_blue' => 15,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t141 => \n\t\t\tarray (\n\t\t\t\t'id' => 3741,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 949,\n\t\t\t\t'team_red_id' => 3680,\n\t\t\t\t'team_winner_id' => 3680,\n\t\t\t\t'polldaddy_id' => 8571743,\n\t\t\t\t'date_time' => '2015-03-06 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3741',\n\t\t\t\t'name' => 'Ahq e-Sports Club vs Hong Kong Esports',\n\t\t\t\t'score_blue' => 12,\n\t\t\t\t'score_red' => 15,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t142 => \n\t\t\tarray (\n\t\t\t\t'id' => 3742,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3677,\n\t\t\t\t'team_red_id' => 3679,\n\t\t\t\t'team_winner_id' => 3677,\n\t\t\t\t'polldaddy_id' => 8571744,\n\t\t\t\t'date_time' => '2015-03-06 11:00:00',\n\t\t\t\t'url' => '/tourney/match/3742',\n\t\t\t\t'name' => 'Logitech Sniper vs Midnight Sun e-Sports',\n\t\t\t\t'score_blue' => 8,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t143 => \n\t\t\tarray (\n\t\t\t\t'id' => 3743,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3680,\n\t\t\t\t'team_red_id' => 974,\n\t\t\t\t'team_winner_id' => 3680,\n\t\t\t\t'polldaddy_id' => 8571745,\n\t\t\t\t'date_time' => '2015-03-22 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3743',\n\t\t\t\t'name' => 'Hong Kong Esports vs Taipei Assassins',\n\t\t\t\t'score_blue' => 15,\n\t\t\t\t'score_red' => 16,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t144 => \n\t\t\tarray (\n\t\t\t\t'id' => 3744,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3676,\n\t\t\t\t'team_red_id' => 3678,\n\t\t\t\t'team_winner_id' => 3678,\n\t\t\t\t'polldaddy_id' => 8571746,\n\t\t\t\t'date_time' => '2015-03-07 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3744',\n\t\t\t\t'name' => 'Dream or Reality vs Never Give Up',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t145 => \n\t\t\tarray (\n\t\t\t\t'id' => 3745,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 974,\n\t\t\t\t'team_red_id' => 3676,\n\t\t\t\t'team_winner_id' => 974,\n\t\t\t\t'polldaddy_id' => 8571747,\n\t\t\t\t'date_time' => '2015-03-01 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3745',\n\t\t\t\t'name' => 'Taipei Assassins vs Dream or Reality',\n\t\t\t\t'score_blue' => 16,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t146 => \n\t\t\tarray (\n\t\t\t\t'id' => 3746,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3679,\n\t\t\t\t'team_red_id' => 3676,\n\t\t\t\t'team_winner_id' => 3679,\n\t\t\t\t'polldaddy_id' => 8571748,\n\t\t\t\t'date_time' => '2015-03-20 11:00:00',\n\t\t\t\t'url' => '/tourney/match/3746',\n\t\t\t\t'name' => 'Midnight Sun e-Sports vs Dream or Reality',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t147 => \n\t\t\tarray (\n\t\t\t\t'id' => 3747,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3676,\n\t\t\t\t'team_red_id' => 3677,\n\t\t\t\t'team_winner_id' => 3677,\n\t\t\t\t'polldaddy_id' => 8571749,\n\t\t\t\t'date_time' => '2015-02-28 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3747',\n\t\t\t\t'name' => 'Dream or Reality vs Logitech Sniper',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 8,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t148 => \n\t\t\tarray (\n\t\t\t\t'id' => 3748,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 974,\n\t\t\t\t'team_red_id' => 949,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8571750,\n\t\t\t\t'date_time' => '1970-01-01 00:00:00',\n\t\t\t\t'url' => '/tourney/match/3748',\n\t\t\t\t'name' => 'Taipei Assassins vs Ahq e-Sports Club',\n\t\t\t\t'score_blue' => 16,\n\t\t\t\t'score_red' => 12,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t149 => \n\t\t\tarray (\n\t\t\t\t'id' => 3749,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3677,\n\t\t\t\t'team_red_id' => 3678,\n\t\t\t\t'team_winner_id' => 3678,\n\t\t\t\t'polldaddy_id' => 8571751,\n\t\t\t\t'date_time' => '2015-02-25 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3749',\n\t\t\t\t'name' => 'Logitech Sniper vs Never Give Up',\n\t\t\t\t'score_blue' => 8,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t150 => \n\t\t\tarray (\n\t\t\t\t'id' => 3750,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 949,\n\t\t\t\t'team_red_id' => 3678,\n\t\t\t\t'team_winner_id' => 949,\n\t\t\t\t'polldaddy_id' => 8571752,\n\t\t\t\t'date_time' => '2015-03-04 11:00:00',\n\t\t\t\t'url' => '/tourney/match/3750',\n\t\t\t\t'name' => 'Ahq e-Sports Club vs Never Give Up',\n\t\t\t\t'score_blue' => 12,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t151 => \n\t\t\tarray (\n\t\t\t\t'id' => 3751,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3680,\n\t\t\t\t'team_red_id' => 3679,\n\t\t\t\t'team_winner_id' => 3680,\n\t\t\t\t'polldaddy_id' => 8571753,\n\t\t\t\t'date_time' => '2015-03-04 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3751',\n\t\t\t\t'name' => 'Hong Kong Esports vs Midnight Sun e-Sports',\n\t\t\t\t'score_blue' => 15,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t152 => \n\t\t\tarray (\n\t\t\t\t'id' => 3752,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3679,\n\t\t\t\t'team_red_id' => 1694,\n\t\t\t\t'team_winner_id' => 1694,\n\t\t\t\t'polldaddy_id' => 8571754,\n\t\t\t\t'date_time' => '2015-03-18 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3752',\n\t\t\t\t'name' => 'Midnight Sun e-Sports vs yoe Flash Wolves',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 20,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t153 => \n\t\t\tarray (\n\t\t\t\t'id' => 3753,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 1694,\n\t\t\t\t'team_red_id' => 974,\n\t\t\t\t'team_winner_id' => 1694,\n\t\t\t\t'polldaddy_id' => 8571755,\n\t\t\t\t'date_time' => '2015-03-05 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3753',\n\t\t\t\t'name' => 'yoe Flash Wolves vs Taipei Assassins',\n\t\t\t\t'score_blue' => 20,\n\t\t\t\t'score_red' => 16,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t154 => \n\t\t\tarray (\n\t\t\t\t'id' => 3754,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3680,\n\t\t\t\t'team_red_id' => 3677,\n\t\t\t\t'team_winner_id' => 3680,\n\t\t\t\t'polldaddy_id' => 8571756,\n\t\t\t\t'date_time' => '2015-03-06 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3754',\n\t\t\t\t'name' => 'Hong Kong Esports vs Logitech Sniper',\n\t\t\t\t'score_blue' => 15,\n\t\t\t\t'score_red' => 8,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t155 => \n\t\t\tarray (\n\t\t\t\t'id' => 3755,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3679,\n\t\t\t\t'team_red_id' => 974,\n\t\t\t\t'team_winner_id' => 974,\n\t\t\t\t'polldaddy_id' => 8605211,\n\t\t\t\t'date_time' => '2015-03-08 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3755',\n\t\t\t\t'name' => 'Midnight Sun e-Sports vs Taipei Assassins',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 16,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t156 => \n\t\t\tarray (\n\t\t\t\t'id' => 3756,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3679,\n\t\t\t\t'team_red_id' => 3676,\n\t\t\t\t'team_winner_id' => 3679,\n\t\t\t\t'polldaddy_id' => 8605212,\n\t\t\t\t'date_time' => '2015-02-15 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3756',\n\t\t\t\t'name' => 'Midnight Sun e-Sports vs Dream or Reality',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t157 => \n\t\t\tarray (\n\t\t\t\t'id' => 3757,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3678,\n\t\t\t\t'team_red_id' => 1694,\n\t\t\t\t'team_winner_id' => 1694,\n\t\t\t\t'polldaddy_id' => 8605213,\n\t\t\t\t'date_time' => '2015-03-04 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3757',\n\t\t\t\t'name' => 'Never Give Up vs yoe Flash Wolves',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 20,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t158 => \n\t\t\tarray (\n\t\t\t\t'id' => 3758,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 949,\n\t\t\t\t'team_red_id' => 1694,\n\t\t\t\t'team_winner_id' => 1694,\n\t\t\t\t'polldaddy_id' => 8605214,\n\t\t\t\t'date_time' => '2015-03-22 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3758',\n\t\t\t\t'name' => 'Ahq e-Sports Club vs yoe Flash Wolves',\n\t\t\t\t'score_blue' => 12,\n\t\t\t\t'score_red' => 20,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t159 => \n\t\t\tarray (\n\t\t\t\t'id' => 3759,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3680,\n\t\t\t\t'team_red_id' => 3678,\n\t\t\t\t'team_winner_id' => 3680,\n\t\t\t\t'polldaddy_id' => 8605215,\n\t\t\t\t'date_time' => '2015-03-21 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3759',\n\t\t\t\t'name' => 'Hong Kong Esports vs Never Give Up',\n\t\t\t\t'score_blue' => 15,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t160 => \n\t\t\tarray (\n\t\t\t\t'id' => 3760,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3678,\n\t\t\t\t'team_red_id' => 974,\n\t\t\t\t'team_winner_id' => 974,\n\t\t\t\t'polldaddy_id' => 8605216,\n\t\t\t\t'date_time' => '2015-03-08 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3760',\n\t\t\t\t'name' => 'Never Give Up vs Taipei Assassins',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 16,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t161 => \n\t\t\tarray (\n\t\t\t\t'id' => 3761,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 974,\n\t\t\t\t'team_red_id' => 3677,\n\t\t\t\t'team_winner_id' => 3677,\n\t\t\t\t'polldaddy_id' => 8605217,\n\t\t\t\t'date_time' => '2015-03-19 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3761',\n\t\t\t\t'name' => 'Taipei Assassins vs Logitech Sniper',\n\t\t\t\t'score_blue' => 16,\n\t\t\t\t'score_red' => 8,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t162 => \n\t\t\tarray (\n\t\t\t\t'id' => 3762,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 949,\n\t\t\t\t'team_red_id' => 3679,\n\t\t\t\t'team_winner_id' => 949,\n\t\t\t\t'polldaddy_id' => 8605218,\n\t\t\t\t'date_time' => '2015-03-18 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3762',\n\t\t\t\t'name' => 'Ahq e-Sports Club vs Midnight Sun e-Sports',\n\t\t\t\t'score_blue' => 12,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t163 => \n\t\t\tarray (\n\t\t\t\t'id' => 3763,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3677,\n\t\t\t\t'team_red_id' => 949,\n\t\t\t\t'team_winner_id' => 949,\n\t\t\t\t'polldaddy_id' => 8605219,\n\t\t\t\t'date_time' => '2015-03-19 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3763',\n\t\t\t\t'name' => 'Logitech Sniper vs Ahq e-Sports Club',\n\t\t\t\t'score_blue' => 8,\n\t\t\t\t'score_red' => 12,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t164 => \n\t\t\tarray (\n\t\t\t\t'id' => 3764,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 3677,\n\t\t\t\t'team_red_id' => 1694,\n\t\t\t\t'team_winner_id' => 1694,\n\t\t\t\t'polldaddy_id' => 8605220,\n\t\t\t\t'date_time' => '2015-03-20 12:00:00',\n\t\t\t\t'url' => '/tourney/match/3764',\n\t\t\t\t'name' => 'Logitech Sniper vs yoe Flash Wolves',\n\t\t\t\t'score_blue' => 8,\n\t\t\t\t'score_red' => 20,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t165 => \n\t\t\tarray (\n\t\t\t\t'id' => 3765,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 199,\n\t\t\t\t'team_blue_id' => 1694,\n\t\t\t\t'team_red_id' => 3680,\n\t\t\t\t'team_winner_id' => 1694,\n\t\t\t\t'polldaddy_id' => 8605221,\n\t\t\t\t'date_time' => '2015-03-20 13:00:00',\n\t\t\t\t'url' => '/tourney/match/3765',\n\t\t\t\t'name' => 'yoe Flash Wolves vs Hong Kong Esports',\n\t\t\t\t'score_blue' => 20,\n\t\t\t\t'score_red' => 15,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:51',\n\t\t\t),\n\t\t\t166 => \n\t\t\tarray (\n\t\t\t\t'id' => 4386,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 205,\n\t\t\t\t'team_blue_id' => 3494,\n\t\t\t\t'team_red_id' => 3823,\n\t\t\t\t'team_winner_id' => 3494,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-01-21 02:00:00',\n\t\t\t\t'url' => '/tourney/match/4386',\n\t\t\t\t'name' => 'Enemy Esports vs The Arbiters',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:58',\n\t\t\t),\n\t\t\t167 => \n\t\t\tarray (\n\t\t\t\t'id' => 4387,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 205,\n\t\t\t\t'team_blue_id' => 3819,\n\t\t\t\t'team_red_id' => 3818,\n\t\t\t\t'team_winner_id' => 3819,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-01-21 03:00:00',\n\t\t\t\t'url' => '/tourney/match/4387',\n\t\t\t\t'name' => 'Darkness vs BrawL NA',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:58',\n\t\t\t),\n\t\t\t168 => \n\t\t\tarray (\n\t\t\t\t'id' => 4388,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 205,\n\t\t\t\t'team_blue_id' => 1134,\n\t\t\t\t'team_red_id' => 3821,\n\t\t\t\t'team_winner_id' => 1134,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-01-29 02:00:00',\n\t\t\t\t'url' => '/tourney/match/4388',\n\t\t\t\t'name' => 'Cloud9 Tempest vs Roar',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:58',\n\t\t\t),\n\t\t\t169 => \n\t\t\tarray (\n\t\t\t\t'id' => 4389,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 205,\n\t\t\t\t'team_blue_id' => 3810,\n\t\t\t\t'team_red_id' => 3820,\n\t\t\t\t'team_winner_id' => 3810,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-01-29 03:00:00',\n\t\t\t\t'url' => '/tourney/match/4389',\n\t\t\t\t'name' => 'Team Confound vs AffNity',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:58',\n\t\t\t),\n\t\t\t170 => \n\t\t\tarray (\n\t\t\t\t'id' => 4390,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 205,\n\t\t\t\t'team_blue_id' => 3856,\n\t\t\t\t'team_red_id' => 3822,\n\t\t\t\t'team_winner_id' => 3856,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-01-22 02:00:00',\n\t\t\t\t'url' => '/tourney/match/4390',\n\t\t\t\t'name' => 'TDK vs Team Frostbite',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:58',\n\t\t\t),\n\t\t\t171 => \n\t\t\tarray (\n\t\t\t\t'id' => 4391,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 205,\n\t\t\t\t'team_blue_id' => 3816,\n\t\t\t\t'team_red_id' => 2928,\n\t\t\t\t'team_winner_id' => 3816,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-01-22 03:00:00',\n\t\t\t\t'url' => '/tourney/match/4391',\n\t\t\t\t'name' => 'Storm vs Zenith eSports',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:58',\n\t\t\t),\n\t\t\t172 => \n\t\t\tarray (\n\t\t\t\t'id' => 4392,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 205,\n\t\t\t\t'team_blue_id' => 3807,\n\t\t\t\t'team_red_id' => 3499,\n\t\t\t\t'team_winner_id' => 3807,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-01-28 02:00:00',\n\t\t\t\t'url' => '/tourney/match/4392',\n\t\t\t\t'name' => 'Team Liquid Academy vs Infinity',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:58',\n\t\t\t),\n\t\t\t173 => \n\t\t\tarray (\n\t\t\t\t'id' => 4393,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 205,\n\t\t\t\t'team_blue_id' => 3813,\n\t\t\t\t'team_red_id' => 3824,\n\t\t\t\t'team_winner_id' => 3824,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-01-28 03:00:00',\n\t\t\t\t'url' => '/tourney/match/4393',\n\t\t\t\t'name' => 'Rock Bottom Gorillas vs CLG Black',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:58',\n\t\t\t),\n\t\t\t174 => \n\t\t\tarray (\n\t\t\t\t'id' => 4394,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 205,\n\t\t\t\t'team_blue_id' => 3494,\n\t\t\t\t'team_red_id' => 3819,\n\t\t\t\t'team_winner_id' => 3494,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '1970-01-01 00:00:00',\n\t\t\t\t'url' => '/tourney/match/4394',\n\t\t\t\t'name' => 'Enemy Esports vs Darkness',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:58',\n\t\t\t),\n\t\t\t175 => \n\t\t\tarray (\n\t\t\t\t'id' => 4395,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 205,\n\t\t\t\t'team_blue_id' => 1134,\n\t\t\t\t'team_red_id' => 3810,\n\t\t\t\t'team_winner_id' => 1134,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-02-05 02:00:00',\n\t\t\t\t'url' => '/tourney/match/4395',\n\t\t\t\t'name' => 'Cloud9 Tempest vs Team Confound',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:58',\n\t\t\t),\n\t\t\t176 => \n\t\t\tarray (\n\t\t\t\t'id' => 4396,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 205,\n\t\t\t\t'team_blue_id' => 3856,\n\t\t\t\t'team_red_id' => 3816,\n\t\t\t\t'team_winner_id' => 3856,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-02-04 02:00:00',\n\t\t\t\t'url' => '/tourney/match/4396',\n\t\t\t\t'name' => 'TDK vs Storm',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:58',\n\t\t\t),\n\t\t\t177 => \n\t\t\tarray (\n\t\t\t\t'id' => 4397,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 205,\n\t\t\t\t'team_blue_id' => 3807,\n\t\t\t\t'team_red_id' => 3824,\n\t\t\t\t'team_winner_id' => 3824,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-02-05 03:00:00',\n\t\t\t\t'url' => '/tourney/match/4397',\n\t\t\t\t'name' => 'Team Liquid Academy vs CLG Black',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:58',\n\t\t\t),\n\t\t\t178 => \n\t\t\tarray (\n\t\t\t\t'id' => 4398,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 205,\n\t\t\t\t'team_blue_id' => 3494,\n\t\t\t\t'team_red_id' => 1134,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '1970-01-01 00:00:00',\n\t\t\t\t'url' => '/tourney/match/4398',\n\t\t\t\t'name' => 'Enemy Esports vs Cloud9 Tempest',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:58',\n\t\t\t),\n\t\t\t179 => \n\t\t\tarray (\n\t\t\t\t'id' => 4399,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 205,\n\t\t\t\t'team_blue_id' => 3856,\n\t\t\t\t'team_red_id' => 3824,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '1970-01-01 00:00:00',\n\t\t\t\t'url' => '/tourney/match/4399',\n\t\t\t\t'name' => 'TDK vs CLG Black',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:58',\n\t\t\t),\n\t\t\t180 => \n\t\t\tarray (\n\t\t\t\t'id' => 4400,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 205,\n\t\t\t\t'team_blue_id' => 0,\n\t\t\t\t'team_red_id' => 0,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '1970-01-01 00:00:00',\n\t\t\t\t'url' => '/tourney/match/4400',\n\t\t\t\t'name' => 'TBD vs TBD',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:35',\n\t\t\t\t'updated_at' => '2015-05-30 07:16:58',\n\t\t\t),\n\t\t\t181 => \n\t\t\tarray (\n\t\t\t\t'id' => 4401,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 206,\n\t\t\t\t'team_blue_id' => 2857,\n\t\t\t\t'team_red_id' => 3556,\n\t\t\t\t'team_winner_id' => 2857,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-01-20 17:00:00',\n\t\t\t\t'url' => '/tourney/match/4401',\n\t\t\t\t'name' => 'ThunderBot Sparta vs Cyber Gaming',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:36',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:04',\n\t\t\t),\n\t\t\t182 => \n\t\t\tarray (\n\t\t\t\t'id' => 4402,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 206,\n\t\t\t\t'team_blue_id' => 3861,\n\t\t\t\t'team_red_id' => 1282,\n\t\t\t\t'team_winner_id' => 1282,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-01-20 18:00:00',\n\t\t\t\t'url' => '/tourney/match/4402',\n\t\t\t\t'name' => 'Annihilon Team vs SK Gaming Prime',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:36',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:04',\n\t\t\t),\n\t\t\t183 => \n\t\t\tarray (\n\t\t\t\t'id' => 4403,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 206,\n\t\t\t\t'team_blue_id' => 2861,\n\t\t\t\t'team_red_id' => 1276,\n\t\t\t\t'team_winner_id' => 1276,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-01-28 17:00:00',\n\t\t\t\t'url' => '/tourney/match/4403',\n\t\t\t\t'name' => 'Team Refuse vs Gamers2',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:36',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:04',\n\t\t\t),\n\t\t\t184 => \n\t\t\tarray (\n\t\t\t\t'id' => 4404,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 206,\n\t\t\t\t'team_blue_id' => 3858,\n\t\t\t\t'team_red_id' => 3863,\n\t\t\t\t'team_winner_id' => 3858,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-01-28 18:00:00',\n\t\t\t\t'url' => '/tourney/match/4404',\n\t\t\t\t'name' => 'Nevo vs Ragnarok',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:36',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:04',\n\t\t\t),\n\t\t\t185 => \n\t\t\tarray (\n\t\t\t\t'id' => 4405,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 206,\n\t\t\t\t'team_blue_id' => 1880,\n\t\t\t\t'team_red_id' => 3865,\n\t\t\t\t'team_winner_id' => 3865,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-01-21 17:00:00',\n\t\t\t\t'url' => '/tourney/match/4405',\n\t\t\t\t'name' => 'Tricked Esport vs LowLandLions White',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:36',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:04',\n\t\t\t),\n\t\t\t186 => \n\t\t\tarray (\n\t\t\t\t'id' => 4406,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 206,\n\t\t\t\t'team_blue_id' => 3860,\n\t\t\t\t'team_red_id' => 3574,\n\t\t\t\t'team_winner_id' => 3574,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-01-21 18:00:00',\n\t\t\t\t'url' => '/tourney/match/4406',\n\t\t\t\t'name' => 'Fnatic Academy vs Different Dimension',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:36',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:04',\n\t\t\t),\n\t\t\t187 => \n\t\t\tarray (\n\t\t\t\t'id' => 4407,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 206,\n\t\t\t\t'team_blue_id' => 3857,\n\t\t\t\t'team_red_id' => 3864,\n\t\t\t\t'team_winner_id' => 3857,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-01-27 17:00:00',\n\t\t\t\t'url' => '/tourney/match/4407',\n\t\t\t\t'name' => 'Millenium Spirit vs Team ROCK',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:36',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:04',\n\t\t\t),\n\t\t\t188 => \n\t\t\tarray (\n\t\t\t\t'id' => 4408,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 206,\n\t\t\t\t'team_blue_id' => 3859,\n\t\t\t\t'team_red_id' => 3862,\n\t\t\t\t'team_winner_id' => 3862,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-01-27 18:00:00',\n\t\t\t\t'url' => '/tourney/match/4408',\n\t\t\t\t'name' => '5 Sins vs ORIGEN',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:36',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:04',\n\t\t\t),\n\t\t\t189 => \n\t\t\tarray (\n\t\t\t\t'id' => 4409,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 206,\n\t\t\t\t'team_blue_id' => 2857,\n\t\t\t\t'team_red_id' => 1282,\n\t\t\t\t'team_winner_id' => 1282,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-02-03 17:00:00',\n\t\t\t\t'url' => '/tourney/match/4409',\n\t\t\t\t'name' => 'ThunderBot Sparta vs SK Gaming Prime',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:36',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:04',\n\t\t\t),\n\t\t\t190 => \n\t\t\tarray (\n\t\t\t\t'id' => 4410,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 206,\n\t\t\t\t'team_blue_id' => 1276,\n\t\t\t\t'team_red_id' => 3858,\n\t\t\t\t'team_winner_id' => 3858,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-02-04 18:00:00',\n\t\t\t\t'url' => '/tourney/match/4410',\n\t\t\t\t'name' => 'Gamers2 vs Nevo',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:36',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:04',\n\t\t\t),\n\t\t\t191 => \n\t\t\tarray (\n\t\t\t\t'id' => 4411,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 206,\n\t\t\t\t'team_blue_id' => 3865,\n\t\t\t\t'team_red_id' => 3574,\n\t\t\t\t'team_winner_id' => 3865,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-02-03 18:00:00',\n\t\t\t\t'url' => '/tourney/match/4411',\n\t\t\t\t'name' => 'LowLandLions White vs Different Dimension',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:36',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:04',\n\t\t\t),\n\t\t\t192 => \n\t\t\tarray (\n\t\t\t\t'id' => 4412,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 206,\n\t\t\t\t'team_blue_id' => 3857,\n\t\t\t\t'team_red_id' => 3862,\n\t\t\t\t'team_winner_id' => 3862,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-02-04 17:00:00',\n\t\t\t\t'url' => '/tourney/match/4412',\n\t\t\t\t'name' => 'Millenium Spirit vs ORIGEN',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:36',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:04',\n\t\t\t),\n\t\t\t193 => \n\t\t\tarray (\n\t\t\t\t'id' => 4413,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 206,\n\t\t\t\t'team_blue_id' => 1282,\n\t\t\t\t'team_red_id' => 3858,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '1970-01-01 00:00:00',\n\t\t\t\t'url' => '/tourney/match/4413',\n\t\t\t\t'name' => 'SK Gaming Prime vs Nevo',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:36',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:04',\n\t\t\t),\n\t\t\t194 => \n\t\t\tarray (\n\t\t\t\t'id' => 4414,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 206,\n\t\t\t\t'team_blue_id' => 3865,\n\t\t\t\t'team_red_id' => 3862,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '1970-01-01 00:00:00',\n\t\t\t\t'url' => '/tourney/match/4414',\n\t\t\t\t'name' => 'LowLandLions White vs ORIGEN',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:36',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:04',\n\t\t\t),\n\t\t\t195 => \n\t\t\tarray (\n\t\t\t\t'id' => 4415,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 206,\n\t\t\t\t'team_blue_id' => 0,\n\t\t\t\t'team_red_id' => 0,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '1970-01-01 00:00:00',\n\t\t\t\t'url' => '/tourney/match/4415',\n\t\t\t\t'name' => 'TBD vs TBD',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:36',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:04',\n\t\t\t),\n\t\t\t196 => \n\t\t\tarray (\n\t\t\t\t'id' => 4551,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 218,\n\t\t\t\t'team_blue_id' => 3752,\n\t\t\t\t'team_red_id' => 4189,\n\t\t\t\t'team_winner_id' => 3752,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-04-14 04:00:00',\n\t\t\t\t'url' => '/tourney/match/4551',\n\t\t\t\t'name' => 'Master3 vs Kx.Happy',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 5,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:37',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:10',\n\t\t\t),\n\t\t\t197 => \n\t\t\tarray (\n\t\t\t\t'id' => 4552,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 218,\n\t\t\t\t'team_blue_id' => 1848,\n\t\t\t\t'team_red_id' => 4191,\n\t\t\t\t'team_winner_id' => 1848,\n\t\t\t\t'polldaddy_id' => 8801501,\n\t\t\t\t'date_time' => '2015-04-15 04:00:00',\n\t\t\t\t'url' => '/tourney/match/4552',\n\t\t\t\t'name' => 'Energy PACEMAKER vs AD Gaming',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 5,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:37',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:10',\n\t\t\t),\n\t\t\t198 => \n\t\t\tarray (\n\t\t\t\t'id' => 4553,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 218,\n\t\t\t\t'team_blue_id' => 687,\n\t\t\t\t'team_red_id' => 2714,\n\t\t\t\t'team_winner_id' => 687,\n\t\t\t\t'polldaddy_id' => 8801508,\n\t\t\t\t'date_time' => '2015-04-16 04:00:00',\n\t\t\t\t'url' => '/tourney/match/4553',\n\t\t\t\t'name' => 'Star Horn Royal Club vs Young Glory',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 5,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:37',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:10',\n\t\t\t),\n\t\t\t199 => \n\t\t\tarray (\n\t\t\t\t'id' => 4554,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 218,\n\t\t\t\t'team_blue_id' => 3749,\n\t\t\t\t'team_red_id' => 4192,\n\t\t\t\t'team_winner_id' => 3749,\n\t\t\t\t'polldaddy_id' => 8801510,\n\t\t\t\t'date_time' => '2015-04-17 04:00:00',\n\t\t\t\t'url' => '/tourney/match/4554',\n\t\t\t\t'name' => 'Gamtee vs Legend Dragons',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 5,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:37',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:10',\n\t\t\t),\n\t\t\t200 => \n\t\t\tarray (\n\t\t\t\t'id' => 4555,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 218,\n\t\t\t\t'team_blue_id' => 3752,\n\t\t\t\t'team_red_id' => 1848,\n\t\t\t\t'team_winner_id' => 3752,\n\t\t\t\t'polldaddy_id' => 8803297,\n\t\t\t\t'date_time' => '2015-04-18 04:00:00',\n\t\t\t\t'url' => '/tourney/match/4555',\n\t\t\t\t'name' => 'Master3 vs Energy PACEMAKER',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 5,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:37',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:10',\n\t\t\t),\n\t\t\t201 => \n\t\t\tarray (\n\t\t\t\t'id' => 4556,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 218,\n\t\t\t\t'team_blue_id' => 687,\n\t\t\t\t'team_red_id' => 3749,\n\t\t\t\t'team_winner_id' => 3749,\n\t\t\t\t'polldaddy_id' => 8808128,\n\t\t\t\t'date_time' => '2015-04-19 04:00:00',\n\t\t\t\t'url' => '/tourney/match/4556',\n\t\t\t\t'name' => 'Star Horn Royal Club vs Gamtee',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 5,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:37',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:10',\n\t\t\t),\n\t\t\t202 => \n\t\t\tarray (\n\t\t\t\t'id' => 4557,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 218,\n\t\t\t\t'team_blue_id' => 3752,\n\t\t\t\t'team_red_id' => 3749,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '1970-01-01 00:00:00',\n\t\t\t\t'url' => '/tourney/match/4557',\n\t\t\t\t'name' => 'Master3 vs Gamtee',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 5,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:37',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:10',\n\t\t\t),\n\t\t\t203 => \n\t\t\tarray (\n\t\t\t\t'id' => 4583,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 224,\n\t\t\t\t'team_blue_id' => 3642,\n\t\t\t\t'team_red_id' => 4327,\n\t\t\t\t'team_winner_id' => 3642,\n\t\t\t\t'polldaddy_id' => 8867913,\n\t\t\t\t'date_time' => '2015-05-16 05:00:00',\n\t\t\t\t'url' => '/tourney/match/4583',\n\t\t\t\t'name' => 'Samsung Galaxy vs Prime Clan',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:37',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:16',\n\t\t\t),\n\t\t\t204 => \n\t\t\tarray (\n\t\t\t\t'id' => 4584,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 224,\n\t\t\t\t'team_blue_id' => 3642,\n\t\t\t\t'team_red_id' => 1010,\n\t\t\t\t'team_winner_id' => 3642,\n\t\t\t\t'polldaddy_id' => 8867914,\n\t\t\t\t'date_time' => '2015-05-16 07:00:00',\n\t\t\t\t'url' => '/tourney/match/4584',\n\t\t\t\t'name' => 'Samsung Galaxy vs Xenics Storm',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:37',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:16',\n\t\t\t),\n\t\t\t205 => \n\t\t\tarray (\n\t\t\t\t'id' => 4585,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 224,\n\t\t\t\t'team_blue_id' => 4327,\n\t\t\t\t'team_red_id' => 1010,\n\t\t\t\t'team_winner_id' => 4327,\n\t\t\t\t'polldaddy_id' => 8867915,\n\t\t\t\t'date_time' => '2015-05-16 09:00:00',\n\t\t\t\t'url' => '/tourney/match/4585',\n\t\t\t\t'name' => 'Prime Clan vs Xenics Storm',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:37',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:16',\n\t\t\t),\n\t\t\t206 => \n\t\t\tarray (\n\t\t\t\t'id' => 4586,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1281,\n\t\t\t\t'team_red_id' => 68,\n\t\t\t\t'team_winner_id' => 68,\n\t\t\t\t'polldaddy_id' => 8870729,\n\t\t\t\t'date_time' => '2015-05-28 16:00:00',\n\t\t\t\t'url' => '/tourney/match/4586',\n\t\t\t\t'name' => 'Unicorns Of Love vs Fnatic',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t207 => \n\t\t\tarray (\n\t\t\t\t'id' => 4587,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 71,\n\t\t\t\t'team_red_id' => 3862,\n\t\t\t\t'team_winner_id' => 3862,\n\t\t\t\t'polldaddy_id' => 8870730,\n\t\t\t\t'date_time' => '2015-05-28 17:00:00',\n\t\t\t\t'url' => '/tourney/match/4587',\n\t\t\t\t'name' => 'Giants Gaming vs Origen',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t208 => \n\t\t\tarray (\n\t\t\t\t'id' => 4588,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1100,\n\t\t\t\t'team_red_id' => 67,\n\t\t\t\t'team_winner_id' => 1100,\n\t\t\t\t'polldaddy_id' => 8870731,\n\t\t\t\t'date_time' => '2015-05-28 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4588',\n\t\t\t\t'name' => 'Copenhagen Wolves vs SK Gaming',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t209 => \n\t\t\tarray (\n\t\t\t\t'id' => 4589,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 69,\n\t\t\t\t'team_red_id' => 3659,\n\t\t\t\t'team_winner_id' => 3659,\n\t\t\t\t'polldaddy_id' => 8870732,\n\t\t\t\t'date_time' => '2015-05-28 18:00:00',\n\t\t\t\t'url' => '/tourney/match/4589',\n\t\t\t\t'name' => 'Gambit Gaming vs Elements',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t210 => \n\t\t\tarray (\n\t\t\t\t'id' => 4590,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1273,\n\t\t\t\t'team_red_id' => 1242,\n\t\t\t\t'team_winner_id' => 1273,\n\t\t\t\t'polldaddy_id' => 8870733,\n\t\t\t\t'date_time' => '2015-05-28 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4590',\n\t\t\t\t'name' => 'H2K vs ROCCAT',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t211 => \n\t\t\tarray (\n\t\t\t\t'id' => 4591,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 3862,\n\t\t\t\t'team_red_id' => 1273,\n\t\t\t\t'team_winner_id' => 3862,\n\t\t\t\t'polldaddy_id' => 8870734,\n\t\t\t\t'date_time' => '2015-05-29 16:00:00',\n\t\t\t\t'url' => '/tourney/match/4591',\n\t\t\t\t'name' => 'Origen vs H2K',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t212 => \n\t\t\tarray (\n\t\t\t\t'id' => 4592,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 71,\n\t\t\t\t'team_red_id' => 1100,\n\t\t\t\t'team_winner_id' => 71,\n\t\t\t\t'polldaddy_id' => 8870735,\n\t\t\t\t'date_time' => '2015-05-29 17:00:00',\n\t\t\t\t'url' => '/tourney/match/4592',\n\t\t\t\t'name' => 'Giants Gaming vs Copenhagen Wolves',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t213 => \n\t\t\tarray (\n\t\t\t\t'id' => 4593,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1242,\n\t\t\t\t'team_red_id' => 69,\n\t\t\t\t'team_winner_id' => 1242,\n\t\t\t\t'polldaddy_id' => 8870736,\n\t\t\t\t'date_time' => '2015-05-29 18:00:00',\n\t\t\t\t'url' => '/tourney/match/4593',\n\t\t\t\t'name' => 'ROCCAT vs Gambit Gaming',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t214 => \n\t\t\tarray (\n\t\t\t\t'id' => 4594,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 68,\n\t\t\t\t'team_red_id' => 67,\n\t\t\t\t'team_winner_id' => 68,\n\t\t\t\t'polldaddy_id' => 8870737,\n\t\t\t\t'date_time' => '2015-05-29 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4594',\n\t\t\t\t'name' => 'Fnatic vs SK Gaming',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t215 => \n\t\t\tarray (\n\t\t\t\t'id' => 4595,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 3659,\n\t\t\t\t'team_red_id' => 1281,\n\t\t\t\t'team_winner_id' => 1281,\n\t\t\t\t'polldaddy_id' => 8870738,\n\t\t\t\t'date_time' => '2015-05-29 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4595',\n\t\t\t\t'name' => 'Elements vs Unicorns Of Love',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t216 => \n\t\t\tarray (\n\t\t\t\t'id' => 4596,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 3659,\n\t\t\t\t'team_red_id' => 71,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870739,\n\t\t\t\t'date_time' => '2015-06-04 16:00:00',\n\t\t\t\t'url' => '/tourney/match/4596',\n\t\t\t\t'name' => 'Elements vs GIANTS GAMING',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t217 => \n\t\t\tarray (\n\t\t\t\t'id' => 4597,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 68,\n\t\t\t\t'team_red_id' => 1242,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870740,\n\t\t\t\t'date_time' => '2015-06-04 17:00:00',\n\t\t\t\t'url' => '/tourney/match/4597',\n\t\t\t\t'name' => 'Fnatic vs ROCCAT',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t218 => \n\t\t\tarray (\n\t\t\t\t'id' => 4598,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1273,\n\t\t\t\t'team_red_id' => 69,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870741,\n\t\t\t\t'date_time' => '2015-06-04 18:00:00',\n\t\t\t\t'url' => '/tourney/match/4598',\n\t\t\t\t'name' => 'H2K vs Gambit Gaming',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t219 => \n\t\t\tarray (\n\t\t\t\t'id' => 4599,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 67,\n\t\t\t\t'team_red_id' => 3862,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870742,\n\t\t\t\t'date_time' => '2015-06-04 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4599',\n\t\t\t\t'name' => 'SK Gaming vs ORIGEN',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t220 => \n\t\t\tarray (\n\t\t\t\t'id' => 4600,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1281,\n\t\t\t\t'team_red_id' => 1100,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870743,\n\t\t\t\t'date_time' => '2015-06-04 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4600',\n\t\t\t\t'name' => 'Unicorns Of Love vs Copenhagen Wolves',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t221 => \n\t\t\tarray (\n\t\t\t\t'id' => 4601,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 69,\n\t\t\t\t'team_red_id' => 68,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870744,\n\t\t\t\t'date_time' => '2015-06-05 16:00:00',\n\t\t\t\t'url' => '/tourney/match/4601',\n\t\t\t\t'name' => 'Gambit Gaming vs Fnatic',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t222 => \n\t\t\tarray (\n\t\t\t\t'id' => 4602,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 71,\n\t\t\t\t'team_red_id' => 67,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870745,\n\t\t\t\t'date_time' => '2015-06-05 17:00:00',\n\t\t\t\t'url' => '/tourney/match/4602',\n\t\t\t\t'name' => 'GIANTS GAMING vs SK Gaming',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t223 => \n\t\t\tarray (\n\t\t\t\t'id' => 4603,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1281,\n\t\t\t\t'team_red_id' => 1242,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870746,\n\t\t\t\t'date_time' => '2015-06-05 18:00:00',\n\t\t\t\t'url' => '/tourney/match/4603',\n\t\t\t\t'name' => 'Unicorns Of Love vs ROCCAT',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t224 => \n\t\t\tarray (\n\t\t\t\t'id' => 4604,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1273,\n\t\t\t\t'team_red_id' => 3659,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870747,\n\t\t\t\t'date_time' => '2015-06-05 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4604',\n\t\t\t\t'name' => 'H2K vs Elements',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t225 => \n\t\t\tarray (\n\t\t\t\t'id' => 4605,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 3862,\n\t\t\t\t'team_red_id' => 1100,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870748,\n\t\t\t\t'date_time' => '2015-06-05 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4605',\n\t\t\t\t'name' => 'ORIGEN vs Copenhagen Wolves',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t226 => \n\t\t\tarray (\n\t\t\t\t'id' => 4606,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 3862,\n\t\t\t\t'team_red_id' => 1281,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870749,\n\t\t\t\t'date_time' => '2015-06-11 16:00:00',\n\t\t\t\t'url' => '/tourney/match/4606',\n\t\t\t\t'name' => 'ORIGEN vs Unicorns Of Love',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t227 => \n\t\t\tarray (\n\t\t\t\t'id' => 4607,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1242,\n\t\t\t\t'team_red_id' => 71,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870750,\n\t\t\t\t'date_time' => '2015-06-11 17:00:00',\n\t\t\t\t'url' => '/tourney/match/4607',\n\t\t\t\t'name' => 'ROCCAT vs GIANTS GAMING',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t228 => \n\t\t\tarray (\n\t\t\t\t'id' => 4608,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 67,\n\t\t\t\t'team_red_id' => 1273,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870751,\n\t\t\t\t'date_time' => '2015-06-11 18:00:00',\n\t\t\t\t'url' => '/tourney/match/4608',\n\t\t\t\t'name' => 'SK Gaming vs H2K',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t229 => \n\t\t\tarray (\n\t\t\t\t'id' => 4609,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 68,\n\t\t\t\t'team_red_id' => 3659,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870752,\n\t\t\t\t'date_time' => '2015-06-11 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4609',\n\t\t\t\t'name' => 'Fnatic vs Elements',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t230 => \n\t\t\tarray (\n\t\t\t\t'id' => 4610,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1100,\n\t\t\t\t'team_red_id' => 69,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870753,\n\t\t\t\t'date_time' => '2015-06-11 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4610',\n\t\t\t\t'name' => 'Copenhagen Wolves vs Gambit Gaming',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t231 => \n\t\t\tarray (\n\t\t\t\t'id' => 4611,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 68,\n\t\t\t\t'team_red_id' => 71,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870754,\n\t\t\t\t'date_time' => '2015-06-12 16:00:00',\n\t\t\t\t'url' => '/tourney/match/4611',\n\t\t\t\t'name' => 'Fnatic vs GIANTS GAMING',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t232 => \n\t\t\tarray (\n\t\t\t\t'id' => 4612,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1242,\n\t\t\t\t'team_red_id' => 3862,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870755,\n\t\t\t\t'date_time' => '2015-06-12 17:00:00',\n\t\t\t\t'url' => '/tourney/match/4612',\n\t\t\t\t'name' => 'ROCCAT vs ORIGEN',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t233 => \n\t\t\tarray (\n\t\t\t\t'id' => 4613,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 3659,\n\t\t\t\t'team_red_id' => 1100,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870756,\n\t\t\t\t'date_time' => '2015-06-12 18:00:00',\n\t\t\t\t'url' => '/tourney/match/4613',\n\t\t\t\t'name' => 'Elements vs Copenhagen Wolves',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t234 => \n\t\t\tarray (\n\t\t\t\t'id' => 4614,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 69,\n\t\t\t\t'team_red_id' => 67,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870757,\n\t\t\t\t'date_time' => '2015-06-12 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4614',\n\t\t\t\t'name' => 'Gambit Gaming vs SK Gaming',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t235 => \n\t\t\tarray (\n\t\t\t\t'id' => 4615,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1281,\n\t\t\t\t'team_red_id' => 1273,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870758,\n\t\t\t\t'date_time' => '2015-06-12 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4615',\n\t\t\t\t'name' => 'Unicorns Of Love vs H2K',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t236 => \n\t\t\tarray (\n\t\t\t\t'id' => 4616,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 71,\n\t\t\t\t'team_red_id' => 69,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870759,\n\t\t\t\t'date_time' => '2015-06-18 16:00:00',\n\t\t\t\t'url' => '/tourney/match/4616',\n\t\t\t\t'name' => 'GIANTS GAMING vs Gambit Gaming',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t237 => \n\t\t\tarray (\n\t\t\t\t'id' => 4617,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 3659,\n\t\t\t\t'team_red_id' => 1242,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870760,\n\t\t\t\t'date_time' => '2015-06-18 17:00:00',\n\t\t\t\t'url' => '/tourney/match/4617',\n\t\t\t\t'name' => 'Elements vs ROCCAT',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t238 => \n\t\t\tarray (\n\t\t\t\t'id' => 4618,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 3862,\n\t\t\t\t'team_red_id' => 68,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870761,\n\t\t\t\t'date_time' => '2015-06-18 18:00:00',\n\t\t\t\t'url' => '/tourney/match/4618',\n\t\t\t\t'name' => 'ORIGEN vs Fnatic',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t239 => \n\t\t\tarray (\n\t\t\t\t'id' => 4619,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 67,\n\t\t\t\t'team_red_id' => 1281,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870762,\n\t\t\t\t'date_time' => '2015-06-18 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4619',\n\t\t\t\t'name' => 'SK Gaming vs Unicorns Of Love',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t240 => \n\t\t\tarray (\n\t\t\t\t'id' => 4620,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1100,\n\t\t\t\t'team_red_id' => 1273,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870763,\n\t\t\t\t'date_time' => '2015-06-18 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4620',\n\t\t\t\t'name' => 'Copenhagen Wolves vs H2K',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t241 => \n\t\t\tarray (\n\t\t\t\t'id' => 4621,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 67,\n\t\t\t\t'team_red_id' => 1242,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870764,\n\t\t\t\t'date_time' => '2015-06-19 16:00:00',\n\t\t\t\t'url' => '/tourney/match/4621',\n\t\t\t\t'name' => 'SK Gaming vs ROCCAT',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t242 => \n\t\t\tarray (\n\t\t\t\t'id' => 4622,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1273,\n\t\t\t\t'team_red_id' => 71,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870765,\n\t\t\t\t'date_time' => '2015-06-19 17:00:00',\n\t\t\t\t'url' => '/tourney/match/4622',\n\t\t\t\t'name' => 'H2K vs GIANTS GAMING',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t243 => \n\t\t\tarray (\n\t\t\t\t'id' => 4623,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1100,\n\t\t\t\t'team_red_id' => 68,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870766,\n\t\t\t\t'date_time' => '2015-06-19 18:00:00',\n\t\t\t\t'url' => '/tourney/match/4623',\n\t\t\t\t'name' => 'Copenhagen Wolves vs Fnatic',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t244 => \n\t\t\tarray (\n\t\t\t\t'id' => 4624,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 69,\n\t\t\t\t'team_red_id' => 1281,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870767,\n\t\t\t\t'date_time' => '2015-06-19 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4624',\n\t\t\t\t'name' => 'Gambit Gaming vs Unicorns Of Love',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t245 => \n\t\t\tarray (\n\t\t\t\t'id' => 4625,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 3862,\n\t\t\t\t'team_red_id' => 3659,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870769,\n\t\t\t\t'date_time' => '2015-06-19 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4625',\n\t\t\t\t'name' => 'ORIGEN vs Elements',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t246 => \n\t\t\tarray (\n\t\t\t\t'id' => 4626,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1242,\n\t\t\t\t'team_red_id' => 1100,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870770,\n\t\t\t\t'date_time' => '2015-06-25 16:00:00',\n\t\t\t\t'url' => '/tourney/match/4626',\n\t\t\t\t'name' => 'ROCCAT vs Copenhagen Wolves',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t247 => \n\t\t\tarray (\n\t\t\t\t'id' => 4627,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1281,\n\t\t\t\t'team_red_id' => 71,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870771,\n\t\t\t\t'date_time' => '2015-06-25 17:00:00',\n\t\t\t\t'url' => '/tourney/match/4627',\n\t\t\t\t'name' => 'Unicorns Of Love vs GIANTS GAMING',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t248 => \n\t\t\tarray (\n\t\t\t\t'id' => 4628,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 3862,\n\t\t\t\t'team_red_id' => 69,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870772,\n\t\t\t\t'date_time' => '2015-06-25 18:00:00',\n\t\t\t\t'url' => '/tourney/match/4628',\n\t\t\t\t'name' => 'ORIGEN vs Gambit Gaming',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t249 => \n\t\t\tarray (\n\t\t\t\t'id' => 4629,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 68,\n\t\t\t\t'team_red_id' => 1273,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870773,\n\t\t\t\t'date_time' => '2015-06-25 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4629',\n\t\t\t\t'name' => 'Fnatic vs H2K',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t250 => \n\t\t\tarray (\n\t\t\t\t'id' => 4630,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 3659,\n\t\t\t\t'team_red_id' => 67,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870774,\n\t\t\t\t'date_time' => '2015-06-25 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4630',\n\t\t\t\t'name' => 'Elements vs SK Gaming',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t251 => \n\t\t\tarray (\n\t\t\t\t'id' => 4631,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 68,\n\t\t\t\t'team_red_id' => 69,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870775,\n\t\t\t\t'date_time' => '2015-06-26 16:00:00',\n\t\t\t\t'url' => '/tourney/match/4631',\n\t\t\t\t'name' => 'Fnatic vs Gambit Gaming',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t252 => \n\t\t\tarray (\n\t\t\t\t'id' => 4632,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1242,\n\t\t\t\t'team_red_id' => 1281,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870776,\n\t\t\t\t'date_time' => '2015-06-26 17:00:00',\n\t\t\t\t'url' => '/tourney/match/4632',\n\t\t\t\t'name' => 'ROCCAT vs Unicorns Of Love',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t253 => \n\t\t\tarray (\n\t\t\t\t'id' => 4633,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1100,\n\t\t\t\t'team_red_id' => 3862,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870777,\n\t\t\t\t'date_time' => '2015-06-26 18:00:00',\n\t\t\t\t'url' => '/tourney/match/4633',\n\t\t\t\t'name' => 'Copenhagen Wolves vs ORIGEN',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t254 => \n\t\t\tarray (\n\t\t\t\t'id' => 4634,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 71,\n\t\t\t\t'team_red_id' => 3659,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870778,\n\t\t\t\t'date_time' => '2015-06-26 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4634',\n\t\t\t\t'name' => 'GIANTS GAMING vs Elements',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t255 => \n\t\t\tarray (\n\t\t\t\t'id' => 4635,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1273,\n\t\t\t\t'team_red_id' => 67,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870779,\n\t\t\t\t'date_time' => '2015-06-26 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4635',\n\t\t\t\t'name' => 'H2K vs SK Gaming',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t256 => \n\t\t\tarray (\n\t\t\t\t'id' => 4636,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 71,\n\t\t\t\t'team_red_id' => 68,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870780,\n\t\t\t\t'date_time' => '2015-07-02 16:00:00',\n\t\t\t\t'url' => '/tourney/match/4636',\n\t\t\t\t'name' => 'GIANTS GAMING vs Fnatic',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t257 => \n\t\t\tarray (\n\t\t\t\t'id' => 4637,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 3659,\n\t\t\t\t'team_red_id' => 1273,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870781,\n\t\t\t\t'date_time' => '2015-07-02 17:00:00',\n\t\t\t\t'url' => '/tourney/match/4637',\n\t\t\t\t'name' => 'Elements vs H2K',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t258 => \n\t\t\tarray (\n\t\t\t\t'id' => 4638,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1242,\n\t\t\t\t'team_red_id' => 67,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870727,\n\t\t\t\t'date_time' => '2015-07-02 18:00:00',\n\t\t\t\t'url' => '/tourney/match/4638',\n\t\t\t\t'name' => 'ROCCAT vs SK Gaming',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t259 => \n\t\t\tarray (\n\t\t\t\t'id' => 4639,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1281,\n\t\t\t\t'team_red_id' => 3862,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870782,\n\t\t\t\t'date_time' => '2015-07-02 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4639',\n\t\t\t\t'name' => 'Unicorns Of Love vs ORIGEN',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t260 => \n\t\t\tarray (\n\t\t\t\t'id' => 4640,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 69,\n\t\t\t\t'team_red_id' => 1100,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870783,\n\t\t\t\t'date_time' => '2015-07-02 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4640',\n\t\t\t\t'name' => 'Gambit Gaming vs Copenhagen Wolves',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t261 => \n\t\t\tarray (\n\t\t\t\t'id' => 4641,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 67,\n\t\t\t\t'team_red_id' => 71,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870784,\n\t\t\t\t'date_time' => '2015-07-03 16:00:00',\n\t\t\t\t'url' => '/tourney/match/4641',\n\t\t\t\t'name' => 'SK Gaming vs GIANTS GAMING',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t262 => \n\t\t\tarray (\n\t\t\t\t'id' => 4642,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 68,\n\t\t\t\t'team_red_id' => 1100,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870785,\n\t\t\t\t'date_time' => '2015-07-03 17:00:00',\n\t\t\t\t'url' => '/tourney/match/4642',\n\t\t\t\t'name' => 'Fnatic vs Copenhagen Wolves',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t263 => \n\t\t\tarray (\n\t\t\t\t'id' => 4643,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1273,\n\t\t\t\t'team_red_id' => 1281,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870786,\n\t\t\t\t'date_time' => '2015-07-03 18:00:00',\n\t\t\t\t'url' => '/tourney/match/4643',\n\t\t\t\t'name' => 'H2K vs Unicorns Of Love',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t264 => \n\t\t\tarray (\n\t\t\t\t'id' => 4644,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 69,\n\t\t\t\t'team_red_id' => 1242,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870787,\n\t\t\t\t'date_time' => '2015-07-03 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4644',\n\t\t\t\t'name' => 'Gambit Gaming vs ROCCAT',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t265 => \n\t\t\tarray (\n\t\t\t\t'id' => 4645,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 3659,\n\t\t\t\t'team_red_id' => 3862,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870788,\n\t\t\t\t'date_time' => '2015-07-03 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4645',\n\t\t\t\t'name' => 'Elements vs ORIGEN',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t266 => \n\t\t\tarray (\n\t\t\t\t'id' => 4646,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 3862,\n\t\t\t\t'team_red_id' => 71,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870789,\n\t\t\t\t'date_time' => '2015-07-09 16:00:00',\n\t\t\t\t'url' => '/tourney/match/4646',\n\t\t\t\t'name' => 'ORIGEN vs GIANTS GAMING',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t267 => \n\t\t\tarray (\n\t\t\t\t'id' => 4647,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 67,\n\t\t\t\t'team_red_id' => 69,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870942,\n\t\t\t\t'date_time' => '2015-07-09 17:00:00',\n\t\t\t\t'url' => '/tourney/match/4647',\n\t\t\t\t'name' => 'SK Gaming vs Gambit Gaming',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t268 => \n\t\t\tarray (\n\t\t\t\t'id' => 4648,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1100,\n\t\t\t\t'team_red_id' => 1281,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870791,\n\t\t\t\t'date_time' => '2015-07-09 18:00:00',\n\t\t\t\t'url' => '/tourney/match/4648',\n\t\t\t\t'name' => 'Copenhagen Wolves vs Unicorns Of Love',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t269 => \n\t\t\tarray (\n\t\t\t\t'id' => 4649,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1273,\n\t\t\t\t'team_red_id' => 68,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870792,\n\t\t\t\t'date_time' => '2015-07-09 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4649',\n\t\t\t\t'name' => 'H2K vs Fnatic',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t270 => \n\t\t\tarray (\n\t\t\t\t'id' => 4650,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1242,\n\t\t\t\t'team_red_id' => 3659,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870793,\n\t\t\t\t'date_time' => '2015-07-09 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4650',\n\t\t\t\t'name' => 'ROCCAT vs Elements',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t271 => \n\t\t\tarray (\n\t\t\t\t'id' => 4651,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1242,\n\t\t\t\t'team_red_id' => 1273,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870794,\n\t\t\t\t'date_time' => '2015-07-10 16:00:00',\n\t\t\t\t'url' => '/tourney/match/4651',\n\t\t\t\t'name' => 'ROCCAT vs H2K',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t272 => \n\t\t\tarray (\n\t\t\t\t'id' => 4652,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1281,\n\t\t\t\t'team_red_id' => 3659,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870795,\n\t\t\t\t'date_time' => '2015-07-10 17:00:00',\n\t\t\t\t'url' => '/tourney/match/4652',\n\t\t\t\t'name' => 'Unicorns Of Love vs Elements',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t273 => \n\t\t\tarray (\n\t\t\t\t'id' => 4653,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 68,\n\t\t\t\t'team_red_id' => 3862,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870796,\n\t\t\t\t'date_time' => '2015-07-10 18:00:00',\n\t\t\t\t'url' => '/tourney/match/4653',\n\t\t\t\t'name' => 'Fnatic vs ORIGEN',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t274 => \n\t\t\tarray (\n\t\t\t\t'id' => 4654,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 67,\n\t\t\t\t'team_red_id' => 1100,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870797,\n\t\t\t\t'date_time' => '2015-07-10 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4654',\n\t\t\t\t'name' => 'SK Gaming vs Copenhagen Wolves',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t275 => \n\t\t\tarray (\n\t\t\t\t'id' => 4655,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 69,\n\t\t\t\t'team_red_id' => 71,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870798,\n\t\t\t\t'date_time' => '2015-07-10 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4655',\n\t\t\t\t'name' => 'Gambit Gaming vs GIANTS GAMING',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t276 => \n\t\t\tarray (\n\t\t\t\t'id' => 4656,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1281,\n\t\t\t\t'team_red_id' => 67,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870799,\n\t\t\t\t'date_time' => '2015-07-16 16:00:00',\n\t\t\t\t'url' => '/tourney/match/4656',\n\t\t\t\t'name' => 'Unicorns Of Love vs SK Gaming',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t277 => \n\t\t\tarray (\n\t\t\t\t'id' => 4657,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1100,\n\t\t\t\t'team_red_id' => 3659,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870800,\n\t\t\t\t'date_time' => '2015-07-16 17:00:00',\n\t\t\t\t'url' => '/tourney/match/4657',\n\t\t\t\t'name' => 'Copenhagen Wolves vs Elements',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:22',\n\t\t\t),\n\t\t\t278 => \n\t\t\tarray (\n\t\t\t\t'id' => 4658,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1242,\n\t\t\t\t'team_red_id' => 68,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870801,\n\t\t\t\t'date_time' => '2015-07-16 18:00:00',\n\t\t\t\t'url' => '/tourney/match/4658',\n\t\t\t\t'name' => 'ROCCAT vs Fnatic',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:23',\n\t\t\t),\n\t\t\t279 => \n\t\t\tarray (\n\t\t\t\t'id' => 4659,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 69,\n\t\t\t\t'team_red_id' => 3862,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870802,\n\t\t\t\t'date_time' => '2015-07-16 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4659',\n\t\t\t\t'name' => 'Gambit Gaming vs ORIGEN',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:23',\n\t\t\t),\n\t\t\t280 => \n\t\t\tarray (\n\t\t\t\t'id' => 4660,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 71,\n\t\t\t\t'team_red_id' => 1273,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870803,\n\t\t\t\t'date_time' => '2015-07-16 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4660',\n\t\t\t\t'name' => 'GIANTS GAMING vs H2K',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:23',\n\t\t\t),\n\t\t\t281 => \n\t\t\tarray (\n\t\t\t\t'id' => 4661,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 3862,\n\t\t\t\t'team_red_id' => 67,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870804,\n\t\t\t\t'date_time' => '2015-07-17 16:00:00',\n\t\t\t\t'url' => '/tourney/match/4661',\n\t\t\t\t'name' => 'ORIGEN vs SK Gaming',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:23',\n\t\t\t),\n\t\t\t282 => \n\t\t\tarray (\n\t\t\t\t'id' => 4662,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 71,\n\t\t\t\t'team_red_id' => 1242,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870805,\n\t\t\t\t'date_time' => '2015-07-17 17:00:00',\n\t\t\t\t'url' => '/tourney/match/4662',\n\t\t\t\t'name' => 'GIANTS GAMING vs ROCCAT',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:23',\n\t\t\t),\n\t\t\t283 => \n\t\t\tarray (\n\t\t\t\t'id' => 4663,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1281,\n\t\t\t\t'team_red_id' => 69,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870806,\n\t\t\t\t'date_time' => '2015-07-17 18:00:00',\n\t\t\t\t'url' => '/tourney/match/4663',\n\t\t\t\t'name' => 'Unicorns Of Love vs Gambit Gaming',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:23',\n\t\t\t),\n\t\t\t284 => \n\t\t\tarray (\n\t\t\t\t'id' => 4664,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1273,\n\t\t\t\t'team_red_id' => 1100,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870807,\n\t\t\t\t'date_time' => '2015-07-17 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4664',\n\t\t\t\t'name' => 'H2K vs Copenhagen Wolves',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:23',\n\t\t\t),\n\t\t\t285 => \n\t\t\tarray (\n\t\t\t\t'id' => 4665,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 3659,\n\t\t\t\t'team_red_id' => 68,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870808,\n\t\t\t\t'date_time' => '2015-07-17 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4665',\n\t\t\t\t'name' => 'Elements vs Fnatic',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:23',\n\t\t\t),\n\t\t\t286 => \n\t\t\tarray (\n\t\t\t\t'id' => 4666,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 67,\n\t\t\t\t'team_red_id' => 68,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870809,\n\t\t\t\t'date_time' => '2015-07-23 16:00:00',\n\t\t\t\t'url' => '/tourney/match/4666',\n\t\t\t\t'name' => 'SK Gaming vs Fnatic',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:23',\n\t\t\t),\n\t\t\t287 => \n\t\t\tarray (\n\t\t\t\t'id' => 4667,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 71,\n\t\t\t\t'team_red_id' => 1281,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870810,\n\t\t\t\t'date_time' => '2015-07-23 17:00:00',\n\t\t\t\t'url' => '/tourney/match/4667',\n\t\t\t\t'name' => 'GIANTS GAMING vs Unicorns Of Love',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:23',\n\t\t\t),\n\t\t\t288 => \n\t\t\tarray (\n\t\t\t\t'id' => 4668,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1100,\n\t\t\t\t'team_red_id' => 1242,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870811,\n\t\t\t\t'date_time' => '2015-07-23 18:00:00',\n\t\t\t\t'url' => '/tourney/match/4668',\n\t\t\t\t'name' => 'Copenhagen Wolves vs ROCCAT',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:23',\n\t\t\t),\n\t\t\t289 => \n\t\t\tarray (\n\t\t\t\t'id' => 4669,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 3659,\n\t\t\t\t'team_red_id' => 69,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870812,\n\t\t\t\t'date_time' => '2015-07-23 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4669',\n\t\t\t\t'name' => 'Elements vs Gambit Gaming',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:23',\n\t\t\t),\n\t\t\t290 => \n\t\t\tarray (\n\t\t\t\t'id' => 4670,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1273,\n\t\t\t\t'team_red_id' => 3862,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870813,\n\t\t\t\t'date_time' => '2015-07-23 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4670',\n\t\t\t\t'name' => 'H2K vs ORIGEN',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:23',\n\t\t\t),\n\t\t\t291 => \n\t\t\tarray (\n\t\t\t\t'id' => 4671,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 1100,\n\t\t\t\t'team_red_id' => 71,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870814,\n\t\t\t\t'date_time' => '2015-07-24 16:00:00',\n\t\t\t\t'url' => '/tourney/match/4671',\n\t\t\t\t'name' => 'Copenhagen Wolves vs GIANTS GAMING',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:23',\n\t\t\t),\n\t\t\t292 => \n\t\t\tarray (\n\t\t\t\t'id' => 4672,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 69,\n\t\t\t\t'team_red_id' => 1273,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870815,\n\t\t\t\t'date_time' => '2015-07-24 17:00:00',\n\t\t\t\t'url' => '/tourney/match/4672',\n\t\t\t\t'name' => 'Gambit Gaming vs H2K',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:23',\n\t\t\t),\n\t\t\t293 => \n\t\t\tarray (\n\t\t\t\t'id' => 4673,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 68,\n\t\t\t\t'team_red_id' => 1281,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870816,\n\t\t\t\t'date_time' => '2015-07-24 18:00:00',\n\t\t\t\t'url' => '/tourney/match/4673',\n\t\t\t\t'name' => 'Fnatic vs Unicorns Of Love',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:23',\n\t\t\t),\n\t\t\t294 => \n\t\t\tarray (\n\t\t\t\t'id' => 4674,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 67,\n\t\t\t\t'team_red_id' => 3659,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870817,\n\t\t\t\t'date_time' => '2015-07-24 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4674',\n\t\t\t\t'name' => 'SK Gaming vs Elements',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:23',\n\t\t\t),\n\t\t\t295 => \n\t\t\tarray (\n\t\t\t\t'id' => 4675,\n\t\t\t\t'league_id' => 2,\n\t\t\t\t'tournament_id' => 225,\n\t\t\t\t'team_blue_id' => 3862,\n\t\t\t\t'team_red_id' => 1242,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870818,\n\t\t\t\t'date_time' => '2015-07-24 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4675',\n\t\t\t\t'name' => 'ORIGEN vs ROCCAT',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:44',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:23',\n\t\t\t),\n\t\t\t296 => \n\t\t\tarray (\n\t\t\t\t'id' => 4676,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 304,\n\t\t\t\t'team_red_id' => 1,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870836,\n\t\t\t\t'date_time' => '2015-05-30 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4676',\n\t\t\t\t'name' => 'Cloud9 vs Team SoloMid',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:28',\n\t\t\t),\n\t\t\t297 => \n\t\t\tarray (\n\t\t\t\t'id' => 4677,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3856,\n\t\t\t\t'team_red_id' => 3654,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870837,\n\t\t\t\t'date_time' => '2015-05-30 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4677',\n\t\t\t\t'name' => 'Team Dragon Knights vs Team Liquid',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:28',\n\t\t\t),\n\t\t\t298 => \n\t\t\tarray (\n\t\t\t\t'id' => 4678,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 2,\n\t\t\t\t'team_red_id' => 3,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870838,\n\t\t\t\t'date_time' => '2015-05-30 21:00:00',\n\t\t\t\t'url' => '/tourney/match/4678',\n\t\t\t\t'name' => 'Counter Logic Gaming vs Team Dignitas',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:28',\n\t\t\t),\n\t\t\t299 => \n\t\t\tarray (\n\t\t\t\t'id' => 4679,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 1258,\n\t\t\t\t'team_red_id' => 3657,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870839,\n\t\t\t\t'date_time' => '2015-05-30 22:00:00',\n\t\t\t\t'url' => '/tourney/match/4679',\n\t\t\t\t'name' => 'Team 8 vs Team Impulse',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:28',\n\t\t\t),\n\t\t\t300 => \n\t\t\tarray (\n\t\t\t\t'id' => 4680,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3656,\n\t\t\t\t'team_red_id' => 3494,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870840,\n\t\t\t\t'date_time' => '2015-05-30 23:00:00',\n\t\t\t\t'url' => '/tourney/match/4680',\n\t\t\t\t'name' => 'Gravity vs Enemy Esports',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:28',\n\t\t\t),\n\t\t\t301 => \n\t\t\tarray (\n\t\t\t\t'id' => 4681,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3654,\n\t\t\t\t'team_red_id' => 1258,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870841,\n\t\t\t\t'date_time' => '2015-05-31 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4681',\n\t\t\t\t'name' => 'Team Liquid vs Team 8',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:28',\n\t\t\t),\n\t\t\t302 => \n\t\t\tarray (\n\t\t\t\t'id' => 4682,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3,\n\t\t\t\t'team_red_id' => 304,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870842,\n\t\t\t\t'date_time' => '2015-05-31 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4682',\n\t\t\t\t'name' => 'Team Dignitas vs Cloud9 ',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:28',\n\t\t\t),\n\t\t\t303 => \n\t\t\tarray (\n\t\t\t\t'id' => 4683,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3657,\n\t\t\t\t'team_red_id' => 2,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870843,\n\t\t\t\t'date_time' => '2015-05-31 21:00:00',\n\t\t\t\t'url' => '/tourney/match/4683',\n\t\t\t\t'name' => 'Team Impulse vs Counter Logic Gaming',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:28',\n\t\t\t),\n\t\t\t304 => \n\t\t\tarray (\n\t\t\t\t'id' => 4684,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 1,\n\t\t\t\t'team_red_id' => 3494,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870844,\n\t\t\t\t'date_time' => '2015-05-31 22:00:00',\n\t\t\t\t'url' => '/tourney/match/4684',\n\t\t\t\t'name' => 'Team SoloMid vs Enemy Esports',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:28',\n\t\t\t),\n\t\t\t305 => \n\t\t\tarray (\n\t\t\t\t'id' => 4685,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3856,\n\t\t\t\t'team_red_id' => 3656,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870845,\n\t\t\t\t'date_time' => '2015-05-31 23:00:00',\n\t\t\t\t'url' => '/tourney/match/4685',\n\t\t\t\t'name' => 'Team Dragon Knights vs Gravity',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t306 => \n\t\t\tarray (\n\t\t\t\t'id' => 4686,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3494,\n\t\t\t\t'team_red_id' => 3654,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870846,\n\t\t\t\t'date_time' => '2015-06-06 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4686',\n\t\t\t\t'name' => 'Enemy Esports vs Team Liquid',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t307 => \n\t\t\tarray (\n\t\t\t\t'id' => 4687,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 304,\n\t\t\t\t'team_red_id' => 3656,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870847,\n\t\t\t\t'date_time' => '2015-06-06 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4687',\n\t\t\t\t'name' => 'Cloud9 vs Gravity',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t308 => \n\t\t\tarray (\n\t\t\t\t'id' => 4688,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 1,\n\t\t\t\t'team_red_id' => 3657,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870848,\n\t\t\t\t'date_time' => '2015-06-06 21:00:00',\n\t\t\t\t'url' => '/tourney/match/4688',\n\t\t\t\t'name' => 'Team SoloMid vs Team Impulse',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t309 => \n\t\t\tarray (\n\t\t\t\t'id' => 4689,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 1258,\n\t\t\t\t'team_red_id' => 2,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870849,\n\t\t\t\t'date_time' => '2015-06-06 22:00:00',\n\t\t\t\t'url' => '/tourney/match/4689',\n\t\t\t\t'name' => 'Team 8 vs Counter Logic Gaming',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t310 => \n\t\t\tarray (\n\t\t\t\t'id' => 4690,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3,\n\t\t\t\t'team_red_id' => 3856,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870850,\n\t\t\t\t'date_time' => '2015-06-06 23:00:00',\n\t\t\t\t'url' => '/tourney/match/4690',\n\t\t\t\t'name' => 'Team Dignitas vs Team Dragon Knights',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t311 => \n\t\t\tarray (\n\t\t\t\t'id' => 4691,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 304,\n\t\t\t\t'team_red_id' => 3657,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870851,\n\t\t\t\t'date_time' => '2015-06-07 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4691',\n\t\t\t\t'name' => 'Cloud9 vs Team Impulse',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t312 => \n\t\t\tarray (\n\t\t\t\t'id' => 4692,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3654,\n\t\t\t\t'team_red_id' => 3656,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870852,\n\t\t\t\t'date_time' => '2015-06-07 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4692',\n\t\t\t\t'name' => 'Team Liquid vs Gravity',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t313 => \n\t\t\tarray (\n\t\t\t\t'id' => 4693,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 2,\n\t\t\t\t'team_red_id' => 1,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870853,\n\t\t\t\t'date_time' => '2015-06-07 21:00:00',\n\t\t\t\t'url' => '/tourney/match/4693',\n\t\t\t\t'name' => 'Counter Logic Gaming vs Team SoloMid',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t314 => \n\t\t\tarray (\n\t\t\t\t'id' => 4694,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3856,\n\t\t\t\t'team_red_id' => 3494,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870854,\n\t\t\t\t'date_time' => '2015-06-07 22:00:00',\n\t\t\t\t'url' => '/tourney/match/4694',\n\t\t\t\t'name' => 'Team Dragon Knights vs Enemy Esports',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t315 => \n\t\t\tarray (\n\t\t\t\t'id' => 4695,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 1258,\n\t\t\t\t'team_red_id' => 3,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870855,\n\t\t\t\t'date_time' => '2015-06-07 23:00:00',\n\t\t\t\t'url' => '/tourney/match/4695',\n\t\t\t\t'name' => 'Team 8 vs Team Dignitas',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t316 => \n\t\t\tarray (\n\t\t\t\t'id' => 4696,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3494,\n\t\t\t\t'team_red_id' => 1258,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870856,\n\t\t\t\t'date_time' => '2015-06-13 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4696',\n\t\t\t\t'name' => 'Enemy Esports vs Team 8',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t317 => \n\t\t\tarray (\n\t\t\t\t'id' => 4697,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 1,\n\t\t\t\t'team_red_id' => 3,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870857,\n\t\t\t\t'date_time' => '2015-06-13 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4697',\n\t\t\t\t'name' => 'Team SoloMid vs Team Dignitas',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t318 => \n\t\t\tarray (\n\t\t\t\t'id' => 4698,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3654,\n\t\t\t\t'team_red_id' => 304,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870858,\n\t\t\t\t'date_time' => '2015-06-13 21:00:00',\n\t\t\t\t'url' => '/tourney/match/4698',\n\t\t\t\t'name' => 'Team Liquid vs Cloud9 ',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t319 => \n\t\t\tarray (\n\t\t\t\t'id' => 4699,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3657,\n\t\t\t\t'team_red_id' => 3856,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870859,\n\t\t\t\t'date_time' => '2015-06-13 22:00:00',\n\t\t\t\t'url' => '/tourney/match/4699',\n\t\t\t\t'name' => 'Team Impulse vs Team Dragon Knights',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t320 => \n\t\t\tarray (\n\t\t\t\t'id' => 4700,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3656,\n\t\t\t\t'team_red_id' => 2,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870860,\n\t\t\t\t'date_time' => '2015-06-13 23:00:00',\n\t\t\t\t'url' => '/tourney/match/4700',\n\t\t\t\t'name' => 'Gravity vs Counter Logic Gaming',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t321 => \n\t\t\tarray (\n\t\t\t\t'id' => 4701,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 304,\n\t\t\t\t'team_red_id' => 1258,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870861,\n\t\t\t\t'date_time' => '2015-06-14 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4701',\n\t\t\t\t'name' => 'Cloud9 vs Team 8',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t322 => \n\t\t\tarray (\n\t\t\t\t'id' => 4702,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 1,\n\t\t\t\t'team_red_id' => 3856,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870862,\n\t\t\t\t'date_time' => '2015-06-14 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4702',\n\t\t\t\t'name' => 'Team SoloMid vs Team Dragon Knights',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t323 => \n\t\t\tarray (\n\t\t\t\t'id' => 4703,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3657,\n\t\t\t\t'team_red_id' => 3654,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870863,\n\t\t\t\t'date_time' => '2015-06-14 21:00:00',\n\t\t\t\t'url' => '/tourney/match/4703',\n\t\t\t\t'name' => 'Team Impulse vs Team Liquid',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t324 => \n\t\t\tarray (\n\t\t\t\t'id' => 4704,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3,\n\t\t\t\t'team_red_id' => 3656,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870864,\n\t\t\t\t'date_time' => '2015-06-14 22:00:00',\n\t\t\t\t'url' => '/tourney/match/4704',\n\t\t\t\t'name' => 'Team Dignitas vs Gravity',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t325 => \n\t\t\tarray (\n\t\t\t\t'id' => 4705,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 2,\n\t\t\t\t'team_red_id' => 3494,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870865,\n\t\t\t\t'date_time' => '2015-06-14 23:00:00',\n\t\t\t\t'url' => '/tourney/match/4705',\n\t\t\t\t'name' => 'Counter Logic Gaming vs Enemy Esports',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t326 => \n\t\t\tarray (\n\t\t\t\t'id' => 4706,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3,\n\t\t\t\t'team_red_id' => 3657,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870866,\n\t\t\t\t'date_time' => '2015-06-20 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4706',\n\t\t\t\t'name' => 'Team Dignitas vs Team Impulse',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t327 => \n\t\t\tarray (\n\t\t\t\t'id' => 4707,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3856,\n\t\t\t\t'team_red_id' => 2,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870867,\n\t\t\t\t'date_time' => '2015-06-20 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4707',\n\t\t\t\t'name' => 'Team Dragon Knights vs Counter Logic Gaming',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t328 => \n\t\t\tarray (\n\t\t\t\t'id' => 4708,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3654,\n\t\t\t\t'team_red_id' => 1,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870868,\n\t\t\t\t'date_time' => '2015-06-20 21:00:00',\n\t\t\t\t'url' => '/tourney/match/4708',\n\t\t\t\t'name' => 'Team Liquid vs Team SoloMid',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t329 => \n\t\t\tarray (\n\t\t\t\t'id' => 4709,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3656,\n\t\t\t\t'team_red_id' => 1258,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870869,\n\t\t\t\t'date_time' => '2015-06-20 22:00:00',\n\t\t\t\t'url' => '/tourney/match/4709',\n\t\t\t\t'name' => 'Gravity vs Team 8',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t330 => \n\t\t\tarray (\n\t\t\t\t'id' => 4710,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3494,\n\t\t\t\t'team_red_id' => 304,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870870,\n\t\t\t\t'date_time' => '2015-06-20 23:00:00',\n\t\t\t\t'url' => '/tourney/match/4710',\n\t\t\t\t'name' => 'Enemy Esports vs Cloud9 ',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t331 => \n\t\t\tarray (\n\t\t\t\t'id' => 4711,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 1258,\n\t\t\t\t'team_red_id' => 3856,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870871,\n\t\t\t\t'date_time' => '2015-06-21 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4711',\n\t\t\t\t'name' => 'Team 8 vs Team Dragon Knights',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t332 => \n\t\t\tarray (\n\t\t\t\t'id' => 4712,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3656,\n\t\t\t\t'team_red_id' => 1,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870872,\n\t\t\t\t'date_time' => '2015-06-21 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4712',\n\t\t\t\t'name' => 'Gravity vs Team SoloMid',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t333 => \n\t\t\tarray (\n\t\t\t\t'id' => 4713,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 2,\n\t\t\t\t'team_red_id' => 304,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870873,\n\t\t\t\t'date_time' => '2015-06-21 21:00:00',\n\t\t\t\t'url' => '/tourney/match/4713',\n\t\t\t\t'name' => 'Counter Logic Gaming vs Cloud9 ',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t334 => \n\t\t\tarray (\n\t\t\t\t'id' => 4714,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3494,\n\t\t\t\t'team_red_id' => 3657,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870874,\n\t\t\t\t'date_time' => '2015-06-21 22:00:00',\n\t\t\t\t'url' => '/tourney/match/4714',\n\t\t\t\t'name' => 'Enemy Esports vs Team Impulse',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t335 => \n\t\t\tarray (\n\t\t\t\t'id' => 4715,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3654,\n\t\t\t\t'team_red_id' => 3,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870875,\n\t\t\t\t'date_time' => '2015-06-21 23:00:00',\n\t\t\t\t'url' => '/tourney/match/4715',\n\t\t\t\t'name' => 'Team Liquid vs Team Dignitas',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t336 => \n\t\t\tarray (\n\t\t\t\t'id' => 4716,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3657,\n\t\t\t\t'team_red_id' => 3656,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870876,\n\t\t\t\t'date_time' => '2015-06-27 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4716',\n\t\t\t\t'name' => 'Team Impulse vs Gravity',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t337 => \n\t\t\tarray (\n\t\t\t\t'id' => 4717,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3654,\n\t\t\t\t'team_red_id' => 2,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870877,\n\t\t\t\t'date_time' => '2015-06-27 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4717',\n\t\t\t\t'name' => 'Team Liquid vs Counter Logic Gaming',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t338 => \n\t\t\tarray (\n\t\t\t\t'id' => 4718,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 1,\n\t\t\t\t'team_red_id' => 1258,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870878,\n\t\t\t\t'date_time' => '2015-06-27 21:00:00',\n\t\t\t\t'url' => '/tourney/match/4718',\n\t\t\t\t'name' => 'Team SoloMid vs Team 8',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t339 => \n\t\t\tarray (\n\t\t\t\t'id' => 4719,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 304,\n\t\t\t\t'team_red_id' => 3856,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870879,\n\t\t\t\t'date_time' => '2015-06-27 22:00:00',\n\t\t\t\t'url' => '/tourney/match/4719',\n\t\t\t\t'name' => 'Cloud9 vs Team Dragon Knights',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t340 => \n\t\t\tarray (\n\t\t\t\t'id' => 4720,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3,\n\t\t\t\t'team_red_id' => 3494,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870880,\n\t\t\t\t'date_time' => '2015-06-27 23:00:00',\n\t\t\t\t'url' => '/tourney/match/4720',\n\t\t\t\t'name' => 'Team Dignitas vs Enemy Esports',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t341 => \n\t\t\tarray (\n\t\t\t\t'id' => 4721,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3656,\n\t\t\t\t'team_red_id' => 3654,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870881,\n\t\t\t\t'date_time' => '2015-06-28 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4721',\n\t\t\t\t'name' => 'Gravity vs Team Liquid',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t342 => \n\t\t\tarray (\n\t\t\t\t'id' => 4722,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3657,\n\t\t\t\t'team_red_id' => 304,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870882,\n\t\t\t\t'date_time' => '2015-06-28 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4722',\n\t\t\t\t'name' => 'Team Impulse vs Cloud9 ',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t343 => \n\t\t\tarray (\n\t\t\t\t'id' => 4723,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 1,\n\t\t\t\t'team_red_id' => 2,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870883,\n\t\t\t\t'date_time' => '2015-06-28 21:00:00',\n\t\t\t\t'url' => '/tourney/match/4723',\n\t\t\t\t'name' => 'Team SoloMid vs Counter Logic Gaming',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t344 => \n\t\t\tarray (\n\t\t\t\t'id' => 4724,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3856,\n\t\t\t\t'team_red_id' => 3,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870885,\n\t\t\t\t'date_time' => '2015-06-28 22:00:00',\n\t\t\t\t'url' => '/tourney/match/4724',\n\t\t\t\t'name' => 'Team Dragon Knights vs Team Dignitas',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t345 => \n\t\t\tarray (\n\t\t\t\t'id' => 4725,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 1258,\n\t\t\t\t'team_red_id' => 3494,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870886,\n\t\t\t\t'date_time' => '2015-06-28 23:00:00',\n\t\t\t\t'url' => '/tourney/match/4725',\n\t\t\t\t'name' => 'Team 8 vs Enemy Esports',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t346 => \n\t\t\tarray (\n\t\t\t\t'id' => 4726,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3,\n\t\t\t\t'team_red_id' => 1258,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870887,\n\t\t\t\t'date_time' => '2015-07-04 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4726',\n\t\t\t\t'name' => 'Team Dignitas vs Team 8',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t347 => \n\t\t\tarray (\n\t\t\t\t'id' => 4727,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 2,\n\t\t\t\t'team_red_id' => 3656,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870889,\n\t\t\t\t'date_time' => '2015-07-04 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4727',\n\t\t\t\t'name' => 'Counter Logic Gaming vs Gravity',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t348 => \n\t\t\tarray (\n\t\t\t\t'id' => 4728,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 304,\n\t\t\t\t'team_red_id' => 3654,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870891,\n\t\t\t\t'date_time' => '2015-07-04 21:00:00',\n\t\t\t\t'url' => '/tourney/match/4728',\n\t\t\t\t'name' => 'Cloud9 vs Team Liquid',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t349 => \n\t\t\tarray (\n\t\t\t\t'id' => 4729,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3657,\n\t\t\t\t'team_red_id' => 3494,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870892,\n\t\t\t\t'date_time' => '2015-07-04 22:00:00',\n\t\t\t\t'url' => '/tourney/match/4729',\n\t\t\t\t'name' => 'Team Impulse vs Enemy Esports',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t350 => \n\t\t\tarray (\n\t\t\t\t'id' => 4730,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3856,\n\t\t\t\t'team_red_id' => 1,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870893,\n\t\t\t\t'date_time' => '2015-07-04 23:00:00',\n\t\t\t\t'url' => '/tourney/match/4730',\n\t\t\t\t'name' => 'Team Dragon Knights vs Team SoloMid',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t351 => \n\t\t\tarray (\n\t\t\t\t'id' => 4731,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3,\n\t\t\t\t'team_red_id' => 3654,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870895,\n\t\t\t\t'date_time' => '2015-07-05 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4731',\n\t\t\t\t'name' => 'Team Dignitas vs Team Liquid',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t352 => \n\t\t\tarray (\n\t\t\t\t'id' => 4732,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 1258,\n\t\t\t\t'team_red_id' => 304,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870896,\n\t\t\t\t'date_time' => '2015-07-05 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4732',\n\t\t\t\t'name' => 'Team 8 vs Cloud9 ',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t353 => \n\t\t\tarray (\n\t\t\t\t'id' => 4733,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 1,\n\t\t\t\t'team_red_id' => 3656,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870897,\n\t\t\t\t'date_time' => '2015-07-05 21:00:00',\n\t\t\t\t'url' => '/tourney/match/4733',\n\t\t\t\t'name' => 'Team SoloMid vs Gravity',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t354 => \n\t\t\tarray (\n\t\t\t\t'id' => 4734,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 2,\n\t\t\t\t'team_red_id' => 3657,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870898,\n\t\t\t\t'date_time' => '2015-07-05 22:00:00',\n\t\t\t\t'url' => '/tourney/match/4734',\n\t\t\t\t'name' => 'Counter Logic Gaming vs Team Impulse',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t355 => \n\t\t\tarray (\n\t\t\t\t'id' => 4735,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3494,\n\t\t\t\t'team_red_id' => 3856,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870899,\n\t\t\t\t'date_time' => '2015-07-05 23:00:00',\n\t\t\t\t'url' => '/tourney/match/4735',\n\t\t\t\t'name' => 'Enemy Esports vs Team Dragon Knights',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t356 => \n\t\t\tarray (\n\t\t\t\t'id' => 4736,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3654,\n\t\t\t\t'team_red_id' => 3856,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870900,\n\t\t\t\t'date_time' => '2015-07-11 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4736',\n\t\t\t\t'name' => 'Team Liquid vs Team Dragon Knights',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t357 => \n\t\t\tarray (\n\t\t\t\t'id' => 4737,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3494,\n\t\t\t\t'team_red_id' => 2,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870901,\n\t\t\t\t'date_time' => '2015-07-11 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4737',\n\t\t\t\t'name' => 'Enemy Esports vs Counter Logic Gaming',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t358 => \n\t\t\tarray (\n\t\t\t\t'id' => 4738,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3656,\n\t\t\t\t'team_red_id' => 304,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870902,\n\t\t\t\t'date_time' => '2015-07-11 21:00:00',\n\t\t\t\t'url' => '/tourney/match/4738',\n\t\t\t\t'name' => 'Gravity vs Cloud9 ',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t359 => \n\t\t\tarray (\n\t\t\t\t'id' => 4739,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 1258,\n\t\t\t\t'team_red_id' => 1,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870903,\n\t\t\t\t'date_time' => '2015-07-11 22:00:00',\n\t\t\t\t'url' => '/tourney/match/4739',\n\t\t\t\t'name' => 'Team 8 vs Team SoloMid',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t360 => \n\t\t\tarray (\n\t\t\t\t'id' => 4740,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3657,\n\t\t\t\t'team_red_id' => 3,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870904,\n\t\t\t\t'date_time' => '2015-07-11 23:00:00',\n\t\t\t\t'url' => '/tourney/match/4740',\n\t\t\t\t'name' => 'Team Impulse vs Team Dignitas',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t361 => \n\t\t\tarray (\n\t\t\t\t'id' => 4741,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 1,\n\t\t\t\t'team_red_id' => 3654,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870905,\n\t\t\t\t'date_time' => '2015-07-12 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4741',\n\t\t\t\t'name' => 'Team SoloMid vs Team Liquid',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t362 => \n\t\t\tarray (\n\t\t\t\t'id' => 4742,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 304,\n\t\t\t\t'team_red_id' => 3,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870906,\n\t\t\t\t'date_time' => '2015-07-12 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4742',\n\t\t\t\t'name' => 'Cloud9 vs Team Dignitas',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t363 => \n\t\t\tarray (\n\t\t\t\t'id' => 4743,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3657,\n\t\t\t\t'team_red_id' => 1258,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870907,\n\t\t\t\t'date_time' => '2015-07-12 21:00:00',\n\t\t\t\t'url' => '/tourney/match/4743',\n\t\t\t\t'name' => 'Team Impulse vs Team 8',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t364 => \n\t\t\tarray (\n\t\t\t\t'id' => 4744,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3494,\n\t\t\t\t'team_red_id' => 3656,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870908,\n\t\t\t\t'date_time' => '2015-07-12 22:00:00',\n\t\t\t\t'url' => '/tourney/match/4744',\n\t\t\t\t'name' => 'Enemy Esports vs Gravity',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t365 => \n\t\t\tarray (\n\t\t\t\t'id' => 4745,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 2,\n\t\t\t\t'team_red_id' => 3856,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870909,\n\t\t\t\t'date_time' => '2015-07-12 23:00:00',\n\t\t\t\t'url' => '/tourney/match/4745',\n\t\t\t\t'name' => 'Counter Logic Gaming vs Team Dragon Knights',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t366 => \n\t\t\tarray (\n\t\t\t\t'id' => 4746,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 304,\n\t\t\t\t'team_red_id' => 3494,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870910,\n\t\t\t\t'date_time' => '2015-07-18 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4746',\n\t\t\t\t'name' => 'Cloud9 vs Enemy Esports',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t367 => \n\t\t\tarray (\n\t\t\t\t'id' => 4747,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3656,\n\t\t\t\t'team_red_id' => 3,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870911,\n\t\t\t\t'date_time' => '2015-07-18 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4747',\n\t\t\t\t'name' => 'Gravity vs Team Dignitas',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t368 => \n\t\t\tarray (\n\t\t\t\t'id' => 4748,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3657,\n\t\t\t\t'team_red_id' => 1,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870912,\n\t\t\t\t'date_time' => '2015-07-18 21:00:00',\n\t\t\t\t'url' => '/tourney/match/4748',\n\t\t\t\t'name' => 'Team Impulse vs Team SoloMid',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t369 => \n\t\t\tarray (\n\t\t\t\t'id' => 4749,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 2,\n\t\t\t\t'team_red_id' => 3654,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870913,\n\t\t\t\t'date_time' => '2015-07-18 22:00:00',\n\t\t\t\t'url' => '/tourney/match/4749',\n\t\t\t\t'name' => 'Counter Logic Gaming vs Team Liquid',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t370 => \n\t\t\tarray (\n\t\t\t\t'id' => 4750,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3856,\n\t\t\t\t'team_red_id' => 1258,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870914,\n\t\t\t\t'date_time' => '2015-07-18 23:00:00',\n\t\t\t\t'url' => '/tourney/match/4750',\n\t\t\t\t'name' => 'Team Dragon Knights vs Team 8',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t371 => \n\t\t\tarray (\n\t\t\t\t'id' => 4751,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3654,\n\t\t\t\t'team_red_id' => 3494,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870915,\n\t\t\t\t'date_time' => '2015-07-19 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4751',\n\t\t\t\t'name' => 'Team Liquid vs Enemy Esports',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t372 => \n\t\t\tarray (\n\t\t\t\t'id' => 4752,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3856,\n\t\t\t\t'team_red_id' => 3657,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870916,\n\t\t\t\t'date_time' => '2015-07-19 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4752',\n\t\t\t\t'name' => 'Team Dragon Knights vs Team Impulse',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t373 => \n\t\t\tarray (\n\t\t\t\t'id' => 4753,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 304,\n\t\t\t\t'team_red_id' => 2,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870917,\n\t\t\t\t'date_time' => '2015-07-19 21:00:00',\n\t\t\t\t'url' => '/tourney/match/4753',\n\t\t\t\t'name' => 'Cloud9 vs Counter Logic Gaming',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t374 => \n\t\t\tarray (\n\t\t\t\t'id' => 4754,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 1258,\n\t\t\t\t'team_red_id' => 3656,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870918,\n\t\t\t\t'date_time' => '2015-07-19 22:00:00',\n\t\t\t\t'url' => '/tourney/match/4754',\n\t\t\t\t'name' => 'Team 8 vs Gravity',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t375 => \n\t\t\tarray (\n\t\t\t\t'id' => 4755,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3,\n\t\t\t\t'team_red_id' => 1,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870919,\n\t\t\t\t'date_time' => '2015-07-19 23:00:00',\n\t\t\t\t'url' => '/tourney/match/4755',\n\t\t\t\t'name' => 'Team Dignitas vs Team SoloMid',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t376 => \n\t\t\tarray (\n\t\t\t\t'id' => 4756,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3494,\n\t\t\t\t'team_red_id' => 1,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870920,\n\t\t\t\t'date_time' => '2015-07-25 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4756',\n\t\t\t\t'name' => 'Enemy Esports vs Team SoloMid',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t377 => \n\t\t\tarray (\n\t\t\t\t'id' => 4757,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3856,\n\t\t\t\t'team_red_id' => 304,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870921,\n\t\t\t\t'date_time' => '2015-07-25 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4757',\n\t\t\t\t'name' => 'Team Dragon Knights vs Cloud9 ',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t378 => \n\t\t\tarray (\n\t\t\t\t'id' => 4758,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3656,\n\t\t\t\t'team_red_id' => 3657,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870922,\n\t\t\t\t'date_time' => '2015-07-25 21:00:00',\n\t\t\t\t'url' => '/tourney/match/4758',\n\t\t\t\t'name' => 'Gravity vs Team Impulse',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t379 => \n\t\t\tarray (\n\t\t\t\t'id' => 4759,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3,\n\t\t\t\t'team_red_id' => 2,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870923,\n\t\t\t\t'date_time' => '2015-07-25 22:00:00',\n\t\t\t\t'url' => '/tourney/match/4759',\n\t\t\t\t'name' => 'Team Dignitas vs Counter Logic Gaming',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t380 => \n\t\t\tarray (\n\t\t\t\t'id' => 4760,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 1258,\n\t\t\t\t'team_red_id' => 3654,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870924,\n\t\t\t\t'date_time' => '2015-07-25 23:00:00',\n\t\t\t\t'url' => '/tourney/match/4760',\n\t\t\t\t'name' => 'Team 8 vs Team Liquid',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t381 => \n\t\t\tarray (\n\t\t\t\t'id' => 4761,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3656,\n\t\t\t\t'team_red_id' => 3856,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870925,\n\t\t\t\t'date_time' => '2015-07-26 19:00:00',\n\t\t\t\t'url' => '/tourney/match/4761',\n\t\t\t\t'name' => 'Gravity vs Team Dragon Knights',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t382 => \n\t\t\tarray (\n\t\t\t\t'id' => 4762,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 2,\n\t\t\t\t'team_red_id' => 1258,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870926,\n\t\t\t\t'date_time' => '2015-07-26 20:00:00',\n\t\t\t\t'url' => '/tourney/match/4762',\n\t\t\t\t'name' => 'Counter Logic Gaming vs Team 8',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t383 => \n\t\t\tarray (\n\t\t\t\t'id' => 4763,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 1,\n\t\t\t\t'team_red_id' => 304,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870927,\n\t\t\t\t'date_time' => '2015-07-26 21:00:00',\n\t\t\t\t'url' => '/tourney/match/4763',\n\t\t\t\t'name' => 'Team SoloMid vs Cloud9 ',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t384 => \n\t\t\tarray (\n\t\t\t\t'id' => 4764,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3494,\n\t\t\t\t'team_red_id' => 3,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870928,\n\t\t\t\t'date_time' => '2015-07-26 22:00:00',\n\t\t\t\t'url' => '/tourney/match/4764',\n\t\t\t\t'name' => 'Enemy Esports vs Team Dignitas',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t385 => \n\t\t\tarray (\n\t\t\t\t'id' => 4765,\n\t\t\t\t'league_id' => 1,\n\t\t\t\t'tournament_id' => 226,\n\t\t\t\t'team_blue_id' => 3654,\n\t\t\t\t'team_red_id' => 3657,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8870929,\n\t\t\t\t'date_time' => '2015-07-26 23:00:00',\n\t\t\t\t'url' => '/tourney/match/4765',\n\t\t\t\t'name' => 'Team Liquid vs Team Impulse',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 1,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-29 23:51:45',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:29',\n\t\t\t),\n\t\t\t386 => \n\t\t\tarray (\n\t\t\t\t'id' => 4878,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 3679,\n\t\t\t\t'team_red_id' => 3677,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879254,\n\t\t\t\t'date_time' => '2015-05-20 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4878',\n\t\t\t\t'name' => 'Midnight Sun e-Sports vs Logitech G Sniper',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:36',\n\t\t\t),\n\t\t\t387 => \n\t\t\tarray (\n\t\t\t\t'id' => 4879,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 4360,\n\t\t\t\t'team_red_id' => 3680,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879255,\n\t\t\t\t'date_time' => '2015-05-20 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4879',\n\t\t\t\t'name' => 'Assassin Sniper vs Hong Kong Esports',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:36',\n\t\t\t),\n\t\t\t388 => \n\t\t\tarray (\n\t\t\t\t'id' => 4880,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 974,\n\t\t\t\t'team_red_id' => 1694,\n\t\t\t\t'team_winner_id' => 1694,\n\t\t\t\t'polldaddy_id' => 8879256,\n\t\t\t\t'date_time' => '2015-05-21 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4880',\n\t\t\t\t'name' => 'Taipei Assassins vs yoe Flash Wolves',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t389 => \n\t\t\tarray (\n\t\t\t\t'id' => 4881,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 2643,\n\t\t\t\t'team_red_id' => 949,\n\t\t\t\t'team_winner_id' => 949,\n\t\t\t\t'polldaddy_id' => 8879257,\n\t\t\t\t'date_time' => '2015-05-21 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4881',\n\t\t\t\t'name' => 'Machi vs ahq e-Sports Club',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t390 => \n\t\t\tarray (\n\t\t\t\t'id' => 4882,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 3679,\n\t\t\t\t'team_red_id' => 974,\n\t\t\t\t'team_winner_id' => 974,\n\t\t\t\t'polldaddy_id' => 8879258,\n\t\t\t\t'date_time' => '2015-05-22 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4882',\n\t\t\t\t'name' => 'Midnight Sun e-Sports vs Taipei Assassins',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t391 => \n\t\t\tarray (\n\t\t\t\t'id' => 4883,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 3677,\n\t\t\t\t'team_red_id' => 1694,\n\t\t\t\t'team_winner_id' => 1694,\n\t\t\t\t'polldaddy_id' => 8879259,\n\t\t\t\t'date_time' => '2015-05-22 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4883',\n\t\t\t\t'name' => 'Logitech G Sniper vs yoe Flash Wolves',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t392 => \n\t\t\tarray (\n\t\t\t\t'id' => 4884,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 2643,\n\t\t\t\t'team_red_id' => 4360,\n\t\t\t\t'team_winner_id' => 2643,\n\t\t\t\t'polldaddy_id' => 8879260,\n\t\t\t\t'date_time' => '2015-05-27 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4884',\n\t\t\t\t'name' => 'Machi vs Assassin Sniper',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t393 => \n\t\t\tarray (\n\t\t\t\t'id' => 4885,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 949,\n\t\t\t\t'team_red_id' => 3680,\n\t\t\t\t'team_winner_id' => 949,\n\t\t\t\t'polldaddy_id' => 8879261,\n\t\t\t\t'date_time' => '2015-05-27 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4885',\n\t\t\t\t'name' => 'ahq e-Sports Club vs Hong Kong Esports',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t394 => \n\t\t\tarray (\n\t\t\t\t'id' => 4886,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 3677,\n\t\t\t\t'team_red_id' => 974,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879262,\n\t\t\t\t'date_time' => '2015-05-28 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4886',\n\t\t\t\t'name' => 'Logitech G Sniper vs Taipei Assassins',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t395 => \n\t\t\tarray (\n\t\t\t\t'id' => 4887,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 3679,\n\t\t\t\t'team_red_id' => 1694,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879263,\n\t\t\t\t'date_time' => '2015-05-28 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4887',\n\t\t\t\t'name' => 'Midnight Sun e-Sports vs yoe Flash Wolves',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t396 => \n\t\t\tarray (\n\t\t\t\t'id' => 4888,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 949,\n\t\t\t\t'team_red_id' => 4360,\n\t\t\t\t'team_winner_id' => 949,\n\t\t\t\t'polldaddy_id' => 8879264,\n\t\t\t\t'date_time' => '2015-05-29 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4888',\n\t\t\t\t'name' => 'ahq e-Sports Club vs Assassin Sniper',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t397 => \n\t\t\tarray (\n\t\t\t\t'id' => 4889,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 2643,\n\t\t\t\t'team_red_id' => 3680,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879265,\n\t\t\t\t'date_time' => '2015-05-29 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4889',\n\t\t\t\t'name' => 'Machi vs Hong Kong Esports',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t398 => \n\t\t\tarray (\n\t\t\t\t'id' => 4890,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 1694,\n\t\t\t\t'team_red_id' => 3680,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879266,\n\t\t\t\t'date_time' => '2015-06-03 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4890',\n\t\t\t\t'name' => 'yoe Flash Wolves vs Hong Kong Esports',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t399 => \n\t\t\tarray (\n\t\t\t\t'id' => 4891,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 3677,\n\t\t\t\t'team_red_id' => 949,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879267,\n\t\t\t\t'date_time' => '2015-06-03 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4891',\n\t\t\t\t'name' => 'Logitech G Sniper vs ahq e-Sports Club',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t400 => \n\t\t\tarray (\n\t\t\t\t'id' => 4892,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 974,\n\t\t\t\t'team_red_id' => 4360,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879268,\n\t\t\t\t'date_time' => '2015-06-04 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4892',\n\t\t\t\t'name' => 'Taipei Assassins vs Assassin Sniper',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t401 => \n\t\t\tarray (\n\t\t\t\t'id' => 4893,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 3679,\n\t\t\t\t'team_red_id' => 2643,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879269,\n\t\t\t\t'date_time' => '2015-06-04 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4893',\n\t\t\t\t'name' => 'Midnight Sun e-Sports vs Machi',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t402 => \n\t\t\tarray (\n\t\t\t\t'id' => 4894,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 3679,\n\t\t\t\t'team_red_id' => 949,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879270,\n\t\t\t\t'date_time' => '2015-06-05 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4894',\n\t\t\t\t'name' => 'Midnight Sun e-Sports vs ahq e-Sports Club',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t403 => \n\t\t\tarray (\n\t\t\t\t'id' => 4895,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 3677,\n\t\t\t\t'team_red_id' => 2643,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879271,\n\t\t\t\t'date_time' => '2015-06-05 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4895',\n\t\t\t\t'name' => 'Logitech G Sniper vs Machi',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t404 => \n\t\t\tarray (\n\t\t\t\t'id' => 4896,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 974,\n\t\t\t\t'team_red_id' => 3680,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879272,\n\t\t\t\t'date_time' => '2015-06-10 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4896',\n\t\t\t\t'name' => 'Taipei Assassins vs Hong Kong Esports',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t405 => \n\t\t\tarray (\n\t\t\t\t'id' => 4897,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 1694,\n\t\t\t\t'team_red_id' => 4360,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879273,\n\t\t\t\t'date_time' => '2015-06-10 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4897',\n\t\t\t\t'name' => 'yoe Flash Wolves vs Assassin Sniper',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t406 => \n\t\t\tarray (\n\t\t\t\t'id' => 4898,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 3679,\n\t\t\t\t'team_red_id' => 4360,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879274,\n\t\t\t\t'date_time' => '2015-06-11 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4898',\n\t\t\t\t'name' => 'Midnight Sun e-Sports vs Assassin Sniper',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t407 => \n\t\t\tarray (\n\t\t\t\t'id' => 4899,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 3677,\n\t\t\t\t'team_red_id' => 3680,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879275,\n\t\t\t\t'date_time' => '2015-06-11 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4899',\n\t\t\t\t'name' => 'Logitech G Sniper vs Hong Kong Esports',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t408 => \n\t\t\tarray (\n\t\t\t\t'id' => 4900,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 1694,\n\t\t\t\t'team_red_id' => 949,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879276,\n\t\t\t\t'date_time' => '2015-06-12 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4900',\n\t\t\t\t'name' => 'yoe Flash Wolves vs ahq e-Sports Club',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t409 => \n\t\t\tarray (\n\t\t\t\t'id' => 4901,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 974,\n\t\t\t\t'team_red_id' => 2643,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879277,\n\t\t\t\t'date_time' => '2015-06-12 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4901',\n\t\t\t\t'name' => 'Taipei Assassins vs Machi',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t410 => \n\t\t\tarray (\n\t\t\t\t'id' => 4902,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 3679,\n\t\t\t\t'team_red_id' => 3680,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879278,\n\t\t\t\t'date_time' => '2015-06-17 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4902',\n\t\t\t\t'name' => 'Midnight Sun e-Sports vs Hong Kong Esports',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t411 => \n\t\t\tarray (\n\t\t\t\t'id' => 4903,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 974,\n\t\t\t\t'team_red_id' => 949,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879279,\n\t\t\t\t'date_time' => '2015-06-17 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4903',\n\t\t\t\t'name' => 'Taipei Assassins vs ahq e-Sports Club',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t412 => \n\t\t\tarray (\n\t\t\t\t'id' => 4904,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 1694,\n\t\t\t\t'team_red_id' => 2643,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879280,\n\t\t\t\t'date_time' => '2015-06-18 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4904',\n\t\t\t\t'name' => 'yoe Flash Wolves vs Machi',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t413 => \n\t\t\tarray (\n\t\t\t\t'id' => 4905,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 3677,\n\t\t\t\t'team_red_id' => 4360,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879281,\n\t\t\t\t'date_time' => '2015-06-18 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4905',\n\t\t\t\t'name' => 'Logitech G Sniper vs Assassin Sniper',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t414 => \n\t\t\tarray (\n\t\t\t\t'id' => 4906,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 3677,\n\t\t\t\t'team_red_id' => 3679,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879282,\n\t\t\t\t'date_time' => '2015-06-19 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4906',\n\t\t\t\t'name' => 'Logitech G Sniper vs Midnight Sun e-Sports',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t415 => \n\t\t\tarray (\n\t\t\t\t'id' => 4907,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 3680,\n\t\t\t\t'team_red_id' => 4360,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879283,\n\t\t\t\t'date_time' => '2015-06-19 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4907',\n\t\t\t\t'name' => 'Hong Kong Esports vs Assassin Sniper',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t416 => \n\t\t\tarray (\n\t\t\t\t'id' => 4908,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 949,\n\t\t\t\t'team_red_id' => 2643,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879284,\n\t\t\t\t'date_time' => '2015-06-24 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4908',\n\t\t\t\t'name' => 'ahq e-Sports Club vs Machi',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t417 => \n\t\t\tarray (\n\t\t\t\t'id' => 4909,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 1694,\n\t\t\t\t'team_red_id' => 974,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879285,\n\t\t\t\t'date_time' => '2015-06-24 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4909',\n\t\t\t\t'name' => 'yoe Flash Wolves vs Taipei Assassins',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t418 => \n\t\t\tarray (\n\t\t\t\t'id' => 4910,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 974,\n\t\t\t\t'team_red_id' => 3679,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879286,\n\t\t\t\t'date_time' => '2015-06-25 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4910',\n\t\t\t\t'name' => 'Taipei Assassins vs Midnight Sun e-Sports',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t419 => \n\t\t\tarray (\n\t\t\t\t'id' => 4911,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 1694,\n\t\t\t\t'team_red_id' => 3677,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879287,\n\t\t\t\t'date_time' => '2015-06-25 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4911',\n\t\t\t\t'name' => 'yoe Flash Wolves vs Logitech G Sniper',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t420 => \n\t\t\tarray (\n\t\t\t\t'id' => 4912,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 4360,\n\t\t\t\t'team_red_id' => 2643,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879288,\n\t\t\t\t'date_time' => '2015-06-26 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4912',\n\t\t\t\t'name' => 'Assassin Sniper vs Machi',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t421 => \n\t\t\tarray (\n\t\t\t\t'id' => 4913,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 3680,\n\t\t\t\t'team_red_id' => 949,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879289,\n\t\t\t\t'date_time' => '2015-06-26 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4913',\n\t\t\t\t'name' => 'Hong Kong Esports vs ahq e-Sports Club',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t422 => \n\t\t\tarray (\n\t\t\t\t'id' => 4914,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 1694,\n\t\t\t\t'team_red_id' => 3679,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879291,\n\t\t\t\t'date_time' => '2015-07-01 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4914',\n\t\t\t\t'name' => 'yoe Flash Wolves vs Midnight Sun e-Sports',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t423 => \n\t\t\tarray (\n\t\t\t\t'id' => 4915,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 974,\n\t\t\t\t'team_red_id' => 3677,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879292,\n\t\t\t\t'date_time' => '2015-07-01 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4915',\n\t\t\t\t'name' => 'Taipei Assassins vs Logitech G Sniper',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t424 => \n\t\t\tarray (\n\t\t\t\t'id' => 4916,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 3680,\n\t\t\t\t'team_red_id' => 2643,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879293,\n\t\t\t\t'date_time' => '2015-07-02 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4916',\n\t\t\t\t'name' => 'Hong Kong Esports vs Machi',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t425 => \n\t\t\tarray (\n\t\t\t\t'id' => 4917,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 4360,\n\t\t\t\t'team_red_id' => 949,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879294,\n\t\t\t\t'date_time' => '2015-07-02 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4917',\n\t\t\t\t'name' => 'Assassin Sniper vs ahq e-Sports Club',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 6,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t426 => \n\t\t\tarray (\n\t\t\t\t'id' => 4918,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 949,\n\t\t\t\t'team_red_id' => 3679,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879319,\n\t\t\t\t'date_time' => '2015-07-03 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4918',\n\t\t\t\t'name' => 'ahq e-Sports Club vs Midnight Sun e-Sports',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t427 => \n\t\t\tarray (\n\t\t\t\t'id' => 4919,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 2643,\n\t\t\t\t'team_red_id' => 3677,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879296,\n\t\t\t\t'date_time' => '2015-07-03 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4919',\n\t\t\t\t'name' => 'Machi vs Logitech G Sniper',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t428 => \n\t\t\tarray (\n\t\t\t\t'id' => 4920,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 4360,\n\t\t\t\t'team_red_id' => 974,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879297,\n\t\t\t\t'date_time' => '2015-07-04 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4920',\n\t\t\t\t'name' => 'Assassin Sniper vs Taipei Assassins',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t429 => \n\t\t\tarray (\n\t\t\t\t'id' => 4921,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 3680,\n\t\t\t\t'team_red_id' => 1694,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879299,\n\t\t\t\t'date_time' => '2015-07-04 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4921',\n\t\t\t\t'name' => 'Hong Kong Esports vs yoe Flash Wolves',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t430 => \n\t\t\tarray (\n\t\t\t\t'id' => 4922,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 949,\n\t\t\t\t'team_red_id' => 3677,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879300,\n\t\t\t\t'date_time' => '2015-07-05 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4922',\n\t\t\t\t'name' => 'ahq e-Sports Club vs Logitech G Sniper',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t431 => \n\t\t\tarray (\n\t\t\t\t'id' => 4923,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 2643,\n\t\t\t\t'team_red_id' => 3679,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879301,\n\t\t\t\t'date_time' => '2015-07-05 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4923',\n\t\t\t\t'name' => 'Machi vs Midnight Sun e-Sports',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t432 => \n\t\t\tarray (\n\t\t\t\t'id' => 4924,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 4360,\n\t\t\t\t'team_red_id' => 1694,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879320,\n\t\t\t\t'date_time' => '2015-07-08 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4924',\n\t\t\t\t'name' => 'Assassin Sniper vs yoe Flash Wolves',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t433 => \n\t\t\tarray (\n\t\t\t\t'id' => 4925,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 3680,\n\t\t\t\t'team_red_id' => 974,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879303,\n\t\t\t\t'date_time' => '2015-07-08 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4925',\n\t\t\t\t'name' => 'Hong Kong Esports vs Taipei Assassins',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:40',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t434 => \n\t\t\tarray (\n\t\t\t\t'id' => 4926,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 3680,\n\t\t\t\t'team_red_id' => 3677,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879304,\n\t\t\t\t'date_time' => '2015-07-09 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4926',\n\t\t\t\t'name' => 'Hong Kong Esports vs Logitech G Sniper',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t435 => \n\t\t\tarray (\n\t\t\t\t'id' => 4927,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 4360,\n\t\t\t\t'team_red_id' => 3679,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879306,\n\t\t\t\t'date_time' => '2015-07-09 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4927',\n\t\t\t\t'name' => 'Assassin Sniper vs Midnight Sun e-Sports',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t436 => \n\t\t\tarray (\n\t\t\t\t'id' => 4928,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 2643,\n\t\t\t\t'team_red_id' => 974,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879307,\n\t\t\t\t'date_time' => '2015-07-10 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4928',\n\t\t\t\t'name' => 'Machi vs Taipei Assassins',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t437 => \n\t\t\tarray (\n\t\t\t\t'id' => 4929,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 949,\n\t\t\t\t'team_red_id' => 1694,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879308,\n\t\t\t\t'date_time' => '2015-07-10 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4929',\n\t\t\t\t'name' => 'ahq e-Sports Club vs yoe Flash Wolves',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t438 => \n\t\t\tarray (\n\t\t\t\t'id' => 4930,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 4360,\n\t\t\t\t'team_red_id' => 3677,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879309,\n\t\t\t\t'date_time' => '2015-07-11 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4930',\n\t\t\t\t'name' => 'Assassin Sniper vs Logitech G Sniper',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t439 => \n\t\t\tarray (\n\t\t\t\t'id' => 4931,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 3680,\n\t\t\t\t'team_red_id' => 3679,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879310,\n\t\t\t\t'date_time' => '2015-07-11 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4931',\n\t\t\t\t'name' => 'Hong Kong Esports vs Midnight Sun e-Sports',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t440 => \n\t\t\tarray (\n\t\t\t\t'id' => 4932,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 2643,\n\t\t\t\t'team_red_id' => 1694,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879311,\n\t\t\t\t'date_time' => '2015-07-12 10:30:00',\n\t\t\t\t'url' => '/tourney/match/4932',\n\t\t\t\t'name' => 'Machi vs yoe Flash Wolves',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t441 => \n\t\t\tarray (\n\t\t\t\t'id' => 4933,\n\t\t\t\t'league_id' => 12,\n\t\t\t\t'tournament_id' => 229,\n\t\t\t\t'team_blue_id' => 949,\n\t\t\t\t'team_red_id' => 974,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8879321,\n\t\t\t\t'date_time' => '2015-07-12 12:30:00',\n\t\t\t\t'url' => '/tourney/match/4933',\n\t\t\t\t'name' => 'ahq e-Sports Club vs Taipei Assassins',\n\t\t\t\t'score_blue' => 6,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:37',\n\t\t\t),\n\t\t\t442 => \n\t\t\tarray (\n\t\t\t\t'id' => 4934,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 4325,\n\t\t\t\t'team_red_id' => 895,\n\t\t\t\t'team_winner_id' => 4325,\n\t\t\t\t'polldaddy_id' => 8880296,\n\t\t\t\t'date_time' => '2015-05-20 08:00:00',\n\t\t\t\t'url' => '/tourney/match/4934',\n\t\t\t\t'name' => 'Anarchy vs Najin e-mFire',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t443 => \n\t\t\tarray (\n\t\t\t\t'id' => 4935,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 3642,\n\t\t\t\t'team_red_id' => 4327,\n\t\t\t\t'team_winner_id' => 3642,\n\t\t\t\t'polldaddy_id' => 8880297,\n\t\t\t\t'date_time' => '2015-05-20 10:00:00',\n\t\t\t\t'url' => '/tourney/match/4935',\n\t\t\t\t'name' => 'Samsung Galaxy vs SBENU SONICBOOM',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t444 => \n\t\t\tarray (\n\t\t\t\t'id' => 4936,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 640,\n\t\t\t\t'team_red_id' => 4325,\n\t\t\t\t'team_winner_id' => 640,\n\t\t\t\t'polldaddy_id' => 8880298,\n\t\t\t\t'date_time' => '2015-05-21 05:00:00',\n\t\t\t\t'url' => '/tourney/match/4936',\n\t\t\t\t'name' => 'CJ ENTUS vs Anarchy',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t445 => \n\t\t\tarray (\n\t\t\t\t'id' => 4937,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 642,\n\t\t\t\t'team_red_id' => 3642,\n\t\t\t\t'team_winner_id' => 642,\n\t\t\t\t'polldaddy_id' => 8880299,\n\t\t\t\t'date_time' => '2015-05-22 08:00:00',\n\t\t\t\t'url' => '/tourney/match/4937',\n\t\t\t\t'name' => 'KT Rolster vs Samsung Galaxy',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t446 => \n\t\t\tarray (\n\t\t\t\t'id' => 4938,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 998,\n\t\t\t\t'team_red_id' => 889,\n\t\t\t\t'team_winner_id' => 998,\n\t\t\t\t'polldaddy_id' => 8880300,\n\t\t\t\t'date_time' => '2015-05-22 10:00:00',\n\t\t\t\t'url' => '/tourney/match/4938',\n\t\t\t\t'name' => 'Jin Air Green Wings vs Incredible Miracle',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t447 => \n\t\t\tarray (\n\t\t\t\t'id' => 4939,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 684,\n\t\t\t\t'team_red_id' => 4327,\n\t\t\t\t'team_winner_id' => 684,\n\t\t\t\t'polldaddy_id' => 8880301,\n\t\t\t\t'date_time' => '2015-05-23 08:00:00',\n\t\t\t\t'url' => '/tourney/match/4939',\n\t\t\t\t'name' => 'SKTelecom T1 vs SBENU SONICBOOM',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t448 => \n\t\t\tarray (\n\t\t\t\t'id' => 4940,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 3641,\n\t\t\t\t'team_red_id' => 895,\n\t\t\t\t'team_winner_id' => 895,\n\t\t\t\t'polldaddy_id' => 8880302,\n\t\t\t\t'date_time' => '2015-05-23 10:00:00',\n\t\t\t\t'url' => '/tourney/match/4940',\n\t\t\t\t'name' => 'KOO Tigers vs Najin e-mFire',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t449 => \n\t\t\tarray (\n\t\t\t\t'id' => 4941,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 998,\n\t\t\t\t'team_red_id' => 4325,\n\t\t\t\t'team_winner_id' => 998,\n\t\t\t\t'polldaddy_id' => 8880303,\n\t\t\t\t'date_time' => '2015-05-27 08:00:00',\n\t\t\t\t'url' => '/tourney/match/4941',\n\t\t\t\t'name' => 'Jin Air Green Wings vs Anarchy',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t450 => \n\t\t\tarray (\n\t\t\t\t'id' => 4942,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 642,\n\t\t\t\t'team_red_id' => 640,\n\t\t\t\t'team_winner_id' => 640,\n\t\t\t\t'polldaddy_id' => 8880304,\n\t\t\t\t'date_time' => '2015-05-27 10:00:00',\n\t\t\t\t'url' => '/tourney/match/4942',\n\t\t\t\t'name' => 'KT Rolster vs CJ ENTUS',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t451 => \n\t\t\tarray (\n\t\t\t\t'id' => 4943,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 3641,\n\t\t\t\t'team_red_id' => 3642,\n\t\t\t\t'team_winner_id' => 3641,\n\t\t\t\t'polldaddy_id' => 8880305,\n\t\t\t\t'date_time' => '2015-05-28 05:00:00',\n\t\t\t\t'url' => '/tourney/match/4943',\n\t\t\t\t'name' => 'KOO Tigers vs Samsung Galaxy',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t452 => \n\t\t\tarray (\n\t\t\t\t'id' => 4944,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 895,\n\t\t\t\t'team_red_id' => 684,\n\t\t\t\t'team_winner_id' => 684,\n\t\t\t\t'polldaddy_id' => 8880306,\n\t\t\t\t'date_time' => '2015-05-29 08:00:00',\n\t\t\t\t'url' => '/tourney/match/4944',\n\t\t\t\t'name' => 'Najin e-mFire vs SKTelecom T1',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t453 => \n\t\t\tarray (\n\t\t\t\t'id' => 4945,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 4325,\n\t\t\t\t'team_red_id' => 889,\n\t\t\t\t'team_winner_id' => 889,\n\t\t\t\t'polldaddy_id' => 8880307,\n\t\t\t\t'date_time' => '2015-05-29 10:00:00',\n\t\t\t\t'url' => '/tourney/match/4945',\n\t\t\t\t'name' => 'Anarchy vs Longzhu Incredible Miracle',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t454 => \n\t\t\tarray (\n\t\t\t\t'id' => 4946,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 640,\n\t\t\t\t'team_red_id' => 4327,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880308,\n\t\t\t\t'date_time' => '2015-05-30 08:00:00',\n\t\t\t\t'url' => '/tourney/match/4946',\n\t\t\t\t'name' => 'CJ ENTUS vs SBENU SONICBOOM',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t455 => \n\t\t\tarray (\n\t\t\t\t'id' => 4947,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 998,\n\t\t\t\t'team_red_id' => 642,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880309,\n\t\t\t\t'date_time' => '2015-05-30 10:00:00',\n\t\t\t\t'url' => '/tourney/match/4947',\n\t\t\t\t'name' => 'Jin Air Green Wings vs KT Rolster',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t456 => \n\t\t\tarray (\n\t\t\t\t'id' => 4948,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 684,\n\t\t\t\t'team_red_id' => 3641,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880310,\n\t\t\t\t'date_time' => '2015-06-03 08:00:00',\n\t\t\t\t'url' => '/tourney/match/4948',\n\t\t\t\t'name' => 'SKTelecom T1 vs KOO Tigers',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t457 => \n\t\t\tarray (\n\t\t\t\t'id' => 4949,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 3642,\n\t\t\t\t'team_red_id' => 998,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880311,\n\t\t\t\t'date_time' => '2015-06-03 10:00:00',\n\t\t\t\t'url' => '/tourney/match/4949',\n\t\t\t\t'name' => 'Samsung Galaxy vs Jin Air Green Wings',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t458 => \n\t\t\tarray (\n\t\t\t\t'id' => 4950,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 895,\n\t\t\t\t'team_red_id' => 889,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880312,\n\t\t\t\t'date_time' => '2015-06-04 05:00:00',\n\t\t\t\t'url' => '/tourney/match/4950',\n\t\t\t\t'name' => 'Najin e-mFire vs Incredible Miracle',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t459 => \n\t\t\tarray (\n\t\t\t\t'id' => 4951,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 3641,\n\t\t\t\t'team_red_id' => 640,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880313,\n\t\t\t\t'date_time' => '2015-06-05 08:00:00',\n\t\t\t\t'url' => '/tourney/match/4951',\n\t\t\t\t'name' => 'KOO Tigers vs CJ ENTUS',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t460 => \n\t\t\tarray (\n\t\t\t\t'id' => 4952,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 4327,\n\t\t\t\t'team_red_id' => 998,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880314,\n\t\t\t\t'date_time' => '2015-06-05 10:00:00',\n\t\t\t\t'url' => '/tourney/match/4952',\n\t\t\t\t'name' => 'SBENU SONICBOOM vs Jin Air Green Wings',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t461 => \n\t\t\tarray (\n\t\t\t\t'id' => 4953,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 3642,\n\t\t\t\t'team_red_id' => 684,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880315,\n\t\t\t\t'date_time' => '2015-06-06 08:00:00',\n\t\t\t\t'url' => '/tourney/match/4953',\n\t\t\t\t'name' => 'Samsung Galaxy vs SKTelecom T1',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t462 => \n\t\t\tarray (\n\t\t\t\t'id' => 4954,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 889,\n\t\t\t\t'team_red_id' => 642,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880316,\n\t\t\t\t'date_time' => '2015-06-06 10:00:00',\n\t\t\t\t'url' => '/tourney/match/4954',\n\t\t\t\t'name' => 'Incredible Miracle vs KT Rolster',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t463 => \n\t\t\tarray (\n\t\t\t\t'id' => 4955,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 4327,\n\t\t\t\t'team_red_id' => 895,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880318,\n\t\t\t\t'date_time' => '2015-06-10 08:00:00',\n\t\t\t\t'url' => '/tourney/match/4955',\n\t\t\t\t'name' => 'SBENU SONICBOOM vs Najin e-mFire',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t464 => \n\t\t\tarray (\n\t\t\t\t'id' => 4956,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 684,\n\t\t\t\t'team_red_id' => 4325,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880319,\n\t\t\t\t'date_time' => '2015-06-10 10:00:00',\n\t\t\t\t'url' => '/tourney/match/4956',\n\t\t\t\t'name' => 'SKTelecom T1 vs Anarchy',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t465 => \n\t\t\tarray (\n\t\t\t\t'id' => 4957,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 642,\n\t\t\t\t'team_red_id' => 3641,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880320,\n\t\t\t\t'date_time' => '2015-06-11 03:00:00',\n\t\t\t\t'url' => '/tourney/match/4957',\n\t\t\t\t'name' => 'KT Rolster vs KOO Tigers',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t466 => \n\t\t\tarray (\n\t\t\t\t'id' => 4958,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 889,\n\t\t\t\t'team_red_id' => 4327,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880321,\n\t\t\t\t'date_time' => '2015-06-11 05:00:00',\n\t\t\t\t'url' => '/tourney/match/4958',\n\t\t\t\t'name' => 'Incredible Miracle vs SBENU SONICBOOM',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t467 => \n\t\t\tarray (\n\t\t\t\t'id' => 4959,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 640,\n\t\t\t\t'team_red_id' => 684,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880322,\n\t\t\t\t'date_time' => '2015-06-12 08:00:00',\n\t\t\t\t'url' => '/tourney/match/4959',\n\t\t\t\t'name' => 'CJ ENTUS vs SKTelecom T1',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t468 => \n\t\t\tarray (\n\t\t\t\t'id' => 4960,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 895,\n\t\t\t\t'team_red_id' => 3642,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880323,\n\t\t\t\t'date_time' => '2015-06-12 10:00:00',\n\t\t\t\t'url' => '/tourney/match/4960',\n\t\t\t\t'name' => 'Najin e-mFire vs Samsung Galaxy',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t469 => \n\t\t\tarray (\n\t\t\t\t'id' => 4961,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 3641,\n\t\t\t\t'team_red_id' => 998,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880324,\n\t\t\t\t'date_time' => '2015-06-13 08:00:00',\n\t\t\t\t'url' => '/tourney/match/4961',\n\t\t\t\t'name' => 'KOO Tigers vs Jin Air Green Wings',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t470 => \n\t\t\tarray (\n\t\t\t\t'id' => 4962,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 4325,\n\t\t\t\t'team_red_id' => 642,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880325,\n\t\t\t\t'date_time' => '2015-06-13 10:00:00',\n\t\t\t\t'url' => '/tourney/match/4962',\n\t\t\t\t'name' => 'Anarchy vs KT Rolster',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t471 => \n\t\t\tarray (\n\t\t\t\t'id' => 4963,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 998,\n\t\t\t\t'team_red_id' => 640,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880326,\n\t\t\t\t'date_time' => '2015-06-17 08:00:00',\n\t\t\t\t'url' => '/tourney/match/4963',\n\t\t\t\t'name' => 'Jin Air Green Wings vs CJ ENTUS',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t472 => \n\t\t\tarray (\n\t\t\t\t'id' => 4964,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 4327,\n\t\t\t\t'team_red_id' => 3641,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880327,\n\t\t\t\t'date_time' => '2015-06-17 10:00:00',\n\t\t\t\t'url' => '/tourney/match/4964',\n\t\t\t\t'name' => 'SBENU SONICBOOM vs KOO Tigers',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t473 => \n\t\t\tarray (\n\t\t\t\t'id' => 4965,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 684,\n\t\t\t\t'team_red_id' => 889,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880328,\n\t\t\t\t'date_time' => '2015-06-18 03:00:00',\n\t\t\t\t'url' => '/tourney/match/4965',\n\t\t\t\t'name' => 'SKTelecom T1 vs Incredible Miracle',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t474 => \n\t\t\tarray (\n\t\t\t\t'id' => 4966,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 4325,\n\t\t\t\t'team_red_id' => 3642,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880329,\n\t\t\t\t'date_time' => '2015-06-18 05:00:00',\n\t\t\t\t'url' => '/tourney/match/4966',\n\t\t\t\t'name' => 'Anarchy vs Samsung Galaxy',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t475 => \n\t\t\tarray (\n\t\t\t\t'id' => 4967,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 642,\n\t\t\t\t'team_red_id' => 4327,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880330,\n\t\t\t\t'date_time' => '2015-06-19 08:00:00',\n\t\t\t\t'url' => '/tourney/match/4967',\n\t\t\t\t'name' => 'KT Rolster vs SBENU SONICBOOM',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t476 => \n\t\t\tarray (\n\t\t\t\t'id' => 4968,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 640,\n\t\t\t\t'team_red_id' => 895,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880331,\n\t\t\t\t'date_time' => '2015-06-19 10:00:00',\n\t\t\t\t'url' => '/tourney/match/4968',\n\t\t\t\t'name' => 'CJ ENTUS vs Najin e-mFire',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t477 => \n\t\t\tarray (\n\t\t\t\t'id' => 4969,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 3642,\n\t\t\t\t'team_red_id' => 889,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880332,\n\t\t\t\t'date_time' => '2015-06-20 08:00:00',\n\t\t\t\t'url' => '/tourney/match/4969',\n\t\t\t\t'name' => 'Samsung Galaxy vs Incredible Miracle',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t478 => \n\t\t\tarray (\n\t\t\t\t'id' => 4970,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 3641,\n\t\t\t\t'team_red_id' => 4325,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880333,\n\t\t\t\t'date_time' => '2015-06-20 10:00:00',\n\t\t\t\t'url' => '/tourney/match/4970',\n\t\t\t\t'name' => 'KOO Tigers vs Anarchy',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t479 => \n\t\t\tarray (\n\t\t\t\t'id' => 4971,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 889,\n\t\t\t\t'team_red_id' => 640,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880334,\n\t\t\t\t'date_time' => '2015-06-24 08:00:00',\n\t\t\t\t'url' => '/tourney/match/4971',\n\t\t\t\t'name' => 'Incredible Miracle vs CJ ENTUS',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t480 => \n\t\t\tarray (\n\t\t\t\t'id' => 4972,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 642,\n\t\t\t\t'team_red_id' => 684,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880335,\n\t\t\t\t'date_time' => '2015-06-24 10:00:00',\n\t\t\t\t'url' => '/tourney/match/4972',\n\t\t\t\t'name' => 'KT Rolster vs SKTelecom T1',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t481 => \n\t\t\tarray (\n\t\t\t\t'id' => 4973,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 4327,\n\t\t\t\t'team_red_id' => 4325,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880336,\n\t\t\t\t'date_time' => '2015-06-25 03:00:00',\n\t\t\t\t'url' => '/tourney/match/4973',\n\t\t\t\t'name' => 'SBENU SONICBOOM vs Anarchy',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t482 => \n\t\t\tarray (\n\t\t\t\t'id' => 4974,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 998,\n\t\t\t\t'team_red_id' => 895,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880337,\n\t\t\t\t'date_time' => '2015-06-25 05:00:00',\n\t\t\t\t'url' => '/tourney/match/4974',\n\t\t\t\t'name' => 'Jin Air Green Wings vs Najin e-mFire',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t483 => \n\t\t\tarray (\n\t\t\t\t'id' => 4975,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 640,\n\t\t\t\t'team_red_id' => 3642,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880338,\n\t\t\t\t'date_time' => '2015-06-26 08:00:00',\n\t\t\t\t'url' => '/tourney/match/4975',\n\t\t\t\t'name' => 'CJ ENTUS vs Samsung Galaxy',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t484 => \n\t\t\tarray (\n\t\t\t\t'id' => 4976,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 889,\n\t\t\t\t'team_red_id' => 3641,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880339,\n\t\t\t\t'date_time' => '2015-06-26 10:00:00',\n\t\t\t\t'url' => '/tourney/match/4976',\n\t\t\t\t'name' => 'Incredible Miracle vs KOO Tigers',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t485 => \n\t\t\tarray (\n\t\t\t\t'id' => 4977,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 895,\n\t\t\t\t'team_red_id' => 642,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880340,\n\t\t\t\t'date_time' => '2015-06-27 08:00:00',\n\t\t\t\t'url' => '/tourney/match/4977',\n\t\t\t\t'name' => 'Najin e-mFire vs KT Rolster',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t486 => \n\t\t\tarray (\n\t\t\t\t'id' => 4978,\n\t\t\t\t'league_id' => 8,\n\t\t\t\t'tournament_id' => 230,\n\t\t\t\t'team_blue_id' => 684,\n\t\t\t\t'team_red_id' => 998,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8880341,\n\t\t\t\t'date_time' => '2015-06-27 10:00:00',\n\t\t\t\t'url' => '/tourney/match/4978',\n\t\t\t\t'name' => 'SKTelecom T1 vs Jin Air Green Wings',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:41',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:44',\n\t\t\t),\n\t\t\t487 => \n\t\t\tarray (\n\t\t\t\t'id' => 4979,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1849,\n\t\t\t\t'team_red_id' => 632,\n\t\t\t\t'team_winner_id' => 632,\n\t\t\t\t'polldaddy_id' => 8882258,\n\t\t\t\t'date_time' => '2015-05-22 05:00:00',\n\t\t\t\t'url' => '/tourney/match/4979',\n\t\t\t\t'name' => 'Team WE vs Invictus Gaming',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t488 => \n\t\t\tarray (\n\t\t\t\t'id' => 4980,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3748,\n\t\t\t\t'team_red_id' => 4382,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882259,\n\t\t\t\t'date_time' => '2015-05-22 07:00:00',\n\t\t\t\t'url' => '/tourney/match/4980',\n\t\t\t\t'name' => 'Snake vs Unlimited Potential',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t489 => \n\t\t\tarray (\n\t\t\t\t'id' => 4981,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4380,\n\t\t\t\t'team_red_id' => 1850,\n\t\t\t\t'team_winner_id' => 4380,\n\t\t\t\t'polldaddy_id' => 8882260,\n\t\t\t\t'date_time' => '2015-05-22 09:00:00',\n\t\t\t\t'url' => '/tourney/match/4981',\n\t\t\t\t'name' => 'Qiao Gu vs LGD GAMING',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t490 => \n\t\t\tarray (\n\t\t\t\t'id' => 4982,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 685,\n\t\t\t\t'team_red_id' => 3753,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882261,\n\t\t\t\t'date_time' => '2015-05-22 11:00:00',\n\t\t\t\t'url' => '/tourney/match/4982',\n\t\t\t\t'name' => 'OMG vs Vici Gaming',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t491 => \n\t\t\tarray (\n\t\t\t\t'id' => 4983,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3753,\n\t\t\t\t'team_red_id' => 4382,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882262,\n\t\t\t\t'date_time' => '2015-05-23 05:00:00',\n\t\t\t\t'url' => '/tourney/match/4983',\n\t\t\t\t'name' => 'Vici Gaming vs Unlimited Potential',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t492 => \n\t\t\tarray (\n\t\t\t\t'id' => 4984,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1849,\n\t\t\t\t'team_red_id' => 3748,\n\t\t\t\t'team_winner_id' => 3748,\n\t\t\t\t'polldaddy_id' => 8882263,\n\t\t\t\t'date_time' => '2015-05-23 07:00:00',\n\t\t\t\t'url' => '/tourney/match/4984',\n\t\t\t\t'name' => 'Team WE vs Snake',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t493 => \n\t\t\tarray (\n\t\t\t\t'id' => 4985,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4381,\n\t\t\t\t'team_red_id' => 3752,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882264,\n\t\t\t\t'date_time' => '2015-05-23 09:00:00',\n\t\t\t\t'url' => '/tourney/match/4985',\n\t\t\t\t'name' => 'Royal Never Give Up vs Master3',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t494 => \n\t\t\tarray (\n\t\t\t\t'id' => 4986,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1847,\n\t\t\t\t'team_red_id' => 3751,\n\t\t\t\t'team_winner_id' => 1847,\n\t\t\t\t'polldaddy_id' => 8882265,\n\t\t\t\t'date_time' => '2015-05-23 11:00:00',\n\t\t\t\t'url' => '/tourney/match/4986',\n\t\t\t\t'name' => 'Edward Gaming vs King',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t495 => \n\t\t\tarray (\n\t\t\t\t'id' => 4987,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3752,\n\t\t\t\t'team_red_id' => 3751,\n\t\t\t\t'team_winner_id' => 3752,\n\t\t\t\t'polldaddy_id' => 8882266,\n\t\t\t\t'date_time' => '2015-05-24 05:00:00',\n\t\t\t\t'url' => '/tourney/match/4987',\n\t\t\t\t'name' => 'Master3 vs King',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t496 => \n\t\t\tarray (\n\t\t\t\t'id' => 4988,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 685,\n\t\t\t\t'team_red_id' => 4380,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882267,\n\t\t\t\t'date_time' => '2015-05-24 07:00:00',\n\t\t\t\t'url' => '/tourney/match/4988',\n\t\t\t\t'name' => 'OMG vs Qiao Gu',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t497 => \n\t\t\tarray (\n\t\t\t\t'id' => 4989,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4381,\n\t\t\t\t'team_red_id' => 1850,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882268,\n\t\t\t\t'date_time' => '2015-05-24 09:00:00',\n\t\t\t\t'url' => '/tourney/match/4989',\n\t\t\t\t'name' => 'Royal Never Give Up vs LGD GAMING',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t498 => \n\t\t\tarray (\n\t\t\t\t'id' => 4990,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1847,\n\t\t\t\t'team_red_id' => 3753,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882475,\n\t\t\t\t'date_time' => '2015-05-24 11:00:00',\n\t\t\t\t'url' => '/tourney/match/4990',\n\t\t\t\t'name' => 'Edward Gaming vs Vici Gaming',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t499 => \n\t\t\tarray (\n\t\t\t\t'id' => 4991,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 632,\n\t\t\t\t'team_red_id' => 4382,\n\t\t\t\t'team_winner_id' => 632,\n\t\t\t\t'polldaddy_id' => 8882270,\n\t\t\t\t'date_time' => '2015-05-29 05:00:00',\n\t\t\t\t'url' => '/tourney/match/4991',\n\t\t\t\t'name' => 'Invictus Gaming vs Unlimited Potential',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t));\n\t\t\\DB::table('matches')->insert(array (\n\t\t\t0 => \n\t\t\tarray (\n\t\t\t\t'id' => 4992,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1847,\n\t\t\t\t'team_red_id' => 3748,\n\t\t\t\t'team_winner_id' => 1847,\n\t\t\t\t'polldaddy_id' => 8882271,\n\t\t\t\t'date_time' => '2015-05-29 07:00:00',\n\t\t\t\t'url' => '/tourney/match/4992',\n\t\t\t\t'name' => 'Edward Gaming vs Snake',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t1 => \n\t\t\tarray (\n\t\t\t\t'id' => 4993,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1849,\n\t\t\t\t'team_red_id' => 3752,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882272,\n\t\t\t\t'date_time' => '2015-05-29 09:00:00',\n\t\t\t\t'url' => '/tourney/match/4993',\n\t\t\t\t'name' => 'Team WE vs Master3',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t2 => \n\t\t\tarray (\n\t\t\t\t'id' => 4994,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 685,\n\t\t\t\t'team_red_id' => 4381,\n\t\t\t\t'team_winner_id' => 685,\n\t\t\t\t'polldaddy_id' => 8882273,\n\t\t\t\t'date_time' => '2015-05-29 11:00:00',\n\t\t\t\t'url' => '/tourney/match/4994',\n\t\t\t\t'name' => 'OMG vs Royal Never Give Up',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t3 => \n\t\t\tarray (\n\t\t\t\t'id' => 4995,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4381,\n\t\t\t\t'team_red_id' => 3751,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882406,\n\t\t\t\t'date_time' => '2015-05-30 05:00:00',\n\t\t\t\t'url' => '/tourney/match/4995',\n\t\t\t\t'name' => 'Royal Never Give Up vs King',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t4 => \n\t\t\tarray (\n\t\t\t\t'id' => 4996,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 632,\n\t\t\t\t'team_red_id' => 4380,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882275,\n\t\t\t\t'date_time' => '2015-05-30 07:00:00',\n\t\t\t\t'url' => '/tourney/match/4996',\n\t\t\t\t'name' => 'Invictus Gaming vs Qiao Gu',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t5 => \n\t\t\tarray (\n\t\t\t\t'id' => 4997,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1850,\n\t\t\t\t'team_red_id' => 4382,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882276,\n\t\t\t\t'date_time' => '2015-05-30 09:00:00',\n\t\t\t\t'url' => '/tourney/match/4997',\n\t\t\t\t'name' => 'LGD GAMING vs Unlimited Potential',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t6 => \n\t\t\tarray (\n\t\t\t\t'id' => 4998,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1849,\n\t\t\t\t'team_red_id' => 685,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882277,\n\t\t\t\t'date_time' => '2015-05-30 11:00:00',\n\t\t\t\t'url' => '/tourney/match/4998',\n\t\t\t\t'name' => 'Team WE vs OMG',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t7 => \n\t\t\tarray (\n\t\t\t\t'id' => 4999,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3751,\n\t\t\t\t'team_red_id' => 3748,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882278,\n\t\t\t\t'date_time' => '2015-05-31 05:00:00',\n\t\t\t\t'url' => '/tourney/match/4999',\n\t\t\t\t'name' => 'King vs Snake',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t8 => \n\t\t\tarray (\n\t\t\t\t'id' => 5000,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4381,\n\t\t\t\t'team_red_id' => 4382,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882279,\n\t\t\t\t'date_time' => '2015-05-31 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5000',\n\t\t\t\t'name' => 'Royal Never Give Up vs Unlimited Potential',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t9 => \n\t\t\tarray (\n\t\t\t\t'id' => 5001,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1850,\n\t\t\t\t'team_red_id' => 3752,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882280,\n\t\t\t\t'date_time' => '2015-05-31 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5001',\n\t\t\t\t'name' => 'LGD GAMING vs Master3',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t10 => \n\t\t\tarray (\n\t\t\t\t'id' => 5002,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 632,\n\t\t\t\t'team_red_id' => 3753,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882281,\n\t\t\t\t'date_time' => '2015-05-31 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5002',\n\t\t\t\t'name' => 'Invictus Gaming vs Vici Gaming',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t11 => \n\t\t\tarray (\n\t\t\t\t'id' => 5003,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 685,\n\t\t\t\t'team_red_id' => 3748,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882282,\n\t\t\t\t'date_time' => '2015-06-05 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5003',\n\t\t\t\t'name' => 'OMG vs Snake',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t12 => \n\t\t\tarray (\n\t\t\t\t'id' => 5004,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3751,\n\t\t\t\t'team_red_id' => 4380,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882283,\n\t\t\t\t'date_time' => '2015-06-05 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5004',\n\t\t\t\t'name' => 'King vs Qiao Gu',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t13 => \n\t\t\tarray (\n\t\t\t\t'id' => 5005,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1847,\n\t\t\t\t'team_red_id' => 632,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882284,\n\t\t\t\t'date_time' => '2015-06-05 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5005',\n\t\t\t\t'name' => 'Edward Gaming vs Invictus Gaming',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t14 => \n\t\t\tarray (\n\t\t\t\t'id' => 5006,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1849,\n\t\t\t\t'team_red_id' => 1850,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882285,\n\t\t\t\t'date_time' => '2015-06-05 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5006',\n\t\t\t\t'name' => 'Team WE vs LGD GAMING',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t15 => \n\t\t\tarray (\n\t\t\t\t'id' => 5007,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4380,\n\t\t\t\t'team_red_id' => 4382,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882286,\n\t\t\t\t'date_time' => '2015-06-06 04:00:00',\n\t\t\t\t'url' => '/tourney/match/5007',\n\t\t\t\t'name' => 'Qiao Gu vs Unlimited Potential',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t16 => \n\t\t\tarray (\n\t\t\t\t'id' => 5008,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1850,\n\t\t\t\t'team_red_id' => 3748,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882287,\n\t\t\t\t'date_time' => '2015-06-06 06:00:00',\n\t\t\t\t'url' => '/tourney/match/5008',\n\t\t\t\t'name' => 'LGD GAMING vs Snake',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t17 => \n\t\t\tarray (\n\t\t\t\t'id' => 5009,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3752,\n\t\t\t\t'team_red_id' => 685,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882288,\n\t\t\t\t'date_time' => '2015-06-06 08:00:00',\n\t\t\t\t'url' => '/tourney/match/5009',\n\t\t\t\t'name' => 'Master3 vs OMG',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t18 => \n\t\t\tarray (\n\t\t\t\t'id' => 5010,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1849,\n\t\t\t\t'team_red_id' => 3753,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882289,\n\t\t\t\t'date_time' => '2015-06-06 10:00:00',\n\t\t\t\t'url' => '/tourney/match/5010',\n\t\t\t\t'name' => 'Team WE vs Vici Gaming',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t19 => \n\t\t\tarray (\n\t\t\t\t'id' => 5011,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3752,\n\t\t\t\t'team_red_id' => 4382,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882290,\n\t\t\t\t'date_time' => '2015-06-07 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5011',\n\t\t\t\t'name' => 'Master3 vs Unlimited Potential',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t20 => \n\t\t\tarray (\n\t\t\t\t'id' => 5012,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3753,\n\t\t\t\t'team_red_id' => 3751,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882291,\n\t\t\t\t'date_time' => '2015-06-07 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5012',\n\t\t\t\t'name' => 'Vici Gaming vs King',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t21 => \n\t\t\tarray (\n\t\t\t\t'id' => 5013,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 632,\n\t\t\t\t'team_red_id' => 3748,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882292,\n\t\t\t\t'date_time' => '2015-06-07 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5013',\n\t\t\t\t'name' => 'Invictus Gaming vs Snake',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t22 => \n\t\t\tarray (\n\t\t\t\t'id' => 5014,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1847,\n\t\t\t\t'team_red_id' => 4381,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882293,\n\t\t\t\t'date_time' => '2015-06-07 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5014',\n\t\t\t\t'name' => 'Edward Gaming vs Royal Never Give Up',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t23 => \n\t\t\tarray (\n\t\t\t\t'id' => 5015,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1847,\n\t\t\t\t'team_red_id' => 3752,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882294,\n\t\t\t\t'date_time' => '2015-06-12 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5015',\n\t\t\t\t'name' => 'Edward Gaming vs Master3',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t24 => \n\t\t\tarray (\n\t\t\t\t'id' => 5016,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1849,\n\t\t\t\t'team_red_id' => 4380,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882295,\n\t\t\t\t'date_time' => '2015-06-12 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5016',\n\t\t\t\t'name' => 'Team WE vs Qiao Gu',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t25 => \n\t\t\tarray (\n\t\t\t\t'id' => 5017,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4381,\n\t\t\t\t'team_red_id' => 3753,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882296,\n\t\t\t\t'date_time' => '2015-06-12 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5017',\n\t\t\t\t'name' => 'Royal Never Give Up vs Vici Gaming',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t26 => \n\t\t\tarray (\n\t\t\t\t'id' => 5018,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1850,\n\t\t\t\t'team_red_id' => 632,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882297,\n\t\t\t\t'date_time' => '2015-06-12 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5018',\n\t\t\t\t'name' => 'LGD GAMING vs Invictus Gaming',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t27 => \n\t\t\tarray (\n\t\t\t\t'id' => 5019,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3748,\n\t\t\t\t'team_red_id' => 4380,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882298,\n\t\t\t\t'date_time' => '2015-06-13 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5019',\n\t\t\t\t'name' => 'Snake vs Qiao Gu',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:53',\n\t\t\t),\n\t\t\t28 => \n\t\t\tarray (\n\t\t\t\t'id' => 5020,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 685,\n\t\t\t\t'team_red_id' => 632,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882299,\n\t\t\t\t'date_time' => '2015-06-13 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5020',\n\t\t\t\t'name' => 'OMG vs Invictus Gaming',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t29 => \n\t\t\tarray (\n\t\t\t\t'id' => 5021,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4381,\n\t\t\t\t'team_red_id' => 1849,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882300,\n\t\t\t\t'date_time' => '2015-06-13 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5021',\n\t\t\t\t'name' => 'Royal Never Give Up vs Team WE',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t30 => \n\t\t\tarray (\n\t\t\t\t'id' => 5022,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1847,\n\t\t\t\t'team_red_id' => 4382,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882478,\n\t\t\t\t'date_time' => '2015-06-13 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5022',\n\t\t\t\t'name' => 'Edward Gaming vs Unlimited Potential',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t31 => \n\t\t\tarray (\n\t\t\t\t'id' => 5023,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3751,\n\t\t\t\t'team_red_id' => 1850,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882302,\n\t\t\t\t'date_time' => '2015-06-14 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5023',\n\t\t\t\t'name' => 'King vs LGD GAMING',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t32 => \n\t\t\tarray (\n\t\t\t\t'id' => 5024,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4381,\n\t\t\t\t'team_red_id' => 632,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882303,\n\t\t\t\t'date_time' => '2015-06-14 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5024',\n\t\t\t\t'name' => 'Royal Never Give Up vs Invictus Gaming',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t33 => \n\t\t\tarray (\n\t\t\t\t'id' => 5025,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3753,\n\t\t\t\t'team_red_id' => 3748,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882304,\n\t\t\t\t'date_time' => '2015-06-14 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5025',\n\t\t\t\t'name' => 'Vici Gaming vs Snake',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t34 => \n\t\t\tarray (\n\t\t\t\t'id' => 5026,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1847,\n\t\t\t\t'team_red_id' => 685,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882305,\n\t\t\t\t'date_time' => '2015-06-14 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5026',\n\t\t\t\t'name' => 'Edward Gaming vs OMG',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t35 => \n\t\t\tarray (\n\t\t\t\t'id' => 5027,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1847,\n\t\t\t\t'team_red_id' => 4380,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882306,\n\t\t\t\t'date_time' => '2015-06-19 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5027',\n\t\t\t\t'name' => 'Edward Gaming vs Qiao Gu',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t36 => \n\t\t\tarray (\n\t\t\t\t'id' => 5028,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3752,\n\t\t\t\t'team_red_id' => 632,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882307,\n\t\t\t\t'date_time' => '2015-06-19 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5028',\n\t\t\t\t'name' => 'Master3 vs Invictus Gaming',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t37 => \n\t\t\tarray (\n\t\t\t\t'id' => 5029,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3753,\n\t\t\t\t'team_red_id' => 1850,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882308,\n\t\t\t\t'date_time' => '2015-06-19 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5029',\n\t\t\t\t'name' => 'Vici Gaming vs LGD GAMING',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t38 => \n\t\t\tarray (\n\t\t\t\t'id' => 5030,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 685,\n\t\t\t\t'team_red_id' => 3751,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882309,\n\t\t\t\t'date_time' => '2015-06-19 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5030',\n\t\t\t\t'name' => 'OMG vs King',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t39 => \n\t\t\tarray (\n\t\t\t\t'id' => 5031,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3753,\n\t\t\t\t'team_red_id' => 3752,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882479,\n\t\t\t\t'date_time' => '2015-06-20 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5031',\n\t\t\t\t'name' => 'Vici Gaming vs Master3',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t40 => \n\t\t\tarray (\n\t\t\t\t'id' => 5032,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 685,\n\t\t\t\t'team_red_id' => 1850,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882311,\n\t\t\t\t'date_time' => '2015-06-20 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5032',\n\t\t\t\t'name' => 'OMG vs LGD GAMING',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t41 => \n\t\t\tarray (\n\t\t\t\t'id' => 5033,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3751,\n\t\t\t\t'team_red_id' => 4382,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882312,\n\t\t\t\t'date_time' => '2015-06-20 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5033',\n\t\t\t\t'name' => 'King vs Unlimited Potential',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t42 => \n\t\t\tarray (\n\t\t\t\t'id' => 5034,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1847,\n\t\t\t\t'team_red_id' => 1849,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882313,\n\t\t\t\t'date_time' => '2015-06-20 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5034',\n\t\t\t\t'name' => 'Edward Gaming vs Team WE',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t43 => \n\t\t\tarray (\n\t\t\t\t'id' => 5035,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4381,\n\t\t\t\t'team_red_id' => 3748,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882314,\n\t\t\t\t'date_time' => '2015-06-21 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5035',\n\t\t\t\t'name' => 'Royal Never Give Up vs Snake',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t44 => \n\t\t\tarray (\n\t\t\t\t'id' => 5036,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3752,\n\t\t\t\t'team_red_id' => 4380,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882315,\n\t\t\t\t'date_time' => '2015-06-21 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5036',\n\t\t\t\t'name' => 'Master3 vs Qiao Gu',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t45 => \n\t\t\tarray (\n\t\t\t\t'id' => 5037,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1849,\n\t\t\t\t'team_red_id' => 4382,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882316,\n\t\t\t\t'date_time' => '2015-06-21 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5037',\n\t\t\t\t'name' => 'Team WE vs Unlimited Potential',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t46 => \n\t\t\tarray (\n\t\t\t\t'id' => 5038,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 632,\n\t\t\t\t'team_red_id' => 3751,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882317,\n\t\t\t\t'date_time' => '2015-06-21 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5038',\n\t\t\t\t'name' => 'Invictus Gaming vs King',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t47 => \n\t\t\tarray (\n\t\t\t\t'id' => 5039,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3753,\n\t\t\t\t'team_red_id' => 4380,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882318,\n\t\t\t\t'date_time' => '2015-06-26 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5039',\n\t\t\t\t'name' => 'Vici Gaming vs Qiao Gu',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t48 => \n\t\t\tarray (\n\t\t\t\t'id' => 5040,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 685,\n\t\t\t\t'team_red_id' => 4382,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882319,\n\t\t\t\t'date_time' => '2015-06-26 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5040',\n\t\t\t\t'name' => 'OMG vs Unlimited Potential',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t49 => \n\t\t\tarray (\n\t\t\t\t'id' => 5041,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1849,\n\t\t\t\t'team_red_id' => 3751,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882320,\n\t\t\t\t'date_time' => '2015-06-26 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5041',\n\t\t\t\t'name' => 'Team WE vs King',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t50 => \n\t\t\tarray (\n\t\t\t\t'id' => 5042,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1847,\n\t\t\t\t'team_red_id' => 1850,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882321,\n\t\t\t\t'date_time' => '2015-06-26 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5042',\n\t\t\t\t'name' => 'Edward Gaming vs LGD GAMING',\n\t\t\t\t'score_blue' => 5,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t51 => \n\t\t\tarray (\n\t\t\t\t'id' => 5043,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4381,\n\t\t\t\t'team_red_id' => 4380,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882322,\n\t\t\t\t'date_time' => '2015-06-27 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5043',\n\t\t\t\t'name' => 'Royal Never Give Up vs Qiao Gu',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t52 => \n\t\t\tarray (\n\t\t\t\t'id' => 5044,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3752,\n\t\t\t\t'team_red_id' => 3748,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882324,\n\t\t\t\t'date_time' => '2015-06-27 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5044',\n\t\t\t\t'name' => 'Master3 vs Snake',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t53 => \n\t\t\tarray (\n\t\t\t\t'id' => 5045,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4382,\n\t\t\t\t'team_red_id' => 1850,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882325,\n\t\t\t\t'date_time' => '2015-06-27 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5045',\n\t\t\t\t'name' => 'Unlimited Potential vs LGD GAMING',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t54 => \n\t\t\tarray (\n\t\t\t\t'id' => 5046,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3753,\n\t\t\t\t'team_red_id' => 1847,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882326,\n\t\t\t\t'date_time' => '2015-06-27 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5046',\n\t\t\t\t'name' => 'Vici Gaming vs Edward Gaming',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t55 => \n\t\t\tarray (\n\t\t\t\t'id' => 5047,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1850,\n\t\t\t\t'team_red_id' => 4380,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882327,\n\t\t\t\t'date_time' => '2015-06-28 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5047',\n\t\t\t\t'name' => 'LGD GAMING vs Qiao Gu',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t56 => \n\t\t\tarray (\n\t\t\t\t'id' => 5048,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3751,\n\t\t\t\t'team_red_id' => 1847,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882328,\n\t\t\t\t'date_time' => '2015-06-28 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5048',\n\t\t\t\t'name' => 'King vs Edward Gaming',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t57 => \n\t\t\tarray (\n\t\t\t\t'id' => 5049,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3752,\n\t\t\t\t'team_red_id' => 4381,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882329,\n\t\t\t\t'date_time' => '2015-06-28 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5049',\n\t\t\t\t'name' => 'Master3 vs Royal Never Give Up',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t58 => \n\t\t\tarray (\n\t\t\t\t'id' => 5050,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3753,\n\t\t\t\t'team_red_id' => 1849,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882330,\n\t\t\t\t'date_time' => '2015-06-28 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5050',\n\t\t\t\t'name' => 'Vici Gaming vs Team WE',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t59 => \n\t\t\tarray (\n\t\t\t\t'id' => 5051,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3751,\n\t\t\t\t'team_red_id' => 3752,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882331,\n\t\t\t\t'date_time' => '2015-07-03 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5051',\n\t\t\t\t'name' => 'King vs Master3',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t60 => \n\t\t\tarray (\n\t\t\t\t'id' => 5052,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1850,\n\t\t\t\t'team_red_id' => 4381,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882332,\n\t\t\t\t'date_time' => '2015-07-03 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5052',\n\t\t\t\t'name' => 'LGD GAMING vs Royal Never Give Up',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t61 => \n\t\t\tarray (\n\t\t\t\t'id' => 5053,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3748,\n\t\t\t\t'team_red_id' => 1849,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882333,\n\t\t\t\t'date_time' => '2015-07-03 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5053',\n\t\t\t\t'name' => 'Snake vs Team WE',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t62 => \n\t\t\tarray (\n\t\t\t\t'id' => 5054,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3753,\n\t\t\t\t'team_red_id' => 685,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882334,\n\t\t\t\t'date_time' => '2015-07-03 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5054',\n\t\t\t\t'name' => 'Vici Gaming vs OMG',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t63 => \n\t\t\tarray (\n\t\t\t\t'id' => 5055,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3748,\n\t\t\t\t'team_red_id' => 3751,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882335,\n\t\t\t\t'date_time' => '2015-07-04 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5055',\n\t\t\t\t'name' => 'Snake vs King',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t64 => \n\t\t\tarray (\n\t\t\t\t'id' => 5056,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4382,\n\t\t\t\t'team_red_id' => 685,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882336,\n\t\t\t\t'date_time' => '2015-07-04 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5056',\n\t\t\t\t'name' => 'Unlimited Potential vs OMG',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t65 => \n\t\t\tarray (\n\t\t\t\t'id' => 5057,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 632,\n\t\t\t\t'team_red_id' => 4380,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882337,\n\t\t\t\t'date_time' => '2015-07-04 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5057',\n\t\t\t\t'name' => 'Invictus Gaming vs Qiao Gu',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t66 => \n\t\t\tarray (\n\t\t\t\t'id' => 5058,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3752,\n\t\t\t\t'team_red_id' => 1849,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882338,\n\t\t\t\t'date_time' => '2015-07-04 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5058',\n\t\t\t\t'name' => 'Master3 vs Team WE',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t67 => \n\t\t\tarray (\n\t\t\t\t'id' => 5059,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4381,\n\t\t\t\t'team_red_id' => 685,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882339,\n\t\t\t\t'date_time' => '2015-07-05 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5059',\n\t\t\t\t'name' => 'Royal Never Give Up vs OMG',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t68 => \n\t\t\tarray (\n\t\t\t\t'id' => 5060,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4382,\n\t\t\t\t'team_red_id' => 3752,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882340,\n\t\t\t\t'date_time' => '2015-07-05 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5060',\n\t\t\t\t'name' => 'Unlimited Potential vs Master3',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t69 => \n\t\t\tarray (\n\t\t\t\t'id' => 5061,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3748,\n\t\t\t\t'team_red_id' => 1847,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882341,\n\t\t\t\t'date_time' => '2015-07-05 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5061',\n\t\t\t\t'name' => 'Snake vs Edward Gaming',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t70 => \n\t\t\tarray (\n\t\t\t\t'id' => 5062,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4380,\n\t\t\t\t'team_red_id' => 3753,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882342,\n\t\t\t\t'date_time' => '2015-07-05 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5062',\n\t\t\t\t'name' => 'Qiao Gu vs Vici Gaming',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t71 => \n\t\t\tarray (\n\t\t\t\t'id' => 5063,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4382,\n\t\t\t\t'team_red_id' => 4381,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882343,\n\t\t\t\t'date_time' => '2015-07-17 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5063',\n\t\t\t\t'name' => 'Unlimited Potential vs Royal Never Give Up',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t72 => \n\t\t\tarray (\n\t\t\t\t'id' => 5064,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3753,\n\t\t\t\t'team_red_id' => 632,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882345,\n\t\t\t\t'date_time' => '2015-07-17 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5064',\n\t\t\t\t'name' => 'Vici Gaming vs Invictus Gaming',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t73 => \n\t\t\tarray (\n\t\t\t\t'id' => 5065,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4380,\n\t\t\t\t'team_red_id' => 3751,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882346,\n\t\t\t\t'date_time' => '2015-07-17 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5065',\n\t\t\t\t'name' => 'Qiao Gu vs King',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t74 => \n\t\t\tarray (\n\t\t\t\t'id' => 5066,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1850,\n\t\t\t\t'team_red_id' => 1847,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882347,\n\t\t\t\t'date_time' => '2015-07-17 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5066',\n\t\t\t\t'name' => 'LGD GAMING vs Edward Gaming',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t75 => \n\t\t\tarray (\n\t\t\t\t'id' => 5067,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4382,\n\t\t\t\t'team_red_id' => 4380,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882348,\n\t\t\t\t'date_time' => '2015-07-18 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5067',\n\t\t\t\t'name' => 'Unlimited Potential vs Qiao Gu',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t76 => \n\t\t\tarray (\n\t\t\t\t'id' => 5068,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 685,\n\t\t\t\t'team_red_id' => 3752,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882349,\n\t\t\t\t'date_time' => '2015-07-18 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5068',\n\t\t\t\t'name' => 'OMG vs Master3',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t77 => \n\t\t\tarray (\n\t\t\t\t'id' => 5069,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3748,\n\t\t\t\t'team_red_id' => 1850,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882350,\n\t\t\t\t'date_time' => '2015-07-18 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5069',\n\t\t\t\t'name' => 'Snake vs LGD GAMING',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t78 => \n\t\t\tarray (\n\t\t\t\t'id' => 5070,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 632,\n\t\t\t\t'team_red_id' => 1847,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882351,\n\t\t\t\t'date_time' => '2015-07-18 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5070',\n\t\t\t\t'name' => 'Invictus Gaming vs Edward Gaming',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t79 => \n\t\t\tarray (\n\t\t\t\t'id' => 5071,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3751,\n\t\t\t\t'team_red_id' => 4381,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882352,\n\t\t\t\t'date_time' => '2015-07-19 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5071',\n\t\t\t\t'name' => 'King vs Royal Never Give Up',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t80 => \n\t\t\tarray (\n\t\t\t\t'id' => 5072,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4382,\n\t\t\t\t'team_red_id' => 632,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882353,\n\t\t\t\t'date_time' => '2015-07-19 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5072',\n\t\t\t\t'name' => 'Unlimited Potential vs Invictus Gaming',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t81 => \n\t\t\tarray (\n\t\t\t\t'id' => 5073,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3752,\n\t\t\t\t'team_red_id' => 1850,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882354,\n\t\t\t\t'date_time' => '2015-07-19 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5073',\n\t\t\t\t'name' => 'Master3 vs LGD GAMING',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t82 => \n\t\t\tarray (\n\t\t\t\t'id' => 5074,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3748,\n\t\t\t\t'team_red_id' => 685,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882355,\n\t\t\t\t'date_time' => '2015-07-19 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5074',\n\t\t\t\t'name' => 'Snake vs OMG',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t83 => \n\t\t\tarray (\n\t\t\t\t'id' => 5075,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3748,\n\t\t\t\t'team_red_id' => 632,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882356,\n\t\t\t\t'date_time' => '2015-07-24 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5075',\n\t\t\t\t'name' => 'Snake vs Invictus Gaming',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t84 => \n\t\t\tarray (\n\t\t\t\t'id' => 5076,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3751,\n\t\t\t\t'team_red_id' => 3753,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882357,\n\t\t\t\t'date_time' => '2015-07-24 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5076',\n\t\t\t\t'name' => 'King vs Vici Gaming',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t85 => \n\t\t\tarray (\n\t\t\t\t'id' => 5077,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4381,\n\t\t\t\t'team_red_id' => 1847,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882358,\n\t\t\t\t'date_time' => '2015-07-24 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5077',\n\t\t\t\t'name' => 'Royal Never Give Up vs Edward Gaming',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:42',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t86 => \n\t\t\tarray (\n\t\t\t\t'id' => 5078,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 685,\n\t\t\t\t'team_red_id' => 1849,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882359,\n\t\t\t\t'date_time' => '2015-07-24 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5078',\n\t\t\t\t'name' => 'OMG vs Team WE',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t87 => \n\t\t\tarray (\n\t\t\t\t'id' => 5079,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3748,\n\t\t\t\t'team_red_id' => 3753,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882360,\n\t\t\t\t'date_time' => '2015-07-25 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5079',\n\t\t\t\t'name' => 'Snake vs Vici Gaming',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t88 => \n\t\t\tarray (\n\t\t\t\t'id' => 5080,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3751,\n\t\t\t\t'team_red_id' => 632,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882361,\n\t\t\t\t'date_time' => '2015-07-25 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5080',\n\t\t\t\t'name' => 'King vs Invictus Gaming',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t89 => \n\t\t\tarray (\n\t\t\t\t'id' => 5081,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3752,\n\t\t\t\t'team_red_id' => 1847,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882362,\n\t\t\t\t'date_time' => '2015-07-25 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5081',\n\t\t\t\t'name' => 'Master3 vs Edward Gaming',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t90 => \n\t\t\tarray (\n\t\t\t\t'id' => 5082,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1850,\n\t\t\t\t'team_red_id' => 1849,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882363,\n\t\t\t\t'date_time' => '2015-07-25 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5082',\n\t\t\t\t'name' => 'LGD GAMING vs Team WE',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t91 => \n\t\t\tarray (\n\t\t\t\t'id' => 5083,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4380,\n\t\t\t\t'team_red_id' => 3748,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882364,\n\t\t\t\t'date_time' => '2015-07-26 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5083',\n\t\t\t\t'name' => 'Qiao Gu vs Snake',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t92 => \n\t\t\tarray (\n\t\t\t\t'id' => 5084,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3752,\n\t\t\t\t'team_red_id' => 3753,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882365,\n\t\t\t\t'date_time' => '2015-07-26 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5084',\n\t\t\t\t'name' => 'Master3 vs Vici Gaming',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t93 => \n\t\t\tarray (\n\t\t\t\t'id' => 5085,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1849,\n\t\t\t\t'team_red_id' => 4381,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882366,\n\t\t\t\t'date_time' => '2015-07-26 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5085',\n\t\t\t\t'name' => 'Team WE vs Royal Never Give Up',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t94 => \n\t\t\tarray (\n\t\t\t\t'id' => 5086,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 632,\n\t\t\t\t'team_red_id' => 685,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882367,\n\t\t\t\t'date_time' => '2015-07-26 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5086',\n\t\t\t\t'name' => 'Invictus Gaming vs OMG',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t95 => \n\t\t\tarray (\n\t\t\t\t'id' => 5087,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4382,\n\t\t\t\t'team_red_id' => 3753,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882368,\n\t\t\t\t'date_time' => '2015-07-31 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5087',\n\t\t\t\t'name' => 'Unlimited Potential vs Vici Gaming',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t96 => \n\t\t\tarray (\n\t\t\t\t'id' => 5088,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1850,\n\t\t\t\t'team_red_id' => 3751,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882369,\n\t\t\t\t'date_time' => '2015-07-31 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5088',\n\t\t\t\t'name' => 'LGD GAMING vs King',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t97 => \n\t\t\tarray (\n\t\t\t\t'id' => 5089,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3748,\n\t\t\t\t'team_red_id' => 4381,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882370,\n\t\t\t\t'date_time' => '2015-07-31 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5089',\n\t\t\t\t'name' => 'Snake vs Royal Never Give Up',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t98 => \n\t\t\tarray (\n\t\t\t\t'id' => 5090,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1849,\n\t\t\t\t'team_red_id' => 1847,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882371,\n\t\t\t\t'date_time' => '2015-07-31 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5090',\n\t\t\t\t'name' => 'Team WE vs Edward Gaming',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t99 => \n\t\t\tarray (\n\t\t\t\t'id' => 5091,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4380,\n\t\t\t\t'team_red_id' => 4381,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882372,\n\t\t\t\t'date_time' => '2015-08-01 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5091',\n\t\t\t\t'name' => 'Qiao Gu vs Royal Never Give Up',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t100 => \n\t\t\tarray (\n\t\t\t\t'id' => 5092,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4382,\n\t\t\t\t'team_red_id' => 3748,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882373,\n\t\t\t\t'date_time' => '2015-08-01 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5092',\n\t\t\t\t'name' => 'Unlimited Potential vs Snake',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t101 => \n\t\t\tarray (\n\t\t\t\t'id' => 5093,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 632,\n\t\t\t\t'team_red_id' => 3752,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882374,\n\t\t\t\t'date_time' => '2015-08-01 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5093',\n\t\t\t\t'name' => 'Invictus Gaming vs Master3',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t102 => \n\t\t\tarray (\n\t\t\t\t'id' => 5094,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3751,\n\t\t\t\t'team_red_id' => 1849,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882375,\n\t\t\t\t'date_time' => '2015-08-01 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5094',\n\t\t\t\t'name' => 'King vs Team WE',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t103 => \n\t\t\tarray (\n\t\t\t\t'id' => 5095,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3748,\n\t\t\t\t'team_red_id' => 3752,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882376,\n\t\t\t\t'date_time' => '2015-08-02 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5095',\n\t\t\t\t'name' => 'Snake vs Master3',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t104 => \n\t\t\tarray (\n\t\t\t\t'id' => 5096,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4380,\n\t\t\t\t'team_red_id' => 1849,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882377,\n\t\t\t\t'date_time' => '2015-08-02 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5096',\n\t\t\t\t'name' => 'Qiao Gu vs Team WE',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t105 => \n\t\t\tarray (\n\t\t\t\t'id' => 5097,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 632,\n\t\t\t\t'team_red_id' => 4381,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882378,\n\t\t\t\t'date_time' => '2015-08-02 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5097',\n\t\t\t\t'name' => 'Invictus Gaming vs Royal Never Give Up',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t106 => \n\t\t\tarray (\n\t\t\t\t'id' => 5098,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3751,\n\t\t\t\t'team_red_id' => 685,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882379,\n\t\t\t\t'date_time' => '2015-08-02 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5098',\n\t\t\t\t'name' => 'King vs OMG',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t107 => \n\t\t\tarray (\n\t\t\t\t'id' => 5099,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4380,\n\t\t\t\t'team_red_id' => 685,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882380,\n\t\t\t\t'date_time' => '2015-08-07 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5099',\n\t\t\t\t'name' => 'Qiao Gu vs OMG',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t108 => \n\t\t\tarray (\n\t\t\t\t'id' => 5100,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 3753,\n\t\t\t\t'team_red_id' => 4381,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882381,\n\t\t\t\t'date_time' => '2015-08-07 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5100',\n\t\t\t\t'name' => 'Vici Gaming vs Royal Never Give Up',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t109 => \n\t\t\tarray (\n\t\t\t\t'id' => 5101,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4382,\n\t\t\t\t'team_red_id' => 1847,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882382,\n\t\t\t\t'date_time' => '2015-08-07 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5101',\n\t\t\t\t'name' => 'Unlimited Potential vs Edward Gaming',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t110 => \n\t\t\tarray (\n\t\t\t\t'id' => 5102,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 632,\n\t\t\t\t'team_red_id' => 1850,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882254,\n\t\t\t\t'date_time' => '2015-08-07 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5102',\n\t\t\t\t'name' => 'Invictus Gaming vs LGD GAMING',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t111 => \n\t\t\tarray (\n\t\t\t\t'id' => 5103,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4382,\n\t\t\t\t'team_red_id' => 3751,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882383,\n\t\t\t\t'date_time' => '2015-08-08 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5103',\n\t\t\t\t'name' => 'Unlimited Potential vs King',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t112 => \n\t\t\tarray (\n\t\t\t\t'id' => 5104,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4380,\n\t\t\t\t'team_red_id' => 1847,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882384,\n\t\t\t\t'date_time' => '2015-08-08 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5104',\n\t\t\t\t'name' => 'Qiao Gu vs Edward Gaming',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t113 => \n\t\t\tarray (\n\t\t\t\t'id' => 5105,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1850,\n\t\t\t\t'team_red_id' => 685,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882385,\n\t\t\t\t'date_time' => '2015-08-08 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5105',\n\t\t\t\t'name' => 'LGD GAMING vs OMG',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t114 => \n\t\t\tarray (\n\t\t\t\t'id' => 5106,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 632,\n\t\t\t\t'team_red_id' => 1849,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882386,\n\t\t\t\t'date_time' => '2015-08-08 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5106',\n\t\t\t\t'name' => 'Invictus Gaming vs Team WE',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t115 => \n\t\t\tarray (\n\t\t\t\t'id' => 5107,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4380,\n\t\t\t\t'team_red_id' => 3752,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882387,\n\t\t\t\t'date_time' => '2015-08-09 05:00:00',\n\t\t\t\t'url' => '/tourney/match/5107',\n\t\t\t\t'name' => 'Qiao Gu vs Master3',\n\t\t\t\t'score_blue' => 3,\n\t\t\t\t'score_red' => 4,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t116 => \n\t\t\tarray (\n\t\t\t\t'id' => 5108,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 1850,\n\t\t\t\t'team_red_id' => 3753,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882388,\n\t\t\t\t'date_time' => '2015-08-09 07:00:00',\n\t\t\t\t'url' => '/tourney/match/5108',\n\t\t\t\t'name' => 'LGD GAMING vs Vici Gaming',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 3,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t117 => \n\t\t\tarray (\n\t\t\t\t'id' => 5109,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 4382,\n\t\t\t\t'team_red_id' => 1849,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882389,\n\t\t\t\t'date_time' => '2015-08-09 09:00:00',\n\t\t\t\t'url' => '/tourney/match/5109',\n\t\t\t\t'name' => 'Unlimited Potential vs Team WE',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t118 => \n\t\t\tarray (\n\t\t\t\t'id' => 5110,\n\t\t\t\t'league_id' => 9,\n\t\t\t\t'tournament_id' => 231,\n\t\t\t\t'team_blue_id' => 685,\n\t\t\t\t'team_red_id' => 1847,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8882390,\n\t\t\t\t'date_time' => '2015-08-09 11:00:00',\n\t\t\t\t'url' => '/tourney/match/5110',\n\t\t\t\t'name' => 'OMG vs Edward Gaming',\n\t\t\t\t'score_blue' => 4,\n\t\t\t\t'score_red' => 5,\n\t\t\t\t'max_games' => 2,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:17:54',\n\t\t\t),\n\t\t\t119 => \n\t\t\tarray (\n\t\t\t\t'id' => 5111,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 232,\n\t\t\t\t'team_blue_id' => 4442,\n\t\t\t\t'team_red_id' => 4474,\n\t\t\t\t'team_winner_id' => 4474,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-05-26 16:00:00',\n\t\t\t\t'url' => '/tourney/match/5111',\n\t\t\t\t'name' => 'Virtual Gaming vs LOW PRIORITY',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:00',\n\t\t\t),\n\t\t\t120 => \n\t\t\tarray (\n\t\t\t\t'id' => 5112,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 232,\n\t\t\t\t'team_blue_id' => 252,\n\t\t\t\t'team_red_id' => 4470,\n\t\t\t\t'team_winner_id' => 252,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-05-26 16:00:00',\n\t\t\t\t'url' => '/tourney/match/5112',\n\t\t\t\t'name' => 'Mousesports vs Epic Avalanche',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:00',\n\t\t\t),\n\t\t\t121 => \n\t\t\tarray (\n\t\t\t\t'id' => 5113,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 232,\n\t\t\t\t'team_blue_id' => 4428,\n\t\t\t\t'team_red_id' => 4485,\n\t\t\t\t'team_winner_id' => 4485,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-05-26 16:00:00',\n\t\t\t\t'url' => '/tourney/match/5113',\n\t\t\t\t'name' => 'Black Ravens vs Les Touristes',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:00',\n\t\t\t),\n\t\t\t122 => \n\t\t\tarray (\n\t\t\t\t'id' => 5114,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 232,\n\t\t\t\t'team_blue_id' => 4453,\n\t\t\t\t'team_red_id' => 4459,\n\t\t\t\t'team_winner_id' => 4453,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-05-27 16:00:00',\n\t\t\t\t'url' => '/tourney/match/5114',\n\t\t\t\t'name' => 'Team Gravy vs Wortex-Gaming',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:00',\n\t\t\t),\n\t\t\t123 => \n\t\t\tarray (\n\t\t\t\t'id' => 5115,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 232,\n\t\t\t\t'team_blue_id' => 4436,\n\t\t\t\t'team_red_id' => 4482,\n\t\t\t\t'team_winner_id' => 4436,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-05-27 16:00:00',\n\t\t\t\t'url' => '/tourney/match/5115',\n\t\t\t\t'name' => 'Ex Nihilo vs Phoenix Reborn',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:00',\n\t\t\t),\n\t\t\t124 => \n\t\t\tarray (\n\t\t\t\t'id' => 5116,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 232,\n\t\t\t\t'team_blue_id' => 1287,\n\t\t\t\t'team_red_id' => 4463,\n\t\t\t\t'team_winner_id' => 4463,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-05-27 16:00:00',\n\t\t\t\t'url' => '/tourney/match/5116',\n\t\t\t\t'name' => 'Biskvitki Zakuska vs Caseking Gaming',\n\t\t\t\t'score_blue' => 1,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:00',\n\t\t\t),\n\t\t\t125 => \n\t\t\tarray (\n\t\t\t\t'id' => 5117,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 232,\n\t\t\t\t'team_blue_id' => 4474,\n\t\t\t\t'team_red_id' => 252,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 8898880,\n\t\t\t\t'date_time' => '2015-06-02 16:00:00',\n\t\t\t\t'url' => '/tourney/match/5117',\n\t\t\t\t'name' => 'LOW PRIORITY vs Mousesports',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:00',\n\t\t\t),\n\t\t\t126 => \n\t\t\tarray (\n\t\t\t\t'id' => 5118,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 232,\n\t\t\t\t'team_blue_id' => 4485,\n\t\t\t\t'team_red_id' => 4453,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-06-03 16:00:00',\n\t\t\t\t'url' => '/tourney/match/5118',\n\t\t\t\t'name' => 'Les Touristes vs Team Gravy',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:00',\n\t\t\t),\n\t\t\t127 => \n\t\t\tarray (\n\t\t\t\t'id' => 5119,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 232,\n\t\t\t\t'team_blue_id' => 4436,\n\t\t\t\t'team_red_id' => 4463,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-06-03 16:00:00',\n\t\t\t\t'url' => '/tourney/match/5119',\n\t\t\t\t'name' => 'Ex Nihilo vs Caseking Gaming',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:01:43',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:00',\n\t\t\t),\n\t\t\t128 => \n\t\t\tarray (\n\t\t\t\t'id' => 5120,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 232,\n\t\t\t\t'team_blue_id' => 4032,\n\t\t\t\t'team_red_id' => 0,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-06-09 16:00:00',\n\t\t\t\t'url' => '/tourney/match/5120',\n\t\t\t\t'name' => 'Team Dignitas EU vs TBD',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:10:04',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:00',\n\t\t\t),\n\t\t\t129 => \n\t\t\tarray (\n\t\t\t\t'id' => 5121,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 232,\n\t\t\t\t'team_blue_id' => 0,\n\t\t\t\t'team_red_id' => 0,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-06-09 16:00:00',\n\t\t\t\t'url' => '/tourney/match/5121',\n\t\t\t\t'name' => 'TBD vs TBD',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:10:04',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:00',\n\t\t\t),\n\t\t\t130 => \n\t\t\tarray (\n\t\t\t\t'id' => 5122,\n\t\t\t\t'league_id' => 7,\n\t\t\t\t'tournament_id' => 232,\n\t\t\t\t'team_blue_id' => 0,\n\t\t\t\t'team_red_id' => 0,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-06-10 16:00:00',\n\t\t\t\t'url' => '/tourney/match/5122',\n\t\t\t\t'name' => 'TBD vs TBD',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:10:04',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:00',\n\t\t\t),\n\t\t\t131 => \n\t\t\tarray (\n\t\t\t\t'id' => 5147,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 235,\n\t\t\t\t'team_blue_id' => 4420,\n\t\t\t\t'team_red_id' => 0,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '1970-01-01 00:00:00',\n\t\t\t\t'url' => '/tourney/match/5147',\n\t\t\t\t'name' => 'Magnetic vs TBD',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:10:11',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:06',\n\t\t\t),\n\t\t\t132 => \n\t\t\tarray (\n\t\t\t\t'id' => 5148,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 235,\n\t\t\t\t'team_blue_id' => 0,\n\t\t\t\t'team_red_id' => 0,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '1970-01-01 00:00:00',\n\t\t\t\t'url' => '/tourney/match/5148',\n\t\t\t\t'name' => 'TBD vs TBD',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:10:11',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:06',\n\t\t\t),\n\t\t\t133 => \n\t\t\tarray (\n\t\t\t\t'id' => 5149,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 235,\n\t\t\t\t'team_blue_id' => 2928,\n\t\t\t\t'team_red_id' => 3807,\n\t\t\t\t'team_winner_id' => 3807,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-05-27 01:00:00',\n\t\t\t\t'url' => '/tourney/match/5149',\n\t\t\t\t'name' => 'Zenith eSports vs Team Liquid Academy',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:10:11',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:06',\n\t\t\t),\n\t\t\t134 => \n\t\t\tarray (\n\t\t\t\t'id' => 5150,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 235,\n\t\t\t\t'team_blue_id' => 4429,\n\t\t\t\t'team_red_id' => 2922,\n\t\t\t\t'team_winner_id' => 4429,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-05-27 01:00:00',\n\t\t\t\t'url' => '/tourney/match/5150',\n\t\t\t\t'name' => 'Misfits vs Also Known As',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:10:11',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:06',\n\t\t\t),\n\t\t\t135 => \n\t\t\tarray (\n\t\t\t\t'id' => 5151,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 235,\n\t\t\t\t'team_blue_id' => 3824,\n\t\t\t\t'team_red_id' => 0,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '1970-01-01 00:00:00',\n\t\t\t\t'url' => '/tourney/match/5151',\n\t\t\t\t'name' => 'CLG Black vs TBD',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:10:11',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:06',\n\t\t\t),\n\t\t\t136 => \n\t\t\tarray (\n\t\t\t\t'id' => 5152,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 235,\n\t\t\t\t'team_blue_id' => 4430,\n\t\t\t\t'team_red_id' => 4431,\n\t\t\t\t'team_winner_id' => 4431,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-05-28 01:00:00',\n\t\t\t\t'url' => '/tourney/match/5152',\n\t\t\t\t'name' => 'Aware Gaming vs Maelstrom Gaming',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:10:11',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:06',\n\t\t\t),\n\t\t\t137 => \n\t\t\tarray (\n\t\t\t\t'id' => 5153,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 235,\n\t\t\t\t'team_blue_id' => 4426,\n\t\t\t\t'team_red_id' => 4432,\n\t\t\t\t'team_winner_id' => 4426,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-05-28 01:00:00',\n\t\t\t\t'url' => '/tourney/match/5153',\n\t\t\t\t'name' => 'Odyssey Gaming vs Fiction eSports',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 1,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:10:11',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:06',\n\t\t\t),\n\t\t\t138 => \n\t\t\tarray (\n\t\t\t\t'id' => 5154,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 235,\n\t\t\t\t'team_blue_id' => 1134,\n\t\t\t\t'team_red_id' => 2414,\n\t\t\t\t'team_winner_id' => 1134,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-05-28 01:00:00',\n\t\t\t\t'url' => '/tourney/match/5154',\n\t\t\t\t'name' => 'Cloud9 Tempest vs Frank Fang Gaming',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 1,\n\t\t\t\t'created_at' => '2015-05-30 00:10:11',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:06',\n\t\t\t),\n\t\t\t139 => \n\t\t\tarray (\n\t\t\t\t'id' => 5155,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 235,\n\t\t\t\t'team_blue_id' => 4420,\n\t\t\t\t'team_red_id' => 0,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '1970-01-01 00:00:00',\n\t\t\t\t'url' => '/tourney/match/5155',\n\t\t\t\t'name' => 'Magnetic vs TBD',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:10:11',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:06',\n\t\t\t),\n\t\t\t140 => \n\t\t\tarray (\n\t\t\t\t'id' => 5156,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 235,\n\t\t\t\t'team_blue_id' => 3807,\n\t\t\t\t'team_red_id' => 4429,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-06-03 01:00:00',\n\t\t\t\t'url' => '/tourney/match/5156',\n\t\t\t\t'name' => 'Team Liquid Academy vs Misfits',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:10:11',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:06',\n\t\t\t),\n\t\t\t141 => \n\t\t\tarray (\n\t\t\t\t'id' => 5157,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 235,\n\t\t\t\t'team_blue_id' => 3824,\n\t\t\t\t'team_red_id' => 4431,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-06-04 01:00:00',\n\t\t\t\t'url' => '/tourney/match/5157',\n\t\t\t\t'name' => 'CLG Black vs Maelstrom Gaming',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:10:11',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:06',\n\t\t\t),\n\t\t\t142 => \n\t\t\tarray (\n\t\t\t\t'id' => 5158,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 235,\n\t\t\t\t'team_blue_id' => 4426,\n\t\t\t\t'team_red_id' => 1134,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-06-04 01:00:00',\n\t\t\t\t'url' => '/tourney/match/5158',\n\t\t\t\t'name' => 'Odyssey Gaming vs Cloud9 Tempest',\n\t\t\t\t'score_blue' => 2,\n\t\t\t\t'score_red' => 2,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:10:11',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:06',\n\t\t\t),\n\t\t\t143 => \n\t\t\tarray (\n\t\t\t\t'id' => 5159,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 235,\n\t\t\t\t'team_blue_id' => 4420,\n\t\t\t\t'team_red_id' => 0,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-06-10 01:00:00',\n\t\t\t\t'url' => '/tourney/match/5159',\n\t\t\t\t'name' => 'Magnetic vs TBD',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:10:11',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:06',\n\t\t\t),\n\t\t\t144 => \n\t\t\tarray (\n\t\t\t\t'id' => 5160,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 235,\n\t\t\t\t'team_blue_id' => 0,\n\t\t\t\t'team_red_id' => 0,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '2015-06-10 01:00:00',\n\t\t\t\t'url' => '/tourney/match/5160',\n\t\t\t\t'name' => 'TBD vs TBD',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:10:11',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:06',\n\t\t\t),\n\t\t\t145 => \n\t\t\tarray (\n\t\t\t\t'id' => 5161,\n\t\t\t\t'league_id' => 6,\n\t\t\t\t'tournament_id' => 235,\n\t\t\t\t'team_blue_id' => 0,\n\t\t\t\t'team_red_id' => 0,\n\t\t\t\t'team_winner_id' => 0,\n\t\t\t\t'polldaddy_id' => 0,\n\t\t\t\t'date_time' => '1970-01-01 00:00:00',\n\t\t\t\t'url' => '/tourney/match/5161',\n\t\t\t\t'name' => 'TBD vs TBD',\n\t\t\t\t'score_blue' => 0,\n\t\t\t\t'score_red' => 0,\n\t\t\t\t'max_games' => 3,\n\t\t\t\t'is_live' => 0,\n\t\t\t\t'is_finished' => 0,\n\t\t\t\t'created_at' => '2015-05-30 00:10:11',\n\t\t\t\t'updated_at' => '2015-05-30 07:18:06',\n\t\t\t),\n\t\t));\n\t}", "public function matches(){\n\t\tif($this->credentials->check_credentials()){\n\t\t\t// Hier een qeury voor de matches!\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from('Gebruikersprofiel');\n\t\t\t$query=$this->db->get(); // SELECT * FROM $tabel;\n\t\t\t\n\t\t\t//Testresultaten opmaken met behulp van de match functie binnen matching_model.\n\t\t\t$resulaten=array();\n\t\t\tforeach($query->result() as $row){\n\t\t\t\tif($row->Bijnaam!==$this->session->userdata('username')){\n\t\t\t\t\t$resultaten[$row->Bijnaam]=$this->matching->match($row->Bijnaam);\n\t\t\t\t}\n\t\t\t\n\t\t\t//Nu de 6 resultaten weer op zoeken.\n\t\t\t$best_six=array();\n\t\t\tfor($i=0;$i<5;$i++){\n\t\t\t\tif(count($resultaten)>0){\n\t\t\t\t\t\t$temp=max(array_keys($resultaten)); // de hoogste waarde\n\t\t\t\t\t\tarray_push($best_six,$temp); // best six ophogen\n\t\t\t\t\t\tunset($resultaten[$temp]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Nu de beste 6 weergeven in xml formaat.\n\t\t\tif(count($best_six)>0){\n\t\t\t\t$this->db->limit(6);\n\t\t\t\t$this->show($this->db->get_where('Gebruikersprofiel', $best_six));\n\t\t\t}\n\t\t}\n\t}", "public function homeMatches()\n {\n return $this->hasMany('Fantasee\\Match', 'team1_id');\n }", "public function run()\n {\n \t$batting_counter = 0;\n \t$bowlling_counter = 9;\n \t$matches_array = []; \n \tfor($match_count=1;$match_count<=4;$match_count++){\n $bat = ++$batting_counter;\n $ball = --$bowlling_counter;\n \t\tarray_push($matches_array, ['batting_team_1' => $bat, 'bowling_team_2' => $ball ,'batting_team_2' => $ball, 'bowling_team_1' => $bat , 'batting_player_id'=>$batting_counter*11, 'bowling_player_id' => $bowlling_counter*11]);\n \t}\n DB::table('matches')->insert($matches_array);\n }", "public function seachMatchByRound($round){\n\t\t $query = $this->getDbTable()->select()\n\t\t ->from(array('b' => 'tbteam'),array('home'=>'b.team'))\n ->joinInner(array('a' => 'tbmatch'),'a.idHomeTeam=b.id',array('a.id','a.goalHomeTeam','a.goalVisitorTeam','a.date','a.round'))\n ->joinInner(array('c' => 'tbteam'),'c.id=a.idVisitorTeam',array('visitor'=>'c.team'))\n ->where(\"a.round =\". $round)\n ->order('a.round')\n ->setIntegrityCheck(false);\n return $this->getDbTable()->fetchAll($query);\n\t}", "function addmatch()\n\t{\n\t\t$option = JFactory::getApplication()->input->getCmd('option');\n\t\t$app = JFactory::getApplication();\n\t\t$post = JFactory::getApplication()->input->post->getArray(array());\n\t\t$post['project_id'] = $app->getUserState( \"$option.pid\", '0' );\n\t\t$post['round_id'] = $app->getUserState( \"$option.rid\", '0' );\n $post['count_result'] = 1;\n $post['published'] = 1;\n\t\t$model = $this->getModel('match');\n $row = $model->getTable();\n \n //$app->enqueueMessage(JText::_(__METHOD__.' '.__LINE__.' row<br><pre>'.print_r($row,true).'</pre>'),'');\n \n // bind the form fields to the table\n if (!$row->bind($post)) \n {\n $this->setError($this->_db->getErrorMsg());\n return false;\n }\n // make sure the record is valid\n if (!$row->check()) \n {\n $this->setError($this->_db->getErrorMsg());\n return false;\n }\n \n //$app->enqueueMessage(JText::_(__METHOD__.' '.__LINE__.' row<br><pre>'.print_r($row,true).'</pre>'),'');\n //$app->enqueueMessage(JText::_(__METHOD__.' '.__LINE__.' post<br><pre>'.print_r($post,true).'</pre>'),'');\n \n // store to the database\n\t\t//if ($row->store($post))\n if ($row->save($post))\n\t\t{\n\t\t\t$msg = JText::_('COM_SPORTSMANAGEMENT_ADMIN_MATCH_CTRL_ADD_MATCH');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$msg = JText::_('COM_SPORTSMANAGEMENT_ADMIN_MATCH_CTRL_ERROR_ADD_MATCH').$model->getError();\n\t\t}\n\t\t$link = 'index.php?option=com_sportsmanagement&view=matches';\n\t\t$this->setRedirect($link,$msg);\n\t}", "public function preEvents ( $match_id, $soccer='soccer' ) {\n\n\t\t//////////////// bazdid //////////////////\n//\t\t$this->load->helper('jdf');\n\t\t$this->counter();\n\t\t ///////////////////////////////\n\t\t $db = new DB();\n\t\t$today_matches = $db->select('matches','*','id',$match_id);\n\t\t\n\t\t$animation_code = 0;\n\t\tif($today_matches != 0){\n\t\t\t if($today_matches[0]['status'] === '0')\n\t\t\t\t $this->inplayBet();\n\t\t\t$animation_code = $today_matches[0]['animation_code']; \n\t\t }\n\t\t\n\t\t$odds = array();\n\t\t\n\t\tfor($i=0;$i<4;$i++){\n\t\t\t$url = API_DIR . \"$soccer/day_$i.json\";\n\t\t\tif ( file_exists($url)){\n\t\t\t\t$matchesToday = json_decode(file_get_contents($url));\n\t\t\t\t\n\t\t\t\tif(!empty($matchesToday)){\n\t\t\t\t\t$match_index = $this->searchArrayForKey('id' , $match_id , $matchesToday->data);\n\t\t\t\t\t\n\t\t\t\tif( $match_index !== null ){\n\t\t\t\t\tif($match_index !== null)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( $match_index !== null ){\n\t\t\tif ( !empty($matchesToday->data[$match_index]) ) {\n $odds = $matchesToday->data[$match_index]->odds->data[0]->types->data;\n $this->smart->assign([\n 'odds' => $odds ,\n ]);\n \t}\n\t\t\t\n\t\t\t if(isset($matchesToday->data[$match_index])){\n\t\t\t\t \n\t\t\t\t $today_match = $matchesToday->data[$match_index];\n\t\t\t\t \n\t\t\t\t $home = $today_match->homeTeam;\n\t\t\t\t $away = $today_match->awayTeam;\n\t\t\t\t \n\t\t\t\t $home_show_name = $this->set_team_name_with_id($soccer, $home->id, $home->name );\n\t\t\t\t $away_show_name = $this->set_team_name_with_id($soccer, $away->id, $away->name );\n\t\t\t\t \n\t\t\t\t $today_match->homeTeam->show_name = $home_show_name;\n\t\t\t\t $today_match->awayTeam->show_name = $away_show_name;\n\t\t\t\t \n\t\t\t\t$this->smart->assign([\n\t\t\t\t'matches' => $today_match ,\n\t\t\t\t'totalStake' => $this->getTotalStake(),\n\t\t\t\t'pageName' => 'preEvents',\n\t\t\t\t'lastUpdated' => time(),\n\t\t\t\t'animation_code' => $animation_code,\n\t\t\t\t'soccer_type' => $soccer,\n\t\t\t\t'sport_upcoming_type' => $this->get_soccer('upComing')\n\t\t\t\t]);\n\t\t\t\t$this->smart->view('preEvents');\n\t\t\t\t}\n\t\t\tdie();\n\t\t}\n\t\t$this->upComing();\n\t\n \n }", "public function GetMatchedParams ();", "function make_table($matches,$teams,$last_schedule){\n\t\t\n\t\t$table=array();\n\n\t\tforeach($teams as $row){\n\t\t\t$table[$row->id]=array('id'=>$row->id,'name'=>$row->name,'section'=>$row->section);\n\t\t\t$table[$row->id]['points']=0;\n \t\t$table[$row->id]['pj']=0;\n \t\t$table[$row->id]['pg']=0;\n \t\t$table[$row->id]['pe']=0;\n \t\t$table[$row->id]['pp']=0;\n \t\t$table[$row->id]['gf']=0;\n \t\t$table[$row->id]['gc']=0;\n \t\t$table[$row->id]['gd']=0;\n \t\t$table[$row->id]['change']=1;\n \t\t$table[$row->id]['updown']=0;\n\t\t}\n\t\t$table_ant=$table;\n\t\n\t\tforeach($matches as $row){\n\t\t\t$home=false;\n\t\t\t$away=false;\n\t\t\t$result=trim($row->result);\n \t\t$h=(int)trim(substr($result,0,1));\n \t\t$a=(int)trim(substr($result,3));\n\t\t\t\n \t\tif(isset($table[$row->home])){\n \t\t\t$table[$row->home]['pj']+=1;\n\t\t\t\t$home=true;\n\t\t\t\tif($row->schedule_id!=$last_schedule)\n\t\t\t\t\t$table_ant[$row->home]['pj']+=1;\n\t\t\t}\n \t\tif(isset($table[$row->away])){\n \t\t\t$table[$row->away]['pj']+=1;\n \t\t\t$away=true;\n \t\t\tif($row->schedule_id!=$last_schedule)\n\t\t\t\t\t$table_ant[$row->away]['pj']+=1;\n \t\t}\n \t\t\n \t\t//Si el equipo local gana\n \t\tif($h>$a){\n \t\t\tif($home){\n\t\t\t\t\t$table[$row->home]['points']+=3;\n\t\t\t\t\t$table[$row->home]['pg']+=1;\n\t\t\t\t\t$table[$row->home]['gf']+=$h;\n\t\t\t\t\t$table[$row->home]['gc']+=$a;\n\t\t\t\t\t$table[$row->home]['gd']+=$h-$a;\n\t\t\t\t\tif($row->schedule_id!=$last_schedule){\n\t\t\t\t\t\t$table_ant[$row->home]['points']+=3;\n\t\t\t\t\t\t$table_ant[$row->home]['pg']+=1;\n\t\t\t\t\t\t$table_ant[$row->home]['gf']+=$h;\n\t\t\t\t\t\t$table_ant[$row->home]['gc']+=$a;\n\t\t\t\t\t\t$table_ant[$row->home]['gd']+=$h-$a;\n\t\t\t\t\t}\n \t\t\t}\n \t\t\tif($away){\n\t\t\t\t\t$table[$row->away]['pp']+=1;\n\t\t\t\t\t$table[$row->away]['gf']+=$a;\n\t\t\t\t\t$table[$row->away]['gc']+=$h;\n\t\t\t\t\t$table[$row->away]['gd']+=$a-$h;\n \t\t\t\tif($row->schedule_id!=$last_schedule){\n\t\t\t\t\t\t$table_ant[$row->away]['pp']+=1;\n\t\t\t\t\t\t$table_ant[$row->away]['gf']+=$a;\n\t\t\t\t\t\t$table_ant[$row->away]['gc']+=$h;\n\t\t\t\t\t\t$table_ant[$row->away]['gd']+=$a-$h;\n\t\t\t\t\t}\n \t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//Si Empatan\n\t\t\t\tif($h==$a){\n\t\t\t\t\tif($home){\n\t\t\t\t\t\t$table[$row->home]['points']+=1;\n\t\t\t\t\t\t$table[$row->home]['pe']+=1;\n\t\t\t\t\t\t$table[$row->home]['gf']+=$h;\n\t\t\t\t\t\t$table[$row->home]['gc']+=$a;\n\t\t\t\t\t\tif($row->schedule_id!=$last_schedule){\n\t\t\t\t\t\t\t$table_ant[$row->home]['points']+=1;\n\t\t\t\t\t\t\t$table_ant[$row->home]['pe']+=1;\n\t\t\t\t\t\t\t$table_ant[$row->home]['gf']+=$h;\n\t\t\t\t\t\t\t$table_ant[$row->home]['gc']+=$a;\n\t\t\t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif($away){\n\t \t\t\t\t$table[$row->away]['points']+=1;\n\t\t\t\t\t\t$table[$row->away]['pe']+=1;\n\t\t\t\t\t\t$table[$row->away]['gf']+=$a;\n\t\t\t\t\t\t$table[$row->away]['gc']+=$h;\n\t \t\t\t\tif($row->schedule_id!=$last_schedule){\n\t \t\t\t\t\t$table_ant[$row->away]['points']+=1;\n\t\t\t\t\t\t\t$table_ant[$row->away]['pe']+=1;\n\t\t\t\t\t\t\t$table_ant[$row->away]['gf']+=$a;\n\t\t\t\t\t\t\t$table_ant[$row->away]['gc']+=$h;\n\t\t\t\t\t\t}\n\t \t\t\t}\n\t\t\t\t}\n\t\t\t\t//Si el Equipo visitante gana\n\t\t\t\telse{\n\t\t\t\t\tif($home){\n\t\t\t\t\t\t$table[$row->home]['pp']+=1;\n\t\t\t\t\t\t$table[$row->home]['gf']+=$h;\n\t\t\t\t\t\t$table[$row->home]['gc']+=$a;\n\t\t\t\t\t\t$table[$row->home]['gd']+=$h-$a;\n\t\t\t\t\t\tif($row->schedule_id!=$last_schedule){\n\t\t\t\t\t\t\t$table_ant[$row->home]['pp']+=1;\n\t\t\t\t\t\t\t$table_ant[$row->home]['gf']+=$h;\n\t\t\t\t\t\t\t$table_ant[$row->home]['gc']+=$a;\n\t\t\t\t\t\t\t$table_ant[$row->home]['gd']+=$h-$a;\n\t\t\t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif($away){\n\t \t\t\t\t$table[$row->away]['points']+=3;\n\t\t\t\t\t\t$table[$row->away]['pg']+=1;\n\t\t\t\t\t\t$table[$row->away]['gf']+=$a;\n\t\t\t\t\t\t$table[$row->away]['gc']+=$h;\n\t\t\t\t\t\t$table[$row->away]['gd']+=$a-$h;\n\t \t\t\t\tif($row->schedule_id!=$last_schedule){\n\t \t\t\t\t\t$table_ant[$row->away]['points']+=3;\n\t\t\t\t\t\t\t$table_ant[$row->away]['pg']+=1;\n\t\t\t\t\t\t\t$table_ant[$row->away]['gf']+=$a;\n\t\t\t\t\t\t\t$table_ant[$row->away]['gc']+=$h;\n\t\t\t\t\t\t\t$table_ant[$row->away]['gd']+=$a-$h;\n\t\t\t\t\t\t}\n\t \t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Ordeno las dos tablas generadas\n\t\tforeach ($table as $key=>$arr):\n\t\t\t$pun[$key] = $arr['points'];\n\t\t\t$g1[$key] = $arr['gd'];\n\t\t\t$g2[$key] = $arr['gf'];\n\t\t\t$g3[$key] = $arr['gc'];\t\n\t\tendforeach;\n\t\t\t\n\t\tarray_multisort($pun,SORT_DESC,$g1,SORT_DESC,$g2,SORT_DESC,$g3,SORT_ASC,$table);\n\t\t\n\t\t$pun=$g1=$g2=$g3=array();\n\t\tforeach ($table_ant as $key=>$arr):\n\t\t\t$pun[$key] = $arr['points'];\n\t\t\t$g1[$key] = $arr['gd'];\n\t\t\t$g2[$key] = $arr['gf'];\n\t\t\t$g3[$key] = $arr['gc'];\t\n\t\tendforeach;\n\t\t\t\t\n\t\tarray_multisort($pun,SORT_DESC,$g1,SORT_DESC,$g2,SORT_DESC,$g3,SORT_ASC,$table_ant);\n\t\t\n\t\t//Reviso posiciones con la ultima fecha y cuanto se han movido\n\t\tforeach($table as $key=>$row){\n\t\t\tforeach($table_ant as $key2=>$row2){\n\t\t\t\tif($row['id']==$row2['id']){\n\t\t\t\t\tif($key>$key2){\n\t\t\t\t\t\t$table[$key]['change']=2;\n\t\t\t\t\t\t$table[$key]['updown']=abs($key-$key2);\n\t\t\t\t\t}\n\t\t\t\t\tif($key<$key2){\n\t\t\t\t\t\t$table[$key]['change']=0;\n\t\t\t\t\t\t$table[$key]['updown']=abs($key-$key2);\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $table;\n\t}", "public function matches(): View\n {\n $matchList = Match::all();\n return view('admin/matches/index', compact('matchList'));\n }", "public function play_offs_preparation() {\n //reverse\n $all = array();\n if ($this->mode == 1) {\n //DECLARING TEAMS!!!!\n $all[0] = array();\n $all[0] = $this->teams;\n } else {\n $all = $this->promoted_all_teams();\n }\n $places_qtt = count($all);\n $promoted_qtt = count($all[0]); //group_qtt?!?\n $new_order = array();\n $new_order_qtt = -1;\n for ($i = 0; $i < $places_qtt; $i++) {\n if ($i % 2 == 0) {\n $place = $i;\n $new_order_qtt++;\n } else {\n $place = $places_qtt - $i;\n }\n for ($j = 0; $j < $promoted_qtt; $j++) {\n if ($i % 2 == 0) {\n $new_order[$new_order_qtt * $promoted_qtt + $j] = new Match();\n $new_order[$new_order_qtt * $promoted_qtt + $j]->set_team1($all[$place][$j]);\n } else {\n $new_order[$new_order_qtt * $promoted_qtt + $j]->set_team2($all[$place][$j]);\n }\n }\n }\n return $new_order;\n }", "public function getMatch()\n {\n return $this->match;\n }", "public function getMatch()\n {\n return $this->generalMatch;\n }", "public function testComplexMove(){\n $gm = new GamesManager();\n\n $game = $this->generateGameObjectWithTwoPlayers();\n\n\n $game->gameState->currentPlayer = 0;\n $game->gameState->isGameGoing = true;\n $game->gameState->selectChecker = false;\n $game->gameState->pickedChecker = [4, 3];\n $game->gameState->possibleGoChoices = [array(\"row\"=>2, \"col\"=>5), array(\"row\"=>4, \"col\"=>3)];\n $game->gameState->boardState = $this->getMultipleBeat();\n\n $gm->userMove(2, 5, 1, $game );\n $gm->userMove(0, 3, 1, $game );\n $gm->userMove(3, 0, 1, $game );\n $result = $gm->userMove(7, 4, 1, $game );\n\n\n $this->assertEquals(0, $result[\"gameState\"]->boardState[4][3]);//initial\n $this->assertEquals(0, $result[\"gameState\"]->boardState[3][4]);//beaten\n $this->assertEquals(-1, $result[\"gameState\"]->boardState[1][6]);//still there due to turkish turn rule\n $this->assertEquals(0, $result[\"gameState\"]->boardState[1][4]);//beaten\n $this->assertEquals(0, $result[\"gameState\"]->boardState[2][1]);//beaten\n $this->assertEquals(0, $result[\"gameState\"]->boardState[4][1]);//beaten\n $this->assertEquals(2, $result[\"gameState\"]->boardState[7][4]);//end position of the hero checker\n\n }", "abstract public function winner();", "public function setMatch(Match $match);", "public function soccerAction()\n {\n header('Expires: 60000'); // cache expires 60s\n //Disable layout\n $this->_helper->layout->disableLayout(true);\n\n //get id of match\n $matchId = (int)$this->_request->getParam('id');\n\n //init response\n $respose = array();\n\n if ($matchId > 0)\n {\n //get common info of match\n $this->_getInfoMatch();\n\n switch ($this->_matchDetail['status'])\n {\n case 1:\n //tran dau ket thuc\n $respose['match']['time'] = 'Trước trận đấu';\n break;\n case 2:\n //tran dau ket thuc\n $respose['match']['time'] = 'Kết thúc';\n break;\n case 4:\n $respose['match']['time'] = 'Hết hiệp 1';\n break;\n case 6:\n $respose['match']['time'] = 'Hết hiệp 2';\n break;\n case 8:\n $respose['match']['time'] = 'Hết hiệp phụ thứ nhất';\n break;\n case 10:\n $respose['match']['time'] = 'Hết hiệp phụ thứ hai';\n break;\n case 11:\n $respose['match']['time'] = 'Penalty';\n break;\n default:\n //tran dau dang dien ra\n $respose['match']['time'] = $this->_matchDetail['matchTime']. \"'\";\n break;\n }\n $score = $this->_matchDetail['goal1'] . ' - ' . $this->_matchDetail['goal2'];\n if($this->_matchDetail['penalty1'] > 0 || $this->_matchDetail['penalty2'] > 0)\n {\n $score .='<p class=\"txt_11\">penalty</p>';\n $score .='<p style=\"color:red\" class=\"txt_11\">('. $this->_matchDetail['penalty1'] . ' - ' . $this->_matchDetail['penalty2'].')</p>';\n }\n\n //init match score\n $respose['match']['score'] = $score;\n //init score card\n $respose['match']['card'] = $this->view->render('match/soccer.phtml');\n\n }\n else {\n $respose['error'] = array('errorKey' => 'content-not-found');\n }\n\n $jsonData = Zend_Json::encode($respose);\n # JSON if no callback\n if (!isset($_GET['callback']))\n {\n echo($jsonData);exit;\n }\n //init model new\n $modelNew = Thethao_Model_News::getInstance();\n # JSONP if valid callback\n if ($modelNew->isValidCallback($_GET['callback']))\n {\n echo(\"{$_GET['callback']}($jsonData)\");exit;\n }\n }", "public function allMatches()\n {\n return $this->homeMatches->merge($this->awayMatches);\n }", "public function score($id)\n {\n if (Auth::guard('admin')->check()) {\n $matches = DB::select('SELECT (SELECT t.name FROM teams t WHERE t.id = m.team_a) as team_a,\n (SELECT t.name FROM teams t WHERE t.id = m.team_b) as team_b, m.id\n FROM matches m JOIN events e ON m.event_id = e.id\n WHERE m.id = ' . $id);\n // \\dd($matches);\n return \\view('admin.match.score', \\compact('matches'));\n } else {\n return Redirect('login')->with('msg', 'Anda harus login'); //routing login\n } \n }", "public function getMatch() {\n return $this->match;\n }", "public function getAllMatches() {\n return $this->matches;\n }", "public function run()\n {\n $matches = [\n ['team1_id' => 28, 'team2_id' => 4, 'start_time' => '2018-06-14 18:00:00'],\n ['team1_id' => 6, 'team2_id' => 18, 'start_time' => '2018-06-15 17:00:00'],\n ['team1_id' => 7, 'team2_id' => 2, 'start_time' => '2018-06-15 18:00:00'],\n ['team1_id' => 27, 'team2_id' => 30, 'start_time' => '2018-06-15 21:00:00'],\n ['team1_id' => 23, 'team2_id' => 1, 'start_time' => '2018-06-16 13:00:00'],\n ['team1_id' => 14, 'team2_id' => 25, 'start_time' => '2018-06-16 16:00:00'],\n ['team1_id' => 17, 'team2_id' => 21, 'start_time' => '2018-06-16 19:00:00'],\n ['team1_id' => 20, 'team2_id' => 8, 'start_time' => '2018-06-16 21:00:00'],\n ['team1_id' => 11, 'team2_id' => 29, 'start_time' => '2018-06-17 16:00:00'],\n ['team1_id' => 24, 'team2_id' => 12, 'start_time' => '2018-06-17 18:00:00'],\n ['team1_id' => 15, 'team2_id' => 32, 'start_time' => '2018-06-17 21:00:00'],\n ['team1_id' => 31, 'team2_id' => 5, 'start_time' => '2018-06-18 15:00:00'],\n ['team1_id' => 19, 'team2_id' => 13, 'start_time' => '2018-06-18 18:00:00'],\n ['team1_id' => 10, 'team2_id' => 22, 'start_time' => '2018-06-18 21:00:00'],\n ['team1_id' => 16, 'team2_id' => 3, 'start_time' => '2018-06-19 15:00:00'],\n ['team1_id' => 26, 'team2_id' => 9, 'start_time' => '2018-06-19 18:00:00'],\n ];\n\n foreach ($matches as $match)\n {\n Match::create($match);\n }\n }", "public function testNewGameStartWithLoveLove()\n {\n $match = $this->getNewMatch();\n $this->assertEquals(0, $match->getScorePlayer1());\n $this->assertEquals(0, $match->getScorePlayer2());\n }", "public function getMatches() : array {\n if (!isset($this->Page_Matches['full'])) {\n $this->map_matches();\n }\n return $this->Page_Matches;\n }", "public function actionListmatch(){\n try{\n $normalPostModel = new ListMatchForm();\n $this->render('listmatch', array('listmatchForm' => $normalPostModel));\n }catch (Exception $ex) {\n Yii::log(\"ListMatchController:actionIndex::\".$ex->getMessage().\"--\".$ex->getTraceAsString(), 'error', 'application');\n }\n }", "public function awayMatches()\n {\n return $this->hasMany('Fantasee\\Match', 'team2_id');\n }", "public function match()\n\t{\n\t\treturn $this->belongsTo('App\\Match');\n\t}", "public function autoembed_callback($matches)\n {\n }", "static function getFeuilleMatch($id_rencontre)\n {\n $r = '<ul>';\n\t\t\n $q1 = Database::query('\n\t\tSelect c.Nom as Nom_Club, e.Categorie, m.Nom, m.Prenom, r0.Points, r0.Fautes, \n\n\t\tr0.Points = (Select max(Points) \n\t\t\tFrom Rencontrer r\n\t\t\tWhere r.ID_Rencontre = r0.ID_Rencontre\n\t\t\tand r.ID_Equipe = r0.ID_Equipe\n\t\t\t) as MeilleurJoueur,\n\n\t\tr0.Fautes = (Select max(Fautes) \n\t\t\tFrom Rencontrer r\n\t\t\tWhere r.ID_Rencontre = r0.ID_Rencontre\n\t\t\tand r.ID_Equipe = r0.ID_Equipe\n\t\t\t) as PireJoueur \n\t\t\t\t\t\t\t\t\n\t\tFrom (\n (\n (\n (Rencontrer r0 inner join Equipe e\n On e.ID_Equipe = r0.ID_Equipe) \n inner join Club c \n On e.ID_Club = c.ID_Club) \n inner join Membre m\n On r0.ID_Membre = m.ID_Membre) \n inner join Joueur j\n On m.ID_Membre = j.ID_Membre)\n\n\t\tWhere r0.ID_Rencontre = ' . $id_rencontre . '\n\n\t\tOrder by Nom_Club, Points DESC, Fautes ASC');\n\t\t\n\t$nom_club = \"\";\n\t\t\n\t// Pour chaque joueur de la rencontre\n\twhile ($data1 = $q1->fetch())\n\t{\n\t\t// On affiche le nom du club pour chaque club\n\t\tif ($nom_club != $data1['Nom_Club'])\n\t\t{\n\t\t\t$nom_club = $data1['Nom_Club'];\n\t\t\t$r = $r . '</ul><h2>Club ' . $nom_club . ' (équipe ' . $data1['Categorie'] . ')</h2><ul>';\n\t\t}\n\t\t\n\t\t$r2 = $data1['Nom'] . ' ' . $data1['Prenom']\n\t\t. ' - Point : ' . $data1['Points'] \n\t\t. ' - Fautes : ' . $data1['Fautes'];\n\t\t\n\t\tif ($data1['PireJoueur'])\n\t\t{\n\t\t\t$r2 = '<font color=\"red\"> ' . $r2 . '</font>';\t\n\t\t}\n\t\telse if ($data1['MeilleurJoueur'])\n\t\t{\n\t\t\t$r2 = '<font color=\"green\"> ' . $r2 . '</font>';\t\n\t\t}\n\t\t\n\t\t$r = $r . '<li>' . $r2 . '</li>';\n\t}\n\t\n return $r;\n }", "function last_games($championship,$num){\n\t\t$games=$this->db->query('Select m.*, t1.id as hid, t1.name as hname, t2.id as aid, t2.name as aname,UNIX_TIMESTAMP(date_match) as datem\n\t\t\t\t\t\t\t\t From matches as m, groups as g, rounds as r, championships as c, matches_teams as mt, teams as t1, teams as t2 \n\t\t\t\t\t\t\t\t Where mt.match_id=m.id and mt.team_id_home=t1.id and mt.team_id_away=t2.id and m.group_id=g.id and g.round_id=r.id and r.championship_id=c.id and c.id='.$championship.'\n\t\t\t\t\t\t\t\t Order by date_match desc\n\t\t\t\t\t\t\t\t Limit 0,'.$num);\n\t\t\n\t\t$query=$this->db->query('SELECT UNIX_TIMESTAMP(min( date_match )) as date_match_first, UNIX_TIMESTAMP(max( date_match ))as date_match_last\n\t\t\t\t\t\t\t\t FROM championships AS c, rounds AS r, groups AS g, matches AS m\n\t\t\t\t\t\t\t\t WHERE c.id =4\n\t\t\t\t\t\t\t \t AND r.championship_id = c.id\n\t\t\t\t\t\t\t \t AND g.round_id = r.id\n\t\t\t\t\t\t\t\t AND m.group_id = g.id')->result();\n\t\t\n\t\t\n\t\t$fecha_first=$this->weekStartEnd(mdate(\"%Y-%m-%d\",$query[0]->date_match_first));\n\t\t$fecha_last=$this->weekStartEnd(mdate(\"%Y-%m-%d\",$query[0]->date_match_last));\n\t\t\n\t\t$i=1;\n\t\tdo{\n\t\t\tif($i!=1){\n\t\t\t\t$fecha_first=$this->weekStartEnd($this->calcularfecha($fecha_first['end'],+3));\n\t\t\t}\n\t\t\t$weeks[$i]=array(\n\t \t\t\t\t\t\"start\" => $fecha_first['start'],\n\t\t\t\t\t\t\t\"end\" => $fecha_first['end'],\t\t\n\t\t \t\t );\n\t\t $i+=1;\n\t\t}while ($fecha_first['end']!=$fecha_last['end']);\n\t\t\n\t\t$j=0;\n\t\tforeach($games->result() as $row):\n\t\t\t$partidos[$j]['id']=$row->id;\n\t\t\t$partidos[$j]['fecha']=mdate(\"%d %M %y\",$row->datem);\n\t\t\t$partidos[$j]['hora']=mdate(\"%h:%i\",$row->datem);\n\t\t\t$partidos[$j]['hequipo']=$row->hname;\n\t\t\t$partidos[$j]['aequipo']=$row->aname;\n\t\t\tif($row->result=='' || $row->result==NULL)\n\t\t\t\t$partidos[$j]['marcador']='Sin jugar';\n\t\t\telse\n\t\t\t\t$partidos[$j]['marcador']=$row->result;\n\t\t\t\n\t\t\t\n\t\t\tfor($k=1 ; $k<$i; $k+=1){\n\t \t\tif($row->date_match>$weeks[$k]['start'].' 00:00:00' AND $row->date_match<$weeks[$k]['end'].' 23:59:59')\n\t \t\t\t$partidos[$j]['jornada']=$k;\n\t\t\t}\n\t\t\t\n\t\t\t$j+=1;\n\t\t\t\n\t\tendforeach;\n\t\t\n\t\treturn $partidos;\n\t\t\n\t}", "public function match()\n {\n return $this->belongsTo('App\\Models\\Match', 'match_id');\n }", "public function testVerifyToWin()\n {\n $match = $this->createMatch();\n\n foreach([0, 1, 2, 3, 4, 5, 6, 7, 8] as $position) {\n $this->createMove($position, $match->id);\n }\n\n foreach([0, 1, 2] as $position) {\n\n $move = Move::where('position', $position)\n ->where(\"match_id\", $match->id)\n ->first();\n\n $move->value = 1;\n $move->save();\n\n }\n\n $winner = new Winner();\n $winner->verify($match, $position, 1);\n\n $matchFound = Match::find($match->id);\n\n $this->assertEquals(1, $matchFound->winner);\n\n }", "public function GetMatch () {\n\t\treturn $this->match;\n\t}", "public function startWithMatch(Match $match)\n {\n //if no Rating->Rating by League\n //save rating in table\n //EGF Rating table\n $result = new EGFResult($match->getResult());\n\n $playerA = new Rating();\n $playerA->setUser($match->getBlack());\n $achievedResult = $result->getAchievedResult($match->getBlack());\n $playerA->setAchievedResult($achievedResult);//win\n\n $playerB = new Rating();\n $playerB->setUser($match->getWhite());\n $achievedResult = $result->getAchievedResult($match->getWhite());\n $playerB->setAchievedResult($achievedResult);//loss\n\n $rating = new EGFRating($playerA, $playerB);\n $rating->doCalculation();\n\n $rating->getPlayerA();\n $rating->getPlayerB();\n\n }", "public function getRouteMatch();", "function fantacalcio_admin_competition_rounds($c_id = \"\") {\n drupal_add_css('sites/all/plugins/interface/interface.css', 'themes', 'all', TRUE);\n drupal_add_js('sites/all/plugins/interface/interface.js');\n drupal_add_js('sites/all/plugins/interface/compressed/idrag.js');\n drupal_add_js('sites/all/plugins/interface/compressed/idrop.js');\n drupal_add_js('sites/all/plugins/interface/compressed/isortables.js');\n drupal_add_js('sites/all/modules/fantacalcio/js/move_competition_rounds.js');\n \n $competitions = get_competitions();\n $c_name = $competitions[$c_id]->name;\n $round_statuses = get_round_statuses();\n \n drupal_set_title(filter_xss($c_name . \" - Gestione giornate\"));\n \n $competition_rounds = get_competition_rounds($c_id);\n \n $out = \"<div id=message style='height:30px'></div><div class=clear></div>\";\n \n $out .= \"<div id='teams'>\n <div id='0' class='groupWrapper' style='width: 100%; min-height: 200px'>\";\n \n foreach ($competition_rounds as $rc_id => $round) {\n $items[$round->round] = \"\\n<div class='groupItem' id='\" . $c_id . \"_\" . $round->competition_round . \"' name='\" . $round->competition_round . \"'>\" . \"\\n<div class='itemHeader' id='\" . $round->competition_round . \"-item'>\" . (!empty($round->round_label) ? $round->round_label : $round->competition_round . \"&ordf; giornata\") . \"</div>\" . \"\\n</div>\";\n if ($round->round == 0)\n $out .= $items[$round->round];\n }\n $out .= \"\\n</div></div>\";\n \n $header = array(\"N°\", \"Data\", \"Stato\", \"Giornata competizione\");\n $rounds = get_vote_rounds();\n foreach ($rounds as $number => $round) {\n $rows[$number][] = array(\"data\" => $number, \"width\" => 40);\n $rows[$number][] = array(\n \"data\" => date(\"d-m-Y H:i\", $round->date), \n \"width\" => 120);\n $rows[$number][] = array(\n \"data\" => $round_statuses[$round->status], \n \"width\" => 90);\n $rows[$number][] = array(\n \"data\" => \"<div id='\" . $number . \"' class='groupWrapper' style='width: 100%; height:30px; min-height:30px;'>\" . $items[$number] . \"</div>\");\n }\n \n $out .= \"<div id=data>\" . theme_table($header, $rows) . \"</div>\";\n \n return $out;\n}", "public function populateMatchStandingsBetweenDates($to,$from){\n\t\t $team = new Application_Model_Mapper_Team();\n\t\t //cath all teams\n\t\t $teamList=$team->fetchAll();\n\t\t $prosGoal= null;\n\t\t $agaistGoal=null;\n\t\t if(count($teamList)>0){\n\t\t \t foreach($teamList as $row){\n\t\t \t \t //begin team statistics by 0\n\t\t \t \t $row->setWins(0);\n\t\t \t \t $row->setLosses(0);\n\t\t \t \t $row->setPoints(0);\n\t\t \t \t $row->setDraws(0);\n\t\t \t \t //catch all matches by team\n\t\t $championship = $this->seachMatchByTeamBetweenDates($row->getId(),$to,$from);\n\t\t foreach ($championship as $match) {\n\t\t \t //if a team is a visitor team goals of visitor team it is\n\t\t \t $prosGoal=$match['goalVisitorTeam'];\n\t\t \t $agaistGoal=$match['goalHomeTeam'];\n\t\t \t //if a team is a home team goals of home team it is\n\t\t \t if($match['idHomeTeam']==$row->getId()){\n\t\t \t \t $prosGoal=$match['goalHomeTeam'];\n\t\t \t \t $agaistGoal=$match['goalVisitorTeam'];\n\t\t \t }\n\t\t \t //if team win\n\t\t \t if($agaistGoal<$prosGoal){\n\t\t \t \t$row->setWins($row->getWins()+1);\n\t\t \t \t$row->setPoints($row->getPoints()+3);\n\t\t \t }//if team lost\n\t\t \t elseif($agaistGoal>$prosGoal){\n\t\t \t \t$row->setLosses($row->getLosses()+1);\n\t\t \t }//if team draw\n\t\t \t else{\n\t\t \t \t$row->setDraws($row->getDraws()+1);\n\t\t \t \t$row->setPoints($row->getPoints()+1);\n\t\t \t }\n\t\t }\n\t\t //update table team\n\t\t $team->updateTeam($row);\n\t\t \t }\n\t\t }\n\t}", "public function index(){\n\t\t$matches = Matches::orderBy('id','desc')->with('winner')->with('loser')->with('winner_character')->with('loser_character')->simplePaginate(50);\n return view('matches.index', compact('matches'));\n }", "function gaMatch_addPlayerResult($kidPlayerId, $win, $draw, $lost) {\n //??????????????????? does record already exist - what if player change ?????????\n $match = array_search ( $kidPlayerId , $this->gamatch_gamePlayerMap);\n if ($match === FALSE) {\n $newGame = new stdData_gameUnit_extended;\n $newGame->stdRec_loadRow($row);\n $this->gamatch_gamePlayerMap[$newGame->game_kidPeriodId] = $newGame;\n ++$this->game_opponents_count;\n $this->game_opponents_kidPeriodId[] = $kidPlayerId;\n $this->game_opponents_wins[] = $win;\n $this->game_opponents_draws[] = $draw;\n $this->game_opponents_losts[] = $lost;\n $this->gagArrayGameId[] = 0;\n } else {\n $this->game_opponents_wins[$match] += $win;\n $this->game_opponents_draws[$match] += $draw;\n $this->game_opponents_losts[$match] += $lost;\n }\n}", "public function setMatch($match)\n{\n$this->match = $match;\n\nreturn $this;\n}", "public function index()\n {\n if($this->user['menteer_type']==37)\n redirect('/dashboard','refresh');\n\n if($this->user['match_status']=='active')\n redirect('/dashboard','refresh');\n\n $matches = $this->session->userdata('matches');\n\n // make sure we have matches\n\n if(is_array($matches) && count($matches) > 0){\n\n // lets add some data to the matches\n\n foreach($matches as $key=>$val) {\n\n // get user info\n $mentors[$key]['match_score'] = $val;\n\n $mentors[$key]['user'] = $this->Application_model->get(array('table'=>'users','id'=>$key));\n\n $mentors[$key]['answers'] = $this->_extract_data($this->Matcher_model->get(array('table'=>'users_answers','user_id'=>$key)));\n }\n\n //printer($mentors);\n\n }else{\n $this->session->set_userdata('skip_matches',true);\n redirect('/dashboard','refresh');\n }\n\n $this->data['page'] = 'chooser';\n $this->data['user'] = $this->user;\n $this->data['mentors'] = $mentors;\n\n $this->load->view('/chooser/header',$this->data);\n $this->load->view('/chooser/index',$this->data);\n $this->load->view('/chooser/footer',$this->data);\n\n }", "function fantacalcio_controlla_formazioni($vote_round) {\n\n drupal_set_title(filter_xss('Risultati ' . $vote_round . '&ordf; giornata'));\n \n $teams = get_teams();\n $competitions = get_competitions();\n\n $formazioni = array();\n foreach ($competitions as $c_id => $competition) {\n $result = db_query(\"SELECT c.competition_round, r.date \n FROM {fanta_rounds} r, {fanta_rounds_competitions} c\n WHERE c.round = r.round\n AND c.c_id = '%d' \n AND c.round = '%d'\", $c_id, $vote_round);\n while ($row = db_fetch_object($result)) {\n $last_round = $row->competition_round;\n $ts_round = $row->date;\n }\n \n if (db_affected_rows($result) > 0) {\n \n $formazioni = array();\n\n $sql = \"SELECT * FROM {fanta_matches} \" .\n \"WHERE g_id IN (SELECT g_id FROM {fanta_groups WHERE c_id = '%d') \" .\n \"AND round = '%d'\";\n $result = db_query($sql, $c_id, $last_round);\n while ($row = db_fetch_object($result)) {\n $competition_teams[$c_id][] = $row->t1_id;\n $competition_teams[$c_id][] = $row->t2_id;\n }\n\n $sql = \"SELECT * FROM {fanta_lineups} f\n INNER JOIN {fanta_lineups_inserts} i\n ON f.c_id = i.c_id\n AND f.round = i.round\n AND f.t_id = i.t_id\n WHERE f.c_id = '%d' \n AND f.round = '%d'\n AND i.i_id = (SELECT MAX(i_id) FROM {fanta_lineups_inserts} WHERE c_id = '%d' AND round = '%d' AND t_id = f.t_id)\";\n $result = db_query($sql, $c_id, $last_round, $c_id, $last_round);\n while ($row = db_fetch_object($result)) {\n $formazioni[$row->t_id][] = $row;\n }\n \n $rows = array();\n \n if ($competition_teams[$c_id]) {\n \n $out .= \"<h3>\" . $competitions[$c_id]->name . \"</h3>\";\n\n foreach ($competition_teams[$c_id] as $t_id) {\n\n $formazione = $formazioni[$t_id];\n\n $modulo = array();\n\n if ($formazione) {\n\n foreach ($formazione as $player) {\n if ($player->position > 0) $modulo[$player->position]++;\n }\n\n if ($modulo == array(1 => 11, 2 => 4, 3 => 3)) $status = \"<span style='color: green; font-weight:bold;'>OK</span>\";\n else $status = \"<span style='color: red; font-weight:bold;'>NO</span>\";\n ksort($modulo);\n \n $ts = ($player->timestamp < $ts_round ) ? date('d-m-Y H:i:s', $player->timestamp) : \"<span style='color: red; font-weight:bold;'>\" . date('d-m-Y H:i:s', $player->timestamp) . \"</span>\";\n\n $rows[$t_id] = array(l($teams[$t_id]->name, \"formazioni/admin/\" . $t_id), implode(\" - \", $modulo), $status, $ts);\n }\n else $rows[$t_id] = array(l($teams[$t_id]->name, \"formazioni/admin/\" . $t_id), array(\"data\" => \"<span style='color: red; font-weight:bold;'>NON INSERITA</span>\", \"colspan\" => 2));\n\n }\n\n $out .= theme_table(array(), $rows);\n }\n }\n }\n\n return $out;\n}", "public abstract function onPlayerSelect();", "protected function manageMatches() {\n $this->invertedIndex = new InvertedIndex();\n\n foreach ($this->matches as $index => $word) {\n $this->manageWord($word, $index);\n }\n unset($index);\n unset($word);\n }", "public function simulateMatch(SimulationMatch $match, $minutes) {\r\n \tif ($match->minute == null) {\r\n \t\t$match->minute = 0;\r\n \t}\r\n \t\r\n \t// start the match\r\n \tif ($match->minute == 0) {\r\n\t \tforeach ($this->_observers as $observer) {\r\n\t \t\t$observer->onBeforeMatchStarts($match);\r\n\t \t}\r\n \t}\r\n \t\r\n \t// match might be completed already before simulation, e.g. when there is no formation provided\r\n \tif ($match->isCompleted) {\r\n \t\t$this->completeMatch($match);\r\n \t\treturn;\r\n \t}\r\n \t\r\n \t// complete match if team has no players\r\n \tif (!$this->_hasPlayers($match->homeTeam) || !$this->_hasPlayers($match->guestTeam)) {\r\n \t\t$this->completeMatch($match);\r\n \t\treturn;\r\n \t}\r\n \t\r\n \tfor ($simMinute = 1; $simMinute <= $minutes; $simMinute++) {\r\n \t\t$match->minute = $match->minute + 1;\r\n \t\t\r\n \t\tif ($match->minute == 1) {\r\n \t\t\t$this->_simStrategy->kickoff($match);\r\n \t\t} else {\r\n \t\t\tSimulationHelper::checkAndExecuteSubstitutions($match, $match->homeTeam, $this->_observers);\r\n \t\t\tSimulationHelper::checkAndExecuteSubstitutions($match, $match->guestTeam, $this->_observers);\r\n \t\t}\r\n \t\t\r\n \t\t// execute next action\r\n \t\t$actionName = $this->_simStrategy->nextAction($match);\r\n \t\t$this->_simStrategy->$actionName($match);\r\n \t\t\r\n \t\t// increase minutes played\r\n \t\t$this->_increaseMinutesPlayed($match->homeTeam);\r\n \t\t$this->_increaseMinutesPlayed($match->guestTeam);\r\n \t\t\r\n \t\t// match ended?\r\n \t\t// two possibilities: \r\n \t\t// a. Normal matches end after regular time\r\n \t\t// b. if penalty shooting is enabled, play extension if there is no result after 90 minutes\r\n \t\t$lastMinute = 90 + SimulationHelper::getMagicNumber(1, 5);\r\n \t\tif ($match->penaltyShootingEnabled || $match->type == 'Pokalspiel') {\r\n \t\t\t\r\n \t\t\t// match ended after regular or extension time with a winner\r\n \t\t\tif (($match->minute == 91 || $match->minute == 121)\r\n \t\t\t\t&& ($match->type != 'Pokalspiel' && $match->homeTeam->getGoals() != $match->guestTeam->getGoals()\r\n \t\t\t\t\t\t|| $match->type == 'Pokalspiel' && !SimulationCupMatchHelper::checkIfExtensionIsRequired($this->_websoccer, $this->_db, $match))) {\r\n \t\t\t\t\r\n \t\t\t\t$this->completeMatch($match);\r\n \t\t\t\tbreak;\r\n \t\t\t\t\r\n \t\t\t\t// no winner after extension time -> penalty shooting\r\n \t\t\t} elseif ($match->minute == 121 \r\n \t\t\t\t\t&& ($match->type != 'Pokalspiel' && $match->homeTeam->getGoals() == $match->guestTeam->getGoals()\r\n \t\t\t\t\t\t\t|| $match->type == 'Pokalspiel' && SimulationCupMatchHelper::checkIfExtensionIsRequired($this->_websoccer, $this->_db, $match))) {\r\n \t\t\t\t\r\n \t\t\t\t$this->_simStrategy->penaltyShooting($match);\r\n \t\t\t\t\r\n \t\t\t\t// we have a winner now\r\n \t\t\t\tif ($match->type == 'Pokalspiel') {\r\n \t\t\t\t\t\r\n \t\t\t\t\t// home team won\r\n \t\t\t\t\tif ($match->homeTeam->getGoals() > $match->guestTeam->getGoals()) {\r\n \t\t\t\t\t\tSimulationCupMatchHelper::createNextRoundMatchAndPayAwards($this->_websoccer, $this->_db, \r\n \t\t\t\t\t\t\t$match->homeTeam->id, $match->guestTeam->id, $match->cupName, $match->cupRoundName);\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t// guest team won\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tSimulationCupMatchHelper::createNextRoundMatchAndPayAwards($this->_websoccer, $this->_db,\r\n \t\t\t\t\t\t\t$match->guestTeam->id, $match->homeTeam->id, $match->cupName, $match->cupRoundName);\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$this->completeMatch($match);\r\n \t\t\t\tbreak;\r\n \t\t\t\t\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\t// regular match\r\n \t\t} elseif ($match->minute >= $lastMinute) {\r\n \t\t\t$this->completeMatch($match);\r\n \t\t\tbreak;\r\n \t\t}\r\n \t\t\r\n \t}\r\n \t\r\n }", "public function prochainMatchAction()\n\t{\n\t\t$rep_matchs = $this->getDoctrine()->getRepository('DFMatchBundle:Matchs');\n\t\t$match = $rep_matchs->getProchainMatch();\n\t\t\n\t\treturn $this->render('DFMatchBundle:Public:prochainMatch.html.twig', array(\n\t\t\t'match' => $match\t\n\t\t));\n\t}", "public function enterMatchScore($captain, $match, $homeTeamScore, $awayTeamScore);", "function linkRgaa($matches) {\n\t$rgaa = array(\n'1.1' => 'http://rgaa.net/1-1-Absence-de-cadres-non-titres.html',\n'1.2' => 'http://rgaa.net/Pertinence-des-titres-donnes-aux.html',\n'2.1' => 'http://rgaa.net/Presence-d-un-autre-moyen-que-la.html',\n'2.2' => 'http://rgaa.net/Presence-d-un-autre-moyen-que-la,4.html',\n'2.3' => 'http://rgaa.net/Presence-d-un-moyen-de.html',\n'2.4' => 'http://rgaa.net/Presence-d-un-moyen-de,6.html',\n'2.5' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du.html',\n'2.6' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,8.html',\n'2.7' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,9.html',\n'2.8' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,10.html',\n'2.9' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,11.html',\n'2.10' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,12.html',\n'2.11' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,13.html',\n'2.12' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,14.html',\n'2.13' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,15.html',\n'2.14' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,16.html',\n'2.15' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,17.html',\n'2.16' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,18.html',\n'3.1' => 'http://rgaa.net/Possibilite-d-identifier-les.html',\n'3.2' => 'http://rgaa.net/Presence-d-information-prealable.html',\n'3.3' => 'http://rgaa.net/Positionnement-correct-des.html',\n'3.4' => 'http://rgaa.net/Regroupement-d-elements-de.html',\n'3.5' => 'http://rgaa.net/Absence-d-element-fieldset-sans.html',\n'3.6' => 'http://rgaa.net/Pertinence-du-contenu-de-l-element.html',\n'3.7' => 'http://rgaa.net/Regroupement-d-elements-option.html',\n'3.8' => 'http://rgaa.net/Presence-d-un-attribut-label-sur-l.html',\n'3.9' => 'http://rgaa.net/Pertinence-du-contenu-de-l.html',\n'3.10' => 'http://rgaa.net/Absence-d-element-de-formulaire.html',\n'3.11' => 'http://rgaa.net/Absence-d-element-de-formulaire,29.html',\n'3.12' => 'http://rgaa.net/Pertinence-des-etiquettes-d.html',\n'3.13' => 'http://rgaa.net/Presence-d-informations-ou-de.html',\n'3.14' => 'http://rgaa.net/Presence-de-mecanismes-permettant.html',\n'3.15' => 'http://rgaa.net/Presence-de-mecanismes-permettant,33.html',\n'3.16' => 'http://rgaa.net/Presence-d-une-page-d-aide-ou-d-un.html',\n'4.1' => 'http://rgaa.net/Presence-de-l-attribut-alt.html',\n'4.2' => 'http://rgaa.net/Pertinence-de-l-alternative.html',\n'4.3' => 'http://rgaa.net/Pertinence-de-l-alternative,37.html',\n'4.4' => 'http://rgaa.net/Pertinence-de-l-alternative,38.html',\n'4.5' => 'http://rgaa.net/Pertinence-de-l-alternative-vide.html',\n'4.6' => 'http://rgaa.net/Longueur-du-contenu-des.html',\n'4.7' => 'http://rgaa.net/Existence-d-une-description-longue.html',\n'4.8' => 'http://rgaa.net/Pertinence-de-la-description.html',\n'4.9' => 'http://rgaa.net/Presence-de-l-attribut-longdesc.html',\n'4.10' => 'http://rgaa.net/Presence-d-une-information-de.html',\n'4.11' => 'http://rgaa.net/Coherence-dans-l-identification.html',\n'5.1' => 'http://rgaa.net/Acces-a-une-information.html',\n'5.2' => 'http://rgaa.net/Presence-de-la-transcription.html',\n'5.3' => 'http://rgaa.net/Pertinence-de-la-transcription.html',\n'5.4' => 'http://rgaa.net/Presence-d-une-description-audio.html',\n'5.5' => 'http://rgaa.net/Pertinence-de-la-description-audio.html',\n'5.6' => 'http://rgaa.net/Possibilite-de-controler-l.html',\n'5.7' => 'http://rgaa.net/Presence-d-une-description-audio,52.html',\n'5.8' => 'http://rgaa.net/Presence-d-une-description-audio,53.html',\n'5.9' => 'http://rgaa.net/Presence-du-sous-titrage.html',\n'5.10' => 'http://rgaa.net/Pertinence-du-sous-titrage.html',\n'5.11' => 'http://rgaa.net/Presence-d-une-alternative-aux.html',\n'5.12' => 'http://rgaa.net/Presence-d-une-alternative-aux,57.html',\n'5.13' => 'http://rgaa.net/Absence-d-elements-provoquant-des.html',\n'5.14' => 'http://rgaa.net/Absence-de-code-javascript,59.html',\n'5.15' => 'http://rgaa.net/Absence-de-mise-en-forme.html',\n'5.16' => 'http://rgaa.net/Compatibilite-des-elements.html',\n'5.17' => 'http://rgaa.net/Absence-totale-de-changements.html',\n'5.18' => 'http://rgaa.net/Presence-du-sous-titrage,63.html',\n'5.19' => 'http://rgaa.net/Absence-de-l-element-blink.html',\n'5.20' => 'http://rgaa.net/Absence-d-elements-provoquant-des,65.html',\n'5.21' => 'http://rgaa.net/Absence-de-code-javascript,66.html',\n'5.22' => 'http://rgaa.net/Absence-de-mise-en-forme,67.html',\n'5.23' => 'http://rgaa.net/Absence-d-element-marquee.html',\n'5.24' => 'http://rgaa.net/Absence-d-elements-affichant-des.html',\n'5.25' => 'http://rgaa.net/Absence-de-code-javascript,70.html',\n'5.26' => 'http://rgaa.net/Absence-de-mise-en-forme,71.html',\n'5.27' => 'http://rgaa.net/Independance-du-peripherique-d.html',\n'5.28' => 'http://rgaa.net/Presence-d-une-alternative-aux,73.html',\n'5.29' => 'http://rgaa.net/Absence-d-elements-declenchant-la.html',\n'5.30' => 'http://rgaa.net/Absence-d-element-bgsound.html',\n'5.31' => 'http://rgaa.net/Presence-de-version-en-langue-des.html',\n'5.32' => 'http://rgaa.net/Pertinence-de-la-version-en-langue.html',\n'5.33' => 'http://rgaa.net/Niveau-sonore-de-la-piste-de.html',\n'5.34' => 'http://rgaa.net/Presence-d-un-mecanisme-pour.html',\n'6.1' => 'http://rgaa.net/Acces-aux-liens-textuels-doublant.html',\n'6.2' => 'http://rgaa.net/Presence-d-un-avertissement.html',\n'6.3' => 'http://rgaa.net/Presence-d-un-avertissement,82.html',\n'6.4' => 'http://rgaa.net/Presence-d-un-avertissement,83.html',\n'6.5' => 'http://rgaa.net/Absence-d-ouverture-de-nouvelles.html',\n'6.6' => 'http://rgaa.net/Absence-de-piege-lors-de-la.html',\n'6.7' => 'http://rgaa.net/Absence-d-element-meta-provoquant.html',\n'6.8' => 'http://rgaa.net/Absence-de-code-javascript.html',\n'6.9' => 'http://rgaa.net/Absence-d-elements-provoquant-un.html',\n'6.10' => 'http://rgaa.net/Absence-d-element-meta-provoquant,89.html',\n'6.11' => 'http://rgaa.net/Absence-de-code-javascript,90.html',\n'6.12' => 'http://rgaa.net/Absence-d-elements-provoquant-une.html',\n'6.13' => 'http://rgaa.net/Possibilite-d-identifier-la.html',\n'6.14' => 'http://rgaa.net/Possibilite-d-identifier-la,93.html',\n'6.15' => 'http://rgaa.net/Coherence-de-la-destination-ou-de.html',\n'6.16' => 'http://rgaa.net/Absence-de-liens-sans-intitule.html',\n'6.17' => 'http://rgaa.net/Presence-d-une-page-contenant-le.html',\n'6.18' => 'http://rgaa.net/Coherence-du-plan-du-site.html',\n'6.19' => 'http://rgaa.net/Presence-d-un-acces-a-la-page.html',\n'6.20' => 'http://rgaa.net/Presence-d-un-fil-d-ariane.html',\n'6.21' => 'http://rgaa.net/Presence-de-menus-ou-de-barres-de.html',\n'6.22' => 'http://rgaa.net/Coherence-de-la-position-des-menus.html',\n'6.23' => 'http://rgaa.net/Coherence-de-la-presentation-des.html',\n'6.24' => 'http://rgaa.net/Navigation-au-clavier-dans-un.html',\n'6.25' => 'http://rgaa.net/Presence-d-un-avertissement,104.html',\n'6.26' => 'http://rgaa.net/Presence-des-informations-de.html',\n'6.27' => 'http://rgaa.net/Presence-des-informations-de-poids.html',\n'6.28' => 'http://rgaa.net/Presence-des-informations-de,107.html',\n'6.29' => 'http://rgaa.net/Presence-de-regroupement-pour-les.html',\n'6.30' => 'http://rgaa.net/Presence-d-un-balisage-permettant.html',\n'6.31' => 'http://rgaa.net/Presence-de-liens-d-evitement-ou-d.html',\n'6.32' => 'http://rgaa.net/Coherence-des-liens-d-evitement-ou.html',\n'6.33' => 'http://rgaa.net/Ordre-des-liens-d-evitement-ou-d.html',\n'6.34' => 'http://rgaa.net/Presence-d-un-moteur-de-recherche.html',\n'6.35' => 'http://rgaa.net/Possibilite-de-naviguer-facilement.html',\n'6.36' => 'http://rgaa.net/Presence-d-une-indication-de-la.html',\n'7.1' => 'http://rgaa.net/Absence-de-generation-de-contenus.html',\n'7.2' => 'http://rgaa.net/Absence-d-alteration-de-la.html',\n'7.3' => 'http://rgaa.net/Lisibilite-des-informations.html',\n'7.4' => 'http://rgaa.net/Absence-d-espaces-utilises-pour.html',\n'7.5' => 'http://rgaa.net/Absence-de-definition-d-une.html',\n'7.6' => 'http://rgaa.net/Possibilite-de-remplacer-les.html',\n'7.7' => 'http://rgaa.net/Possibilite-de-remplacer-les,122.html',\n'7.8' => 'http://rgaa.net/Absence-d-attributs-ou-d-elements.html',\n'7.9' => 'http://rgaa.net/Absence-d-elements-HTML-utilises-a.html',\n'7.10' => 'http://rgaa.net/Maintien-de-la-distinction.html',\n'7.11' => 'http://rgaa.net/Absence-de-suppression-de-l-effet.html',\n'7.12' => 'http://rgaa.net/Absence-de-justification-du-texte.html',\n'7.13' => 'http://rgaa.net/Lisibilite-du-document-en-cas-d.html',\n'7.14' => 'http://rgaa.net/Absence-d-unites-absolues-ou-de.html',\n'7.15' => 'http://rgaa.net/Absence-d-apparition-de-barre-de.html',\n'7.16' => 'http://rgaa.net/Largeur-des-blocs-de-textes.html',\n'7.17' => 'http://rgaa.net/Valeur-de-l-espace-entre-les.html',\n'7.18' => 'http://rgaa.net/Restitution-correcte-dans-les.html',\n'8.1' => 'http://rgaa.net/Mise-a-jour-des-alternatives-aux.html',\n'8.2' => 'http://rgaa.net/Universalite-du-gestionnaire-d.html',\n'8.3' => 'http://rgaa.net/Universalite-des-gestionnaires-d.html',\n'8.4' => 'http://rgaa.net/Possibilite-de-desactiver-toute.html',\n'8.5' => 'http://rgaa.net/Absence-de-changements-de-contexte.html',\n'8.6' => 'http://rgaa.net/Ordre-d-acces-au-clavier-aux.html',\n'8.7' => 'http://rgaa.net/Utilisation-correcte-du-role-des.html',\n'8.8' => 'http://rgaa.net/Presence-d-une-alternative-au-code.html',\n'8.9' => 'http://rgaa.net/Absence-de-suppression-du-focus.html',\n'8.10' => 'http://rgaa.net/Absence-de-limite-de-temps-pour.html',\n'8.11' => 'http://rgaa.net/Absence-de-perte-d-informations.html',\n'8.12' => 'http://rgaa.net/Presence-d-une-alternative-au-code,145.html',\n'8.13' => 'http://rgaa.net/Accessibilite-des-contenus.html',\n'9.1' => 'http://rgaa.net/Presence-de-la-declaration-d.html',\n'9.2' => 'http://rgaa.net/Conformite-de-la-position-de-la.html',\n'9.3' => 'http://rgaa.net/Conformite-syntaxique-de-la.html',\n'9.4' => 'http://rgaa.net/Validite-du-code-HTML-XHTML-au.html',\n'9.5' => 'http://rgaa.net/Absence-de-composants-obsoletes.html',\n'9.6' => 'http://rgaa.net/Presence-d-un-titre-dans-la-page.html',\n'9.7' => 'http://rgaa.net/Pertinence-du-titre-de-la-page.html',\n'9.8' => 'http://rgaa.net/Presence-d-une-langue-de.html',\n'10.1' => 'http://rgaa.net/Presence-d-au-moins-un-titre-de.html',\n'10.2' => 'http://rgaa.net/Pertinence-du-contenu-des-titres.html',\n'10.3' => 'http://rgaa.net/Absence-d-interruption-dans-la.html',\n'10.4' => 'http://rgaa.net/Presence-d-une-hierarchie-de.html',\n'10.5' => 'http://rgaa.net/Absence-de-simulation-visuelle-de.html',\n'10.6' => 'http://rgaa.net/Utilisation-systematique-de-listes.html',\n'10.7' => 'http://rgaa.net/Balisage-correct-des-listes-de.html',\n'10.8' => 'http://rgaa.net/Balisage-correct-des-citations.html',\n'10.9' => 'http://rgaa.net/Balisage-correct-des-abreviations.html',\n'10.10' => 'http://rgaa.net/Balisage-correct-des-acronymes.html',\n'10.11' => 'http://rgaa.net/Pertinence-de-la-version-non.html',\n'10.12' => 'http://rgaa.net/Pertinence-de-la-version-complete.html',\n'10.13' => 'http://rgaa.net/Accessibilite-des-documents.html',\n'11.1' => 'http://rgaa.net/Presence-des-balises-th-pour.html',\n'11.2' => 'http://rgaa.net/Presence-d-une-relation-entre-les.html',\n'11.3' => 'http://rgaa.net/Presence-d-une-relation-entre-les,170.html',\n'11.4' => 'http://rgaa.net/Absence-des-elements-propres-aux.html',\n'11.5' => 'http://rgaa.net/Absence-de-tableaux-de-donnees-ou.html',\n'11.6' => 'http://rgaa.net/Linearisation-correcte-des.html',\n'11.7' => 'http://rgaa.net/Presence-d-un-titre-pour-les.html',\n'11.8' => 'http://rgaa.net/Presence-d-un-resume-pour-les.html',\n'11.9' => 'http://rgaa.net/Pertinence-du-titre-du-tableau-de.html',\n'11.10' => 'http://rgaa.net/Pertinence-du-resume-du-tableau-de.html',\n'12.1' => 'http://rgaa.net/Presence-de-l-indication-des.html',\n'12.2' => 'http://rgaa.net/Presence-de-l-indication-des,179.html',\n'12.3' => 'http://rgaa.net/Equivalence-de-l-information-mise.html',\n'12.4' => 'http://rgaa.net/Presence-de-liens-ou-de.html',\n'12.5' => 'http://rgaa.net/Absence-de-syntaxes-cryptiques-par.html',\n'12.6' => 'http://rgaa.net/Presence-d-informations-sur-les.html',\n'12.7' => 'http://rgaa.net/Presence-d-un-moyen-de,184.html',\n'12.8' => 'http://rgaa.net/Presence-d-un-autre-moyen-que-la,185.html',\n'12.9' => 'http://rgaa.net/Presence-d-un-autre-moyen-que-la,186.html',\n'12.10' => 'http://rgaa.net/Utilisation-d-un-style-de.html'\n);\n\n\treturn $matches[1].'<a href=\"'.$rgaa[$matches[2]].'\">'.$matches[2].'</a>';\n}", "public function __construct()\n {\n $this->matchFinished = false;\n //$this->player1 = new Player('A');\n //$this->player2 = new Player('B');\n }", "public function all()\n {\n $sql = '\n SELECT \n t.name team1, \n t2.name team2, \n IF ( m.match_date_time > CURDATE(), \"-\", CONCAT_WS( \"-\", m.team1_goalcount, m.team2_goalcount) ) score, \n DATE_FORMAT(m.match_date_time, \"%d.%m.%Y %H:%i %W\") date\n FROM matches m\n LEFT JOIN teams t ON m.team1_id = t.id\n LEFT JOIN teams t2 ON m.team2_id = t2.id\n ORDER BY m.match_date_time ASC';\n \n return view( 'all', ['matches' => \\DB::select( $sql ) ] );\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 }", "function translate_smiley($matches)\n {\n }", "public function create_raw_matches() {\r\n if (!$this->valid_team_array())\r\n return false;\r\n\r\n $this->matches = array();\r\n $row=array();\r\n $row[]=\"Equipe 1\";\r\n $row[]=\"Equipe 2\";\r\n\t\t$tableau=array();\r\n\t\t$tableau[]=$row;\r\n\t\t\r\n for ($i = 0; $i < count($this->teams); $i++)\r\n for ($i2 = $i + 1; $i2 < count($this->teams); $i2++)\r\n {$row=array();\r\n \t$this->matches[] = array($this->teams[$i], $this->teams[$i2]);\r\n \t$row[]=$this->teams[$i];\r\n \t$row[]=$this->teams[$i2];\r\n \t\r\n }\r\n\r\n $this->finished = true;\r\n $this->raw_matches_created = true;\r\n $this->matchdays_created = false;\r\n $this->clear_pointer();\r\n\r\n return $this->matches;\r\n }", "public function show(Matchup $matchup)\n {\n //\n }", "public function match() {\n if ( isset( $_POST['submit'] ) && !empty( $_POST['submit'] ) ) {\n Found::match( $_POST['lost'], $_POST['found'] );\n } else {\n // in case some how POST method get problem, malicious user attack\n header( \"Location: /voodoo/\" );\n exit;\n }\n header( \"Location: /voodoo/found/{$_POST['found']}\" );\n exit;\n }", "function GetNumberOfMatchesMS()\n {\n return sizeof($this->more_skin_matches);\n }", "function get_potential_matches($person_id) {\n global $person_id, $mysqli, $person_array_data, $states;\n\n // Get personal data\n $get_person_data = \"SELECT * FROM gegevens WHERE id=\".$person_id;\n $person_array_data = $mysqli->query($get_person_data)->fetch_array(MYSQLI_ASSOC);\n\n // As double check drop the created views\n $mysqli->query(\"DROP VIEW `get_answers`, `get_desired`, `get_importance`, `order_questions`;\");\n\n // Create some views\n $mysqli->query(\"CREATE VIEW get_answers AS SELECT answers.person_id, GROUP_CONCAT(answers.ans) AS answers FROM answers GROUP BY answers.person_id\") or die($mysqli->error);\n $mysqli->query(\"CREATE VIEW get_importance AS SELECT importance.person_id, GROUP_CONCAT(importance.imp) AS importance FROM importance GROUP BY importance.person_id\") or die($mysqli->error);\n $mysqli->query(\"CREATE VIEW order_questions AS SELECT desired.person_id, GROUP_CONCAT(desired.ans ORDER BY desired.ans SEPARATOR '-') AS des FROM desired GROUP BY desired.person_id, desired.quest\") or die($mysqli->error);\n $mysqli->query(\"CREATE VIEW get_desired AS SELECT person_id, GROUP_CONCAT(order_questions.des) AS desired FROM order_questions GROUP BY order_questions.person_id\") or die($mysqli->error);\n\n //Get the query for the potential matches and execute query\n $get_potential_matches_query = ($person_array_data['sexse'] == 0) ? generate_query(($person_array_data['gender'] == 0) ? 1 : 0) : (($person_array_data['sexse'] == 1) ? generate_query(($person_array_data['gender'] == 0) ? 0 : 1) : generate_query(\"%\"));\n $get_potential_matches_execute = $mysqli->query($get_potential_matches_query) or die($mysqli->error);\n \n //Make an array with all the potential matches\n $get_potential_matches_array = array();\n while($get_potential_matches_row = $get_potential_matches_execute->fetch_array(MYSQLI_ASSOC) ) {\n\n if(in_array($person_array_data['state'], ($states[$get_potential_matches_row['state']]))) {\n $get_potential_matches_array[] = $get_potential_matches_row;\n }\n }\n\n // Drop the created views\n $mysqli->query(\"DROP VIEW `get_answers`, `get_desired`, `get_importance`, `order_questions`;\");\n\n //Return array\n return $get_potential_matches_array;\n }", "private function findMatch(&$matches, $home, $guest)\n {\n $ret = [];\n for ($i = 0, $cnt = count($matches); $i < $cnt; ++$i) {\n if ($matches[$i]->getProperty('home') == $home && $matches[$i]->getProperty('guest') == $guest) {\n $ret[] = $matches[$i];\n }\n }\n // Die Paarung gibt es nicht.\n return count($ret) ? $ret : $this->noMatchStr;\n }", "private function saveMatchListMatches(&$api, $matches) {\n $matches = json_decode($matches['matches'], true);\n forEach($matches as $match_entry) {\n try {\n $matchFromDatabase = Match::where('gameId', (string)$match_entry['gameId'])->firstOrFail();\n } catch (ModelNotFoundException $e) {\n $apiMatch = $api->getMatch($match_entry['gameId'], false);\n\n $newMatch = new Match;\n $newMatch->seasonId = (isset($apiMatch['seasonId']) ? $apiMatch['seasonId'] : '');\n $newMatch->queueId = (isset($apiMatch['queueId']) ? $apiMatch['queueId'] : '');\n $newMatch->gameId = (string)$match_entry['gameId'];\n // make the participant identities\n forEach($apiMatch['participantIdentities'] as $pId) {\n if ($pId['player']['accountId'] != 0) {\n try {\n $findParticipantIdentity = MatchParticipantIdentities::where('matchId', (string)$match_entry['gameId'])->where('accountId', $pId['player']['currentAccountId'])->firstOrFail();\n } catch (ModelNotFoundException $pie) {\n $newPId = new MatchParticipantIdentities;\n $newPId->matchId = (string)$match_entry['gameId'];\n $newPId->currentPlatformId = (isset($pId['player']['currentPlatformId']) ? $pId['player']['currentPlatformId'] : '');\n $newPId->summonerName = $pId['player']['summonerName'];\n $newPId->matchHistoryUri = (isset($pId['player']['matchHistoryUri']) ? $pId['player']['matchHistoryUri'] : '');\n $newPId->platformId = (isset($pId['player']['platformId']) ? $pId['player']['platformId'] : '');\n $newPId->currentAccountId = $pId['player']['currentAccountId'];\n $newPId->profileIcon = (isset($pId['player']['profileIcon']));\n $newPId->summonerId = $pId['player']['summonerId'];\n $newPId->accountId = $pId['player']['accountId'];\n $newPId->participantId = (isset($pId['participantId']) ? $pId['participantId'] : '');\n $newPId->save();\n }\n }\n }\n\n $newMatch->gameVersion = (isset($apiMatch['gameVersion']) ? $apiMatch['gameVersion'] : '');\n $newMatch->platformId = (isset($apiMatch['platformId']) ? $apiMatch['platformId'] : '');\n $newMatch->gameMode = $apiMatch['gameMode'];\n $newMatch->mapId = $apiMatch['mapId'];\n $newMatch->gameType = $apiMatch['gameType'];\n // make the teams\n forEach($apiMatch['teams'] as $team) {\n $newTeam = new MatchTeam;\n $newTeam->matchId = (string)$match_entry['gameId'];\n $newTeam->firstDragon = (isset($team['firstDragon']) ? $team['firstDragon'] : '');\n $newTeam->bans = (isset($team['bans']) ? json_encode($team['bans']) : '');\n $newTeam->win = (isset($team['win']) ? $team['win'] : '');\n $newTeam->firstRiftHerald = (isset($team['firstRiftHerald']) ? $team['firstRiftHerald'] : '');\n $newTeam->firstBaron = (isset($team['firstBaron']) ? $team['firstBaron'] : '');\n $newTeam->firstInhibitor = (isset($team['firstInhibitor']) ? $team['firstInhibitor'] : '');\n $newTeam->baronKills = (isset($team['baronKills']) ? $team['baronKills'] : '');\n $newTeam->riftHeraldKills = (isset($team['riftHeraldKills']) ? $team['riftHeraldKills'] : '');\n $newTeam->firstBlood = $team['firstBlood'];\n $newTeam->teamId = $team['teamId'];\n $newTeam->firstTower = (isset($team['firstTower']) ? $team['firstTower'] : '');\n $newTeam->vilemawKills = (isset($team['vilemawKills']) ? $team['vilemawKills'] : '');\n $newTeam->inhibitorKills = (isset($team['inhibitorKills']) ? $team['inhibitorKills'] : '');\n $newTeam->towerKills = (isset($team['towerKills']) ? $team['towerKills'] : '');\n $newTeam->dominionVictoryScore = (isset($team['dominionVictoryScore']) ? $team['dominionVictoryScore'] : '');\n $newTeam->dragonKills = (isset($team['dragonKills']) ? $team['dragonKills'] : '');\n $newTeam->save();\n }\n // make the participants\n forEach($apiMatch['participants'] as $participant) {\n $newParticipant = new MatchParticipant;\n $newParticipant->matchId = (string)$match_entry['gameId'];\n $newParticipant->stats = json_encode($participant['stats']);\n $newParticipant->runes = (isset($participant['runes']) ? json_encode($participant['runes']) : '');\n $newParticipant->masteries = (isset($participant['masteries']) ? json_encode($participant['masteries']) : '');\n $newParticipant->timeline = (isset($participant['timeline']) ? json_encode($participant['timeline']) : '');\n $newParticipant->spell1Id = (isset($participant['spell1Id']) ? $participant['spell1Id'] : '');\n $newParticipant->spell2Id = (isset($participant['spell2Id']) ? $participant['spell2Id'] : '');\n $newParticipant->participantId = $participant['participantId'];\n $newParticipant->highestAchievedSeasonTier = (isset($participant['highestAchievedSeasonTier']) ? $participant['highestAchievedSeasonTier'] : '');\n $newParticipant->teamId = $participant['teamId'];\n $newParticipant->championId = $participant['championId'];\n $newParticipant->save();\n }\n $newMatch->gameDuration = $apiMatch['gameDuration'];\n $newMatch->gameCreation = (string)$apiMatch['gameCreation'];\n $newMatch->save();\n }\n }\n }", "public function videPanier()\n {\n $this->CollProduit->vider();\n }", "public function onCheatDetect($cheatType){\n //add point TODO\n //Check player status about points TODO\n }", "function draw_y ($image, $black, $grey, $light_grey, $tab) // affiche les infos de l'axe des ordonnees\n\t{\n\t\tImageTTFText ($image, 10, 0, 3, 20, $grey, $this->path, $this->yname);\n\n\t\t//l'origine\n\t\tImageTTFText ($image, 10, 0, 0, $this->y(0) + 3, $black, $this->path, 0);\n\n\t\t$nb_draw = floor($this->ref_height / 30);\n\t\t$i = $this->max_y / $nb_draw;\n\t\t$stop = $nb_draw * $i;\n\n\t\t// affiche les reperes en fonction de la hauteur de l'axe\n\t\t$compt = 0;\n\t\twhile($i <= $stop)\n\t\t{\n\t\t\t$compt++;\nimageline($image, $this->x(0) - 5, $this->y($i), $this->x(0), $this->y($i), $black);\nimageline($image, $this->x(0) + 1, $this->y($i), $this->pic_width - 30, $this->y($i), $light_grey);\nImageTTFText ($image, 10, 0, 0, $this->y($i) + 3, $black, $this->path, $i);\n\t\t\t$i += $this->max_y / $nb_draw;\n\t\t\t\n\t\t}\n\t\tif ($compt == 1)\n\t\t{\n\t\t\t$i -= $this->max_y / $nb_draw;\nimageline($image, $this->x(0) - 5, $this->y($i/2), $this->x(0), $this->y($i/2), $black);\nimageline($image, $this->x(0) + 1, $this->y($i/2), $this->pic_width - 30, $this->y($i/2), $light_grey);\nImageTTFText ($image, 10, 0, 0, $this->y($i/2) + 3, $black, $this->path, $i/2);\n\t\t}\n\t}", "public function testMatchRetrieval()\n {\n // Given a match has been created in the database\n $insertedmatch = factory(Match::class)->create($this->data());\n \n // When I fetch the matches\n $retrievedmatch = Match::get();\n $this->assertTrue(true);\n }", "public function run()\n {\n $slugs = DB::table('teams')->select('slug')->get();\n $startDate = now()->subMonths(10);\n\n foreach ($slugs as $homeTeamSlug) {\n foreach ($slugs as $awayTeamSlug) {\n $startDate->addDays(3);\n if ($homeTeamSlug->slug !== $awayTeamSlug->slug) {\n $matchSlug = $homeTeamSlug->slug . '-' . $awayTeamSlug->slug;\n Match::create([\n 'played_at' => $startDate,\n 'slug' => $matchSlug\n ]);\n }\n }\n }\n }", "public function winloss()\n {\n $sql = '\n SELECT \n t.name,\n ( \n ( SELECT COUNT(*)\n FROM matches m\n WHERE m.match_date_time < CURDATE()\n AND m.team1_id=t.id\n AND m.team1_goalcount > m.team2_goalcount ) +\n ( SELECT COUNT(*)\n FROM matches m\n WHERE m.match_date_time < CURDATE()\n AND m.team2_id=t.id\n AND m.team1_goalcount < m.team2_goalcount ) \n ) wins,\n ( \n ( SELECT COUNT(*)\n FROM matches m\n WHERE m.match_date_time < CURDATE()\n AND m.team1_id=t.id\n AND m.team1_goalcount < m.team2_goalcount ) +\n ( SELECT COUNT(*)\n FROM matches m\n WHERE m.match_date_time < CURDATE()\n AND m.team2_id=t.id\n AND m.team1_goalcount > m.team2_goalcount )\n ) losses\n FROM teams t';\n\n return view( 'winloss', ['matches' => \\DB::select( $sql ) ] );\n }", "function next_games($championship,$num){\n\t\t$query=$this->db->query('Select m.*, t1.name as t1name,t2.name as t2name, UNIX_TIMESTAMP(m.date_match) as dm \n\t\t\t\t\t\t \t\t From matches as m, matches_teams as mt, teams as t1, teams as t2, groups as g, rounds as r, championships as c \n\t\t\t\t\t\t \t\t Where c.id='.$championship.' AND c.id=r.championship_id AND r.id=g.round_id AND g.id=m.group_id AND m.id=mt.match_id AND mt.team_id_home=t1.id AND mt.team_id_away=t2.id AND m.state=0 AND m.date_match > \"'.mdate(\"%Y-%m-%d 00:00:00\").'\"\n\t\t\t\t\t\t \t\t Order by date_match ASC\n\t\t\t\t\t\t \t\t Limit 0,'.$num);\n\t\t\n\t\t$partido=array();\n\t\t$i=0;\n\t\tforeach($query->result() as $row):\n\t\t\t$partido[$i]['id']=$row->id;\n\t\t\t$partido[$i]['fecha']=mdate(\"%Y/%m/%d\",$row->dm);\n\t\t\t$partido[$i]['hora']=mdate(\"%h:%i\",$row->dm);\n\t\t\t$partido[$i]['hequipo']=$row->t1name;\n\t\t\t$partido[$i]['aequipo']=$row->t2name;\n\t\t\t$i+=1;\n\t\tendforeach;\n\t\t\n\t\treturn $partido;\n\t}", "public function getMatchsDay(){\n return view('matchs.matchs',\n ['matchs' => Match::where('date',$date)->with('teams')->with('users')->orderBy('date', 'desc')->get(),\n 'referees' => User::all()]);\n }" ]
[ "0.6381805", "0.62410885", "0.62015074", "0.61641365", "0.61583906", "0.60638374", "0.59246963", "0.58398557", "0.56489766", "0.5626429", "0.5597815", "0.55602515", "0.55069107", "0.5481473", "0.54458046", "0.54458046", "0.54273987", "0.541721", "0.53878736", "0.5385514", "0.53804886", "0.5374727", "0.53731984", "0.53579515", "0.53568715", "0.53464437", "0.53315145", "0.53215027", "0.5299376", "0.5290919", "0.52906644", "0.52901894", "0.5285637", "0.5274793", "0.52745646", "0.52518547", "0.5190232", "0.5152586", "0.5150236", "0.5144378", "0.51286155", "0.5123438", "0.51008207", "0.50893784", "0.5070839", "0.5054577", "0.5049528", "0.5048618", "0.50417906", "0.50207675", "0.5016116", "0.49958992", "0.4991755", "0.49897534", "0.49891207", "0.49771893", "0.49758744", "0.49746156", "0.4971943", "0.49716222", "0.49603796", "0.49593607", "0.4952554", "0.4932525", "0.49254602", "0.49246824", "0.4923058", "0.49229392", "0.4920015", "0.4909881", "0.49082792", "0.4907889", "0.4906756", "0.49012595", "0.48998395", "0.48982015", "0.48979068", "0.48967215", "0.48961505", "0.48887616", "0.488801", "0.4882148", "0.48783243", "0.48572215", "0.48527256", "0.48524496", "0.48398578", "0.48372987", "0.4834774", "0.48318636", "0.48269624", "0.4824101", "0.48220772", "0.48220167", "0.48185143", "0.48158813", "0.4815566", "0.48136002", "0.48101613", "0.48077455" ]
0.5071929
44
Display a listing of the resource.
public function index() { $bibliografias = Bibliografia::paginate(5); return view('bibliografia.listabibliografia',compact('bibliografias')); }
{ "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() { $cursos = Curso::all(); $disciplinas = Disciplina::all(); return view('bibliografia.create_bibliografia',compact('cursos','disciplinas')); }
{ "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) { $this->validate($request,[ 'ano' =>'required|integer', 'titulo' =>'required', 'autor' =>'required', 'isbn' =>'required', 'editora' =>'required', ],[ 'ano.required' =>'O campo ANO é obrigatório.', 'ano.integer' =>'Digite apenas números no campo ANO.', 'titulo.required' =>'O campo TITULO é obrigatório.', 'autor.required' =>'O campo AUTOR é obrigatório.', 'isbn.required' =>'O campo ISBN é obrigatório.', 'editora.required' =>'O campo EDITORA é obrigatório.', ]); // dd($request->all()); $dados = $request->all(); Bibliografia::create($dados); echo "<script language=JavaScript>"; echo "alert('Operação realizada com sucesso!');"; echo "window.location='/listabibliografia';"; echo "</script>"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { $cursos = Curso::all(); $disciplinas = Disciplina::all(); $bibliografia = Bibliografia::findOrFail($id); return view('bibliografia.edit_bibliografia',compact('bibliografia','cursos','disciplinas')); }
{ "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) { $bibliografia = $request->all(); $id = Bibliografia::findOrFail($id); $id->update($bibliografia); echo "<script language=JavaScript>"; echo "alert('Operação realizada com sucesso!');"; echo "window.location='/listabibliografia';"; echo "</script>"; }
{ "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) { $deleta_bibliografia = Bibliografia::findOrFail($id); $deleta_bibliografia -> delete($id); echo "<script language=JavaScript>"; echo "alert('Operação realizada com sucesso!');"; echo "window.location='/listabibliografia';"; echo "</script>"; }
{ "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
Creates a HTML representation of the cart
public function getCartHTML() { $productLines = $this->cart->getProductLines(); $sum = $this->cart->getSumSEK(); $html = "<ul>"; foreach ($productLines as $productLine) { $product = $productLine->getProduct(); $name = $product->getName(); $costSEK = $product->getCostSEK(); $amount = $productLine->getAmount(); $totalSEK = $productLine->getTotalSEK(); $linkHTML = $this->productListView->getBuyProductLink($product, "+"); $removeLink = $this->productListView->getRemoveProductLink($product, "-"); $buttons = "[$linkHTML][$removeLink]"; $html .= "<li>$name $amount x $costSEK = $totalSEK SEK $buttons</li>"; } $html .= "</ul>"; if (isset($_SESSION[self::$messageHolder])) { if ($_SESSION[self::$messageHolder] == self::$addProductSucceded) { $html .= "Grattis till ditt köp, kommer göra dig gott!</br>"; } else { $html .= "Du tog bort en produkt! </br>"; } unset($_SESSION[self::$messageHolder]); } if ($this->cart->containsItems()) { $checkout = $this->navigationView->getCheckoutLink(); } else { $checkout = "Inga produkter i varukorgen"; } return "<h2>Cart</h2> $html Summa : $sum kr $checkout"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 renderCart() {\n return trim(self::getInstance()->renderCart());\n }", "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 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 }", "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 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 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 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 cart(): void\n {\n $userData = $this->getSession()->getCurrentUserData();\n\n if ($userData->getCart() && $userData->getCart()->hasProducts())\n {\n echo $this->render('cart/shoppingCart', $userData->getRenderCartParams());\n }\n }", "public function cartView()\n {\n $cartItems = Cart::content();// получаем весь массив айдишников товаров текущего экземпляра корзины\n\n return view('basket', ['items' => $cartItems]);\n }", "public function renderBigCart() {\n\n $L = Mage::getSingleton('core/layout');\n\n\n $totals = $L\n ->createBlock('checkout/cart_totals')\n ->setTemplate('checkout/cart/totals.phtml')\n ;\n $shipping = $L\n ->createBlock('checkout/cart_shipping')\n ->setTemplate('checkout/cart/shipping.phtml')\n ;\n\n $coupon = $L\n ->createBlock('checkout/cart_coupon')\n ->setTemplate('checkout/cart/coupon.phtml')\n ;\n\n // top methods\n\n $t_onepage = $L\n ->createBlock('checkout/onepage_link')\n ->setTemplate('checkout/onepage/link.phtml')\n ;\n $t_methods = $L\n ->createBlock('core/text_list')\n ->append($t_onepage, 'top_methods');\n\n\n //methods\n $onepage = $L\n ->createBlock('checkout/onepage_link')\n ->setTemplate('checkout/onepage/link.phtml')\n ;\n\n $multishipping = $L\n ->createBlock('checkout/multishipping_link')\n ->setTemplate('checkout/multishipping/link.phtml')\n ;\n\n\n\n\n $methods = \t$L\n ->createBlock('core/text_list')\n ->append($onepage, \"onepage\")\n ->append($multishipping, \"multishipping\");\n\n\n // Cross-sales etc\n\n $crossel = $L\n ->createBlock('checkout/cart_crosssell')\n ->setTemplate('checkout/cart/crosssell.phtml')\n ;\n\n\n Mage::getSingleton('checkout/session')->setCartWasUpdated(true);\n\n $cart1 = $L\n ->createBlock('checkout/cart')\n ->setEmptyTemplate('checkout/cart/noItems.phtml')\n ->setCartTemplate('checkout/cart.phtml')\n ->addItemRender('simple', 'checkout/cart_item_renderer', 'checkout/cart/item/default.phtml')\n ->addItemRender('configurable', 'checkout/cart_item_renderer_configurable', 'checkout/cart/item/default.phtml')\n ->addItemRender('grouped', 'checkout/cart_item_renderer_grouped', 'checkout/cart/item/default.phtml')\n ->addItemRender('downloadable', 'downloadable/checkout_cart_item_renderer', 'downloadable/checkout/cart/item/default.phtml')\n ->addItemRender('bundle', 'bundle/checkout_cart_item_renderer', 'checkout/cart/item/default.phtml')\n ->addItemRender('subscription_simple', 'sarp/checkout_cart_item_renderer_simple', 'checkout/cart/item/default.phtml')\n ->addItemRender('bookable', 'booking/checkout_cart_item_renderer', 'checkout/cart/item/default.phtml')\n ->setTemplate('checkout/cart.phtml')\n ->setChild('top_methods',$t_methods)\n ->setChild('totals', $totals)\n ->setChild('shipping', $shipping)\n ->setChild('coupon', $coupon)\n ->setChild('methods', $methods)\n ->setChild('crosssell', $crossel)\n ;\n $cart1\n ->chooseTemplate();\n \n $readyCart = trim($cart1->renderView());\n\n /* Checkout Promo compatibility */\n $checkoutPromoName = 'AW_Checkoutpromo';\n if ($this->extensionEnabled($checkoutPromoName))\n {\n $CPcart = '';\n if (version_compare($this->getExtensionVersion($checkoutPromoName), '1.2.0') >= 0)\n {\n $appliedBlockIds = Mage::app()->getLayout()->createBlock('checkoutpromo/checkoutpromo')->getAppliedBlockIds();\n }\n else\n {\n $appliedBlockIds = Mage::helper('checkoutpromo')->getAppliedBlockIds();\n }\n if (is_array($appliedBlockIds) && array_key_exists('shoppingcartpromo', $appliedBlockIds))\n {\n foreach ($appliedBlockIds['shoppingcartpromo'] as $appliedBlockId)\n {\n $CPcart .= $L->createBlock('cms/block')\n ->setBlockId($appliedBlockId)\n ->toHtml();\n }\n }\n $readyCart = $CPcart.$readyCart;\n }\n\n return $readyCart;\n }", "public function getCartContentAsHtml($hidetotal=0){\r\n $content='<ul id=\"cartcontent\">'; $total=0; $count = 0;\r\n $cpt=1;\r\n if(!empty($this->items)){foreach($this->items as $item){\r\n $amount = $item['quantity']*$item['price'];\r\n $content.='<li class=\"cartitem\">'.$item['quantity'].' x \"'.$item['name'].'\" at '.$this->cursymbol.''.$item['price'];\r\n if($item['shipping']>0)$content.= ' + '.$this->cursymbol.''.$item['shipping'].' shipping ';\r\n $content.=' for '.$this->cursymbol.''.$amount;\r\n $content.='</li>';\r\n $total+=$amount;\r\n $count+=$item['quantity'];\r\n $cpt++;\r\n }}\t\r\n if($hidetotal!=1){ $content.='<li class=\"carttotal\">Total: '.$count.' Items for '.$this->cursymbol.''.$total.'</li>'; }\r\n $content.='</ul>';\r\n return $content;\r\n }", "public function cart()\n {\n\n $cartCollection = \\Cart::getContent();\n\n return view('cart',compact('cartCollection'));\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 cart()\n {\n return view('carts.cart');\n }", "function printCart(){\n\t\tprint_r($this->articulos);\n\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}", "public function show(){\n $data=$this->cart->contents();\n echo \"<pre>\";\n print_r($data);\n echo \"</pre>\";\n\t}", "public function cartAction()\r\n\t{\r\n\t\t$this->_view->_title = 'Giỏ hàng';\r\n\t\t$this->_view->motoInCart = $this->_model->listItem($this->_arrParam, ['task' => 'motos_in_cart']);\r\n\t\t$this->_view->render($this->_arrParam['controller'] . '/cart');\r\n\t}", "public function tempCart()\n\t{\n\t\t$cart_id = $_SESSION['wpcart_cart_id'];\n\n\t\t//$checkout_page = 'wpcart';\n\n\t\tswitch ($checkout_page) {\n\t\t\tcase 'wpcart':\n\t\t\t\t\n\t\t\t\t\t$action = site_url() . '?checkout';\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'paypal':\n\n\t\t\t\t\t$action = 'https://www.sandbox.paypal.com/cgi-bin/webscr';\n\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t\t$action = '';//site_url() . '?checkout''';\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$template = '<script type=\"text/template\" id=\"wpcart-ajax-template\" >\n\n\t\t<!-- PayPal details -->\n\t\t<input type=\"hidden\" value=\"<%= product.name %>\" name=\"item_name_1\" />\n\t\t<input type=\"hidden\" value=\"<%= product.price %>\" name=\"amount_16\" />\n\t <input type=\"hidden\" name=\"quantity_1\" value=\"<%= quantity %>\">\n\n\t\t<!-- End of PayPal details -->\n\n\t\t<strong><%= product.name %></strong> \n\t\t(<span style=\"width: 45px;\" class=\"wpcart-item-quantity\" ><%= quantity %></span> item<%= (quantity > 1) ? \"s\" : \"\" %> ) \n\t\t<span style=\"color: #cc0000;\" ><span>$</span><span class=\"item-subtotal\" ><%= product.price * quantity %></span> \n\t\t<span class=\"wpcart-remove-item\" >[&times;] </span>\n\n\t\t</script>';\n\n\t\t$notify_url = admin_url() . 'admin-ajax.php?action=wpcart_ipn';\n\t\t$cart = $template;\n\n\t\t$cart .= '<div id=\"wpcart-cart\" class=\"wpcart-basket\" >\n\n\t\t<form method=\"post\" action=\"'. $action . '\" >\n\t <input type=\"hidden\" name=\"business\" value=\"[email protected]\"/>\n\t <input type=\"hidden\" name=\"notify_url\" value=\"' . $notify_url\n\t . '\"/>\n\t\t<input type=\"hidden\" name=\"cmd\" value=\"_cart\"/>\n\t\t<input type=\"hidden\" name=\"upload\" value=\"1\"/>\n\t <input type=\"hidden\" name=\"custom\"\tvalue=\"' . $cart_id . '\" />\n\n\t\t\t<ul id=\"wpcart-cart-basket\"></ul>\n\t\t\t\n\t\t\t<div style=\"padding: 10px;\" ><strong>Subtotal: </strong>$<span class=\"wpcart-subtotal\" ></span></div>\n\t\t\t<div id=\"wpcart-buttons\" >\n\t\t\t<input type=\"hidden\" name=\"wpcart_checkout\" value=\"true\" />\n\t\t\t<input type=\"submit\" value=\"Checkout\" />\n\t\t\t</div>\n\n\t\t</form>\n\t\t\n\t\t</div>';\n\n\t\treturn $cart;\n\t}", "public static function writeShoppingCart() {\n\tif (isset($_SESSION['cart']))\n\t{\n\t$cart = $_SESSION['cart'];\n\t}\n\t\n\tif (!isset($cart) || $cart=='') {\n\t\treturn '<p>You have no items in your shopping cart</p>';\n\t} \n\t\telse \n\t{\n\t\t// Parse the cart session variable\n\t\t$items = explode(',',$cart);\n\t\t$s = (count($items) > 1) ? 's':'';\n\t\treturn '<p>You have <a href=\"index.php?content_page=php-shopping/cart&action=display\">'.count($items).' item'.$s.' in your shopping cart</a></p>';\n\t\t}\n }", "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 viewCart(){\r\n $data =(isset($_SESSION['cart']))? $_SESSION['cart']:array('cart' => 'empty');\r\n render('cart',$data);\r\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 cart(){\n return view('pages.cart', compact('cart'));\n }", "public function show()\n {\n return view('fontend.pages.cart.carts');\n }", "function printCart () {\r\n //gets all products from the cart\r\n $products = fetchProductsFromCartAsArray();\r\n\r\n if (count($products) > 0) {\r\n\t\tfor ($i=0; $i < count($products) ; $i++) {\r\n\t\t\tprint(\"<div class='row p-3 ml-2 cartItem'>\r\n\t\t\t\t\t\t\t <!-- Afbeelding product -->\r\n\t\t\t\t\t\t\t <div class='col-2'>\r\n\t\t\t\t\t\t\t \t <img class='img-fluid rounded img-thumbnail' src='https://sc02.alicdn.com/kf/HTB1wYdzPFXXXXaXapXXq6xXFXXX2/USB-Flash-Drive-8-GB-Memory-Stick.jpg_350x350.jpg' />\r\n\t\t\t\t\t\t\t </div>\r\n\r\n\t\t\t\t\t\t\t <!-- Naam product -->\r\n\t\t\t\t\t\t\t <div class='col-4'>\r\n\t\t\t\t\t\t\t \t <span class='badge-pill badge-primary mr-2'>\" . $products[$i]['amount'] . \"</span><b><a clas='cart-title' href='product.php?id=\" . $products[$i]['StockItemID'] . \"'>\" . $products[$i]['StockItemName'] . \"</a></b>\r\n\t\t\t\t\t\t\t </div>\r\n\r\n\t\t\t\t\t\t\t <!-- Naam product -->\r\n\t\t\t\t\t\t\t <div class='col-3'>\r\n\t\t\t\t\t\t\t \t <p>€ \" . $products[$i]['RecommendedRetailPrice'] * $products[$i]['amount'] . \"</p>\r\n\t\t\t\t\t\t\t </div>\r\n\r\n\t\t\t\t\t\t\t <!-- Verwijder knoppen -->\r\n\t\t\t\t\t\t\t <div class='col-3'>\r\n\t\t\t\t\t\t\t\t <form class='' action='winkelwagen.php' method='post'>\r\n\t\t\t\t\t\t\t\t\t <input type='number' name='ID' value='\" . $products[$i]['StockItemID'] . \"' hidden>\r\n\t\t\t\t\t\t\t\t\t <input type='number' name='amount' value=\" . (string)$products[$i]['amount'] . \" hidden>\r\n\t\t\t\t\t\t\t\t\t <button type='submit' class='btn btn-danger' name='RemoveItem'><i class='fas fa-trash'></i> Remove all</button>\r\n\t\t\t\t\t\t\t\t\t</form>\r\n\t\t\t\t\t\t\t\t\t<form class='' action='winkelwagen.php' method='post'>\r\n\t\t\t\t\t\t\t\t\t\t<input type='number' name='ID' value='\" . $products[$i]['StockItemID'] . \"' hidden>\r\n\t\t\t\t\t\t\t\t\t\t<input type='number' name='amount' value=1 hidden>\r\n\t\t\t\t\t\t\t\t\t <button type='submit' class='btn btn-danger' name='RemoveItem'><i class='fas fa-trash'></i> Remove one</button>\r\n\t\t\t\t\t\t\t\t\t</form>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\");\r\n\t\t}\r\n\t} else {\r\n \tprint(\"<div class='alert alert-danger mx-auto my-5' role='alert'>\r\n \t\t\t\t <strong>Oh snap!</strong> Your cart is empty. <i class='far fa-frown'></i>\r\n\t\t\t\t\t </div>\");\r\n\t}\r\n}", "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 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 toString()\n {\n return \"Customer's Shopping Cart section on Order Create backend page is empty.\";\n }", "public function viewCart()\n {\n return view('shoppingCart.cart');\n }", "public function getCart();", "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 index()\n {\n $output = $this->generateOutputData();\n\n return view('invoice.cart')->with($output);\n }", "public function create()\n {\n return view('admin.cart.create');\n }", "public function create()\n\t{\n\t\treturn View::make('cart.create');\n\t}", "public function giohang(){\n\t\t$content = Cart::content();\n\t\t$total = Cart::total();\n\t\treturn view('frontend.cart',compact('content','total'));\n\t}", "public function render() {\n $htmlContent = \"\";//Main Content\n \n //id und class Bezeichnungen der HTML Elementen\n $idContent = \"content\";\n $classProduct = \"product-detail\";\n $classImage = \"img-preview-detail\";\n $classDescription = \"description\";\n $classDescriptionText = \"description-text-detail\";\n $label1 = \"label1\";\n\n //local config\n $maxDescriptionCharlenght = 20000;\n $imagePath = \"/src/theme/images/\";\n $lang_pageTitel = i(\"Productview\");\n $button1 = (\"Buy\");\n \n //Product array\n $products = array();\n\n //TSCM TODO get from DB instead from Session..\n $products = $_SESSION['products'];\n\n\n //Array erstellen\n //TODO Array aus DB holen und verifizieren\n foreach($products as $book){\n\n// exit;\n if($_GET['id'] != $book['ISBN Number']){\n continue;\n }\n\n $paragraph = Utilities::buildParagraph($book);\n\n //too long text?\n if(strlen ( $book['Description'] ) > $maxDescriptionCharlenght)\n {\n $book['Description'] = substr ( $book['Description'] , 0 , $maxDescriptionCharlenght );\n $book['Description'] = $book['Description'] . \"...\";\n }else{\n //not too long, display it all\n $modDescription = $book['Description'];\n }\n \n/*\n * schwf5: Element in Warenkorb legen \n */\n\n//Auslesen der BuchID\nif(isset($_GET[\"id\"])) \n$currentID = $_GET[\"id\"];\nelse \n\t$currentID = 0; \n \n//Prüfen ob Seite mit added action geladen wurde (d.h. dass Buch in Korb gelegt wurde)\nif((isset($_GET[\"action\"])) && $_GET[\"action\"]==\"added\") {\n\n\t$amount = $_POST[\"amountSelection\"];\n\t//Seite wurde neu geladen. Prüfen, ob bereits ein Warenkorb existiert\n\t\n\t//Korb existiert schon. Items also in den Warenkorb hinzufügen\n\tif(isset($_COOKIE[\"shoppingCart\"])) {\n\t\t$cartArray = json_decode($_COOKIE[\"shoppingCart\"]);\n\t\tarray_push($cartArray, array (\"ID\"=>$currentID, \"amount\"=>$amount));\n\t\tsetcookie(\"shoppingCart\", json_encode($cartArray));\n\t}\n\t\n\t\n\t//neuen Korb machen mit erstem Item\n\telse { \n\t$cartArray = array\t(\n\t\tarray (\"ID\"=>$currentID, \"amount\"=>$amount));\n\tsetcookie(\"shoppingCart\", json_encode($cartArray));\n\t}\n\t\n\t//\n\t\n\t\n} \n\n\nelse \n\t;\n\n$htmlContent .= \"\n <div class=\\\"$classProduct\\\">\n <div class=\\\"$classImage\\\"><img src=\\\"\".$imagePath.$book['Picture'].\"\\\" />\n </div>\n <div class=\\\"$classDescription\\\">\n\n $paragraph\n\n <div>\n <a href='index.php?view=payment&id={$_GET[\"id\"]}'>\n <input class='buy_button' type='button' value='\".$button1.\"'></input>\n </a>\n \n <br>Amount: \n <form action='index.php?view=productdetail&id=$currentID&action=added' method='post'>\n <select name='amountSelection'>\n\t\t\t\t\n \t\t\t\t\t <option value='1'>1</option>\n \t\t\t\t\t <option value='2'>2</option>\n \t\t\t\t\t <option value='3'>3</option>\n \t\t\t\t\t <option value='4'>4</option>\n \t\t\t\t\t <option value='5'>5</option>\n \t\t\t\t\t \n\t\t\t\t\t</select>\n\t\t\t\t\t<input type='submit' name='submit' value='Add to Cart' />\n\t\t\t\t\t</form>\n \t\t\n \t\t\n \t\t\n </div>\n \n </div>\n </div>\";\n \n\n }\n\n\nif(isset($_GET[\"action\"])){\n\t\n\t$buyState= \"Produkt wurde in den Warenkorb gelegt.<br>\";\n\t\t\n} else $buyState=\"\";\n\t\n$htmlContentBody = \"\n\t\t<div id=\\\"content\\\">\n <span style='color:red'>$buyState</span>\n \n <h1>$lang_pageTitel</h1>\n $htmlContent\n </div>\n \n\";\n\n\nreturn $htmlContentBody;\n\n\n}", "public function show()\n {\n return view('cart.show')->with([\n 'cart' => cart(),\n ]);\n }", "public function cartAction() {\n\t\t$result = $this->_updateShoppingCart();\n\n\t\tif ($result !== true) {\n\t\t\t$response = array('status' => 1, 'message' => $result);\n\t\t\t$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($response));\n\t\t\treturn;\n\t\t}\n\n\t\t$response = array('status' => 0);\n\n\t\t$quote = $this->_getCart()->getQuote();\n\t\t$checkoutHelper = Mage::helper('checkout');\n\n\t\t$items = array();\n\t\tforeach ($quote->getAllVisibleItems() as $item) {\n\t\t\t$items[] = array(\n\t\t\t\t'id' => $item->getId(),\n\t\t\t\t'qty' => $item->getQty(),\n\t\t\t\t'rowtotal' => $checkoutHelper->formatPrice($item->getRowTotal()),\n\t\t\t);\n\t\t}\n\n\t\t$response['items'] = $items;\n\n\t\t$totals = $quote->getTotals();\n\t\tif (isset($totals['subtotal'])) {\n\t\t\t$response['subtotal'] = $checkoutHelper->formatPrice($totals['subtotal']->getValue());\n\t\t}\n\t\tif (isset($totals['shipping'])) {\n\t\t\t$response['shipping'] = $checkoutHelper->formatPrice($totals['shipping']->getAddress()->getShippingAmount());\n\t\t}\n\t\tif (isset($totals['discount'])) {\n\t\t\t$response['discount'] = $checkoutHelper->formatPrice($totals['discount']->getValue());\n\t\t}\n\t\tif (isset($totals['grand_total'])) {\n\t\t\t$response['grand_total'] = $checkoutHelper->formatPrice($totals['grand_total']->getValue());\n\t\t}\n\n\t\t$response['version'] = strtotime($quote->getUpdatedAt());\n\n\t\t$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($response));\n\t}", "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 }", "public function showCart($cart) {\n $this->logInfo('carro: ' . str_replace('\"', \"'\", json_encode($cart)));\n }", "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}", "function list_cart_items()\n{\n\tforeach (WC()->cart->get_cart() as $cart_item) {\n\t\t$item_name = $cart_item['data']->get_title();\n\t\t$quantity = $cart_item['quantity'];\n\t\t$price = $cart_item['data']->get_price();\n\n\t\techo '\n\t\t<li class=\"list-group-item d-flex justify-content-between align-items-center\">\n\t\t\t<div>\n\t\t\t\t' . $item_name . '<span class=\"font-weight-bold\"> x ' . $quantity . '</span>\n\t\t\t</div>\n\t\t\t<span class=\"h5\">' . $price . '</span>\n\t\t</li>';\n\t};\n}", "public function renderBuy(){\n $lst = $this->hlp->sess(\"listing\");\n $this->template->finalPriceBTC = $lst->finalPriceBTC;\n $this->template->finalPriceCZK = $lst->finalPriceCZK;\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 actionIndex(){\n\n $session = Yii::$app->session;\n\n $items = $session['cart'];\n\n return $this->render('index',[\n 'items' => $items,\n ]);\n\n }", "public function cart()\n {\n if(Auth::check()) {\n $user_email = Auth::user()->email;\n $userCart = DB::table('cart')->where('user_email', $user_email)->get();\n } else {\n $session_id = Session::get('session_id');\n $userCart = DB::table('cart')->where('session_id', $session_id)->get();\n }\n \n // Get images for cart items\n foreach($userCart as $key => $product){\n $product = Product::where('id', $product->product_id)->first();\n $userCart[$key]->image = $product->image;\n }\n $meta_title = \"Shopping Cart - E-com Website\";\n $meta_description = \"View Shopping Cart of E-com Website\";\n $meta_keywords = \"Shopping Cart - E-com Website\";\n return view('products.cart', compact('userCart', 'meta_title','meta_description', 'meta_keywords'));\n }", "public function view_cart(){\n\t\t//Devuelve el carrrtio\n\t\t$data['title'] = 'Detalle de la Compra';\n\t\t$data['active'] = 2; //punto 2 del sidebar\n\t\t//Obtener carrito\n\t\t$userid = $_SESSION['logged_in']['userid'];\n\t\t$data['carrito'] = $this->cila_model->get_carrito($userid);\n\t\t$this->loadview('shop-cart',$data);\n\n\t}", "public function index()\n {\n $cartItems = $this->cartItems();\n $cartTotalPrice = $this->cartTotalAmount();\n // return $cartItems;\n return view('cart.index')->with([\n 'cartItems' => $cartItems,\n 'cartTotalPrice' => $cartTotalPrice\n ]);\n }", "public function showCartButton() {\n\t\t\n\t\techo $this->getCartButton();\n\t}", "public function Render() {\n\t$out = NULL;\n\n\t$nPrice\t= $this->Price();\n\t$nShItm\t= $this->SH_perItem();\n\t$nShPkg\t= $this->SH_perPackage();\n\t$nQty\t= $this->Qty();\n\n\t$nPriceQty = $this->Price() * $nQty;\n\t$nShItmQty = $this->SH_perItem() * $nQty;\n\t$nLineTotal = $nPriceQty + $nShItmQty;\t// line total including per-item s/h\n\n\t$sCatNum = $this->CatNum();\n\t$sDescr = $this->Descrip();\n\n\t//$ftShipPkg = clsMoney::BasicFormat($dlrPerPkg);\n\n\t$out = sprintf($this->FormatString(),\n\t $sCatNum,\n\t $nPrice,\n\t $nShItm,\n\t $nQty,\n\t $nPriceQty,\n\t $nShItmQty,\n\t $nLineTotal\n\t )\n\t .\"\\n - $sDescr\\n\";\n\treturn $out;\n }", "public function run()\n {\n \t\n return view('widgets.ajax_cart')->with([\n \t\t\t\t\t\t\t\t\t\t'total'=>Cart::total(),\n \t\t\t\t\t\t\t\t\t\t'count'=>Cart::count()\n \t\t\n ]); \n }", "public function getViewCartButton()\n {\n return $this->renderWith('ViewCartButton');\n }", "public function cart()\n {\n $data['cart'] = Cart::where('user_id',Auth::user()->id)->get();\n return view('cart',$data);\n }", "public function showCart(Request $request){\n\n $cart_items=Cart::content();\n return view('frontend.cart',['configurations'=>$this->configuration,'cart_items'=>$cart_items]);\n\n }", "function displayCart(){\r\n\r\n\t\r\n\r\n\t$totalPrice = 0;\r\n\t$imageUrl = \" \";\r\n\tforeach ($_SESSION[\"cart\"] as $item ) {\r\n\t$totalPrice += $item->getPrice();\r\n\t$imageUrl =\t \"../\".$item->getImageUrl();\r\n\r\n\t$itemId = $item->getItemId()\r\n?>\r\n\t <div class=\"cart-header\">\r\n\t\t\t\t\r\n\t\t\t\t \t<a href = \"?action=removeItem&itemId=<?php echo $item->getItemId().\"&price=\".$item->getPrice(); ?>\">\r\n\t\t\t\t\t\t<div class=\"close1\"></div>\r\n\t\t\t\t\t</a>\r\n\t\t\t\t \r\n\t\t\t\t <div class=\"cart-sec\">\r\n\t\t\t\t\t\t<div class=\"cart-item cyc\">\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t<?php echo'<img src=\"'.$imageUrl.'\" alt=\"\"/>' ?>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t <div class=\"cart-item-info\">\r\n\t\t\t\t\t\t\t<h3><?php echo $item->getItemName() ?>\r\n\t\t\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t\t\t \t<?php \r\n\t\t\t\t\t\t\t\t\t \t echo \"Item Id: \";\r\n\t\t\t\t\t\t\t\t\t \t\techo $itemId; \r\n\t\t\t\t\t\t\t\t\t \t?>\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t</h3>\r\n\t\t\t\t\t\t\t <h4><span>Price. R </span><?php echo $item->getPrice() ?></h4>\r\n\t\t\t\t\t\t\t <p class=\"qty\">Qty ::</p>\r\n\t\t\t\t\t\t\t <input min=\"1\" type=\"number\" id=\"quantity\" name=\"quantity\" value=\"1\" class=\"form-control input-small\">\r\n\t\t\t\t\t </div>\r\n\t\t\t\t\t <div class=\"clearfix\"></div>\r\n\t\t\t\t\t\t<div class=\"delivery\">\r\n\t\t\t\t\t\t\t <p>Service Charges:: Rs.50.00</p>\r\n\t\t\t\t\t\t\t <span>Delivered in 2-3 bussiness days</span>\r\n\t\t\t\t\t\t\t <div class=\"clearfix\"></div>\r\n\t\t\t\t </div>\t\t\t\t\t\t\r\n\t\t\t\t </div>\r\n</div>\r\n<?php\r\n\t}\r\n}", "public function render()\n {\n $products = ProductModel::where('name', 'like', '%'.$this->search.'%')->orderBy('created_at', 'DESC')->paginate(12); \n\n\n $condition = new \\Darryldecode\\Cart\\CartCondition([\n 'name' => 'pajak',\n 'type' => 'tax',\n 'target' => 'total',\n 'value' => $this->tax,\n 'order' => 1\n ]);\n\n //ambil session user berdasarkan id\n \\Cart::session(Auth()->id())->condition($condition);\n\n $items = \\Cart::session(Auth()->id())->getContent()->sortBy(function ($cart){\n return $cart->attributes->get('added at'); \n });\n //cek apakah cart kosong atau tidak\n //apabila kosong maka \n if(\\Cart::isEmpty()){\n $cartData = [];\n }\n //dan apabila tidak kosong\n else\n {\n //apabila tidak kosong maka kita perulangkan dengan foreach \n foreach($items as $item){\n $cart[] = [\n 'rowId' => $item->id, //ini agar idnya unik\n 'name' => $item->name, //untuk menambahkan nama \n 'qty' => $item->quantity,\n 'pricesingle' => $item->price,\n 'price' => $item->getPriceSum(), //agar menambahkan jumlah atau harga\n ];\n }\n // kemudian tampung di variabel cartData isi dari cartnya\n $cartData = collect($cart);\n }\n\n $sub_total = \\Cart::session(Auth()->id())->getSubTotal();\n $total = \\Cart::session(Auth()->id())->getTotal();\n\n $newCondition = \\Cart::session(Auth()->id())->getCondition('pajak');\n $pajak = $newCondition->getCalculatedValue($sub_total);\n\n $summary = [\n 'sub_total' => $sub_total,\n 'pajak' => $pajak,\n 'total' => $total\n ];\n\n\n return view('livewire.cart', [\n 'products' => $products,\n 'carts' => $cartData,\n 'summary' => $summary\n ]);\n }", "function createCartHeadButton(){\n initializeCartArray();\n $itemsInCart = count($_SESSION[\"cart\"]);\n $cartBut = '<a class=\"item\" href=\"shopping-cart.php\"><i class=\"shop icon\"></i> Cart' . createCartCountLabel() . '</a>';\n return $cartBut;\n}", "public function index() {\n $pageConfigs = [\n 'bodyClass' => 'ecommerce-application',\n 'mainLayoutType' => 'horizontal',\n 'isMain' => '0',\n ];\n $breadcrumbs = [\n ['link' => \"dashboard-analytics\", 'name' => \"Home\"], ['link' => \"dashboard-analytics\", 'name' => \"eCommerce\"], ['name' => \"Checkout\"]\n ];\n if (auth()->check()) {\n ProductCart()->setUser(auth()->user()->id);\n }\n $CartData = ProductCart()->data();\n $CartItems = ProductCart()->toArray(true)['CartItems'];\n \n return view('site.ForntEnd.prouduct_cart', compact('pageConfigs', 'breadcrumbs', 'CartData', 'CartItems'));\n }", "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 }", "public function createCart() {\n if (!is_array($this->cart)) {\n $this->cart = array();\n $this->updateSession();\n }\n }", "public function index()\n {\n return CartResource::collection($this->cart)->additional([\n 'factory'=>[\n 'factory_id' =>$this->factory ? $this->factory->id:null,\n 'factory_name'=>$this->factory ? $this->factory->factory_name:null,\n 'logo' =>$this->factory ? $this->factory->logo:null\n ]]);\n }", "function index()\n {\n // If the cart is empty, show the empty cart page\n if (empty($_SESSION['cart'])) {\n $this->registry->template->show('cart-empty');\n die();\n }\n\n $cartItemsHtml = '';\n $game = new \\Webshop\\Model\\Game();\n\n $resultGames = [];\n $subtotaal = 0.0;\n $verzendkosten = 1.98;\n\n // Load the games from the database\n foreach ($_SESSION['cart'] as $gameFromSession) {\n $gameId = $gameFromSession[0];\n if ($game->getOne(\"id\", $gameId)) {\n $resultGames[] = $game->getOne(\"id\", $gameId);\n }\n }\n\n // Create the html for eacht game\n $count = 0;\n foreach ($resultGames as $game) {\n\n if (file_exists(\"images/games/\" . $game->imageBackground)) {\n $gameBackgroundImage = $game->imageBackground;\n } else {\n $gameBackgroundImage = \"pc/General_background.jpg\";\n }\n\n $options = '';\n $amount = $_SESSION['cart'][$count][1];\n for ($index = 1; $index < $this->amountOfOption; $index++) {\n $selected = '';\n ($index == $amount) ? $selected = 'selected' : '';\n $options .= \"<option $selected>$index</option>\";\n }\n\n $gameTotalPrice = $game->price * $amount;\n $subtotaal += $gameTotalPrice;\n $cartItemsHtml .= <<< CARTITEMS\n <article style=\"background: url(/images/games/$gameBackgroundImage) center center no-repeat;\">\n <h2><a href = \"/games/id/$game->id\" >$game->title</a></h2>\n <a href=\"/games/id/$game->id\" >\n <img alt = \"Primary image of the article\" class=\"product-front-img\" src = \"/images/games/$game->image\">\n </a> \n <strong>$amount x &euro; $game->price = &euro; $gameTotalPrice</strong>\n <form method=\"post\" action=\"/cart/updateNumberOfItems\">\n <input type=\"hidden\" name=\"gameId\" value=\"$game->id\">\n <select name=\"amount\" onchange=\"this.form.submit()\">\n $options\n </select>\n </form>\n <a class=\"button remove-from-cart\" href=\"/cart/remove/$game->id\">\n <span class=\"lnr lnr-trash\"></span>\n </a> \n </article>\nCARTITEMS;\n\n $count++;\n }\n\n $totalPrice = $subtotaal + $verzendkosten; // Default verzendkosten\n $this->registry->template->verzendkosten = $verzendkosten;\n $this->registry->template->subTotal = $subtotaal;\n $this->registry->template->totalPrice = $totalPrice;\n $this->registry->template->cartItemsHtml = $cartItemsHtml;\n $this->registry->template->show('cart');\n unset($_SESSION['addToCartError']);\n }", "function __toString() {\r\n\t\t\t$out = '<div id=\"products\">';\r\n\t\t\t\r\n\t\t\tforeach($this->data['products'] as $p) {\r\n\t\t\t\t$out .= \"<div class='product'><a href='BASE_URL'><img src='{$p['photo']}' alt='{$p['shortdesc']}'/><div class='label'>{$p['name']}</div></a></div>\\n\";\r\n\t\t\t}\r\n\t\t\t$out .= \"</div>\";\r\n\t\t\treturn $out;\r\n\t\t}", "public function index(){\n $carts = Cart::content();\n $total = Cart::total();\n $subtotal = Cart::subtotal();\n\n return view('front.shop.cart', compact('carts','total', 'subtotal'));\n }", "function foodgrower_cart_link() {\n\t\t?>\n\t\t\t<a class=\"cart-contents\" href=\"<?php echo esc_url( WC()->cart->get_cart_url() ); ?>\" title=\"<?php esc_attr_e( 'View your shopping cart', 'storefront' ); ?>\">\n\t\t\t\t<span class=\"count\"><?php echo wp_kses_data( sprintf( _n( '%d ', '%d ', WC()->cart->get_cart_contents_count(), 'storefront' ), WC()->cart->get_cart_contents_count() ) );?></span>\n\t\t\t\t<img src=\"<?php echo get_stylesheet_directory_uri(); ?>/assets/images/cart.jpg\" class=\"img-responsive\">\n\t\t\t</a>\n\t\t<?php\n\t}", "public function cart()\n {\n if (!Session::has('cart')) {\n return view('shop.shopping-cart');\n }\n $old_cart = Session::get('cart');\n $cart = new Cart($old_cart);\n // dd($cart->items);\n // return $cart->total_price;\n return view('shop.shopping-cart', ['products' => $cart->items, 'total_price' => $cart->total_price]);\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 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 goToCart(){\n $cart = Cart::content();\n $this->data['cart'] = $cart;\n return view('Customer.Layouts.cart',$this->data);\n }", "public function actionShow() {\n $session = $this->session;\n $this->layout = false; // loading only view file, without layout;\n $items_to_show = $this->getProductObject($session);\n return $this->render('cart-modal', compact('session', 'cart_products', 'items_to_show'));\n }", "protected function generateParams()\n {\n $qty = Cart::count();\n\n $templatePart = $qty ? '_cart-content' : '_cart-empty';\n\n $html = view(\"website.cart.$templatePart\")->render();\n\n return compact('html', 'qty');\n }", "public function index()\n\t{\n\t\t// $this->load->model('Product');\n\t\t// $queryRecords = $this->Product->list_product();\n\t\t// $data['products'] = $queryRecords; \n\t\t$data['cart_list'] = $this->cart->contents();\n\n\t\t$this->load->view('cart',$data);\n\t}", "public function cart(Request $request)\n {\n return view('frontend.cart.cartdetail');\n }", "public function show()\n {\n return view('carts');\n }", "function display($htmlContent){\r\n\t\t$cart = $_SESSION[\"cart\"];\r\n\t\tif(sizeof($cart)==0){\r\n return false;\r\n\t\t}else{\r\n\t\t\tfor ($i=0;$i<sizeof($cart);$i++) {\r\n\t\t\t\tprintf($htmlContent, $cart[$i][\"product_id\"], $cart[$i][\"label\"], $cart[$i][\"quantity\"]);\r\n\t\t\t}\r\n \treturn true;\r\n\t\t}\r\n\t}", "public function __toString(){\t\t\n\t\t$string = '<div class=\"item_wrapper\" id=\"item-'.$this->itemid.'\">';\n\t\t$string .= '<img class=\"itemimage\" src='.HOME.'images/items/'.$this->image.' alt = '.$this->itemname.' />';\n\t\t$string .='<div class = \"item_info\">';\n\t\t// We want to prevent unregistered user from entering the order item page\n\t\tif(isUser()) \n\t\t\t$string .= '<h3><a href=\"'.HOME.'item/'.$this->itemid.'\" title=\"'. __('Order').'\">'.$this->itemname.'</a></h3>';\n\t\telse\n\t\t\t$string .= '<h3>'.$this->itemname.'</h3>';\n\t\t\n\t\t$string .= '<div class=\"item_price\"><table>';\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tswitch ($this->itemtype){\n\t\t\tcase 1:\t\t\t\t\n\t\t\t\tif($this->prices != \"0.00\")\n\t\t\t\t\t$string .= sprintf(__('<tr><td class=\"desc\">330cc can</td><td> %s </td></tr>'),$this->prices);\n\t\t\t\tif($this->pricem != \"0.00\")\n\t\t\t\t\t$string .= sprintf(__('<tr><td class=\"desc\">500cc bottle</td><td> %s </td></tr>'),$this->pricem);\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$string .= sprintf(__('<tr><td class=\"desc\">מחיר: </td><td> %s </td></tr>'),$this->prices);\t\n\t\t\t\tbreak;\n\t\t\tcase 3: \t\t\t\t\n\t\t\t\tif($this->prices != \"0.00\")\n\t\t\t\t\t$string .= sprintf(__('<tr><td class=\"desc\">Regular</td><td> %s </td></tr>'),$this->prices);\n\t\t\t\tif($this->pricem != \"0.00\")\n\t\t\t\t\t$string .= sprintf(__('<tr><td class=\"desc\">Double</td><td> %s </td></tr>'),$this->pricem);\t\t\t\t\n\t\t\t\tif($this->pricel != \"0.00\")\n\t\t\t\t\t$string .= sprintf(__('<tr><td class=\"desc\">Triple</td><td> %s </td></tr>'),$this->pricel);\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 4: \n\t\t\tcase 5:\n\t\t\t//\t$string .= sprintf(__('<tr><td class=\"desc\">Small</td><td> %s </td></tr><tr><td class=\"price\">Medium</td><td> %s</td></tr><tr><td class=\"price\">Large</td><td> %s</td></tr>'),$this->prices, $this->pricem, $this->pricel);\t\t\t\n\t\t\t\tif($this->prices != \"0.00\")\n\t\t\t\t\t$string .= sprintf(__('<tr><td class=\"desc\">Small</td><td> %s </td></tr>'),$this->prices);\n\t\t\t\tif($this->pricem != \"0.00\")\n\t\t\t\t\t$string .= sprintf(__('<tr><td class=\"desc\">Medium</td><td> %s </td></tr>'),$this->pricem);\t\t\t\t\n\t\t\t\tif($this->pricel != \"0.00\")\n\t\t\t\t\t$string .= sprintf(__('<tr><td class=\"desc\">Large</td><td> %s </td></tr>'),$this->pricel);\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\t$string .= sprintf(__('<tr><td class=\"desc\">For 3</td><td> %s </td></tr><tr><td class=\"price\">For 4</td><td> %s</td></tr>'), $this->pricem, $this->pricel);\t\t\t\n\t\t\t\tbreak;\t\t\t\n\t\t\t}\t\t\n\t\t$string .= '</table></div>';\n\t\t$string .= '</div>';\n\t\t// We want to prevent unregistered user from entering the order item page\n\t\tif(isUser()){\t\n\t\t\t$string .= '<a href=\"'.HOME.'item/'.$this->itemid.'\" title=\"'.__('Add this item to your cart').'\"><img class=\"addtoorder\" src=\"'.HOME.'images/addtocart.png\" alt=\"Add to order\"></a>';\n\t\t}\n\t\t$string .='</div>';\n\t\treturn $string;\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 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 index()\n {\n $userId = \\Auth::user()->id;\n $cartContent = \\Cart::session($userId)->getContent();\n \n $itemsInCart = [];\n foreach ($cartContent as $cartItem) {\n $itemsInCart[] = Product::findOrFail($cartItem['id'])->toArray();\n }\n $sorteditemsInCart = collect($itemsInCart)->sortBy('brand')->all();\n\n return view('checkout', [\n 'itemsInCart' => $sorteditemsInCart,\n 'cartContent' => $cartContent,\n 'cartTotalPrice' => \\Cart::session($userId)->getTotal()\n ]);\n }", "public function index()\n {\n return view('frontend.pages.carts');\n }", "public function getDisplayDetails($inCart, $inEmail = false)\n {\n $db = DataAccess::getInstance();\n $msgs = $db->get_text(true, 10202);\n $return = array (\n 'css_class' => '',//empty string to use default CSS class in the HTML, otherwise a string containing the css class name.\n 'title' => $msgs[500626],//text that is displayed for this item in list of items purchased.\n 'canEdit' => false, //show edit button for item?\n 'canDelete' => false, //show delete button for item?\n 'canPreview' => false, //show preview button for item?\n 'canAdminEditPrice' => false, //show edit price button for item, if displaying in admin panel cart?\n 'priceDisplay' => $msgs[500628], //Price as it is displayed\n 'cost' => $this->getCost(), //amount this adds to the total, what getCost returns\n 'total' => $this->getCost(), //amount this AND all children adds to the total (will add to it as we parse the children)\n 'children' => array() //should be array of child items, with the index\n //being the item's ID, and the contents being associative array like\n //this one. If no children, it should be an empty array. (Careful\n //not to get into any infinite recursion)\n );\n\n $sv = $this->getParent()->get('session_variables');\n if ($sv['auction_type'] == 3) {\n //special case: this is a reverse auction.\n //If charging final fees for reverse auctions is not enabled, kill the item and return false to not show anything here\n $planItem = geoPlanItem::getPlanItem('auction', $this->getPricePlan());\n if (!$planItem->charge_reverse_final_fees) {\n $id = $this->getId();\n geoOrderItem::remove($id);\n return false;\n }\n }\n\n\n $return['title'] .= '<a href=\"' . $db->get_site_setting('classifieds_url') . '?a=4&amp;b=3#FF' . $this->getPricePlan() . '\" onclick=\"window.open(this.href); return false;\">' . $msgs[500627] . '</a>';\n\n\n //THIS PART IMPORTANT: Need to keep this part to make the item able to have children\n\n //go through children...\n $order = $this->getOrder();//get the order\n $items = $order->getItem();//get all the items in the order\n $children = array();\n foreach ($items as $i => $item) {\n if (is_object($item) && $item->getType() != $this->getType() && is_object($item->getParent())) {\n $p = $item->getParent();//get parent\n if ($p->getId() == $this->getId()) {\n //Parent is same as me, so this is a child of mine, add it to the array of children.\n //remember the function is not static, so cannot use callDisplay() or callUpdate(), need to call\n //the method directly.\n $displayResult = $item->getDisplayDetails($inCart, $inEmail);\n if ($displayResult !== false) {\n //only add if they do not return bool false\n $children[$item->getId()] = $displayResult;\n $return['total'] += $children[$item->getId()]['total']; //add to total we are returning.\n }\n }\n }\n }\n if (count($children)) {\n //add children to the array\n $return['children'] = $children;\n }\n return $return;\n }", "public function index()\n {\n return view('cart.index',[\n 'cart' => Cart::content()\n ]);\n }", "public function render()\n {\n return view('storefront::livewire.product-card');\n }", "function custom_mini_cart() {\n\n echo '<div class=\"\">cart stuff</div>';\n\n }", "public function checkoutDetails()\n {\n if (!Session::has('cart')) {\n return view('section.checkout');\n }\n\n $oldCart = Session::get('cart');\n $cart = new Cart($oldCart);\n return view('section.checkout', ['products' => $cart->items, 'totalPrice' => $cart->totalPrice]);\n }", "public function index()\n {\n $cart = Cart::name('shopping');\n $items = $cart->getItems();\n $total = $cart->getItemsSubtotal();\n $subtotal = $cart->getSubtotal();\n $action = $cart->sumActionsAmount();\n $quantity = $cart->sumItemsQuantity();\n\n // dd($items);\n\n return view('frontend.cart', compact(\n 'items',\n 'total',\n 'subtotal',\n 'action',\n 'quantity',\n ));\n }", "public function carrito()\n {\n $items = Cart::getContent();\n return view('factura.carrito', compact(['items']));\n }", "public function createCart($observer)\n {\n /*$order = Mage::getModel('sales/order')->loadByIncrementId('145000025');\n print_r($order);exit;*/\n\n $cart = Mage::getModel('checkout/cart')->getQuote();\n $cartItems = $cart->getAllItems();\n\n $result = array();\n $apiItems = array();\n\n foreach ($cartItems as $item) {\n $product = $item->getProduct();\n\n $apiItems[] = array(\n 'sku' => $product->getSku(),\n 'name' => $product->getName(),\n 'vat' => $this->priceFormat($this->getTaxPercent($product->getTaxClassId())),\n 'price' => $this->priceFormat($product->getPrice()),\n 'quantity' => $item->getQty(),\n );\n }\n\n $result['items'] = $apiItems;\n\n $api = Mage::getModel(\"vaimo_urbit/urbit_api\", new Vaimo_UrbIt_Model_Urbit_Api_Client());\n $responseObj = $api->createCart($result);\n\n //save cart id to session\n if (isset($responseObj->response['id'])) {\n Mage::getSingleton('core/session')->setCartIdFromApi($responseObj->response['id']);\n Mage::log($responseObj->response['id']);\n }\n }", "public function index()\n {\n\n $cart = $this->cart->content();\n\n return view('public.cart.index', compact('cart'));\n }", "public function success()\n {\n setcookie(\"shoppingCart\", \"\", time() - 3600, \"/\");\n return $this->twig->render('checkout/success.html.twig');\n }", "public function index()\n {\n return view('frontEnd.cart');\n }", "public function show()\n {\n $cart = Cart::content();\n\n return view('customer_side.pages.cart') ->with('cart', $cart);\n }", "public function actionCartPayment()\n\t{ \n\t # - Get Visitor Cart Items for Listing\n\t\t$model = new Store;\t\n \t $cartItem = $model->getAllCartItem();\n \t\t\n\t\t# Create invoice for the subscriptions\n\t\t$invoiceModel = new Invoices;\n\t\t$invoice_id = $invoiceModel->createInvoiceByCart( $cartItem );\n\t\t \n \t\t# Create Subscription for each Item and create relation with the invoice\n\t\t$subModel\t = new Subscriptions;\n\t\t$subs = $subModel->createSubscriptionByCart( $invoice_id, $cartItem );\n\t\t\n\t\t$_SESSION['invoice_id'] = $invoice_id;\n \t\t$this->render(\"cartPayment\", array(\"cartItems\"=>$cartItem));\n\t}", "public function index() \n\t{\n $this->initModel('Cart_model');\n\n\t\tif(!empty($_SESSION['cart']->getProdList()))\n\t\t{\n //We instansiate cartItems method where we save the new array from session\n\t\t$data = $this->modelObj->showCart();\n $this->reqView('Cart', $data);\n\n\t\t} else {\n\t\t\t$this->reqView('Cart');\n\t\t}\n //This will be shown on our cart page\n\t}", "function lb_show_view_cart_page_action() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'view-cart',\n\t\t)\n\t);\n}", "function get_cart() {\n\t\t\treturn $this->cart_contents;\n\t\t}", "public function viewCartAction(Request $request)\n {\n $session = $request->getSession();\n\n if (!$session->has('cart')) $session->set('cart', array());\n\n $em = $this->getDoctrine()->getManager();\n $products = $em->getRepository('WizishopCoreBundle:Product')->findArray(array_keys($session->get('cart')));\n\n return $this->render('WizishopCoreBundle:Core:cart.html.twig', array(\n 'products' => $products,\n 'cart' => $session->get('cart'),\n ));\n }", "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}" ]
[ "0.736701", "0.7174151", "0.68823636", "0.68808746", "0.6793349", "0.6767283", "0.6711893", "0.6693496", "0.66721725", "0.6641056", "0.66335607", "0.66295105", "0.660527", "0.6555112", "0.6535464", "0.6517875", "0.6504102", "0.6500157", "0.6485095", "0.64806217", "0.64734703", "0.64407086", "0.6426363", "0.6422759", "0.6359039", "0.6337403", "0.6293598", "0.62849295", "0.62738866", "0.626797", "0.62559515", "0.62129027", "0.6194437", "0.61862034", "0.6183195", "0.61706936", "0.6169246", "0.615077", "0.6147541", "0.61364496", "0.61330366", "0.6129633", "0.6123807", "0.61232805", "0.61207706", "0.6104785", "0.6089365", "0.6064186", "0.60636044", "0.6027011", "0.60228986", "0.60208344", "0.6016083", "0.6004516", "0.5997813", "0.59909534", "0.59901386", "0.5986809", "0.5968218", "0.5964379", "0.5963509", "0.5962757", "0.5959311", "0.5951281", "0.5947867", "0.59425867", "0.5942264", "0.59391767", "0.593523", "0.59179467", "0.5917445", "0.59116554", "0.59086555", "0.59030485", "0.5897718", "0.5897099", "0.5896009", "0.58889896", "0.5877845", "0.5870838", "0.58663625", "0.5865106", "0.5845942", "0.5840707", "0.58348274", "0.58320886", "0.58297265", "0.5829683", "0.58278525", "0.58234626", "0.5813887", "0.58075404", "0.58030516", "0.5798313", "0.5790523", "0.57862645", "0.5785158", "0.5770322", "0.57669526", "0.5761579" ]
0.79317546
0
Create item and insert to database.
public function create( &$args ) { global $wpdb; $section = $this->parse( $args ); $section = stripslashes_deep( $section ); $section['section_order'] = $this->get_last_number_order( $section['section_course_id'] ) + 1; $insert_data = array( 'section_course_id' => $this->course_id, 'section_name' => $section['section_name'], 'section_order' => $section['section_order'], 'section_description' => $section['section_description'], ); $wpdb->insert( $wpdb->learnpress_sections, $insert_data, array( '%d', '%s', '%d', '%s' ) ); $section['section_id'] = $wpdb->insert_id; // allow hook do_action( 'learn-press/after-create-section', $this->course_id, $section ); return $section; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insert()\n {\n $this->_checkItem();\n $service = $this->getService();\n $entry = $service->newItemEntry();\n $this->setEntry($entry);\n $this->_prepareEnrtyForSave();\n $this->getEntry()->setItemType($this->_getItemType());\n $entry = $service->insertGbaseItem($this->getEntry());\n $this->setEntry($entry);\n $entryId = $this->getEntry()->getId();\n $published = $this->gBaseDate2DateTime($this->getEntry()->getPublished()->getText());\n $this->getItem()\n ->setGbaseItemId($entryId)\n ->setPublished($published);\n\n if ($expires = $this->_getAttributeValue('expiration_date')) {\n $expires = $this->gBaseDate2DateTime($expires);\n $this->getItem()->setExpires($expires);\n }\n }", "public function createItem($item) {\n\t\treturn tdb::insert(self::$tablename,$item);\n\t}", "public function createItem (Item $item) {\n $this->itemsDB->create($item);\n $item->setId($this->retrieveLastItemId());\n }", "function createItem($item) {\n\t\tglobal $dbh;\n\t\t$stmt = $dbh->prepare('INSERT INTO ITEM VALUES (NULL, ?, ?, ?, ?)');\n\t\t$success = $stmt->execute(array($item['content'],\n\t\t\t\t\t\t\t\t\t\t$item['image'],\n\t\t\t\t\t\t\t\t\t\t$item['checked'],\n\t\t\t\t\t\t\t\t\t\t$item['listID']));\n\t\treturn $success;\n\t}", "public function createNewItem();", "public function createItem($data);", "public function insert($item): void;", "public function createItem( $preparedItem ) {\n\t}", "function addItemToDB()\n {\n $this->database->addItemToDB($this);\n }", "public static function storeItem($item)\n {\n //return DB::table('employees')->insertGetId($item); //RETURN ID\n return self::create($item); //RETURN OBJECT\n }", "public function insert() {\n\t\ttry {\n\t\t\t$this->validateInsert();\n\n\t\t\tif (!$this->id) {\n\t\t\t\t$this->id = $this->context->connection->generateId();\n\t\t\t}\n\n\t\t\t$sth = $this->context->connection->prepare(\n\t\t\t\t\"INSERT INTO list_item_definition (\n\t\t\t\t\tinstance_id, list_item_definition_id, sequence_no, application_definition_id,\n\t\t\t\t\tpage_definition_id, title, icon, php_key, title_width,\n\t\t\t\t\ttitle_label\n\t\t\t\t) VALUES (\n\t\t\t\t\t:instId, :id, 0, :appDefId,\n\t\t\t\t\t:pageDefId, :title, :icon, :phpSelector, :titleWidth,\n\t\t\t\t\t:titleLabel\n\t\t\t\t)\");\n\n\t\t\t$this->context->connection->bindInstance($sth);\n\t\t\t$sth->bindValue(\":id\", $this->id, \\PDO::PARAM_INT);\n\t\t\t$sth->bindValue(\n\t\t\t\t\":appDefId\", $this->applicationDefinitionId, \\PDO::PARAM_INT);\n\t\t\t$sth->bindValue(\n\t\t\t\t\":pageDefId\", $this->pageDefinitionId, \\PDO::PARAM_INT);\n\t\t\t$sth->bindValue(\":title\", $this->title, \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\":icon\", $this->icon, \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\n\t\t\t\t\":phpSelector\", $this->phpSelector, \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\":titleWidth\", $this->titleWidth, \\PDO::PARAM_INT);\n\t\t\t$sth->bindValue(\":titleLabel\", $this->titleLabel, \\PDO::PARAM_STR);\n\n\t\t\t$sth->execute();\n\n\t\t\t\\Scrivo\\SequenceNo::position($this->context, \"list_item_definition\",\n\t\t\t\t\"application_definition_id\", $this->id, \\Scrivo\\SequenceNo::MOVE_LAST);\n\n\t\t} catch(\\PDOException $e) {\n\t\t\tthrow new \\Scrivo\\ResourceException($e);\n\t\t}\n\t}", "public function create()\n {\n // Not needed cause this is coming from the item listing\n }", "function insert_item($metadata = array(), $elementTexts = array(), $fileMetadata = array())\n{\n $builder = new Builder_Item(get_db());\n $builder->setRecordMetadata($metadata);\n $builder->setElementTexts($elementTexts);\n $builder->setFileMetadata($fileMetadata);\n return $builder->build();\n}", "public function saveItem(Item $item) {\n\t\tif ($item->getId() == -1) {\n\t\t\t$q = $this->bdd->prepare('INSERT INTO items SET created = :created, expired = :expired, title = :title, link = :link, affiliate_link = :affiliate_link, content = :content, photo_link = :photo_link, code = :code, normal_price = :normal_price, promo_price = :promo_price, discount = :discount, quantity = :quantity, shop = :shop, status = :status');\n\t\t} else {\n\t\t\t$q = $this->bdd->prepare('UPDATE items SET created = :created, expired = :expired, title = :title, link = :link, affiliate_link = :affiliate_link, content = :content, photo_link = :photo_link, code = :code, normal_price = :normal_price, promo_price = :promo_price, discount = :discount, quantity = :quantity, shop = :shop, status = :status WHERE id = :id');\n\t\t\t$q->bindValue(':id', $item->getId(), PDO::PARAM_INT);\n\t\t}\n\t\t$q->bindValue(':created', $item->getCreated(), PDO::PARAM_STR);\n\t\t$q->bindValue(':expired', $item->getExpired(), PDO::PARAM_STR);\n\t\t$q->bindValue(':title', $item->getTitle(), PDO::PARAM_STR);\n\t\t$q->bindValue(':link', $item->getLink(), PDO::PARAM_STR);\n\t\t$q->bindValue(':affiliate_link', $item->getAffiliateLink(), PDO::PARAM_STR);\n\t\t$q->bindValue(':content', $item->getContent(), PDO::PARAM_STR);\n\t\t$q->bindValue(':photo_link', $item->getPhotoLink(), PDO::PARAM_STR);\n\t\t$q->bindValue(':code', $item->getCode(), PDO::PARAM_STR);\n\t\t$q->bindValue(':normal_price', $item->getNormalPrice(), PDO::PARAM_STR);\n\t\t$q->bindValue(':promo_price', $item->getPromoPrice(), PDO::PARAM_STR);\n\t\t$q->bindValue(':discount', $item->getDiscount(), PDO::PARAM_INT);\n\t\t$q->bindValue(':quantity', $item->getQuantity(), PDO::PARAM_INT);\n\t\t$q->bindValue(':shop', $item->getShop(), PDO::PARAM_STR);\n\t\t$q->bindValue(':status', $item->getStatus(), PDO::PARAM_STR);\n\n\n\t\t$q->execute();\n\t\tif ($item->getId() == -1) $item->setId($this->bdd->lastInsertId());\n\t}", "public function index_post()\n {\n $input = $this->input->post();\n $this->db->insert('items',$input);\n \n $this->response(['Item created successfully.'], REST_Controller::HTTP_OK);\n }", "function create(){\n $query = \"INSERT INTO\n \" . $this->table_name . \"\n SET\n item_name=:item_name, user_id=:user_id\";\n\n // prepare query\n $stmt = $this->conn->prepare($query);\n\n // sanitize\n $this->item_name=htmlspecialchars(strip_tags($this->item_name));\n $this->user_id=htmlspecialchars(strip_tags($this->user_id));\n\n // bind values\n $stmt->bindParam(\":item_name\", $this->item_name);\n $stmt->bindParam(\":user_id\", $this->user_id);\n\n // execute query\n if($stmt->execute()){\n return true;\n }\n\n return false;\n }", "protected function createNew() {\n $this->db->insert($this->tableName, $this->mapToDatabase());\n $this->id = $this->db->insert_id();\n }", "public function index_post()\n {\n $input = $this->input->post();\n $this->write_db->insert($_table,$input);\n \n $this->response(['Item created successfully.'], REST_Controller::HTTP_OK);\n }", "function saveItem($db, $resource_pk, $item) {\r\n\r\n $prefix = DB_TABLENAME_PREFIX;\r\n if (!isset($item->item_pk)) {\r\n $sql = <<< EOD\r\nINSERT INTO {$prefix}item (resource_link_pk, item_title, item_text, item_url, max_rating, step, visible, sequence, created, updated)\r\nVALUES (:resource_pk, :item_title, :item_text, :item_url, :max_rating, :step, :visible, :sequence, :created, :updated)\r\nEOD;\r\n } else {\r\n $sql = <<< EOD\r\nUPDATE {$prefix}item\r\nSET item_title = :item_title, item_text = :item_text, item_url = :item_url, max_rating = :max_rating, step = :step, visible = :visible,\r\n sequence = :sequence, updated = :updated\r\nWHERE (item_pk = :item_pk) AND (resource_link_pk = :resource_pk)\r\nEOD;\r\n }\r\n $query = $db->prepare($sql);\r\n $item->updated = new DateTime();\r\n if (!isset($item->item_pk)) {\r\n $item->created = $item->updated;\r\n $item->sequence = getNumItems($db, $resource_pk) + 1;\r\n $query->bindValue('created', $item->created->format('Y-m-d H:i:s'), PDO::PARAM_STR);\r\n } else {\r\n $query->bindValue('item_pk', $item->item_pk, PDO::PARAM_INT);\r\n }\r\n $query->bindValue('item_title', $item->item_title, PDO::PARAM_STR);\r\n $query->bindValue('item_text', $item->item_text, PDO::PARAM_STR);\r\n $query->bindValue('item_url', $item->item_url, PDO::PARAM_STR);\r\n $query->bindValue('max_rating', $item->max_rating, PDO::PARAM_INT);\r\n $query->bindValue('step', $item->step, PDO::PARAM_INT);\r\n $query->bindValue('visible', $item->visible, PDO::PARAM_INT);\r\n $query->bindValue('sequence', $item->sequence, PDO::PARAM_INT);\r\n $query->bindValue('updated', $item->updated->format('Y-m-d H:i:s'), PDO::PARAM_STR);\r\n $query->bindValue('resource_pk', $resource_pk, PDO::PARAM_INT);\r\n\r\n return $query->execute();\r\n\r\n }", "public function createItem($data) {\n // the queue table yet, so we cannot rely on drupal_write_record().\n $query = db_insert('queue')\n ->fields(array(\n 'name' => $this->name,\n 'data' => serialize($data),\n // We cannot rely on REQUEST_TIME because many items might be created\n // by a single request which takes longer than 1 second.\n 'created' => time(),\n ));\n return (bool) $query->execute();\n }", "function insertItem(){\n\t\t$cartDB = new DB();\n\n\t\tif(!empty($_GET[\"cartItem\"])) {\n\t\t\t$cartItem = $this->getItemFromProducts($_GET[\"cartItem\"]);\n\t\t\t$this->insertCart($cartItem[0][\"id\"],$cartItem[0][\"itemName\"],$cartItem[0][\"itemDesc\"], 1, $cartItem[0][\"regularPrice\"]);\n\t\t\t$numberOf = $cartItem[0][\"numberLeft\"];\n\t\t\t$numberOf --;\n\t\t\t$this->updateNumberOf($numberOf);\n\t\t}\t\t\n\t}", "function create() {\r\n\t\tglobal $ufoSession;\r\n\t\tglobal $ufoDb;\r\n\t\t$link = $ufoDb->getLink();\r\n\t\t$this->uid = $ufoSession->userId();\r\n\r\n\t\t// insert\r\n\t\t$query = \"INSERT INTO ufo_product (uid, name, description) VALUES ($this->uid, '$this->name', '$this->description')\";\r\n\t\t$result = pg_query($query) or die(\"Query failed : \" . pg_last_error());\r\n\t\t/* Get the auto increment Id of the last insert. */\r\n\t\t$this->oid = $ufoDb->insert_id(\"ufo_product_seq\");\r\n\t\t$this->initialized = True;\r\n\t}", "public function create() //添加\n {\n\t\t//\n }", "public function createListItem(ListItemModel $item) {\n RealityCheckLogger::info(\"Entering BucketListDataService.createListItem()\");\n\n try{\n //select variables and see if the row exists\n $description = $item->getDescription();\n $bucketListID = $item->getBucketListID();\n\n //prepared statements is created\n $stmt = $this->conn->prepare(\"INSERT INTO `ListItem` (`Description`, `BucketList_ID`) VALUES (:description, :bucketlistid)\");\n $stmt->bindParam(':description', $description);\n $stmt->bindParam(':bucketlistid', $bucketListID);\n\n /*see if list item existed and return true if found\n else return false if not found*/\n if ($stmt->execute()) {\n RealityCheckLogger::info(\"Leaving BucketListDataService.createListItem() with true\");\n return true;\n }\n\n else {\n RealityCheckLogger::info(\"Leaving BucketListDataService.createListItem() with false\");\n return false;\n }\n }\n\n catch(PDOException $e) {\n RealityCheckLogger::error(\"Exception: \", array(\"message\" => $e->getMessage()));\n throw new DatabaseException(\"Database Exception: \" . $e->getMessage(), 0, $e);\n }\n }", "function save()\r\n {\r\n $GLOBALS['DB']->exec(\"INSERT INTO inventory_items (name) VALUES ('{$this->getName()}')\");\r\n $this->id = $GLOBALS['DB']->lastInsertId();\r\n }", "function addItemForInsert($item, $batch_id=null) {\n if($batch_id != null) {\n $this->_insert[$batch_id] = $item;\n } else {\n $this->_insert[] = $item;\n }\n }", "public function insertItem($item)\n {\n $filteredItem = array();\n $this->_addToFilteredItem( \"\", $item, $filteredItem );\n $dbFieldsStr = implode(\",\",array_keys($filteredItem));\n $itemKeyFieldsStr = \":\" .implode(\",:\",array_keys($filteredItem));\n\n $sql = \"INSERT INTO `\" . self::DB_TABLE . \"` (\" . $dbFieldsStr . \") VALUES (\" . $itemKeyFieldsStr . \")\";\n $preparedStmt = $this->_pdo->prepare( $sql );\n $preparedStmt->execute( $filteredItem );\n }", "private function _create() {\n\n $this->db->insert(XCMS_Tables::TABLE_USERS, $this->getArray());\n $this->set(\"id\", $this->db->insert_id());\n\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function create()\n {\n $attributes = $this->attributes();\n $sql = \"INSERT INTO \" . self::$table_name . \" (\";\n $sql .= join(\",\", array_keys($attributes));\n $sql .= \")VALUES('\";\n $sql .= join(\"','\", array_values($attributes));\n $sql .= \"')\";\n \n $conn = new mysqli(DB_SERVER,DB_USER,null,DB_NAME);\n \n if($conn->query($sql))\n {\n $this->cart_id = mysqli_insert_id($conn);\n $attributes['cart_id'] = $this->cart_id;\n return true;\n }\n return false;\n }", "public function insertRecord()\n\t{\n\t\tif($this->user->hasRight($this->getHandler()->getAddRight()))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$record = $this->getHandler()->getRecord();\n\t\t\t\t$record->import($this->getRequest());\n\n\t\t\t\t// check captcha\n\t\t\t\t$this->handleCaptcha($record);\n\n\t\t\t\t// insert\n\t\t\t\t$this->getHandler()->create($record);\n\n\n\t\t\t\t$msg = new Message('You have successful create a ' . $record->getName(), true);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t\tcatch(\\Exception $e)\n\t\t\t{\n\t\t\t\t$msg = new Message($e->getMessage(), false);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$msg = new Message('Access not allowed', false);\n\n\t\t\t$this->setResponse($msg, null, $this->user->isAnonymous() ? 401 : 403);\n\t\t}\n\t}", "public function insert()\n {\n $this->id = insert($this);\n }", "public function InsertItem(\\ItemClass $i){\n $conn = new conexao();\n $conexao = $conn->getConexao();\n $query = $conexao->prepare($this->INSERT_ITEM);\n $query->bindValue(\":nome_item\", $i->getNome_item());\n $query->bindValue(\":aplicacao\", $i->getAplicacao());\n $query->bindValue(\":tipo\", $i->getTipo());\n //$query->bindValue(\":dominio\", $a->getDominio());\n $query->execute();\n $conn->fecharConexao();\n if($query){\n return \"success\";\n }else{\n return \"Erro ao registar item\";\n }\n }", "public function add ($item) {\n $objData = get_object_vars($item);\n $keys = array_keys($objData);\n // Query time.\n $sql = 'INSERT INTO ' . $this->table . ' (' . implode(',', $keys) . ') VALUES (:' . implode(',:', $keys) . ')';\n $this->query($sql, $objData);\n // Update the item primary key if single before returning it.\n/*\n if (count($this->keys) === 1) {\n $pk = current($this->keys);\n $item->$pk = $this->pdo->lastInsertId();\n }\n*/\n return $item;\n }", "public function create() {\n\t\t\t\n\t\t/* set method */\n\t\t$this->request_method = 'create';\n\t\t\t\t\n\t\t/* check for a model id */\n\t\tif( $this->id) {\n\t\t\t$this->set_error( 4, 'A model id is set in the request, cant create a new item on server' );\n\t\t\treturn;\t\t\t\n\t\t}\n\t\t\n\t\t/* read the data from backbone */\n\t\t$this->parse_model_request();\n\n\t\tif($this->get_errors())\n\t\t\treturn;\n\t\t\t\n\t\t/* get the parsed post data from request */\n\t\t$item_data = $this->parsed_model_request;\n\n\t\t/* privileg checking @TODO outsource to filter */\n\t\tif( $this->properties->access == \"loggedin\" && ! current_user_can('edit_posts')) { // TODO improve CPT\n\t\t\t$this->set_error( 9, 'no user privileges to save the item on server' );\n\t\t\treturn;\n\t\t}\t\n\t\t\t\t \t\n\t\t/* insert database */\n\t\tswitch( $this->properties->modelclass ) {\n\t\t\t\n\t\t\t/* posts */\n\t\t\tcase('post'):\n\t\t\t\t$post = $item_data['post'];\t\t\t\t\t\t\t\n\t\t\t\t$result = wp_insert_post( $post );\n\t\t\t\t\n\t\t\t\t/* was there an error saving the post */\n\t\t\t\tif( ! $result) {\n\t\t\t\t\t$this->set_error( 6, 'saving the item failed on the server' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* got the id of the created post */\n\t\t\t\t$new_id = $result;\t\n\t\t\tbreak;\n\n\t\t\tcase('attachment'):\n\t\t\t\t//@TODO\n\t\t\t\t$attachment = $item_data['post'];\t\n\t\t\t\t\n\t\t\t\t/* a post parent for a attachment must be set */\t\t\t\n\t\t\t\tif( ! $this->parent_id ) {\n\t\t\t\t\t$this->set_error( 7, 'the attachment has no parent id' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* upload the file ($_FILE) and attach it to the parent post\t\t\t */\n\t\t\t\t$result = media_handle_upload('async-upload', $this->parent_id, $attachment);\t\t\n if ( is_wp_error( $result )) {\n\t\t\t\t\t$this->set_error( 8, 'saving the attachment failed on the server' ); \n return; \n }\n\t\t\t\t$new_id = $result;\t\t\n\t\t\tbreak;\n\t\t\t\n\t\t\t/* comment */\n\t\t\tcase('comment'):\n\t\t\t\t$comment = $item_data['comment'];\n\n\t\t\t\t/* a post parent for a comment must be set */\t\t\t\n\t\t\t\tif( ! $this->parent_id ) {\n\t\t\t\t\t$this->set_error( 7, 'the comment has no parent id' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* in some odd cases it maybe that the parent id is not yet present in the comment array */\n\t\t\t\t$comment['comment_post_ID'] = $this->parent_id;\n\t\t\t\t\n\t\t\t\t$result = wp_insert_comment($comment);\n\t\t\t\t\n\t\t\t\t/* was there an error saving the comment */\t\t\t\t\t\t\t\n\t\t\t\tif( ! $result) {\n\t\t\t\t\t$this->set_error( 8, 'saving the comment failed on the server' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* got the id of the created comment */\n\t\t\t\t$new_id = $result;\n\t\t\tbreak;\n\t\t\tcase('user'):\n\t\t\t//@TODO\n\t\t\tbreak;\n\t\t\tcase('idone'):\n\t\t\t\t$new_id = $this->id; // interacting with the databse is outsourced to the data package handlers\t\t\t\n\t\t\tbreak;\n\t\t}\t\n\t\t\n\t\t/* save custom data, this only method does all the magic, details must be specified in the custom package handlers */\n\t\t$this->_action_custom_package_data( $new_id, $item_data);\t\n\t\t\n\t\t/* set a clean response */\n\t\t$this->parse_model_response($new_id);\t\n do_action('bb-wp-api_after_create', $new_id, $this->properties, $this );\n\t}", "public function store(CreateItemRequest $request)\n {\n // --\n // Check role/permission\n if (!AdminHelper::can_action(115, 'created')) {\n return response()->json(\"Access denied\", 403);\n }\n\n if ($this->itemRepo->create($request)) {\n return response()->json('success');\n } else {\n return response()->json('error', 401);\n }\n }", "public function insert()\n\t{\n\t\tif (isset($this->item->params) && $this->item->params instanceof CRegistry) {\n\t\t\t$this->item->params = $this->item->params->toString();\n\t\t}\n\n\t\t$ret = $this->db->insertObject('#__'.$this->table, $this->item);\n\n\t\t//Get the new record id\n\t\t$id = (int)$this->db->insertid();\n\n\t\t$this->setKey($id);\n\n\t\treturn $this;\n\t}", "public function create() {\n global $db;\n $this->_precreate();\n $sql_keys = ''; $sql_values = '';\n $data = array();\n foreach($this->_magicProperties as $key=>$value)\n {\n $sql_keys .= \"`\".addslashes($key).\"`,\";\n $sql_values .= \"?,\";\n $data[] = $value;\n }\n $sql_keys = substr($sql_keys, 0, -1);\n $sql_values = substr($sql_values, 0, -1);\n\n $query = \"INSERT INTO {$this->table} ($sql_keys) VALUES ($sql_values);\";\n $result = $db->query($query,$data);\n if (!isset($this->_magicProperties['id']) || !$this->_magicProperties['id']) {\n $id = $db->lastInsertId();\n $this->{'set'.$this->id_field}($id);\n }\n $this->loaded = true;\n $this->_postcreate($result);\n return $this->id;\n }", "public function Insert() {\n\t\t\t// Declare classes\n\t\t\t$RepItem\t\t\t= new RepItem();\n\t\t\t$ModItem\t\t\t= new ModItem();\n\t\t\t// Fetch and model Item types\n\t\t\t$combat_types\t\t= $RepItem->getAllCombatItemTypes();\n\t\t\t$combat_types\t\t= ($combat_types) ? $ModItem->combo($combat_types) : false;\n\t\t\t$noncombat_types\t= $RepItem->getAllNonCombatItemTypes();\n\t\t\t$noncombat_types\t= ($noncombat_types) ? $ModItem->combo($noncombat_types) : false;\n\t\t\t// Fetch and model fields for combo\n\t\t\t$RepQuestion\t\t= new RepQuestion();\n\t\t\t$branches\t\t\t= $RepQuestion->getAllBranches();\n\t\t\t$branches\t\t\t= ($branches) ? $ModItem->combo($branches, true) : false;\n\t\t\t// Define sub menu selection\n\t\t\t$GLOBALS['menu']['items']['opt1_css'] = 'details_item_on';\n\t\t\tView::set('branches',\t\t\t$branches);\n\t\t\tView::set('combat_types',\t\t$combat_types);\n\t\t\tView::set('noncombat_types',\t$noncombat_types);\n\t\t\t// Render view\n\t\t\tView::render('itemsInsert');\n \t\t}", "protected function create() {\n $this->db->insertRow($this->table_name, $this->update);\n storeDbMsg($this->db,\"New \" . $this->form_ID . \" successfully created!\");\n }", "public function insertAt($index, $item)\n {\n parent::insertAt($index, $this->createObject($item));\n }", "public function insert(){\n\t\t// $post->title = 'A post from the insert method';\n\t\t// $post->body = 'Some random ghibberrish';\n\t\t// $post->save();\n\n\t\t$data = array(\n\t\t\t'title' => 'A post from the insert method, using the data array',\n\t\t\t'body' => 'Some random ghibberrish, using the data array',\n\t\t\t'user_id' => 1\n\t\t);\n\n\t\tPost::create($data);\n\n\t\tdd('post inserted');\n\t}", "function CreateItem($conn) {\n\t/* Retrieve and sanitize inputs */\n\t$itemID = sanitizeMySQL($conn, get_post($conn, 'itemID')); // Get itemID & sanitize\n\t$title = sanitizeMySQL($conn, get_post($conn, 'title')); // Get title & sanitize\n\t$price = sanitizeMySQL($conn, get_post($conn, 'price')); // Get price & sanitize\n\t$weight = sanitizeMySQL($conn, get_post($conn, 'weight')); // Get weight & sanitize\n\t$quantityA = sanitizeMySQL($conn, get_post($conn, 'quantityA')); // Get quantity & sanitize\n\t$quantityB = sanitizeMySQL($conn, get_post($conn, 'quantityA')); // Get quantity & sanitize\n\t$description = sanitizeMySQL($conn, get_post($conn, 'description')); // Get description & sanitize\n\t//echo $itemID.\"<br>\".$title.\"<br>\".$price.\"<br>\".$weight.\"<br>\".$quantityA.\"<br>\".$quantityB.\"<br>\".$description;\n\n\t/* Insert item into DB */\n\tif(!ItemExists($conn, $itemID)) { // If item does not exist\n\t\tInsertItem($conn, $itemID, $title, $price, $weight, $description); // Insert item\n\t\techo '<div class=\"alert alert-primary\" role=\"alert\">Item insert created!</div>';\n\t} else {\n\t\techo '<div class=\"alert alert-primary\" role=\"alert\">Item already exists!</div>';\n\t\treturn false;\n\t}\n\n\t/* Insert item inventory into DB */\n\tif(!InsertInventory($conn, $itemID, 'A', $quantityA, null)) { // Try to item picture in DB\n\t\techo <<<_END\n <div class=\"alert alert-primary\" role=\"alert\">Inventory A insert failed!</div>\n_END;\n\t\treturn false; // Try to item picture in DB\n\t}\n\tif(!InsertInventory($conn, $itemID, 'B', $quantityB, null)) { // Try to item picture in DB\n\t\techo <<<_END\n <div class=\"alert alert-primary\" role=\"alert\">Inventory B insert failed!</div>\n_END;\n\t\treturn false; // Try to item picture in DB\n\t}\n\t/* Upload picture and retrieve filename */\n\t$picture = UploadPicture($itemID, $title); // Get directory of where the picture was stored\n\tif(is_null($picture)) return false;\n\t/* Insert picture into DB */\n\tif(!InsertPicture($conn, $itemID, $picture)) { // Try to insert picture in DB\n\t\techo <<<_END\n <div class=\"alert alert-primary\" role=\"alert\">Picture insert failed!</div>\n_END;\n\t\treturn false;\n\t} else\n\t\techo <<<_END\n\t\t<div class=\"alert alert-primary\" role=\"alert\">Picture inserted!</div>\n_END;\n\treturn true; // Successful item creation\n}", "public function actionCreateItem()\r\n {\r\n $catalogItem = new CatalogItem(['scenario' => 'create']);\r\n\r\n if($catalogItem->load(Yii::$app->request->post()) && $catalogItem->save())\r\n {\r\n $this->redirect(['/admin/catalog/index', 'id' => $catalogItem->id]);\r\n }\r\n\r\n $catalog = new Catalog();\r\n\r\n return $this->render(\r\n 'create',\r\n [\r\n 'catalog' => $catalog,\r\n 'catalogItem' => $catalogItem,\r\n ]\r\n );\r\n }", "abstract public function add_item();", "public function addItem($params){\n $sql = \"insert into fruit_table (name) values (:name)\";\n $sth = $this->parent->db->prepare($sql);\n // Key = value pair\n $sth->execute(array(\":name\"=>$params[\"name\"]));\n }", "public function insertItem() {\n\n // Build the query.\n $this->query = \"INSERT INTO inventory (make, model, year, color, mileage, type, price, transmission, drive) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?);\";\n\n try {\n $this->query = $this->db->prepare($this->query);\n $this->query->execute(array($_POST['make'], $_POST['model'], $_POST['year'], $_POST['color'], $_POST['mileage'], $_POST['type'], $_POST['price'], $_POST['transmission'], $_POST['drive'],));\n\n // Check if any rows were added.\n if($this->query->rowCount() == 1) {\n return \"The vehicle has been added to the inventory.\";\n } else {\n return \"Sorry, we did not find any matches. No items where added.\";\n }\n \n } catch(\\PDOException $e) {\n exit($e->getMessage());\n }\n }", "public function saveItem(array $itemData)\n {\n return $this->model->create($itemData);\n }", "public function insert() {\r\n\r\n\t\t// Does the Genre object already have an ID?\r\n\t\tif ( !is_null( $this->id ) ) trigger_error ( \"Genre::insert(): Attempt to insert an Genre object that already has its ID property set (to $this->id).\", E_USER_ERROR );\r\n\r\n\t\t// Insert the Genre\r\n\t\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\r\n\t\t$sql = \"INSERT INTO :table ( id, name ) VALUES ( :id, :name )\";\r\n\t\t$st = $conn->prepare ( $sql );\r\n\t\t$st->bindValue( \":table\", DB_TBL_GENRE, PDO::PARAM_STR );\r\n\t\t$st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n\t\t$st->bindValue( \":name\", $this->name, PDO::PARAM_STR );\r\n\t\t$st->execute();\r\n\t\t$this->id = $conn->lastInsertId();\r\n\t\t$conn = null;\r\n\t}", "protected function _insert()\n\t{\n\t\t$this->date_added = \\Core\\Date::getInstance(null,\\Core\\Date::SQL_FULL, true)->toString();\n\t\t$this->date_modified = $this->date_added;\n\t\t$this->last_online = $this->date_modified;\n\t\t$this->activity_open = $this->date_modified;\n\t\t$this->language_id = \\Core\\Base\\Action::getModule('Language')->getLanguageId();\n\t}", "private function saveItem()\n {\n DB::beginTransaction();\n try\n {\n $customer = ( !empty(request()->json('id')) ) ? Customer::find(request()->json('id')) : new Customer();\n $customer->name = request()->json('name');\n $customer->contact = request()->json('contact');\n $customer->email = request()->json('email');\n $customer->phone = request()->json('phone');\n $customer->fax = request()->json('fax');\n $customer->address1 = request()->json('address1');\n $customer->address2 = request()->json('address2');\n $customer->city = request()->json('city');\n $customer->postal_code = request()->json('postal_code');\n $customer->province_id = request()->json('province_id');\n $customer->country_id = request()->json('country_id');\n $customer->active = ( !empty(request()->json('active')) ) ? true : false;\n $customer->save();\n \n //set customer id\n $customer_id = $customer->id;\n\n //add to warehouse client table if it was a popup and warehouse and client id's were sent in\n $warehouse_id = request()->json('warehouse_id');\n $client_id = request()->json('client_id');\n if ( !empty($warehouse_id) && !empty($client_id) )\n {\n $customer_client_warehouse = new CustomerClientWarehouse();\n $customer_client_warehouse->customer_id = $customer_id;\n $customer_client_warehouse->warehouse_id = $warehouse_id;\n $customer_client_warehouse->client_id = $client_id;\n $customer_client_warehouse->save();\n }\n else\n {\n /* Update client warehouse */\n //delete all current data\n CustomerClientWarehouse::where('customer_id', '=', $customer_id)->delete();\n\n //merge both lists and add\n $items = request()->json('client_warehouse_new', []);\n $items = array_merge($items, request()->json('client_warehouse', []));\n\n foreach( $items as $item )\n {\n $object = new CustomerClientWarehouse();\n $object->customer_id = $customer->id;\n $object->warehouse_id = $item['warehouse_id'];\n $object->client_id = $item['client_id'];\n $object->save();\n }\n }\n }\n catch(\\Exception $e)\n {\n //rollback since something failed\n DB::rollback();\n\n //log error so we can trace it if need be later\n Log::info(auth()->user());\n Log::error($e);\n\n //set error message. Don't send verbose error if not in debug mode\n $err_msg = ( env('APP_DEBUG') === true ) ? $e->getMessage() : 'SQL error. Please try again or report the issue to the admin.';\n\n //send back error\n $error_message = ['errorMsg' => 'The customer was not saved. Error: ' . $err_msg];\n\n return response()->json($error_message);\n }\n\n //if we got here, then everything worked!\n DB::commit();\n\n return response()->json($customer_id);\n }", "public function create(){\n\n $id=0;\n $attributes = $this->prepared_attributes_insert();\n\t\t\n\t $sql = \"INSERT INTO \".static::$table_name.\" (\";\n\t $sql .= join(\",\",array_keys($attributes));\n\t $sql .= \") VALUES (\"; \n $sql .= join(\",\",array_values($attributes));\t\t \n $sql .= \") \";\n \n $idf = static::$id_field;\n \n $this->{static::$id_field} = static::db()->insert($sql);\n static::db()->free_statement();\n if (static::$idf !== -1)\n {\n\t return true;\n\t } else {\n\t return false;\n\t }\n }", "public function create()\n {\n //\n// $this->store();\n\n }", "public function addItem($item)\n {\n\n /*echo \"<pre>\";\n print_r($item);exit();*/\n\n \t/*$sql=\"INSERT INTO `item`(`product_code`,`item_name`, `hsn_code`, `category_id`, `unit_id`, `tax_id`, `item_description`, `purchase_price`, `sales_price`, `status`, `picture`,`user_id`,`bar_code`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)\";*/\n\n if($this->db->insert('item',$item)){\n return true;\n }\n return false;\n\n }", "private function create()\n {\n if ($this->isRequired()) {\n $db = Database::getDatabaseConnection();\n $db->exec($this->getDropQuery());\n $db->exec($this->getCreateQuery());\n $this->populate($db);\n }\n }", "abstract protected function saveItems();", "protected function create()\n {\n $database = cbSQLConnect::connect('object');\n if (isset($database))\n {\n $fields = self::$db_fields;\n $data = array();\n foreach($fields as $key)\n {\n if ($this->{$key})\n {\n $data[$key] = $this->{$key};\n }\n else\n $data[$key] = NULL;\n\n }\n // return data\n $insert = $database->SQLInsert($data, \"place\"); // return true if sucess or false\n if ($insert)\n {\n return $insert;\n }\n else\n {\n return false;\n }\n }\n }", "public function created(Item $item)\n {\n //\n }", "public function insertItem(Request $request)\n {\n\n error_log($request->get('precioCompraDefecto'));\n //error_log($request);\n $item = new articulo();\n $item = new articulo([\n 'nombre' => $request->get('nombre'),\n 'descripcion' => $request->get('descripcion'),\n 'imagen' => $request->get('imagen'),\n 'codigo' => $request->get('codigo'),\n 'stockMinimo' => $request->get('stockMinimo'),\n 'precioCompraDefecto' => $request->get('precioCompraDefecto'),\n 'precioVentaDefecto' => $request->get('precioVentaDefecto'),\n 'idCategoria' => $request->get('idCategoria'),\n 'idMedida' => $request->get('idMedida'),\n 'idLugarServir' => $request->get('idLugarServir'),\n ]);\n\n if (strpos($item->imagen, 'storage') !== false) {\n $item->imagen = \"/storage/images/categorias/nada.png\";\n } else {\n $item->imagen = \"/storage/images/categorias/\" . $item->imagen;\n }\n\n if ($item->stockMinimo == null) {\n $item->stockMinimo = 0;\n }\n\n if ($item->precioCompraDefecto == null) {\n\n $item->precioCompraDefecto = 0.00;\n\n }\n if ($item->precioVentaDefecto == null) {\n\n $item->precioVentaDefecto = 0.00;\n }\n\n if ($item->precioVentaDefecto != null) {\n\n $item->precioVentaDefecto = floatval($item->precioVentaDefecto);\n }\n if ($item->precioCompraDefecto != null) {\n\n $item->precioCompraDefecto = floatval($item->precioCompraDefecto);\n }\n\n if ($item->idCategoria == null) {\n $item->idCategoria = 1;\n }\n if ($item->idMedida == null) {\n $item->idMedida = 1;\n }\n\n $item->estado = true;\n $item->save();\n\n error_log('[articulo]Nueva ');\n return response()->json('Agregado exitosamente');\n }", "public function insert($item)\n {\n $this->insertItem($item, $this->root);\n }", "protected function create_item( $name ) {\n\t\t// Check whether the item name is still available\n\t\tif ( ThumbsUp_Database::item_name_exists( $name ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Initialize the item fields\n\t\t$this->item = array(\n\t\t\t'name' => (string) $name,\n\t\t\t'closed' => 0,\n\t\t\t'date' => time(),\n\t\t);\n\n\t\t// Insert the item into the database\n\t\t/*sqlite_escape_string repalce with mysqli_escape_string PHP7 Compatibility*/\n\t\tThumbsUp_Database::db()->queryExec(\"\n\t\t\tINSERT INTO items (id, name, closed, date)\n\t\t\tVALUES (NULL, '\" . mysqli_escape_string( $this->item['name'] ) . \"', {$this->item['closed']}, {$this->item['date']})\");\n\n\t\t// Load the item id\n\t\t$this->item['id'] = ThumbsUp_Database::db()->lastInsertRowid();\n\n\t\t// All done successfully\n\t\treturn true;\n\t}", "function addItem2DB()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $result = $_POST['itemInfo'];\n echo $this->carousel_model->add($result);\n }\n }", "function createObject()\n {\n $stmt = $this->mysqli->prepare(\"INSERT INTO object(`name`, `description`, `price`, `typeCoin`, `weight`, `volume`, `limitationStrength`,\n `limitationDex`, `limitationCons`, `limitationInt`, `limitationWis`,`typeObject`, `primal`)\n VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)\");\n $stmt->bind_param(\n \"ssisiiiiiiisi\",\n $this->name,\n $this->description,\n $this->price,\n $this->typeCoin,\n $this->weight,\n $this->volume,\n $this->limitationStrength,\n $this->limitationDex,\n $this->limitationCons,\n $this->limitationInt,\n $this->limitationWis,\n $this->typeObject,\n $this->primal\n );\n $stmt->execute();\n $this->id = $this->mysqli->insert_id;\n $stmt->close();\n }", "public function insert(PDO $pdo) {\n\t\t// enforce the itemId is null (i.e., don't insert a item that already exists)\n\t\tif($this->itemId !== null) {\n\t\t\tthrow(new PDOException(\"not a new item\"));\n\t\t}\n\n\t\t// create query template\n\t\t$query\t = \"INSERT INTO item(itemId, userId, itemDescription, images, email, price, location)\n\t\tVALUES(:itemId, :itemDescription, :images, :email, :price, :location)\";\n\t\t$statement = $pdo->prepare($query);\n\n\n\t\t// update the null tweetId with what mySQL just gave us\n\t\t$this->itemId = intval($pdo->lastInsertId());\n\t}", "function create()\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$this->setId($ilDB->nextId(\"bookmark_data\"));\n\t\t$q = sprintf(\n\t\t\t\t\"INSERT INTO bookmark_data (obj_id, user_id, title,description, target, type) \".\n\t\t\t\t\"VALUES (%s,%s,%s,%s,%s,%s)\",\n\t\t\t\t$ilDB->quote($this->getId(), \"integer\"),\n\t\t\t\t$ilDB->quote($_SESSION[\"AccountId\"], \"integer\"),\n\t\t\t\t$ilDB->quote($this->getTitle(), \"text\"),\n\t\t\t\t$ilDB->quote($this->getDescription(), \"text\"),\n\t\t\t\t$ilDB->quote($this->getTarget(), \"text\"),\n\t\t\t\t$ilDB->quote('bm', \"text\")\n\t\t\t);\n\n\t\t$ilDB->manipulate($q);\n\t\t$this->tree->insertNode($this->getId(), $this->getParent());\n\t}", "public function insertItem($userId, $data)\n {\n\n $orm = $this->getOrm();\n\n $itemNode = $orm->newEntity(\"WbfsysAddressItem\");\n\n $itemNode->vid = $userId;\n\n $itemNode->use_for_contact = $data->use_for_contact;\n $itemNode->flag_private = $data->flag_private;\n $itemNode->name = $data->name;\n $itemNode->address_value = $data->address_value;\n $itemNode->id_type = $data->id_type;\n $itemNode->description = $data->description;\n\n $itemNode = $orm->insert($itemNode);\n\n return $itemNode;\n\n }", "public function testStore() {\n\n if ($this->skipBaseTests) $this->markTestSkipped('Skipping Base Tests');\n\n $item = $this->model->factory()->make();\n\n // Check create :: Create model\n $response = $this->postJson($this->baseUrl, $item->toArray(), ['FORCE_CONTENT_TYPE'=>'json'])\n ->assertStatus(200);\n\n // Check that the database contains the item created by the factory\n $this->assertDatabaseHas($this->table, $item->toArray());\n }", "public function create()\n\t{\n\t\t$image = $this->uploadImage();\n if ($image) {\n $this->data('image', $image);\n }\n\t\t$this->data([\n\t\t\t'story_title' => $this->request->post('story_title'),\n\t\t\t'story_name' => $this->request->post('story_name'),\n\t\t\t'details' => $this->request->post('details'),\n\t\t\t'status' => $this->request->post('status'),\n\t\t\t'created_at' => date('Y-m-d H:i:s'),\n\t\t])->insert($this->table);\n\t}", "function create()\n\t{\n\t\tglobal $ilDB;\n\n\t\t$q = \"INSERT INTO map_area (item_id, nr, shape, \".\n\t\t\t\"coords, link_type, title, href, target, type, highlight_mode, highlight_class, target_frame) \".\n\t\t\t\" VALUES (\".\n\t\t\t$ilDB->quote($this->getItemId(), \"integer\").\",\".\n\t\t\t$ilDB->quote($this->getNr(), \"integer\").\",\".\n\t\t\t$ilDB->quote($this->getShape(), \"text\").\",\".\n\t\t\t$ilDB->quote($this->getCoords(), \"text\").\",\".\n\t\t\t$ilDB->quote($this->getLinkType(), \"text\").\",\".\n\t\t\t$ilDB->quote($this->getTitle(), \"text\").\",\".\n\t\t\t$ilDB->quote($this->getHref(), \"text\").\",\".\n\t\t\t$ilDB->quote($this->getTarget(), \"text\").\",\".\n\t\t\t$ilDB->quote($this->getType(), \"text\").\",\".\n\t\t\t$ilDB->quote($this->getHighlightMode(), \"text\").\",\".\n\t\t\t$ilDB->quote($this->getHighlightClass(), \"text\").\",\".\n\t\t\t$ilDB->quote($this->getTargetFrame(), \"text\").\")\";\n\t\t$ilDB->manipulate($q);\n\t}", "private function saveItem()\n {\n DB::beginTransaction();\n try\n {\n $product = !empty(request()->json('id')) ? Product::find(request()->json('id')) : new Product();\n $product->client_id = auth()->user()->current_client_id;\n $product->warehouse_id = auth()->user()->current_warehouse_id;\n $product->sku = request()->json('sku');\n $product->sku_client = request()->json('sku_client', null);\n $product->name = request()->json('name');\n $product->barcode = request()->json('barcode', null);\n $product->barcode_client = request()->json('barcode_client', null);\n $product->rfid = request()->json('rfid', null);\n $product->reorder_level = request()->json('reorder_level');\n $product->product_type_id = request()->json('product_type_id');\n\n /* HARDCODE IT TO BE THE DEFAULT FOR THE PRODUCT TYPE FOR NOW. CHANGE IT TO BE PER PRODUCT LATER */\n $product->default_uom = request()->json('product_type')['default_uom'];\n\n $product->uom1 = request()->json('uom1');\n $product->uom2 = request()->json('uom2', null);\n $product->uom3 = request()->json('uom3', null);\n $product->uom4 = request()->json('uom4', null);\n $product->uom5 = request()->json('uom5', null);\n $product->uom6 = request()->json('uom6', null);\n $product->uom7 = request()->json('uom7', null);\n $product->uom8 = request()->json('uom8', null);\n $product->oversized_pallet = (!empty(request()->json('oversized_pallet'))) ? true : false;\n $product->active = (!empty(request()->json('active'))) ? true : false;\n\n $product->save();\n\n //check for default bin and add it\n if( empty(request()->json('id')) )\n {\n $aisle = request()->json('aisle');\n $section = request()->json('section');\n $tier = request()->json('tier');\n $position = request()->json('position');\n\n //part of default bin data is missing\n if( empty($aisle) || empty($section) || empty($tier) || empty($position) )\n {\n throw new Exception('Default bin data is missing');\n }\n\n //add the bin\n else\n {\n $bin = new Bin();\n $bin->product_id = $product->id;\n $bin->default = true;\n $bin->active = true;\n $bin->aisle = $aisle;\n $bin->section = $section;\n $bin->tier = $tier;\n $bin->position = $position;\n $bin->save();\n }\n }\n }\n catch(\\Exception $e)\n {\n //rollback since something failed\n DB::rollback();\n\n //log error so we can trace it if need be later\n Log::info(auth()->user());\n Log::error($e);\n\n //set error message. Don't send verbose error if not in debug mode\n $err_msg = ( env('APP_DEBUG') === true ) ? $e->getMessage() : 'SQL error. Please try again or report the issue to the admin.';\n\n //send back error\n $error_message = array('errorMsg' => 'The product was not saved. Error: ' . $err_msg);\n return response()->json($error_message);\n }\n\n //if we got here, then everything worked!\n DB::commit();\n\n return $product->id;\n }", "public function ___save(Saveable $item) {\n\n\t\t$blank = $this->makeBlankItem();\n\t\t\n\t\tif(!$item instanceof $blank) {\n\t\t\t$className = $blank->className();\n\t\t\tthrow new WireException(\"WireSaveableItems::save(item) requires item to be of type: $className\");\n\t\t}\n\n\t\t$database = $this->wire()->database; \n\t\t$table = $database->escapeTable($this->getTable());\n\t\t$sql = \"`$table` SET \";\n\t\t$id = (int) $item->id;\n\t\t$this->saveReady($item); \n\t\t$data = $item->getTableData();\n\t\t$binds = array();\n\n\t\tforeach($data as $key => $value) {\n\t\t\tif(!$this->saveItemKey($key)) continue; \n\t\t\tif($key === 'data') $value = is_array($value) ? $this->encodeData($value) : '';\n\t\t\t$key = $database->escapeTableCol($key);\n\t\t\t$bindKey = $database->escapeCol($key);\n\t\t\t$binds[\":$bindKey\"] = $value; \n\t\t\t$sql .= \"`$key`=:$bindKey, \";\n\t\t}\n\n\t\t$sql = rtrim($sql, \", \"); \n\n\t\tif($id) {\n\t\t\t\n\t\t\t$query = $database->prepare(\"UPDATE $sql WHERE id=:id\");\n\t\t\tforeach($binds as $key => $value) {\n\t\t\t\t$query->bindValue($key, $value); \n\t\t\t}\n\t\t\t$query->bindValue(\":id\", $id, \\PDO::PARAM_INT);\n\t\t\t$result = $query->execute();\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t$query = $database->prepare(\"INSERT INTO $sql\"); \n\t\t\tforeach($binds as $key => $value) {\n\t\t\t\t$query->bindValue($key, $value); \n\t\t\t}\n\t\t\t$result = $query->execute();\n\t\t\tif($result) {\n\t\t\t\t$item->id = (int) $database->lastInsertId();\n\t\t\t\t$this->getAll()->add($item);\n\t\t\t\t$this->added($item);\n\t\t\t}\n\t\t}\n\n\t\tif($result) {\n\t\t\t$this->saved($item); \n\t\t\t$this->resetTrackChanges();\n\t\t} else {\n\t\t\t$this->error(\"Error saving '$item'\"); \n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function insert_item_type($metadata = array(), $elementInfos = array())\n{\n $builder = new Builder_ItemType(get_db());\n $builder->setRecordMetadata($metadata);\n $builder->setElements($elementInfos);\n return $builder->build();\n}", "function insertItem( $data = NULL ){\n if( $data == NULL ) return ; \n return $this->db->insert($this->table, $data); \n }", "function addIngredient(){\n //check if ingredient name is set or not\n if(isset($_POST['ingredientname'])){\n $name = $_POST['ingredientname'];\n }\n\n //create item array for prepared statement\n $item = array(\":name\" => $name, \":uid\" => $_SESSION['user_session']);\n try{\n //get global database connection object\n global $db_con;\n //create and execute insert query\n $stmt = $db_con->prepare(\"INSERT INTO Item_master (Item_name, Cust_id) VALUES (:name, :uid)\");\n if($stmt->execute($item)){\n //print ok if query gets executed successfully\n echo 'ok';\n }\n }\n catch(PDOException $e){\n //print exception error message\n echo $e->getMessage();\n }\n\n }", "public function insert(stubObject $entity);", "function create()\n {\n $this->_getConnection();\n $this->preSave();\n $req = 'INSERT INTO `'.$this->_con->pfx.$this->_table.'` SET'.\"\\n\";\n $fields = array();\n $assoc = array();\n foreach ($this->_cols as $col=>$val) {\n $field = new $val['type']();\n if ($col == 'id') {\n continue;\n } elseif ($field->type == 'manytomany') {\n // If is a defined array, we need to associate.\n if (is_array($this->$col)) {\n $assoc[$val['model']] = $this->$col;\n }\n continue;\n }\n $fields[] = '`'.$col.'` = \\''.$this->_con->esc($this->$col).'\\'';\n }\n $req .= implode(','.\"\\n\", $fields);\n if (!$this->_con->execute($req)) {\n throw new Exception($this->_con->error());\n }\n if (false === ($id=$this->_con->getLastID())) {\n throw new Exception($this->_con->error());\n }\n $this->_data['id'] = $id;\n foreach ($assoc as $model=>$ids) {\n $this->batchAssoc($model, $ids);\n }\n return true;\n }", "protected function _create()\n {\n $entry = $this->_db->createRow();\n foreach ($this->getFields() as $key => $value) {\n $entry->{$key} = $value;\n }\n return $entry->save();\n }", "public function store()\n {\n # code...\n $item = new Item();\n\n $item->item_name = request('itemname');\n $item->price = request('itemprice');\n $item->itemCategory = request('type');\n $item->save();\n return redirect()->route('item.index');\n }", "public function action_create_item($id = NULL)\n {\n if ($id === NULL)\n {\n $id = $this->request->param('id');\n }\n\n $this->action_edit_item(FALSE, $id);\n }", "public function insert($data);", "public function add($item);", "public function add($item);", "public function createItem($data)\n {\n DB::beginTransaction();\n try {\n $warehouse_data=array();\n $user_id=Auth::user()->id; \n \n foreach ($data['warehouse'] as $key => $row) \n {\n $warehouse_data['state_id']=$row['state'];\n $warehouse_data['district_id']=$row['district'];\n $warehouse_data['warehouse']=$row['warehouse'];\n $warehouse_data['corresponding_hats']=$row['corresponding_hats'];\n $warehouse_data['storage_type']=$row['storage_type'];\n $warehouse_data['storage_capacity']=$row['storage_capacity'];\n $warehouse_data['created_by']=$user_id;\n $warehouse_data['updated_by']=$user_id;\n\n $item = new ServiceModel($warehouse_data);\n $item->save(); \n\n /*Insert blocks Now */\n $warehouse_block_data=array();\n foreach ($row['block'] as $key => $value) \n {\n $warehouse_block_data['warehouse_id']=$item->id;\n $warehouse_block_data['block_id']=$value;\n $warehouse_block_data['created_by']=$user_id;\n $warehouse_block_data['updated_by']=$user_id;\n $block_data=new WarehouseMasterBlocks($warehouse_block_data);\n $block_data->save(); \n }\n \n }\n\n \n\n DB::commit();\n\n return ServiceModel::where([\n 'id' => $item->id\n ])->firstOrFail();\n \n }catch (\\Throwable $th) {\n DB::rollBack();\n throw $th;\n }\n }", "public static function addItem($conn, $sku, $title, $price, $quantity=\"1\", $taxable=\"0\", $tangible=\"0\", $available=\"0\", $listed=\"0\", $description=\"\", $notes =\"\")\n\t{\n\t\t// add the item entry\n\t\t$st = <<<sql\n\t\t\tinsert into Items (sku, title, price, quantity, taxable, tangible, available, listed, description, notes)\n\t\t\tvalues (:sku, :title, :price, :quantity, :taxable, :tangible, :available, :listed, :description, :notes);\n\t\tsql;\n\t\t\n\t\t// start transaction\n\t\t$conn->beginTransaction();\n\t\t\n\t\t$q = $conn->prepare($st);\n\t\t$q->execute([\n\t\t\t':sku' => $sku,\n\t\t\t':title' => $title,\n\t\t\t':price' => $price,\n\t\t\t':quantity' => $quantity,\n\t\t\t':taxable' => $taxable,\n\t\t\t':tangible' => $tangible,\n\t\t\t':available' => $available,\n\t\t\t':listed' => $listed,\n\t\t\t':description' => $description,\n\t\t\t':notes' => $notes,\n\t\t\t]);\n\t\t\n\t\t// get last ID entered and commit\n\t\t$id = $conn->query(\"select last_insert_id() as id from items\");\n\t\t$output = ($id->fetch())['id'];\n\t\t//die();\n\t\t$conn->commit();\n\t\t\n\t\treturn (int)$output;\n\t}", "protected function _insert()\n {\n \n }", "protected function _insert()\n {\n \n }", "public function insert_() {\n\n\n\t\t\t$podcast = Model\\Podcast::get_instance();\n\n\t\t}", "public function createAction()\n {\n $entity = new Item();\n $request = $this->getRequest();\n $form = $this->createForm(new ItemType(), $entity);\n $form->handleRequest ($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n\n $photo = $entity->getPhoto();\n if(!empty($photo))\n {\n $media = $this->get('striide_inventory.service.media')->save($entity->getPhoto());\n $entity->setPhoto($media->getId());\n }\n\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('StriideInventoryBundle_admin_item_show', array('id' => $entity->getId())));\n\n }\n\n return $this->render('StriideInventoryBundle:Item:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'json_types' => json_encode($this->get('striide_inventory.types')->getInventoryTypesArray()),\n 'form_theme' => 'StriideTwitterbootstrapBundle:Form:form_theme.html.twig',\n 'crumbs' => array(\n array('href' => $this->get('router')->generate('StriideInventoryBundle_homepage'),\n 'label' => $this->get('translator')->trans('Inventory')),\n array('href' => $this->get('router')->generate('StriideInventoryBundle_admin_item_new'),\n 'label' => $this->get('translator')->trans('Create new Item'))\n )\n ));\n }", "public function createAction()\n {\n $itemGroupId = $this->getRequest()->getParam('containerId');\n \n //prepare form for input event\n $form = $this->_model->getForm('insert',array(\n 'containerId' => $itemGroupId,\n 'containerType' => 'itemGroup',\n 'model' => $this->_model\n ));\n \n \n //define form action\n $form->setAction($this->view->url(\n array(\n 'controller' => 'itemgrouprow',\n 'action' => 'create',\n 'containerId' =>$itemGroupId,\n 'askComeBack' => 'false'\n ),\n 'event'\n ));\n \n $this->processInsert(\n $form, \n 'msg_itemgrouprow_created',\n $this->getHelper('lastVisited')->redirectUrl(\n $this->view->url(\n array(\n 'controller' => 'itemgrouprow',\n 'action' => 'index',\n 'containerId' => $itemGroupId),\n 'event'\n )));\n }", "function addItem($userInput)\n {\n $stmt = $this->dbConnection->prepare('INSERT INTO todos (item) VALUES (:item)');\n $stmt->bindValue(':item', $userInput, PDO::PARAM_STR);\n $stmt->execute();\n $errorMsg = \"Inserted new item with ID: \" . $this->dbConnection->lastInsertId();\n $_POST=[]; \n }", "private function _store(Yourdelivery_Model_Inventory $item) {\n $request = $this->getRequest();\n $form = new Yourdelivery_Form_Administration_Inventory_Create();\n if ($form->isValid($request->getPost())) {\n\n if (!$this->_subChecks($form)) {\n return;\n }\n\n $values = $form->getSubForm('item')->getValues();\n $values['item']['printerNextDate'] = date('Y-m-d H:i:s', strtotime($values['item']['printerNextDate']));\n $item->setData($values['item']);\n $item->save();\n\n //store all the stati for creation \n $item->addComment('needs', $form->getSubform('status')->getValue('statusCommentNeeds'), $form->getSubform('status')->getValue('statusNeeds'), $this->session->admin->getId());\n $item->addComment('printer', $form->getSubform('status')->getValue('statusCommentPrinterCost'), $form->getSubform('status')->getValue('statusPrinterCost'), $this->session->admin->getId());\n $item->addComment('website', $form->getSubform('status')->getValue('statusCommentWebsite'), $form->getSubform('status')->getValue('statusWebsite'), $this->session->admin->getId());\n $item->addComment('flyer', $form->getSubform('status')->getValue('statusCommentFlyer'), $form->getSubform('status')->getValue('statusFlyer'), $this->session->admin->getId());\n $item->addComment('terminal', $form->getSubform('status')->getValue('statusCommentTerminal'), $form->getSubform('status')->getValue('statusTerminal'), $this->session->admin->getId());\n\n $this->_redirect('administration_inventory/overview');\n }\n else {\n $this->view->post = $request->getPost();\n $this->error($form->getMessages());\n $this->error(__b(\"Konnte Posten nicht anlegen\"));\n }\n }", "public function insert() {\r\n\t\t$this->getMapper()->insert($this);\r\n\t}", "public function addItem(Collection $collection, ItemCreateStruct $itemCreateStruct): Item;", "private function insertOrdemItem($item, $orderID) {\n $ordemItem = new OrderItem();\n $ordemItem->orderID = $orderID;\n $ordemItem->ISBN = $item['ISBN'];\n $ordemItem->qty = $item['quantity'];\n $ordemItem->price = $item['price'];\n $ordemItem->save();\n }", "public function store(ItemFormRequest $request)\n {\n $item = Item::create($request->all());\n flash('New item has been added!', 'success');\n return redirect('items');\n }", "protected function saveInsert()\n {\n }", "public function create() {\n\t\t$columns = implode(', ', array_keys($this->params));\n\t\t$bindings = substr(str_repeat(', ?', count($this->params)), 2);\n\t\t$sql = 'INSERT INTO ' . static::$table . ' (' . $columns . ') VALUES (' . $bindings . ');';\n\t\t$query = DBH()->prepare($sql);\n\t\t$query->execute(array_values($this->params));\n\t}", "public function store()\n {\n $this->form_validation->set_rules('title', 'Title', 'required');\n $this->form_validation->set_rules('description', 'Description', 'required');\n\n if ($this->form_validation->run() == FALSE){\n $this->session->set_flashdata('errors', validation_errors());\n redirect(base_url('items/create'));\n }else{\n $this->itemCRUD->insert();\n redirect(base_url('items'));\n }\n }", "private function create() {\n\t\t$id = $this->objAccessCrud->getId();\n\t\tif (!empty ( $id )) return;\n\t\t// Check if there are permission to execute delete command.\n\t\t$result = $this->clsAccessPermission->toCreat();\n\t\tif(!$result){\n\t\t\t$this->msg->setWarn(\"You don't have permission to create!\");\n\t\t\treturn;\n\t\t}\n\t\t// Execute insert.\n\t\t$this->objAccessCrud->setDateInsert(date(\"Y-m-d H:i:s\"));\n\t\t$id = $this->objAccessCrud->create ();\n\t\t// Check result.\n\t\tif ($id == 0) {\n \t\t\t$this->msg->setError ('There were issues on creating ther record!');\n\t\t\t\treturn;\n\t\t}\n\t\t// Save the id in the session to be used in the update.\n\t\t$_SESSION ['PK']['ACCESSCRUD'] = $id;\n\t\t\t\n\t\t$this->msg->setSuccess ( 'Created the record with success!' );\n\t\treturn;\n\t}", "public function upsertItem($item) {\n\t\t\n\t\tif($this->_storageType == self::USE_DBASE) {\n\t\t\t\n\t\t\tif($item->entityTypeId == Model_Core_DataProtection_ItemEntityTypes::REFERENCING) {\n\n\t\t\t\tif(empty($this->_referencingDpaDatasource)) {\n\n\t\t\t\t\t$this->_referencingDpaDatasource = new Datasource_Core_DataProtection_Referencing();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->_referencingDpaDatasource->upsertItem($item);\n\t\t\t}\n\t\t\telse if($item->entityTypeId == Model_Core_DataProtection_ItemEntityTypes::INSURANCE) {\n\t\t\t\t\n\t\t\t\tif(empty($this->_insuranceDpaDatasource)) {\n\t\t\t\t\t\n\t\t\t\t\t$this->_insuranceDpaDatasource = new Datasource_Core_DataProtection_Insurance();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->_insuranceDpaDatasource->upsertItem($item);\n\t\t\t}\n\t\t\telse if($item->entityTypeId == Model_Core_DataProtection_ItemEntityTypes::WEBLEAD) {\n\t\t\t\n\t\t\t\tif(empty($this->_webleadsDatasource)) {\n\t\t\t\t\t\n\t\t\t\t\t$this->_webleadsDatasource = new Datasource_Core_DataProtection_WebLeads();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->_webleadsDatasource->upsertItem($item);\n\t\t\t}\n\t\t}\n\t\telse if($this->_storageType == self::USE_SESSION) {\n\t\t\t\n\t\t\tif(empty($this->_dataProtectionSession)) {\n\t\t\t\t\n\t\t\t\t$this->_dataProtectionSession = new Zend_Session_Namespace('data_protection');\n\t\t\t\t$this->_dataProtectionSession->itemArray = array();\n\t\t\t}\n\t\t\t\n\t\t\t$this->_dataProtectionSession->itemArray[] = $item;\n\t\t}\n\t}", "public abstract function insert();" ]
[ "0.7539195", "0.75069106", "0.7464451", "0.74273485", "0.7137917", "0.7101741", "0.7052292", "0.68731165", "0.6766768", "0.6743298", "0.6723123", "0.6721574", "0.6721331", "0.6665712", "0.66564", "0.6620478", "0.65321815", "0.65267277", "0.6512981", "0.64876956", "0.64641845", "0.643889", "0.6396285", "0.6352451", "0.63456637", "0.63433325", "0.6331995", "0.6297483", "0.628773", "0.62738174", "0.6273355", "0.6268984", "0.6258289", "0.6246253", "0.62419206", "0.6235787", "0.622551", "0.620858", "0.6188995", "0.6188491", "0.6183571", "0.6174438", "0.6155347", "0.61479557", "0.6142075", "0.6141951", "0.6135779", "0.61346084", "0.61326313", "0.6129071", "0.6127301", "0.6123759", "0.6120747", "0.61171836", "0.6102078", "0.6101258", "0.6094283", "0.609402", "0.60926855", "0.6077606", "0.6075524", "0.60740143", "0.6071871", "0.60692686", "0.60663754", "0.6066314", "0.60636663", "0.60515916", "0.6051249", "0.60445374", "0.6043083", "0.60417956", "0.6038731", "0.6037552", "0.60299325", "0.6011036", "0.6006578", "0.600178", "0.6000754", "0.59989893", "0.5994537", "0.5994537", "0.5993459", "0.5987083", "0.5979612", "0.5979612", "0.59787273", "0.5970006", "0.59670806", "0.5961835", "0.59597707", "0.5957243", "0.5955197", "0.59497947", "0.5949116", "0.5948101", "0.5947622", "0.59472066", "0.5945573", "0.5938133", "0.59334004" ]
0.0
-1
Update data into database.
public function update( &$args ) { $section = $this->parse( $args ); if ( empty( $section['section_id'] ) ) { return $this->create( $args ); } $section_id = $section['section_id']; $update_data = array( 'section_name' => $section['section_name'], 'section_course_id' => $section['section_course_id'], 'section_order' => $section['section_order'], 'section_description' => $section['section_description'], ); global $wpdb; $wpdb->update( $wpdb->learnpress_sections, $update_data, array( 'section_id' => $section_id ) ); $section['section_id'] = $section_id; return $section; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function db_update() {}", "public function update($data) {}", "public function update($data) {}", "private function update()\n {\n $queryString = 'UPDATE ' . $this->table . ' SET ';\n foreach ($this->data as $column => $value) {\n if ($column != self::ID) {\n $queryString .= $column . ' =:' . $column . ',';\n }\n }\n $queryString .= ' updated_at = sysdate() WHERE 1 = 1 AND ' . self::ID . ' =:' . self::ID;\n $this->query = $this->pdo->prepare($queryString);\n }", "public function updateData()\n {\n try {\n// echo \"<pre>\";\n// print_r($this->where);\n// print_r($this->insertUpdateArray);\n// exit;\n DB::table($this->dbTable)\n ->where($this->where)\n ->update($this->insertUpdateArray);\n } catch (Exception $ex) {\n throw new Exception($ex->getMessage(), 10024, $ex);\n }\n }", "private function _update() {\n\n $this->db->replace(XCMS_Tables::TABLE_USERS, $this->getArray());\n $this->attributes->save();\n\n }", "abstract public function updateData();", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function update(array $data);", "public function update(array $data);", "public function update(array $data);", "protected function update() {\n $this->db->updateRows($this->table_name, $this->update, $this->filter);\n storeDbMsg($this->db,ucwords($this->form_ID) . \" successfully updated!\");\n }", "public function updateDatabase(){\n $api_response = Http::get(config('urls.api'));\n //Place in database\n $this->postToDatabase($api_response);\n }", "public function update()\n\t{\n\t\t$this->user->db_update();\n\t}", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",email1=\\\"$this->email1\\\",address1=\\\"$this->address1\\\",lastname=\\\"$this->lastname\\\",phone1=\\\"$this->phone1\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function updateData(){\n try{\n $this->dbConnection->query($this->query);\n $this->message = $this->moduleName.' Successfully Updated';\n $this->data = array();\n $this->data['id'] = $this->dbConnection->lastInsertId();\n $this->sendJSONResponse();\n \n }catch( PDOException $ex ) {\n $this->message = 'Error storing '.$this->moduleName.' :'. $ex->getMessage();\n $this->sendJSONErrorReponse();\n }\n }", "function update(){\n\t\t\t\t$servername = \"localhost\";\n\t\t\t\t$username = \"root\";\n\t\t\t\t$password = \"\";\n\t\t\t\t$dbname = \"CS230\";\n\t\t\t\t//Variables for holding entity data\n\t\t\t\t$i = $_POST['i'];\n\t\t\t\t$cr = $_POST['creator'];\n\t\t\t\t$ti = $_POST['title'];\n\t\t\t\t$ty = $_POST['type'];\n\t\t\t\t$id = $_POST['identifier'];\n\t\t\t\t$da = $_POST['date'];\n\t\t\t\t$la = $_POST['language'];\n\t\t\t\t$de = $_POST['description'];\n\t\t\t\t$conn = mysqli_connect($servername, $username, $password, $dbname);\n\t\t\t\t\tif($conn){\n\t\t\t\t\t//echo \"Connection OK\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdie(\"The Connection has failed: \" .mysqli_connect_error());\n\t\t\t\t\t}\n\t\t\t\t$sql = \"UPDATE eBook_MetaData SET creator='$cr', title='$ti', type='$ty', identifier='$id', date='$da', language='$la', description='$de' WHERE id='$i'\";\n\t\t\t\t\t$data = mysqli_query($conn, $sql);\n\n\t\t\t\t\tif(!$data){\n\t\t\t\t\t\techo \"error\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo \"data updated\";\n\t\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t$conn = null;\n\t\t\t\t}", "public function updateData(array $data);", "public function update($data){\n\t\t\t$this->name=trim($data['name']);\n\t\t\t$this->rfid=trim($data['rfid']);\n\t\t\t$this->updated_at=date('Y/m/d H:i:s');\n\t\t\t$this->id=$data['id'];\n\t\t\ttry {\n\t\t\t\t$connect = Database::connect();\n\t\t\t\t$query='UPDATE vehicles SET name = :name, rfid=:rfid, updated_at=:updated_at WHERE id = :id';\n\t\t\t\t$statement = $connect->prepare($query);\n\t\t\t\t$statement->bindParam(':id', $this->id); \n\t\t $statement->bindParam(':name', $this->name);\n\t\t $statement->bindParam(':rfid', $this->rfid);\n\t\t $statement->bindParam(':updated_at', $this->updated_at);\n\t\t return $statement->execute();\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\techo $e;\n\t\t\t}\n\t\t}", "public function update() {\n\t\tif (isset($this->params['updated'])) {\n\t\t\t$this->params['updated'] = null;\n\t\t} // 'updated' is an auto timestamp\n\n\t\t$columns = array();\n\t\tforeach (array_keys($this->params) as $key) {\n\t\t\tarray_push($columns, $key . ' = ?');\n\t\t}\n\t\t$bindings = implode(', ', $columns);\n\t\t$sql = 'UPDATE ' . static::$table . ' SET ' . $bindings . ' WHERE id = ' . $this->get('id') . ' ;';\n\t\t$query = DBH()->prepare($sql);\n\t\t$query->execute(array_values($this->params));\n\t}", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",lastname=\\\"$this->lastname\\\",username=\\\"$this->username\\\",email=\\\"$this->email\\\",kind=\\\"$this->kind\\\",status=\\\"$this->status\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function update() {\n\t\tTournamentDBClient::update($this);\n\t}", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function updateDB()\n {\n\n }", "function update() {\n\t\t\t$updateQuery = \"UPDATE \".$this->table.\" SET \";\n\n\t\t\t$keysAR = array_keys($this->activeRecord);\n\n\t\t\tfor ($loopUp = 0; $loopUp < count($this->activeRecord); $loopUp++) {\n\n $updateQuery .= $keysAR[$loopUp] . \" = ?, \";\n $paramArray[] = $this->activeRecord[$keysAR[$loopUp]];\n\n\t\t\t}\n\n\t\t\t$updateQuery = substr($updateQuery, 0, -2); // Haal de laatste komma weg.\n\n\t\t\t$updateQuery .= \" WHERE \";\n\n\t\t\t// Fetch de primary key van de tabel.\n $fetchPrimary = $this->mysqlConnection->query(\"SHOW INDEX FROM \".$this->table);\n $arrayIndex = $fetchPrimary->fetch(PDO::FETCH_ASSOC);\n $kolomIndex = $arrayIndex['Column_name'];\n\n $updateQuery .= $kolomIndex.\" = \".$this->originalValues[$kolomIndex];\n\n\t\t\t$this->lastQuery = $updateQuery;\n\n $updateTable = $this->mysqlConnection->prepare($this->lastQuery);\n $updateTable->execute($paramArray);\n\n\t\t}", "protected function update()\n\t{\n\t\t//append ID to fields\n\t\t$query = $this->connection->prepare\n\t\t(\"\n\t\t\tupdate Booth\n\t\t\tset BoothNum = ?\n\t\t\twhere BoothID = ?\n\t\t\");\n\n\t\t$query->execute(array_values($this->fields));\n\n\t}", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",comments=\\\"$this->comments\\\",price=\\\"$this->price\\\",brand=\\\"$this->brand\\\",model=\\\"$this->model\\\",y=\\\"$this->y\\\",link=\\\"$this->link\\\",in_existence=\\\"$this->in_existence\\\",is_public=\\\"$this->is_public\\\",is_featured=\\\"$this->is_featured\\\",category_id=\\\"$this->category_id\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function Update($data) {\n\n }", "public function update(){\n\t\t$this->beforeSave();\n\t\t$tableName = $this->tableName();\n\t\t$fields = $this->fields();\n\t\t// Remove fields set as ignored by rules validation.\n\t\t$fields = $this->removeIgnored($fields);\n\t\t// Create PDO placeholders.\n\t\t$params = implode(', ', array_map(fn($name) => $name . ' = :' . $name, $fields));\n\t\t$primaryKey = $this->getPrimaryKey();\n\t\t$where = $primaryKey . ' = :' . $primaryKey;\n\t\t$statement = $this->db->prepare('UPDATE ' . $tableName . ' SET ' . $params . ' WHERE ' . $where);\n\t\t// Bind values to placeholders.\n\t\tforeach($fields as $field){\n\t\t\t$this->binder($statement, ':' . $field, $this->{$field});\n\t\t}\n\t\t$statement->bindValue(':' . $primaryKey, $this->{$primaryKey});\n\t\tif($statement->execute()){\n\t\t\t$this->afterSave();\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function updateRecord() \n {\n $str = \"Id = :Id\";\n array_walk($this->arrayKeysValues(), function ($value, $key) use (&$str) {\n $str .= \", $key = :$key\";\n });\n $sql = sprintf(\"UPDATE Cubans SET %s WHERE Id = :Id\", $str);\n $statement = $this->connect->prepare($sql);\n $statement->execute(array_merge([\":Id\" => $this->id], $this->arrayKeysValues()));\n }", "public function updateData($data){\n\t\t// $this->db->query($query);\n\t\t// $this->db->bind('deptId',$data['deptId']);\n\t\t// $this->db->bind('deptName',$data['deptName']);\n\t\t// $this->db->execute();\n\n\t\t// return $this->db->rowCount();\n\t}", "public function update( $data )\n {\n foreach ( $data as $key => $value )\n {\n $this->{$key} = $value;\n }\n return $this->save();\n }", "public function updateRecords($data)\n {\n\n $this->dataStore->setData($data);\n }", "public function update()\n\t{\n\t\t$mytable = WikiRevision::$table;\n\t\t$buf = \"UPDATE $mytable SET \";\n\t\tfor ($i = 0; $i < count(WikiRevision::$fields); $i++) {\n\t\t\t$buf .= WikiRevision::$fields[$i] . \" = '\" . DBConnection::get()->handle()->real_escape_string($this->data[$fields[$i]]) . \"'\" . ($i == count(WikiRevision::$fields) - 1)?(', '):(' ');\n\t\t}\n\t\t$buf .= \"WHERE rev_id = \" . $data['rev_id'];\n\t\tDBConnection::get()->handle()->query($buf);\n\t}", "protected function _update() {\n $this->_getDef();\n \n //prepare\n foreach ($this->_tableData as $field) {\n if($field['primary']) {\n $primaryKey = $field['field_name'];\n $primaryValue = $this->$primaryKey;\n continue;\n }\n \n $sql_fields[] = '`' . $field['field_name'] . '` =?';\n \n $field_name = $field['field_name'];\n \n if(false !== ($overrideKey = $this->_getOverrideKey($field_name))){\n $field_name = $overrideKey;\n }\n \n if($this->$field_name instanceof \\DateTime){\n $$field_name = $this->$field_name->format('Y-m-d H:i:s');\n } elseif(is_array($$field_name)){\n $$field_name = json_encode($$field_name);\n } else {\n $$field_name = $this->$field_name;\n }\n \n $values[] = $$field_name;\n }\n \n $values[] = $primaryValue;\n \n $sql = \"UPDATE `{$this->_table}` SET \" . implode(',', $sql_fields) . \" WHERE `{$primaryKey}` =?\";\n $stmt = Database::connection($this->_connection)->prepare($sql, $values);\n $stmt->execute();\n $this->setLastError(NULL);\n if($stmt->error !== ''){\n $this->setLastError($stmt->error);\n }\n \n $stmt->close();\n \n return $this->getLastError() === NULL ? true : false;\n }", "public function update() {\n global $DB;\n $record = array(\n 'sortorder' => $this->sortorder,\n 'criterion' => $this->criterion,\n 'addinfo' => json_encode($this->addinfo)\n );\n if ($this->id) {\n $record['id'] = $this->id;\n $DB->update_record($this->get_table_name(), $record);\n } else {\n $record['instantquizid'] = $this->instantquiz->id;\n $this->id = $DB->insert_record($this->get_table_name(), $record);\n }\n }", "public function update(){\n if(empty($this->attributes)){\n return;\n }\n if ($this->isAutoInc) {\n $fieldsList = \" SET \";\n foreach ($this->attributes as $column => $value) {\n $fieldsList.=$column.\"=\".'\\''.$value.'\\''.\", \";\n }\n $fieldsList = str_last_replace(\", \", \"\", $fieldsList);\n $sqlQuery = \"UPDATE \".$this->table.$fieldsList.\" WHERE \".$this->idName.\"=\".$this->attributes[$this->idName];\n\n Db::instance()->execute($sqlQuery,$this->attributes);\n }\n }", "public function updateDatabase(){\n\t\t$db = static::getDatabaseConnection();\n\t\t//Get all of the columns in the database table\n\t\t$columns = static::$columns;\n\t\t//Because we dont want the ID to change, remove the ID from the database\n\t\tunset($columns[array_search('id', $columns)]);\n\t\t//If we had a timecreated and timeupdated column, we would unset the timecreated column here\n\n\t\t//Write an Update Query\n\t\t$query = \"UPDATE \" . static::$tableName . \" SET \";\n\t\t$updatecols = [];\n\t\tforeach ($columns as $column){\n\t\t\tarray_push($updatecols, $column . \"=:\" . $column);\n\t\t}\n\t\t$query .= implode(\",\", $updatecols);\n\t\t$query .= \" WHERE id =:id\";\n\t\t$statement = $db->prepare($query);\n\n\t\tforeach(static::$columns as $column){\n\t\t\t//Hash the password\n\t\t\tif($column === 'password'){\n\t\t\t\t$this->$column = password_hash($this->$column, PASSWORD_DEFAULT);\n\t\t\t}\n\t\t\t$statement->bindValue(\":\".$column, $this->$column);\n\t\t}\n\t\t$statement->execute();\n\t}", "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 updateDb()\n {\n\n // make sure this is a valid new entry\n if ($this->isValid()) {\n\n // check for duplicate\n $vals = sprintf(\"Level = %d\",$this->level);\n $sql = \" update Admins set $vals where Email = '$this->email';\";\n Dbc::getReader()->Exec($sql);\n }\n else\n print \"<br> Invalid entry. STOP! ($sql)<br>\";\n }", "public function update() {\n // Get the values that are currently in the database\n $curr_vals = $this->read_single();\n\n // Set the values that will be added to the table\n foreach ($curr_vals as $key => $value) {\n // Convert key from the Database's capitalization to\n // this model's attribute capitalization style (all lowercase)\n $local_key = strtolower($key);\n // If user didn't specify property\n if (($this->attr[$local_key] === \"\") || ($this->attr[$local_key] === null)){\n // Then use the value that's already in the database\n $this->attr[$local_key] = $curr_vals[$key];\n }\n }\n\n // Create query\n $query = \"UPDATE \" . $this->table .\n \" SET = \" .\n \" WHERE MID = :mid AND Spot = :spot \";\n\n // Prepare statement\n $stmt = $this->conn->prepare($query);\n\n // Clean the data (reduce malicious SQL injection, etc.)\n foreach ($this->attr as $key => $value) {\n $this->attr[$key] = htmlspecialchars(strip_tags($value));\n }\n \n // Bind the data to a variable for an SQL attribute\n foreach ($this->attr as $key => $value) {\n $stmt->bindValue((\":\" . $key), $value);\n }\n\n // Execute the prepared statement and check for errors in running it\n return $this->runPrepStmtChkErr($stmt);\n }", "public function update_with($new_data)\n {\n }", "public function updateData(){\n //buatlah query, cobalah untuk vertical\n $sqlQuery = \"UPDATE\n \". $this->t_name .\"\n SET\n name = :name, \n email = :email, \n age = :age, \n designation = :designation, \n created = :created\n WHERE \n id = :id\";\n //persiapkan statement\n $stmt = $this->conn->prepare($sqlQuery);\n\n //convert string\n $this->name=htmlspecialchars(strip_tags($this->name));\n $this->email=htmlspecialchars(strip_tags($this->email));\n $this->age=htmlspecialchars(strip_tags($this->age));\n $this->designation=htmlspecialchars(strip_tags($this->designation));\n $this->created=htmlspecialchars(strip_tags($this->created));\n //id karena ini update pada satu row\n $this->id=htmlspecialchars(strip_tags($this->id));\n\n //bind\n $stmt->bindParam(\":name\",$this->name);\n $stmt->bindParam(\":email\",$this->email);\n $stmt->bindParam(\":age\",$this->age);\n $stmt->bindParam(\":designation\",$this->designation);\n $stmt->bindParam(\":created\",$this->created);\n //id\n $stmt->bindParam(\":id\",$this->id);\n\n //eksekusi\n if($stmt->execute()){\n return true;\n }\n return false;\n }", "public function update() {\n $Sql = \"UPDATE \" . $this->tableName[0] . \" SET \";\n foreach ($this->fieldListArray as $Key_ => $Value_) {\n $Sql = $Sql . \"$Key_='$Value_', \";\n }\n $Sql = substr($Sql, 0, strlen($Sql) - 2);\n $Sql = $Sql . \" WHERE \";\n foreach ($this->conditionArray as $Key_ => $Value_) {\n $Sql = $Sql . \"$Key_='$Value_' AND \";\n }\n $Sql = substr($Sql, 0, strlen($Sql) - 4);\n //echo $Sql;\n return mysqli_query($this->dataBaseConnect->getConnection(), $Sql);\n }", "public function update($modelData) {\n// codigoCliente = ? ,\n// codigoPedido = ?, \n// monto = ? WHERE codigo = ?\"; \n// \n// $stmt = $this->mysql->getStmt($sql);\n// $stmt->bind_param(\"iidi\", $modelData['codigoCliente'], \n// $modelData['codigoPedido'], \n// $modelData['monto'],\n// $modelData['codigo']);\n// $stmt->execute();\n }", "function update(){\n\t\t$this->model->update();\n\t}", "function update($id, $data)\n {\n $this->db->where($this->id,$id);\n $this->db->update($this->table, $data);\n }", "public function update(){\n $sql = \"update \".self::$tablename.\" set correlativo=\\\"$this->correlativo\\\",nombre_instalador=\\\"$this->nombre_instalador\\\",nombre_proyecto=\\\"$this->nombre_proyecto\\\",localizacion=\\\"$this->localizacion\\\",contrato_orden_trabajo=\\\"$this->contrato_orden_trabajo\\\",sector_trabajo=\\\"$this->sector_trabajo\\\",area_aceptada=\\\"$this->area_aceptada\\\",fecha_proyecto=\\\"$this->fecha_proyecto\\\" where id_usuario=$this->id_usuario\";\n Executor::doit($sql);\n }", "public function updateMultiple_data()\n {\n \n }", "function update_data($where,$data,$table){\n\t\t$this->db->where($where);\n\t\t$this->db->update($table,$data);\n\t}", "protected function update() {\n if ($this->_isLoaded()) {\n $this->db->where('id', $this->id);\n $this->db->update($this->tableName, $this->mapToDatabase());\n } else {\n throw new Exception(\"Model is not loaded\");\n }\n }", "public function Save()\r\n\t\t{\r\n\t\t\tif ($this->id == -1) {\r\n\t\t\t\tunset($this->columns[\"id\"]);\r\n\t\t\t\t$sqlCol = null;\r\n\t\t\t\t$sqlKey = null;\r\n\t\t\t\tforeach ($this->columns as $column => $value) {\r\n\t\t\t\t\t$data[$column] = $this->$column;\r\n\t\t\t\t\t$sqlCol .= \",\" . $column;\r\n\t\t\t\t\t$sqlKey .= \",:\" . $column;\r\n\t\t\t\t}\r\n\t\t\t\t$sqlCol = ltrim($sqlCol, \",\");\r\n\t\t\t\t$sqlKey = ltrim($sqlKey, \",\");\r\n\t\t\t\t$query = $this->db->prepare(\r\n\t\t\t\t\t\"INSERT INTO \" . $this->table . \" (\" . $sqlCol . \")\r\n\t\t\t\t\t\tVALUES (\" . $sqlKey . \") ;\"\r\n\t\t\t\t);\r\n\t\t\t\t$query->execute($data);\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t// Sinon faire un update dynamique\r\n\t\t\t\t$sqlSet = null;\r\n\t\t\t\tforeach ($this->columns as $column => $value) {\r\n\t\t\t\t\t$data[$column] = $this->$column;\r\n\t\t\t\t\t$sqlSet[] .= $column . \"=:\" . $column;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Suppression de la mise à jour de la date d'update \r\n\t\t\t\t// la mise à jour des dates est maintenant faites en BDD.\r\n\t\t\t\t$query = $this->db->prepare(\r\n\t\t\t\t\t\"UPDATE \" . $this->table . \" SET \r\n\t\t\t\t\t\t\" . implode(\",\", $sqlSet) . \"\r\n\t\t\t\t\t\tWHERE id=:id;\"\r\n\t\t\t\t);\r\n\r\n\t\t\t\t$query->execute($data);\r\n\t\t\t}\r\n\t\t}", "function updateField() {\n DATABASE::INIT_TABLE($this->database, $this->table);\n $fname = $this->urlParam('fname');\n $fvalue = $this->urlParam('fvalue');\n $id = $this->urlParam('id');\n DATABASE::UPDATE($this->table, [$fname], [$fvalue], $id);\n }", "function updateData($table,$data,$id){\n\t\treturn $this->db->update($table,$data,$id);\n\t}", "protected function update() {}", "public function update($data)\n {\n $this->db->where('user_id',$data['id']);\n return $this->db->update('user_survey_answer',$data);\n }", "public function update():void\n {\n $id = $this->id;\n $first_name = $this->first_name;\n $last_name = $this->last_name;\n $image = $this->image;\n $user_type = $this->user_type;\n $address = $this->address;\n\t\t$phone = $this->phone;\n $this->fetch(\n 'UPDATE user\n SET first_name = ?,\n last_name = ?,\n image = ?,\n user_type = ?,\n address=?,\n phone=?\n WHERE id = ?;',\n [$first_name, $last_name,$image, $user_type,$address ,$phone , $id]\n );\n }", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public static function update($data , $id)\n {\n self::_update(self::tableName(), $data, 'id = '. $id);\n }", "public function update()\n\t{\n\t\t$crud = $this->crud->find($_POST['id']);\n\t\t$curd->data([\n\t\t\t'first_name' => $_POST['first_name'],\n\t\t\t'last_name' => $_POST['last_name'],\n\t\t]);\n\t\t$crud->update();\n\t\t$this->redirect('crud');\n\t}", "function update_data($where,$data,$table){\n $this->db->where($where);\n $this->db->update($table,$data);\n }", "private static function updateTransaction($data)\n {\n global $db;\n\n try {\n $fields = implode(', ', array_map(\n function ($v, $k) {\n return sprintf(\"`%s` = '%s'\", $k, $v);\n },\n $data,\n array_keys(\n $data\n )\n ));\n\n $db->Execute(\"\n\t\t\t\tUPDATE\n\t\t\t\t\t`\" . static::$table_name . \"`\n\t\t\t\tSET\n\t\t\t\t\t\" . $fields . \"\n\t\t\t\tWHERE\n\t\t\t\t `unique_id` = '\" . $data['unique_id'] . \"'\n\t\t\t\");\n } catch (\\Exception $exception) {\n //$this->logEx($exception);\n }\n }", "public function update(array $data, array $where);", "public function update(array $data)\n {\n parent::update($data);\n if (array_key_exists('data', $data)) {\n $this->setData($data['data']);\n }\n }", "public function saveToDb()\n\t{\n\t\t$db = \\App\\Db::getInstance('admin');\n\t\t$tablesData = array_intersect_key($this->getData(), $this->changes);\n\t\tforeach ($tablesData as $key => $value) {\n\t\t\t$db->createCommand()->update($this->baseTable, ['value' => $value], ['type' => $this->type, 'name' => $key])->execute();\n\t\t}\n\t}", "public function save()\n {\n $db = DatabaseUtil::db_connect($this->database);\n $db->query('update ' . $this->table . 'set ' . $this->column . ' = ' . $this->value . ' where ID=' . $this->ID);\n $db->close();\n }", "public function atualizando($data){\n $this->db->where('coluna_id', $data['dados_id']);\n //vai na coluna tal e atualiza pra tal\n $this->db->set('coluna', $data['dados']);\n //nome da tabela\n $this->db->update('tabela'); \n //echo $this->db->last_query();\n }", "public function update() {\n\t\t$dbh = App::getDatabase()->connect();\n\n\t\t$query = \"UPDATE \".$this->getTableName().\"\n\t\t\t\t SET \";\n\n\t\t$fl = true;\n\t\tforeach($this as $column => $val) {\n\t\t\tif(!in_array($column, $this->getPrimaries())) {\n\t\t\t\t$query .= (($fl) ? \"\" : \", \").$column.\" = \".((is_bool($val)) ? (($val) ? \"TRUE\" : \"FALSE\") : ((is_null($val)||($val === \"\")) ? \"null\" : \"'\".$val.\"'\"));\n\t\t\t\t$fl = false;\n\t\t\t}\n\t\t}\n\n\t\t$fl = true;\n\t\tforeach($this as $column => $val) {\n\t\t\tif(in_array($column, $this->getPrimaries())) {\n\t\t\t\t$query .= \"\\n\".(($fl) ? \"WHERE\" : \"AND\").\" \".$column.\" = '\".$val.\"'\";\n\t\t\t\t$fl = false;\n\t\t\t}\n\t\t}\n\n\t\t$res = $dbh->exec($query);\n\t\t$dbh = null;\n\t\treturn $res;\n\t}", "public function update() {\n $this->connect();\n\n mysqli_multi_query($this->con, $this->sql);\n $this->sql = \"\";\n mysqli_close($this->con);\n $this->getStories();\n }", "private function Update() {\n $Update = new Update;\n $Update->ExeUpdate(self::Entity, $this->Data, \"WHERE id = :id\", \"id={$this->Post}\");\n if ($Update->getResult()):\n $this->Error = [\"As informações de <b>contato</b> foram atualizadas com sucesso!\", WS_ACCEPT];\n $this->Result = true;\n endif;\n }", "protected function update()\n {\n $update = 'UPDATE users SET first_name = :first_name, last_name = :last_name,\n email = :email, password = :password WHERE id = :id';\n $statement = self::$dbc->prepare($update);\n foreach ($this->attributes as $key => $value) {\n $statement->bindValue(\":$key\", $value, PDO::PARAM_STR);\n }\n $statement->execute();\n }", "public function update(array $data){\n //dynamically query generate\n $query = \"UPDATE \".$this->table[0].\" SET\";\n $comma = \" \";\n foreach ($data as $key => $value) {\n if( ! empty($value)) {\n $query .= $comma . $key . \" = '\" .trim($value) . \"'\";\n $comma = \", \";\n }\n }\n //finaly query generated as per your form fields name and value\n \n $sql= $query. \" WHERE sid = '\".$data[\"sid\"].\"'\";\n //run the query\n return mysqli_query($this->conn,$sql);\n }", "public function update(){\n\t\techo $sql = \"update \".self::$tablename.\" set title=\\\"$this->title\\\",description=\\\"$this->description\\\",skills=\\\"$this->skills\\\",area_id=$this->area_id,jobtype_id=$this->jobtype_id,jobperiod_id=$this->jobperiod_id,duration=$this->duration,is_public=$this->is_public,is_finished=$this->is_finished,created_at=$this->created_at where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function update($id, $data)\n\t{\n $this->db->where('id', $id);\n $this->db->update('alumns', $data);\n\t}", "public function commitUpdate();", "public function update()\n\t{\n\t\t$this->getModel()->update($this);\n\t}", "public function update(array $data) {\n return $this->_dataHandler->update($this->_table, $data, $this->getPrimaryKeyCondition($data[$this->_primaryKeyElement]));\n }", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set Origen='$this->Origen',Fechap='$this->Fechap',Horap='$this->Horap',Cod_Referencia='$this->Referencia',Nombre_Referencia='$this->Nombre',Ref_Tela='$this->Reftela',Pinta='$this->Pinta',Color='$this->Color',Proceso='$this->Proceso',Ubicacion='$this->Ubicacion',SKU='$this->Sku',Maquina='$this->Maquina',Longitud_Inicial='$this->Longitudini',Longitud_Final='$this->Longitudfin',Peso='$this->Peso',Grados_PFoAT800K='$this->Plancha',Grados_Plato='$this->Plato',Grados_Pie='$this->Pie',Grados_Aire_S='$this->Airesup',Grados_Aire_I='$this->Aireinf',Caudal_Sup='$this->Caudalsup',Caudal_Inf='$this->Caudalinf',Presion='$this->Presion',Velocidad='$this->Velocidad',Velocidad_Sup='$this->Velocidad_Sup',Velocidad_Inf='$this->Velocidad_Inf',Intensidad='$this->Intensidad',Tiempo_Exp='$this->Tiempo',Resultado='$this->Resultado',Dinamometro='$this->Dinamometro',Observaciones1='$this->Observaciones' where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function SQL_UPDATE() {\r\n\t}", "public function updateRow($data)\r\n\t{\r\n\t\t$data = (array)$data;\r\n\t\t$data = $this->cleanupFieldNames($data);\r\n\t\t\r\n\t\t// Build SQL\r\n\t\t$sql = 'UPDATE `'.$this->name.'` SET ';\r\n\t\t$values = array();\r\n\t\t$pkFound = false;\r\n\t\tforeach($data as $key => $val)\r\n\t\t{\r\n\t\t\t// Ignore if field is not in table\r\n\t\t\tif (!$this->hasField($key))\r\n\t\t\t{\r\n\t\t\t\tunset($data[$key]);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t// Include value, but not if primary key and table has auto-incr PK\r\n\t\t\t$include = true;\r\n\t\t\tif ($key == $this->primaryKey)\r\n\t\t\t{\r\n\t\t\t\tif ($this->primaryKeyIsAutoIncrement)\r\n\t\t\t\t{\r\n\t\t\t\t\t$include = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Found non-empty primary key\r\n\t\t\t\tif (!empty($val))\r\n\t\t\t\t{\r\n\t\t\t\t\t$pkFound = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Include and process special value\r\n\t\t\tif ($include)\r\n\t\t\t{\r\n\t\t\t\tif ($val === 'NULL')\r\n\t\t\t\t{\r\n\t\t\t\t\t$values[] = \"`$key` = NULL\";\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$values[] = \"`$key` = :$key\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t// Quit if has no primary key\r\n\t\tif (!$pkFound)\r\n\t\t{\r\n\t\t\tthrow new \\Exception('Cannot update: The supplied data does not contain a primary key');\r\n\t\t}\r\n\t\r\n\t\t// No fields were found - update makes no sense\r\n\t\tif (count($values) == 0)\r\n\t\t{\r\n\t\t\tthrow new \\Exception('No fields were added to the UPDATE query');\r\n\t\t}\r\n\t\t\t\r\n\t\t// Add values to query\r\n\t\t$sql .= implode(', ', $values);\r\n\t\r\n\t\t// Add where\r\n\t\t$sql .= ' WHERE `'.$this->primaryKey.'` = :' . $this->primaryKey;\r\n\r\n\t\t// Execute\r\n\t\t$result = $this->db->runQuery($sql, $data);\r\n\t\t\r\n\t\treturn $this->db->getAffectedRows();\r\n\t}", "public function update_data($where,$data,$table){\r\n $this->db->where($where);\r\n $this->db->update($table,$data);\r\n }", "public function update(){\n static::setConnection();\n $table = static::$table;\n $keyColumn = static::$keyColumn;\n $sql = \"UPDATE \".$table.\" SET \";\n foreach($this as $k=>$v){\n $sql .= $k.\" = '\".$v.\"',\";\n }\n $sql = trim($sql, ',');\n $sql .= \" WHERE \".$keyColumn.\" = \".$this->keyColumn;\n mysqli_query(static::$conn, $sql);\n }", "protected function saveUpdate()\n {\n }", "function update( \\gb\\domain\\DomainObject $object ) {\n //$this->updateStmt->execute( $values );\n }", "public function update()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$sql = 'UPDATE class SET ';\n\n\t\t\tif(isset($this->_year))\n\t\t\t\t$sql.=' year = :year,';\n\n\t\t\tif(isset($this->_section))\n\t\t\t\t$sql.=' section = :section';\n\t\t\telse\n\t\t\t\t$sql = substr_replace($sql, '', -1);\n\t\t\t\n\t\t\t$sql.=' WHERE id = :id';\n\n \t\t$data = [\n\t\t\t 'id' => $this->_id,\n\t\t\t 'year' => $this->_year,\n\t\t\t 'section' => $this->_section,\n\t\t\t];\n\n\t \t$stmt = $this->db->prepare($sql);\n\t \t$stmt->execute($data);\n\t\t\t$status = $stmt->rowCount();\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\theader(\"HTTP/1.0 400 Bad request\");\n\t\t\techo $e;\n\t\t}\n\t}", "public function update($tables,$data,$pk,$id){\n $this->db->where($pk,$id);\n $this->db->update($tables,$data);\n }", "public function update($tables,$data,$pk,$id){\n $this->db->where($pk,$id);\n $this->db->update($tables,$data);\n }", "public function update($tables,$data,$pk,$id){\n $this->db->where($pk,$id);\n $this->db->update($tables,$data);\n }", "function update($id, $data)\n\t{\n\t\t$this->db->where($this->id, $id);\n\t\treturn $this->db->update($this->table, $data);\n\t}", "function update() {\r\n\r\n\t\t$this->connection = new Connection();\r\n\t\t$conn = $this->connection->openConnection();\r\n\r\n\t\t$insert = $conn->prepare(\"UPDATE `panier` SET `quantite`=:quantite WHERE id_internaute=:id_internaute AND id_nourriture=:id_nourriture AND datep=:datep\");\r\n\t\ttry {\r\n\t\t\t$result = $insert->execute(array('quantite' => $this->getQuantite(),'id_internaute' => $this->getId_internaute(),'id_nourriture' => $this->getId_nourriture(),'datep' => $this->getDate()));\r\n\t\t\t\r\n\t\t} catch (PDOExecption $e) {\r\n\t\t\tprint \"Error!: \" . $e->getMessage() . \"</br>\";\r\n\t\t}\r\n\t\t$this->connection->closeConnection();\r\n\t}", "function update()\n {\n global $config;\n $query=file_get_contents(\"sql/updateArticle.sql\"); \n $query =sprintf($query, $config->prefix.self::$table); \n $query = $config->sql->prepare($query);\n $param=array(\n $this->title, $this->content, $this->lang, $this->date,\n $this->cat, $this->id, $this->lang\n );\n $result=$query->execute($param);\n if ($result) {\n return true;\n } else {\n print_r($query->errorInfo());\n }\n \n }", "public function updateToDb()\n {\n try {\n $sql = 'UPDATE bplace\n SET title=:title, width=:width, height=:height, change_time=:change_time\n WHERE id=:id';\n $this->_db->query($sql, array('title' => $this->_title, 'width' => $this->_width, 'height' => $this->_height, 'change_time' => $this->_changeTime, 'id' => $this->_id));\n } catch (Exception $e) {\n throw new Exception($e->getMessage());\n }\n }", "public function update($data) { \n\n\t\tif ($data['name'] != $this->name) { \n\t\t\t$this->update_name($data['name']); \n\t\t} \n\t\tif ($data['pl_type'] != $this->type) { \n\t\t\t$this->update_type($data['pl_type']); \n\t\t} \n\n\t}", "public function updateToDB()\n {\n try {\n $sql = 'UPDATE news\n SET link_id=:link_id, title=:title, date_public=:date_public, date_create=:date_create,\n short_text=:short_text, full_text=:full_text\n WHERE id=:id';\n $this->_db->query($sql, array('link_id' => $this->_link->getId(), 'title' => $this->_title, 'date_create' => $this->_dateCreate,\n 'date_public' => $this->_datePublic, 'short_text' => $this->_shortText, 'full_text' => $this->_fullText, 'id' => $this->_id));\n\n $fileName = $this->_file->download('file');\n if ($fileName !== false) {\n $this->_file->createPreview(40, 40);\n $this->_db->query('UPDATE news SET file=:file WHERE id=:id', array('file' => $fileName, 'id' => $this->_id));\n }\n } catch (Exception $e) {\n throw new Exception($e->getMessage());\n }\n }" ]
[ "0.7739455", "0.76965857", "0.76965857", "0.762034", "0.75970054", "0.7423975", "0.7334283", "0.72561514", "0.72561514", "0.72561514", "0.72561514", "0.7219041", "0.7219041", "0.7219041", "0.7180245", "0.71515995", "0.7119131", "0.71007794", "0.70431554", "0.70412374", "0.7016965", "0.69880325", "0.6980055", "0.69759697", "0.6956714", "0.6933816", "0.6925122", "0.6922113", "0.69185925", "0.6911498", "0.69036096", "0.69021755", "0.68637395", "0.68492323", "0.68449616", "0.68352973", "0.6825031", "0.6819691", "0.6816972", "0.6814774", "0.6790274", "0.67815375", "0.67815375", "0.67815375", "0.67815375", "0.67815375", "0.6781472", "0.6777356", "0.6742155", "0.67410725", "0.674026", "0.6725941", "0.6725185", "0.669079", "0.6675479", "0.6669352", "0.666854", "0.6663492", "0.6642442", "0.66394234", "0.66275513", "0.6624827", "0.66167784", "0.6616595", "0.6613421", "0.6611751", "0.6606914", "0.66046077", "0.65974784", "0.6582739", "0.6581865", "0.65713733", "0.6568216", "0.65562695", "0.6555019", "0.65470904", "0.6543927", "0.6543798", "0.65408856", "0.6540351", "0.6538303", "0.6532678", "0.6531133", "0.65295845", "0.6521667", "0.6520732", "0.65189207", "0.65102667", "0.6509781", "0.65034956", "0.6499096", "0.64970666", "0.64937806", "0.64937806", "0.64937806", "0.64896274", "0.64851135", "0.64844495", "0.6483494", "0.64824164", "0.64638996" ]
0.0
-1
Delete section data from database.
public function delete( &$id ) { global $wpdb; // allow hook do_action( 'learn-press/before-delete-section', $this->course_id, $id ); // Remove section items. $wpdb->delete( $wpdb->learnpress_section_items, array( 'section_id' => $id ) ); learn_press_reset_auto_increment( 'learnpress_section_items' ); // Remove section $result = $wpdb->delete( $wpdb->learnpress_sections, array( 'section_id' => $id ) ); learn_press_reset_auto_increment( 'learnpress_sections' ); return ! ! $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function deleteSection() {\n $courseID = $_POST['courseID'];\n $sectionID = $_POST['sectionID'];\n\n $this->openConn();\n\n $sql = \"DELETE FROM Section WHERE courseID= :courseID and sectionID = :sectionID\";\n $stmt = $this->conn->prepare($sql);\n $stmt->execute(array(':courseID'=> $courseID, ':sectionID'=> $sectionID));\n\n if($stmt === TRUE) {\n $this->closeConn();\n return true;\n }\n else {\n $this->closeConn();\n return false;\n }\n\n }", "public function deleteDatabaseStructure( );", "public function deleteSection($sectionId);", "public function delete(){\n if (isset($this->content[$this->idField])) {\n\n $sql = \"DELETE FROM {$this->table} WHERE {$this->idField} = {$this->content[$this->idField]};\";\n $delet = new \\AR\\BD\\Delete();\n $delet->ExeDelete($this->table, \"WHERE {$this->idField} = {$this->content[$this->idField]}\", \"\");\n \n }\n }", "public function deleteData()\n {\n DB::table($this->dbTable)\n ->where($this->where)\n ->delete();\n }", "public function deleting(Section $section)\n {\n $section->fields->each(function ($field) {\n $field->delete();\n });\n }", "public function delete() {\n\t\tif ($this->checkDependencies() == true ) {\n\t\t\t$sql = \"DELETE FROM \".$this->tablename.\" where \".$this->idcol.\" = \".$this->page->ctrl['record'];\n\t\t\t$this->dbc->exec($sql);\n\t\t}\n\t}", "function delete() {\n\t\t$personSectionObject = DB_DataObject::factory('person_section');\n\t\t$personSectionObject->person_id = $this->person_id;\n\t\t$personSectionObject->find();\n\t\t//echo '<PRE> Found Person Section Objects'; print_r($personSectionObject); echo '<PRE>';\n\n\t\twhile ($personSectionObject->fetch()) {\n\t\t\t$deleteObject = DB_DataObject::factory('person_section');\n\t\t\t$deleteObject->id = $personSectionObject->id;\n\t\t\t$deleteObject->section_id = $personSectionObject->section_id;\n\t\t\t$deleteObject->person_id = $this->id;\n\t\t\t$deleteObject->delete();\n\t\t}\n\n\t\treturn DB_DataObject::delete(); //Call the parent method\n\t}", "public function delete()\n {\n $this->db->delete($this->table, $this->data['id'], $this->key);\n }", "function delete() {\n $this->db->delete(self::table_name, array('id' => $this->id));\n // need to delete from tag maps too\n // tbd\n }", "public function rm($section){\n\t\t$body = $this->toArray();\n\t\tunset($body[$section]);\n\t\t$this->updateFile($body);\n\t}", "public function destroy(section $section)\n {\n //\n }", "function ondelete(){\n\t\tforeach($this->get_sections() as $one){\n\t\t\t$one->dbdelete();\n\t\t}\n\t\treturn true;\n\t}", "function delete()\n\t{\n\t\tSQL::query(\"delete from {$this->_table} where id = {$this->_data['id']}\");\n\t}", "public function deleteFromDatabase($section_rating_view)\n\t{\n\t\treturn false;\n\t}", "public function delete() {\n global $DB;\n $DB->delete_records($this->get_table_name(), array('id' => $this->id));\n }", "public function delete() {\n\t\tif (!empty($this->originalData)) {\n\t\t\t$query = $this->connection->query(\"DELETE FROM {$this->table} WHERE \".self::$primaryKey[$this->table].\"='{$this->originalData[self::$primaryKey[$this->table]]}'\");\n\t\t\t$query = $this->connection->query(\"ALTER TABLE $this->table AUTO_INCREMENT = 1\");\n\t\t\t$this->originalData = array();\n\t\t}\t\n\t\telse \n\t\t\tthrow new Exception('You are trying to delete an inexistent row');\n\t}", "public function delete(string $section, string $key) : bool;", "public function delete()\n {\n $sql = \"DELETE FROM \" . TB_USAGE . \" WHERE mix_id = {$this->db->sqltext($this->mix_id)}\";\n $this->db->exec($sql);\n\n //\tremove everything from cache\n $cache = VOCApp::getInstance()->getCache();\n if ($cache) {\n $cache->flush();\n }\n }", "public function destroy($id)\n {\n $model = Section::findOrFail($id);\n $model->delete();\n }", "public function delete() {\n\t\t$dbh = App::getDatabase()->connect();\n\n\t\t$query = \"DELETE FROM \".$this->getTableName();\n\n\t\t$fl = true;\n\t\tforeach($this as $column => $val) {\n\t\t\tif(in_array($column, $this->getPrimaries())) {\n\t\t\t\t$query .= \"\\n\".(($fl) ? \"WHERE\" : \"AND\").\" \".$column.\" = '\".$val.\"'\";\n\t\t\t\t$fl = false;\n\t\t\t}\n\t\t}\n\n\t\t$res = $dbh->exec($query);\n\t\t$dbh = null;\n\t\treturn $res;\n\t}", "function delete(){\n\t\t\t\t$servername = \"localhost\";\n\t\t\t\t$username = \"root\";\n\t\t\t\t$password = \"\";\n\t\t\t\t$dbname = \"CS230\";\n\t\t\t\t//Variables for holding entity data\n\t\t\t\t$i = $_POST['i'];\n\t\t\t\t$conn = mysqli_connect($servername, $username, $password, $dbname);\n\t\t\t\tif($conn){\n\t\t\t\t//echo \"Connection OK\";\n\t\t\t\t}else{\n\t\t\t\t\tdie(\"The Connection has failed: \" .mysqli_connect_error());\n\t\t\t\t}\n\t\t\t\t$sql = \"DELETE FROM eBook_MetaData WHERE id='$i'\";\n\t\t\t\t$data = mysqli_query($conn,$sql);\n\t\t\t\t\t//If data is not transfered to the database\n\t\t\t\t\tif(!$data){\n\t\t\t\t\techo \"error\";\n\t\t\t\t\t//If it is transfered\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo \"Data deleted\";\n\t\t\t\t\t}\n\t\t\t\t$conn = null;\n\t\t\t\t}", "public function delete()\n {\n\n\n $myDataAccess = aDataAccess::getInstance();\n $myDataAccess->connectToDB();\n // I just made it cascade null when deleted ;)\n\n\n \t$recordsAffected = $myDataAccess->deletePage($this->m_Pageid);\n\n \treturn \"$recordsAffected row(s) affected!\";\n }", "function delete() {\n $fetchPrimary = $this->mysqlConnection->query(\"SHOW INDEX FROM \".$this->table);\n $arrayIndex = $fetchPrimary->fetch(PDO::FETCH_ASSOC);\n $kolomIndex = $arrayIndex['Column_name'];\n\n\t\t\t// Delete het huidige record.\n\n\t\t\t$deleteQuery = \"DELETE FROM \".$this->table.\" WHERE \".$kolomIndex.\" = \".$this->originalValues[$kolomIndex];\n\t\t\t$this->lastQuery = $deleteQuery;\n\n $deleteTable = $this->mysqlConnection->prepare($this->lastQuery);\n $deleteTable->execute();\n\n\t\t}", "public function deleteSection($id)\n\t{\n\t\t$this->admo->checkRoleIsAdmin('menghapus section dengan id ' . $id);\n\n\t\t$nama_section = $this->getSectionById($id)['nama_section'];\n\t\t\n\t\t$this->db->delete('section', ['id_section' => $id]);\n\t\t$this->lomo->insertLog('Section <b>' . $nama_section . '</b> berhasil dihapus');\n\t\t$this->session->set_flashdata('message-success', 'Section ' . $nama_section . ' berhasil dihapus');\n\t\tredirect('section/index');\n\t}", "function erase() {\n //delete * from database\n }", "public static function delete_section($S_SectionID_pk)\n {\n $sql = \"sp_delete_from_t_Section @S_SectionID_pk=?\";\n $stmt = \\NMI::Db()->prepare($sql);\n $stmt->bindParam(1, $S_SectionID_pk);\n $stmt->execute();\n }", "public function delete()\n {\n self::deleteById( $this->db, $this->id, $this->prefix );\n\n if( $this->inTransaction )\n {\n //$this->db->commit();\n $this->inTransaction = false;\n }\n }", "public function destroy(Section $section)\n {\n $section->delete();\n }", "function doRealDelete()\n {\n /* Query data of this section */\n $this->dbQuerySingle();\n /* Check the presence of GET or POST parameter 'returntoparent'. */\n $this->processReturnToParent();\n /* The function above sets $this->rs to values that shall be\n displayed. By assigning $this->rs to Smarty variable 'section'\n we can fill the values of $this->rs into a template. */\n $this->_smarty->assign('section', $this->rs);\n\n /* Delete the record */\n $this->dbDeleteById();\n /* Delete the corresponding counter */\n $this->dbDeleteCounterById();\n\n /* Left column contains administrative menu */\n $this->_smarty->assign('leftcolumn', \"leftadmin.tpl\");\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 delete(){\n\n\t\t$sql = new Sql();\n\n\t\t$sql->query(\"DELETE FROM tb_categories WHERE idcategory=:idcategory\",array(\n\t\t\t\":idcategory\"=>$this->getidcategory()\n\t\t));\n\n\t\tCategory::updateFile();\n\t}", "public function delete()\n\t{\n\t\tDatabase::query(\"\n\t\t\tDELETE FROM\n\t\t\t\t\". $this->tableName .\"\n\t\t\tWHERE\n\t\t\t\tid = '\". $this->id .\"'\n\t\t\");\n\t}", "public function delete() {\n\t\ttry {\n\t\t\tif($this->_state == self::STATE_UNCHANGED) {\n\t\t\t\t$sql = 'DELETE FROM ' . self::sanitize($this->_table->getProperty('name')) . ' WHERE ' . self::sanitize($this->_key_primary->name) . ' = ' . self::sanitize($this->_data[$this->_key_primary->name]);\n\t\t\t\t\\Bedrock\\Common\\Logger::info('Deleting record with query: ' . $sql); echo $sql;\n\t\t\t\t$this->_connection->exec($sql);\n\t\t\t}\n\t\t\telseif($this->_state == self::STATE_CHANGED) {\n\t\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('Unsaved changes found, cannot delete record.');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('Record not found in database.');\n\t\t\t}\n\t\t}\n\t\tcatch(\\PDOException $ex) {\n\t\t\t\\Bedrock\\Common\\Logger::exception($ex);\n\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('A database error was encountered, the record could not be deleted.');\n\t\t}\n\t\tcatch(\\Exception $ex) {\n\t\t\t\\Bedrock\\Common\\Logger::exception($ex);\n\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('The record could not be deleted.');\n\t\t}\n\t}", "protected function delete() {\n $this->db->deleteRows($this->table_name, $this->filter);\n storeDbMsg($this->db);\n }", "function cpatient_detail_delete() {\n\t\tglobal $conn;\n\n\t\t// Initialize table object\n\t\t$GLOBALS[\"patient_detail\"] = new cpatient_detail();\n\n\t\t// Intialize page id (for backward compatibility)\n\t\tif (!defined(\"EW_PAGE_ID\"))\n\t\t\tdefine(\"EW_PAGE_ID\", 'delete', TRUE);\n\n\t\t// Initialize table name (for backward compatibility)\n\t\tif (!defined(\"EW_TABLE_NAME\"))\n\t\t\tdefine(\"EW_TABLE_NAME\", 'patient_detail', TRUE);\n\n\t\t// Open connection to the database\n\t\t$conn = ew_Connect();\n\t}", "public function delete()\n\t{\n\t\t$transaction = $this->dbConnection->beginTransaction();\n\t\ttry {\n\t\t\tforeach ($this->previnterventions as $prev) {\n\t\t\t\t$prev->delete();\n\t\t\t}\n\t\t\tforeach ($this->relevantinterventions as $relv) {\n\t\t\t\t$relv->delete();\n\t\t\t}\n\t\t\tforeach ($this->deviationreasons as $devr) {\n\t\t\t\t$devr->delete();\n\t\t\t}\n\t\t\tforeach ($this->filecollection_assignments as $fca) {\n\t\t\t\t$fca->delete();\n\t\t\t}\n\t\t\tif (parent::delete()) {\n\t\t\t\t$transaction->commit();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new Exception('unable to delete');\n\t\t\t}\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\t$transaction->rollback();\n\t\t\tthrow $e;\n\t\t}\n\n\t}", "public function delete()\n {\n if ( !$this->loaded )\n $this->reload();\n\n $this->lock();\n\n try\n {\n $sql = \"DELETE FROM $this->_table_name\n WHERE\n $this->left_column >= $this->left\n AND $this->right_column <= $this->right\n AND $this->scope_column = $this->scope\n \";\n $this->_db->exec($sql);\n\n $this->delete_space($this->left, $this->size);\n }\n catch (PDOException $e)\n {\n $this->unlock();\n throw $e;\n }\n\n $this->unlock();\n }", "public function delete()\n {\n $this->execute(\n $this->syntax->deleteSyntax(get_object_vars($this))\n );\n }", "public function destroy($id)\n {\n //\n //finding user id \n $section= sections::findOrFail($id);\n //now deleting this user\n $section->delete();\n }", "public function delete() {\n $this->remove_content();\n\n parent::delete();\n }", "public function delete() {\n // Create query\n $query = \"DELETE FROM \" . $this->table .\n \" WHERE MID = :mid AND Spot = :spot \";\n \n // Prepare the statement\n $stmt = $this->conn->prepare($query);\n\n // Clean the query\n $this->attr[\"mid\"] = htmlspecialchars(strip_tags($this->attr[\"mid\"]));\n $this->attr[\"spot\"] = htmlspecialchars(strip_tags($this->attr[\"spot\"]));\n\n // Bind the data\n $stmt->bindValue(\":mid\", $this->attr[\"mid\"]);\n $stmt->bindValue(\":spot\", $this->attr[\"spot\"]);\n \n // Execute the prepared statement and check for errors in running it\n return $this->runPrepStmtChkErr($stmt);\n }", "public function delete()\n {\n $this->_validateModifiable();\n\n $this->_getDataSource()->delete($this);\n }", "function delete() {\n\t\t\n\t\t$this->autoRender = false;\n\t\t$this->layout = \"\";\n\t\t\n\t\tConfigure::write('debug', 0);\n\t\t\n\t\t$id = $this->Session->read('Member.memberid');\n\t\t\n\t\t// id 4 means trash\n\t\t\n\t\t$activeid = 4;\n\t\t\t$this->Member->updateAll(array(\n\t\t\t\t'Member.active' => \"'\" . $activeid . \"'\"\n\t\t\t), array(\n\t\t\t\t'Member.id' => $id\n\t\t\t));\n\t\t\n\t\techo \"deleted\";\n\t\t\t\n\t\n\t/*\tif ($id) {\n\t\t\t\n\t\t\t$delete = $this->Member->delete($id);\n\t\t\t\n\t\t \tif ($delete) {\n\t\t\t\t$meta = $this->userMeta->deleteAll(array(\n\t\t\t\t\t'userMeta.member_id' => $id\n\t\t\t\t));\n\t\t\t\t$course = $this->TutCourse->deleteAll(array(\n\t\t\t\t\t'TutCourse.member_id' => $id\n\t\t\t\t));\n\t\t\t\t$event = $this->TutEvent->deleteAll(array(\n\t\t\t\t\t'TutEvent.tutor_id' => $id\n\t\t\t\t));\n\t\t\t\t$image = $this->UserImage->deleteAll(array(\n\t\t\t\t\t'UserImage.user_id' => $id\n\t\t\t\t));\n\t\t\t\t\n\t\t\t}\n\t\t\tif ($meta) {\n\t\t\t\techo \"deleted\";\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} */\n\t\t\n\t\t\n\t\n\t\n\t}", "function delete() {\n \tglobal $mysql;\n \tif(empty($this->id)) return;\n \t$tablename = $this->class_name();\n \t$id = $this->id;\n \t$query = \"DELETE FROM $tablename WHERE id=$id\";\n \t$mysql->update($query);\n }", "public function delete()\n\t{\n\t\tif ($this->data['id'])\n\t\t{\n\t\t\treturn $this->db->delete($this->table_name, array('id' => $this->data['id']));\n\t\t}\n\t}", "public function delete() {\n\n // Does the course object have an ID?\n if ( is_null( $this->courseId ) ) trigger_error ( \"Course::delete(): Attempt to delete course object that does not have its ID property set.\", E_USER_ERROR );\n\n // Delete the Student\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $st = $conn->prepare ( \"DELETE FROM course WHERE courseId = :courseId LIMIT 1\" );\n $st->bindValue( \":courseId\", $this->courseId, PDO::PARAM_INT );\n $st->execute();\n $conn = null;\n }", "function delete() {\n\t\t$sqlStatements = array();\n\t\t$sqlStatements[] = \"DROP TABLE IF EXISTS tags\";\n\t\t$sqlStatements[] = \"DROP TABLE IF EXISTS siteViews\";\n\t\texecuteSqlStatements($sqlStatements);\n\t}", "public function delete()\r\n {\r\n $db = Database::getDatabase();\r\n $db->consulta(\"DELETE FROM puesto WHERE idPue = {$this->idPue};\");\r\n }", "public function DeleteSection($id) {\n $this->Db()->where('id', $id);\n if($this->Db()->delete('Sections')) {\n return 'Onderdeel verwijderd.';\n } else {\n throw new RestException(500, 'Niet gelukt om onderdeel met Id: \\'' . $id . '\\' te verwijderen');\n }\n }", "function delete() {\n $this->db->delete(self::table_name, array('id' => $this->id));\n }", "public function delete() {\n $conexion = StorianDB::connectDB();\n $borrado = \"DELETE FROM cuento WHERE id=\\\"\".$this->id.\"\\\"\";\n $conexion->exec($borrado);\n }", "function deleteSchool(){\n mysql_query(\"DELETE FROM school WHERE id='$this->schoolId'\") or die(mysql_error());\n \n // Delete the delegate positions table\n mysql_query(\"DROP TABLE school_$this->schoolId\") or die(mysql_error());\n }", "function delete(){\n // Delete subclauses\n foreach($this->subClause as $clause){\n $clause->delete();\n }\n \n mysql_query(\"DELETE FROM resolution WHERE id='$this->clauseId'\") or die(mysql_error());\n }", "public function delete()\n {\n $textvalues = $this->gettextvalues();\n $this->deleteValues($textvalues);\n \n $componentvalues = $this->getcomponentvalues();\n $this->deleteValues($componentvalues);\n \n $filevalues = $this->getfilevalues();\n $this->deleteValues($filevalues);\n \n $contributorvalues = $this->getcontributorvalues();\n $this->deleteValues($contributorvalues);\n \n parent::delete();\n }", "public function delete() { // Page::destroy($this->pages()->select('id')->get());\n $this->pages()->detach();\n parent::delete();\n }", "function row_delete()\n\t{\n\t $this->db->where('id', $id);\n\t $this->db->delete('testimonials'); \n\t}", "final public function delete() {\n global $config; \n # Borrar el elemento de la base de datos\n $this->db->query(\"DELETE FROM guarderia_2 WHERE id_guarderia = $this->id\");\n # Redireccionar a la página principal del controlador\n $this->functions->redir($config['site']['url'] . 'sedes/&success=true');\n }", "public function delete(){\n global $wpdb;\n $table_name = $wpdb->prefix.static::$_table;\n return $wpdb->delete($table_name,[$this->getPk()=>$this->getPkValue()]);\n }", "public function delete()\n\t{\n\t\t$this->hard_delete();\n\t}", "function delete(){\n\t\t$eventDet = $this->get_full_details();\n\t\t//print_r($eventDet);\n\t\t#unlink all images for the event\n\t\tif ($eventDet->news_image_logo) { \n\t\t\t//unlink($this->imgPath.$eventDet->news_image_logo);\n\t\t}\n\t\tif ($eventDet->news_photo1) { \n\t\t\tunlink($this->imgPath.$eventDet->news_photo1);\n\t\t}\n\t\tif ($eventDet->news_photo2) { \n\t\t\tunlink($this->imgPath.$eventDet->news_photo2);\n\t\t}\n\t\tif ($eventDet->news_photo3) { \n\t\t\tunlink($this->imgPath.$eventDet->news_photo3);\n\t\t}\t\t\t\t\t\t\n\t\t\n\t\t#remove event entry from the db\n\t\tglobal $db;\n\t\t$sQl = \"delete from cms_news where id = '\".$this->event_id.\"'\";\n\t\tif ($db->query($sQl)){\n\t\t\t$this->message = \"Event \".$eventDet->news_title.\" deleted successfully\";\n\t\t\treturn true;\n\t\t} else {\n\t\t\t$this->error = \"Cannot delete Event \".$eventDet->news_title.\"\";\n\t\t\treturn false;\n\t\t}\n\t}", "function delete() {\n\t\t$sql = \"DELETE FROM \".$this->hr_db.\".hr_person_detail\n\t\t\t\tWHERE psd_ps_id=?\";\n\t\t$this->hr->query($sql, array($this->psd_ps_id));\n\t}", "public function delete()\n {\n Db::getInstance()->delete($this->getTableName(), ['id' => $this->getId()]);\n }", "public function delete()\n {\n $class = strtolower(get_called_class());\n $table = self::$_table_name != null ? self::$_table_name : $class . 's';\n\n $pdo = PDOS::getInstance();\n\n $whereClause = '';\n foreach (static::$_primary_keys as $pk)\n $whereClause .= $pk . ' = :' . $pk . ' AND ';\n $whereClause = substr($whereClause, 0, -4);\n $sql = 'DELETE FROM ' . $table . ' WHERE ' . $whereClause;\n $query = $pdo->prepare($sql);\n $attributes = $this->getAttributes(new \\ReflectionClass($this));\n foreach ($attributes as $k => $v)\n {\n if (in_array($k, static::$_primary_keys))\n $query->bindValue(':' . $k, $v);\n }\n $query->execute();\n }", "public function deleteFromDb() {\n\n // calling configuration of database\n include('database/config.php');\n\n // Accessing cookie stored in validate-user-login.php\n $email = $_COOKIE['email'];\n\n // Removing data by using json_remove function\n $result = mysqli_query($connection, \"UPDATE users SET contact=json_remove(contact, '$.{$this->contactToDelete}') WHERE email='$email'\");\n\n // Refreshing page by redirecting\n header(\"Location: main.php#\");\n }", "public function delete() {\n // Find document ID.\n if (!$this->find()) {\n debugging('Failed to find ousearch document');\n return false;\n }\n self::wipe_document($this->id);\n }", "public function deleteFromIndex()\n {\n if ($this->es_info) {\n ESHelper::deleteDocumentFromType($this);\n }\n }", "public function testDelete()\n {\n if (! $this->_url) $this->markTestSkipped(\"Test requires a CouchDb server set up - see TestConfiguration.php\");\n $db = $this->_setupDb();\n \n $db->create(array('a' => 1), 'mydoc');\n \n // Make sure document exists in DB\n $doc = $db->retrieve('mydoc');\n $this->assertType('Sopha_Document', $doc);\n \n // Delete document\n $ret = $db->delete('mydoc', $doc->getRevision());\n \n // Make sure return value is true\n $this->assertTrue($ret);\n \n // Try to fetch doc again \n $this->assertFalse($db->retrieve('mydoc'));\n \n $this->_teardownDb();\n }", "public function adminDelComm()\n {\n $commID = $_POST['commID'];\n $del = \"DELETE FROM comment_section WHERE comm_id = ?\";\n $do = $this->connect()->prepare($del);\n $do->execute([$commID]);\n }", "function delete() {\n\t\t$sql = \"DELETE FROM \".$this->hr_db.\".hr_amphur\n\t\t\t\tWHERE amph_id=?\";\n\t\t$this->hr->query($sql, array($this->amph_id));\n\t}", "public function delete() {\n\t\t$this->getConnection()->delete( $this );\n\t\t$this->clear();\n\t}", "function sql_deleteEntry($sectionID) {\n global $database;\n $thisQuery = \"DELETE FROM \".TABLE_PREFIX.\"mod_dirlist WHERE section_id='$sectionID'\";\n $oldErrorReporting = error_reporting(0);\n $database->query($thisQuery);\n error_reporting($oldErrorReporting);\n if ($database->is_error()) {\n // SQL Fehler\n $this->errorPlace = 'sql_deleteEntry()';\n $this->error = $database->get_error();\n return false; }\n else {\n return true; }\n }", "public function clean(){\n\t\t$sql = 'DELETE FROM conta_a_pagar';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "public function delete() {\n $sql = sprintf(\"DELETE FROM category WHERE id=%d\", $this->id);\n self::$connection->execute($sql);\n }", "public function delete()\n\t{\n\t \tif (!Validate::isTableOrIdentifier($this->identifier) OR !Validate::isTableOrIdentifier($this->table))\n\t \t\tdie(Tools::displayError());\n\n\t\t$this->clearCache();\n\n\t\t/* Database deletion */\n\t\t$result = Db::getInstance()->Execute('DELETE FROM `'.pSQL($this->table).'` WHERE `'.pSQL($this->identifier).'` = '.(int)($this->id));\n\t\tif (!$result)\n\t\t\treturn false;\n\t\t\n\t\treturn $result;\n\t}", "public function delete()\n {\n $stmt = $this->_db->prepare(\"DELETE FROM score;\");\n $stmt->execute();\n }", "public function delLink() {\n\t \t$section = $_GET['section'];\n\t\t$id = $_GET['id'];\n \tswitch ($section):\n\t\t\tcase ('showcase'):\n\t\t $title = $_GET['showcase'];\n\t\t if ($this->_ci->db->delete('showcase_relatedlinks', array('id' => $id))):\n\t\t \treturn TRUE;\n\t\t else:\n\t\t \treturn FALSE;\n\t\t endif;\n\t\t break;\n\t\t\tcase ('blog'):\n\t\t\t\t$title = $_GET['blog'];\n\t\t\t\tif ($this->_ci->db->delete('blog_relatedlinks', array('id' => $id))):\n\t\t \treturn TRUE;\n\t\t else:\n\t\t \treturn FALSE;\n\t\t endif;\n\t\t break;\n\t\tendswitch;\n }", "public function delete()\n {\n\n //If no log in is performed redirect to login page\n if (!$this->loggedIn()) {\n header('Location: index.php?c=login&m=login');\n }\n\n //If no game id is provided redirect to login page\n if (!isset($_GET['id'])) {\n header('Location: index.php?c=game&m=index');\n }\n\n $clean = $this->cleanInput($_GET['id']);\n\n //Select row to be deleted from games table\n $gamesCollection = new GamesCollection();\n $game = $gamesCollection->getGameById($clean);\n\n //Check for result query in main table 'games'\n //If no records are fetched for a game redirect\n if (is_null($game)) {\n header('Location: index.php?c=game&m=index');\n }\n\n //Select rows to be deleted from tables games_names , games_description and games_year\n $gamesNamesCollection = new GamesNamesCollection();\n $gameName = $gamesNamesCollection->getGameName($game->getNameId());\n\n $gamesDescriptionCollection = new GamesDescriptionCollection();\n $gameDescription = $gamesDescriptionCollection->getGameDescription($game->getDescriptionId());\n\n $gamesYearCollection = new GamesYearCollection();\n $gameYear = $gamesYearCollection->getGameYear($game->getYearId());\n\n\n // Use name , id , description , year from result query stored in '$game'\n // and delete records in tables games_names , games_description , games_year\n $gamesNamesCollection->delete($gameName->getId());\n $gamesDescriptionCollection->delete($gameDescription->getId());\n $gamesYearCollection->delete($gameYear->getId());\n\n //Delete game column from games table and delete image from folder\n unlink('../images/'.$game->getImage());\n $gamesCollection->delete($game->getId());\n\n //Assign a value to a variable containing the video id of the selected video_id column and later use this value to\n //delete records from table games_videos\n $gamesAdditionalCollection = new GamesAdditionalCollection();\n $gameVideo = $gamesAdditionalCollection->getGameVideoById($clean);\n\n //Assign a value to a variable containing the image id of the selected image_id column and later use this value to\n //delete records from table games_gallery_images\n $gameImage = $gamesAdditionalCollection->getGameImageById(array('games_id' => $clean));\n\n //Delete records from table games_additional_info\n $gamesAdditionalCollection->delete($clean);\n\n //Delete records from table games_videos\n $gamesVideosCollection = new GamesVideosCollection();\n $gamesVideosCollection->delete($gameVideo->getVideoId());\n\n //First select image_id from table games_additional_info and use it to delete records\n //from table games_gallery_images and image files from folder small_images\n $imageCollection = new GamesGalleryImagesCollection();\n\n //Fill an array with an image_id for an image or images\n $imagesIdArray = array();\n $imagesNamesArray = array();\n foreach($gameImage as $img) {\n $imagesIdArray[] = $img->getImageId();\n }\n //End\n\n //$imagesIdArray contains ids and they are used to fetch the images names from\n // table games_gallery_images and store them in $imageNamesArray array\n foreach($imagesIdArray as $imageId) {\n $imagesNamesArray[] = $imageCollection->getGameImage(array('id' => $imageId));\n }\n //End\n\n //$imagesNameArray array contains the images names and they are used to delete\n //the actual images from the folder small_images\n foreach($imagesNamesArray as $imageName) {\n unlink('../small_images/'.$imageName[0]->getImage());\n }\n\n ///Delete records from table games_gallery images using the ids stored in $imagesIdArray\n foreach($imagesIdArray as $imageGallery) {\n $imageCollection->delete($imageGallery);\n }\n\n header('Location: index.php?c=game&m=index');\n }", "public function delete(NewsSection $section): void\n {\n $children_sections = $this->getCachedSubsections($section);\n\n // Delete articles\n (new NewsArticle())->whereIn('section_id', $children_sections)->delete();\n // Delete subsections\n (new NewsSection())->whereIn('id', $children_sections)->delete();\n\n $this->clearCache();\n }", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "function delete() {\n $this->that->delete($this->id, $this->name);\n $this->put_id();\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 deleteStudentInfoFromEventTable(){\n \n $deleteId = $_POST[\"edeleteId\"];\n \n if ($this->databaseConnection()){\n $queryDelete = $this->db_connection->prepare('DELETE FROM events WHERE eid = :deleteId');\n $queryDelete->bindValue(':deleteId', $deleteId ,PDO::PARAM_INT);\n $queryDelete->execute();\n // Return something to display the we have delete the entry \n }\n }", "public final function delete() {\n }", "protected function _delete()\n {\n $pages = $this->getTable('ExhibitPage')->findBy(array('exhibit'=>$this->id));\n foreach($pages as $page) {\n $page->delete();\n }\n $this->deleteTaggings();\n }", "public function DELETE() {\n #\n }" ]
[ "0.73761266", "0.6953956", "0.6879618", "0.68073994", "0.6785122", "0.673039", "0.67299855", "0.6727538", "0.6663893", "0.6547913", "0.65443105", "0.64983666", "0.6485585", "0.6461823", "0.6450848", "0.64467424", "0.6434468", "0.6431587", "0.6359967", "0.63415474", "0.6257271", "0.6252569", "0.62428266", "0.62354547", "0.61701834", "0.61608857", "0.61523783", "0.61248946", "0.6118404", "0.6111518", "0.61104167", "0.6084316", "0.6075657", "0.6054889", "0.6048319", "0.6046085", "0.6025531", "0.6024644", "0.60206395", "0.601652", "0.601131", "0.60037774", "0.59998244", "0.5999127", "0.5988505", "0.5988483", "0.5987051", "0.5984376", "0.59836286", "0.5957189", "0.5944203", "0.5942222", "0.5939577", "0.5939398", "0.59348613", "0.5934558", "0.5931269", "0.5929567", "0.5929479", "0.59266865", "0.5919763", "0.59194547", "0.59142756", "0.5903225", "0.5891212", "0.5890499", "0.5885802", "0.58844", "0.5870136", "0.58614624", "0.5860399", "0.58583516", "0.58492464", "0.58467764", "0.5838175", "0.58358335", "0.5832618", "0.5830228", "0.5829659", "0.5826395", "0.5826395", "0.5826395", "0.5826395", "0.5826395", "0.5826395", "0.5826395", "0.5826395", "0.5826395", "0.5826395", "0.5826395", "0.5826395", "0.5826395", "0.5826395", "0.5826395", "0.5825679", "0.58222693", "0.58184737", "0.5818357", "0.5816534", "0.58134353" ]
0.5930918
57
TODO: Implement duplicate() method.
public function duplicate( &$section, $args = array() ) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function duplicate()\n {\n }", "public function createDuplicate();", "public function duplicate(){\n\t\treturn self::cloneObject($this);\n\t}", "function duplicate($p_archive)\n {\n }", "public function check_duplicate()\n {\n }", "public function testDuplicate()\n {\n $this->duplicate(\n array_merge(\n $this->_createData1(),\n $this->_createData2()\n ),\n array_merge(\n $this->_expectData1(),\n $this->_expectData2()\n )\n );\n }", "function duplicate($obj) {\n $newObj = $obj;\n return $newObj;\n}", "public function duplicate() {\n \t\t\n \t\ttry {\n\t\t\t\n\t \t\t// start duplicate\n\t\t\t$class = get_class($this);\n \t\t\t$duplicate = new $class;\n \t\t\t\n\t \t\t// duplicate row fields\n\t \t\t$this->duplicateRow($duplicate);\n\t \t\t\n \t\t\t// duplicate data\n\t \t\t$this->duplicateData($duplicate);\n\t \t\t\n\t \t\t// duplicate items\n\t \t\t$this->duplicateChildren($duplicate);\n\t \t\t\n\t \t\t$duplicate->setDuplicate($this->getId());\n \t\t\n \t\t\treturn $duplicate;\n \t\t\t\n \t\t} catch (Exception $e) {\n \t\t\n \t\t\treturn false;\n \t\t\t\n \t\t}\n \t\t\n \t}", "public function testDuplicate()\n {\n $this->duplicate(\n [\n 'tabId' => 1,\n ],\n [\n 'tabId' => 1,\n ]\n );\n }", "public function copy();", "function copy(){ return $this->_copy(); }", "public function getCopy();", "public function getCopy();", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone () {}", "private function __clone(){ }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "abstract protected function copy();", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone(){}", "public function duplicate( &$object, $args = array() );", "final private function __clone(){}", "private function __clone() { \n\n\t}", "private function __clone()\r\n {}", "private function __clone() \r\n { \r\n }", "final private function __clone() {}", "final private function __clone() {}", "final private function __clone() {}", "final private function __clone() {}", "private function __clone() {\r\n \r\n }", "public function duplicateData(&$duplicate) {\n\t\t\n\t\t$id = $this->getId();\n \t\t$object = $this;\n \t\t\n \t\t// get data\n \t\t$data = $this->getDataValues();\n $duplicate->dataLoaded = true;\n \t\t// set data\n \t\t$duplicate->setDataByArray($data);\n \t\t\n \t\treturn $this;\n \t\t\n\t}", "function __clone()\n {\n\t\n }", "private function __clone()\r\n {\r\n }", "private function __clone()\n\t{\n\n\t}", "private function __clone()\n\t{\n\n\t}", "protected function __clone() { }", "private function __clone() \n {\n }", "private function __clone()\n {\n \n }", "private function __clone()\n {\n \n }", "private function __clone(){\n\t\t\n\t}", "private function __clone() {\r\n\t}", "private function __clone()\r\n {\r\n // ...\r\n }", "private function __clone()\n {\n\n }", "private function __clone()\n {\n\n }", "private function __clone()\n {\n\n }", "private function __clone()\n {\n\n }", "final private function __clone() { }", "final private function __clone() { }", "public function __clone() {}", "public function __clone() {}" ]
[ "0.8443669", "0.81615627", "0.781679", "0.71740675", "0.7066397", "0.70564103", "0.7034084", "0.69258046", "0.6913501", "0.6899205", "0.682961", "0.68092525", "0.68092525", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.67891157", "0.676564", "0.676564", "0.676564", "0.676564", "0.676564", "0.676564", "0.676564", "0.676564", "0.676564", "0.676564", "0.676564", "0.673001", "0.6728378", "0.6713041", "0.66872734", "0.66872734", "0.66872734", "0.66872734", "0.66872734", "0.66872734", "0.66872734", "0.66872734", "0.66872734", "0.66872734", "0.6686535", "0.66602165", "0.66602165", "0.66602165", "0.66602165", "0.66602165", "0.66602165", "0.66602165", "0.6623971", "0.65718895", "0.6569293", "0.6557049", "0.6542329", "0.65395254", "0.6539011", "0.6539011", "0.6539011", "0.6539011", "0.652987", "0.6522891", "0.65121716", "0.6506031", "0.6505925", "0.6505925", "0.65040004", "0.6502726", "0.64979684", "0.64979684", "0.6493665", "0.6492212", "0.6489011", "0.64871573", "0.64871573", "0.64871573", "0.64871573", "0.6480191", "0.6480191", "0.64735734", "0.64735734" ]
0.0
-1
Remove all items from each section and delete course's sections.
public function clear() { $sections_ids = LP_Object_Cache::get( 'course-' . $this->course_id, 'learn-press/course-sections-ids' ); if ( ! $sections_ids ) { return false; } global $wpdb; do_action( 'learn-press/before-clear-section', $this->course_id ); // Remove all items in course's sections $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}learnpress_section_items WHERE %d AND section_id IN(" . join( ',', $sections_ids ) . ')', 1 ) ); learn_press_reset_auto_increment( 'learnpress_section_items' ); // delete sections ids cache // wp_cache_delete( 'course-' . $this->course_id, 'learn-press/course-sections-ids' ); // delete sections in course $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}learnpress_sections WHERE section_course_id = %d", $this->course_id ) ); learn_press_reset_auto_increment( 'learnpress_sections' ); // delete sections cache // wp_cache_delete( 'course-' . $this->course_id, 'learn-press/course-sections' ); LP_Course_Utils::set_cache_db_sections( $this->course_id, false ); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function remove_empty_section_branches() {\n global $PAGE;\n $cache = new navigation_cache('navigation');\n $course = &$PAGE->navigation->find_active_node(navigation_node::TYPE_COURSE);\n if ($course===false || !$cache->cached('modinfo'.$course->key) || !$cache->cached('coursesections'.$course->key)) {\n return 0;\n }\n $sectionstoremove = array();\n $coursesections = $cache->{'coursesections'.$course->key};\n $modinfosections = $cache->{'modinfo'.$course->key}->sections;\n foreach ($coursesections as $id=>$section) {\n if (!array_key_exists($id, $modinfosections)) {\n $sectionstoremove[] = $section->id;\n }\n }\n\n foreach ($course->children as $key=>$node) {\n if ($node->type == navigation_node::TYPE_SECTION && in_array($node->key, $sectionstoremove)) {\n $course->remove_child($key);\n }\n }\n }", "function courseprefs_cleanup($file='cleanup.php', $semester=0, $logger=null, $web_report=false) {\n global $CFG;\n\n if (!$logger) {\n $logger = new Logger(true);\n }\n\n $clean_children = array(\"block_courseprefs_teamteach\",\n \"block_courseprefs_crosslist\",\n \"block_courseprefs_split\",\n \"block_courseprefs_logs\",\n \"block_courseprefs_teachers\",\n \"block_courseprefs_students\");\n\n if ($semester == 0) {\n $sql = \"SELECT * FROM {$CFG->prefix}block_courseprefs_semesters \n WHERE grades_due < \" . time();\n } else {\n $sql = \"SELECT * FROM {$CFG->prefix}block_courseprefs_semesters\n WHERE id = {$semester}\";\n }\n\n require_once($CFG->dirroot . '/blocks/courseprefs/classes/CoursePrefsHook.php');\n\n $hooks = CoursePrefsHook::allHooks($logger);\n\n // Parent semesters to remove\n $semesters = get_records_sql($sql);\n\n // If the result from query is not null, iterate\n if ($semesters) {\n\n foreach ($semesters as $semester) {\n $hooks->execute('cleanup', $semester->id);\n \n // For processing time's sake, we remove enroll here\n delete_records('block_courseprefs_enroll', 'semestersid', $semester->id);\n \n $str = \"Removing {$semester->campus} {$semester->name} {$semester->year}\" . \n \" and all associated data.\";\n $logger->log($str);\n if ($web_report) {\n mtrace($str);\n }\n }\n $semesterids = implode(',', array_keys($semesters));\n $sql = \"SELECT * FROM {$CFG->prefix}block_courseprefs_sections\n WHERE semestersid IN ({$semesterids})\";\n\n $sections = get_records_sql($sql);\n \n foreach ($sections as $section) {\n\n // Blow away the 'normal' cases first\n foreach ($clean_children as $table) {\n delete_records($table, 'sectionsid', $section->id);\n }\n\n // Remove the section entry\n delete_records('block_courseprefs_sections', 'id', $section->id);\n $str = \"Removing section {$section->id} {$section->idnumber}\";\n $logger->log($str);\n }\n // Remove the semesters\n delete_records_select('block_courseprefs_semesters', \n 'id IN ('. $semesterids .')');\n } else {\n $str = \"There are no semesters to remove.\";\n $logger->log($str);\n if ($web_report) {\n mtrace($str);\n }\n }\n\n $header = get_string('cleanup_header', 'block_courseprefs'); \n $logger->reportErrors($file, $header, $header);\n}", "public function rm($section){\n\t\t$body = $this->toArray();\n\t\tunset($body[$section]);\n\t\t$this->updateFile($body);\n\t}", "public function flushSections()\n {\n $this->sections = [];\n $this->sectionStack = [];\n }", "function delete($deleteChildren = true)\n\t{\n\t\t$sections = $this->getSections();\n\t\t\n\t\tforeach($sections as $section)\n\t\t{\n\t\t\t$this->detach($section);\n\t\t}\n\t\t\n\t\t$this->destroy();\n\t}", "public function on_course_sections_end() {\n $this->converter->set_stash('sectionidslist', $this->sectionids);\n unset($this->sectionids);\n }", "public function delete( &$id ) {\n\n\t\tglobal $wpdb;\n\n\t\t// allow hook\n\t\tdo_action( 'learn-press/before-delete-section', $this->course_id, $id );\n\n\t\t// Remove section items.\n\t\t$wpdb->delete( $wpdb->learnpress_section_items, array( 'section_id' => $id ) );\n\t\tlearn_press_reset_auto_increment( 'learnpress_section_items' );\n\n\t\t// Remove section\n\t\t$result = $wpdb->delete( $wpdb->learnpress_sections, array( 'section_id' => $id ) );\n\t\tlearn_press_reset_auto_increment( 'learnpress_sections' );\n\n\t\treturn ! ! $result;\n\t}", "public function deleteChildren(){\n $this->publicEnvironments()->delete();\n $this->privateEnvironments()->delete();\n $collections = Collection::where('project_id', $this->id)->get();\n\n foreach($collections as $collection){\n $collection->items()->delete();\n $collection->delete();\n }\n }", "public function destroy(section $section)\n {\n //\n }", "private function deleteSection() {\n $courseID = $_POST['courseID'];\n $sectionID = $_POST['sectionID'];\n\n $this->openConn();\n\n $sql = \"DELETE FROM Section WHERE courseID= :courseID and sectionID = :sectionID\";\n $stmt = $this->conn->prepare($sql);\n $stmt->execute(array(':courseID'=> $courseID, ':sectionID'=> $sectionID));\n\n if($stmt === TRUE) {\n $this->closeConn();\n return true;\n }\n else {\n $this->closeConn();\n return false;\n }\n\n }", "public function remove_sections($active, $section)\n {\n $sections_ids = apply_filters(\n 'mo_optin_customizer_sections_ids',\n array(\n $this->configuration_section_id,\n $this->integration_section_id,\n $this->design_section_id,\n $this->fields_section_id,\n $this->headline_section_id,\n $this->description_section_id,\n $this->note_section_id,\n $this->setup_display_rule_section_id,\n $this->user_targeting_display_rule_section_id,\n $this->click_launch_display_rule_section_id,\n $this->exit_intent_display_rule_section_id,\n $this->x_seconds_display_rule_section_id,\n $this->x_scroll_display_rule_section_id,\n $this->x_page_views_display_rule_section_id,\n $this->page_filter_display_rule_section_id,\n $this->query_filter_display_rule_section_id,\n $this->user_targeting_display_rule_section_id,\n $this->schedule_display_rule_section_id,\n $this->success_section_id,\n $this->embed_section_id\n )\n );\n\n return in_array($section->id, $sections_ids);\n }", "public function clearItems();", "public function deleteSection($sectionId);", "public function clearRepeated()\n {\n foreach ($this->repeatedLayouts as $repeatedLayout) {\n $repeatedLayout->delete();\n }\n }", "public function deleting(Section $section)\n {\n $section->fields->each(function ($field) {\n $field->delete();\n });\n }", "public function destroy($id)\n\t{\n\t\t$section = Section:: find($id);\n\n\t\t$categories=Category::where('section_id','=',$id)->get();\n\n\t\tfor ($i=0; $i <count($categories); $i++) {\n\t\t\t//add notification wher article deleted\n\t\t\t$this->addnotification(\"delete\" , \"category\" , $categories[$i] );\n\t\t}\n\t\t$section->delete();\n\t}", "function cerify_delete($course) {\r\n\tglobal $db;\r\n\r\n/*\r\n\t// delete hello_world course table entries\r\n\t$sql = \"DELETE FROM \".TABLE_PREFIX.\"certify, \".TABLE_PREFIX.\"certify_members, \".TABLE_PREFIX.\"certify_tests \";\r\n\t$sql .= \"USING \".TABLE_PREFIX.\"certify INNER JOIN \".TABLE_PREFIX.\"certify_members INNER JOIN \".TABLE_PREFIX.\"certify_tests \";\r\n\t$sql .= \"WHERE \".TABLE_PREFIX.\"certify.course = $course \";\r\n\t$sql .= \"AND \".TABLE_PREFIX.\"certify.certify_id = \".TABLE_PREFIX.\"certify_members.certify_id \";\r\n\t$sql .= \"AND \".TABLE_PREFIX.\"certify.certify_id = \".TABLE_PREFIX.\"certify_tests.certify_id\";\r\n\tmysql_query($sql, $db);\r\n*/\r\n\r\n//\t$sql = 'DELETE members FROM '.TABLE_PREFIX.'certify AS certify INNER JOIN '.TABLE_PREFIX.'certify_members AS members WHERE certify.course='.$course.' AND certify.certify_id=members.certify_id';\r\n//\tmysql_query($sql, $db);\r\n\t$sql = 'DELETE tests FROM '.TABLE_PREFIX.'certify AS certify INNER JOIN '.TABLE_PREFIX.'certify_tests AS tests WHERE certify.course='.$course.' AND certify.certify_id=tests.certify_id';\r\n\tmysql_query($sql, $db);\r\n\t$sql = 'DELETE FROM '.TABLE_PREFIX.'certify AS certify WHERE certify.course='.$course;\r\n\tmysql_query($sql, $db);\r\n\r\n\r\n}", "public function removeSettingSections( $sSectionID1=null, $sSectionID2=null, $_and_more=null ) { \n \n foreach( func_get_args() as $_sSectionID ) {\n $this->oForm->removeSection( $_sSectionID );\n }\n \n }", "public function clear_titles_layouts(string $area)\n{\n\n // Delete existing\n db::query(\"DELETE FROM cms_layouts WHERE area = %s\", $area);\n\n // Delete from redis cms:titles\n$keys = redis::hkeys('cms:titles');\n foreach ($keys as $key) { \n if (!preg_match(\"/^$area\\//\", $key)) { continue; }\n redis::hdel('cms:titles', $key);\n }\n\n // Delete from redis cms:layouts\n $keys = redis::hkeys('cms:layouts');\n foreach ($keys as $key) { \n if (!preg_match(\"/^$area\\//\", $key)) { continue; }\n redis::hdel('cms:layouts', $key);\n }\n\n // Debug\n debug::add(2, tr(\"Cleared all page titles / layouts from area {1}\", $area));\n\n}", "public function delete(NewsSection $section): void\n {\n $children_sections = $this->getCachedSubsections($section);\n\n // Delete articles\n (new NewsArticle())->whereIn('section_id', $children_sections)->delete();\n // Delete subsections\n (new NewsSection())->whereIn('id', $children_sections)->delete();\n\n $this->clearCache();\n }", "public function remove_section($id)\n {\n }", "public function removeAll()\n {\n foreach ($this->items as $item) {\n $this->items->remove($item);\n }\n }", "public function clearCategories()\n {\n $scenario = Scenarios::getOrCreateUserScenario();\n $scenario->categories()->detach();\n }", "public function cleanup()\n {\n // Remove old parts without binaries \n $this->removePartsWithoutBinary();\n \n // Remove parts where the binary is missing\n $this->removePartsWithMissingBinary();\n \n // Remove binaries without parts\n $this->removeBinariesWithoutParts();\n }", "public function destroy($id)\n {\n $model = Section::findOrFail($id);\n $model->delete();\n }", "public function destroy($resourceable, $id, Section $section, Content $content)\n {\n\n if($content->sections->count() > 1 ){\n foreach($content->sections as $section){\n $section->components()->detach([$content->id]);\n }\n }else {\n $section->components()->detach([$content->id]);\n }\n\n // delete Section_content\n $this->deleteEntry($content, request());\n\n log_activity(' Component Deleted',\n 'A Section Content was successfully removed from the Sections', $content);\n\n return redirect_to_resource();\n }", "public static function clearWebFront($section)\n {\n $frontPage = ($section == 0) || ($section == -1);\n switch ($section){\n case -1:\n $articles = Webfront::moveFrontPage();\n break;\n\n case 0:\n $articles = WebFront::frontPage();\n break;\n\n default:\n $articles = WebFront::bySection($section);\n break;\n }\n $articles->each(function($item, $key) use($frontPage){\n /** @var \\App\\Story $item */\n if($frontPage){\n $item->addToFrontPage(null);\n }else{\n $item->addToSectionWebfront(null);\n }\n });\n }", "public function run()\n\t{\n\t\tDB::table('course_sections')->delete();\n\n\t\t$course_sections = array(\n array(\n 'id' => '1CCN1M',\n 'num_section' => 1,\n 'course_id' => '1CC',\n 'turn_id' => 'TM101',\n 'classroom_id' => 'CR101'\n ),\n array(\n 'id' => '1CCN2M',\n 'num_section' => 2,\n 'course_id' => '1CC',\n 'turn_id' => 'TM101',\n 'classroom_id' => 'CR112'\n ),\n array(\n 'id' => '2CCN1M',\n 'num_section' => 1,\n 'course_id' => '2CC',\n 'turn_id' => 'TM102',\n 'classroom_id' => 'CR112'\n )\n\t\t);\n\n\t\t// Uncomment the below to run the seeder\n\t\tDB::table('course_sections')->insert($course_sections);\n\t}", "function puzzle_modify_puzzle_sections($puzzle_sections, $f) {\n /* Remove or keep sections by their slugs */\n // $puzzle_sections->remove_section('accordions');\n // $puzzle_sections->remove_sections(array('accordions', 'carousel'));\n // $puzzle_sections->keep_sections(array('one-column', 'two-column'));\n \n /* Add new sections */\n // foreach (glob(get_stylesheet_directory() . '/theme/sections/*.php') as $filename) {\n // include $filename;\n // }\n}", "public function destroy(Section $section)\n {\n $section->delete();\n }", "public function cleanup()\n\t{\n\t\t$ArticlesLatest = Article::where('status', 'read')->where('star_ind', '0')->orderBy('created_at', 'desc')->select('id')->take(10000)->get();\n\t\t$ArticlesStar = Article::where('star_ind', '1')->select('id')->get();\n\t\t$ArticlesUnread = Article::where('status', 'unread')->select('id')->get();\n\n\t\t//create new empty array to store id's\n\t\t$cleanup_item_ids = [];\n\n\t\t//store id's from ArticlesStar in cleanup_item_ids\n\t\tif (!empty($ArticlesStar)) {\n\t\t\tforeach ($ArticlesStar as $Article) {\n\t\t\t\tarray_push($cleanup_item_ids, $Article->id);\n\t\t\t}\n\t\t}\n\n\t\t//store id's from ArticlesLatest in cleanup_item_ids\n\t\tif (!empty($ArticlesLatest)) {\n\t\t\tforeach ($ArticlesLatest as $Article) {\n\t\t\t\tarray_push($cleanup_item_ids, $Article->id);\n\t\t\t}\n\t\t}\n\n\t\t//store id's from ArticlesUnread in cleanup_item_ids\n\t\tif (!empty($ArticlesUnread)) {\n\t\t\tforeach ($ArticlesUnread as $Article) {\n\t\t\t\tarray_push($cleanup_item_ids, $Article->id);\n\t\t\t}\n\t\t}\n\n\t\t//delete items that are not in cleanup_item_ids array\n\t\tArticle::whereNotIn('id', $cleanup_item_ids)->delete();\n\t}", "public function deleteAllChunks(){\n\n $totalChunks = $this->getTotalChunks();\n\n for ($i = 1; $i <= $totalChunks; $i++) {\n $path = $this->getChunkPath($i);\n if (file_exists($path)) {\n unlink($path);\n }\n }\n }", "public function dropCourse($personId, $sectionId){\n $query = \"delete from students \"\n . \" where person_id = \"\n . $personId\n . \" and section_id = \"\n . $sectionId;\n\n return $this->query($query);\n\n }", "public function cleanup() : void\n {\n unset($this->groups);\n }", "public function clearItems()\n {\n $this->collItems = null; // important to set this to NULL since that means it is uninitialized\n }", "function deleteuniversitylocation($id){\n\n\t\t// Delete University course all data start.....\n \n\t\t$datacourse = array();\n $Qcourse = $this->db->QUERY('SELECT id FROM tbl_university_courses WHERE locationid=\"'.$id.'\"');\n\t\tif ($Qcourse->num_rows() > 0)\n\t\t{\n\t\t\tforeach ($Qcourse->result_array() as $rowcourse)\n\t\t\t{\n\t\t\t\tif($rowcourse['id']!=\"\" || $rowcourse['id']!=NULL)\n\t\t\t\t{\n\t\t\t\t\t$this->db->WHERE('uni_courseid',$rowcourse['id']);\n\t\t\t\t\t$this->db->DELETE('tbl_university_course_eligibility');\n\n\t\t\t\t\t$this->db->WHERE('uni_courseid',$rowcourse['id']);\n\t\t\t\t\t$this->db->DELETE('tbl_university_course_process');\n\n\t\t\t\t\t$this->db->WHERE('uni_courseid',$rowcourse['id']);\n\t\t $this->db->DELETE('tbl_university_course_subjects');\n\n\t\t\t\t\t$this->db->WHERE('courseid',$rowcourse['id']);\n\t\t $this->db->DELETE('tbl_course_intakes');\n\n\t\t\t\t\t$datacourses_fees = array();\n\t\t\t\t\t$Qcourses_fees = $this->db->QUERY('SELECT id FROM tbl_university_courses_fees_title WHERE uni_courseid=\"'.$rowcourse['id'].'\"');\n\t\t\t\t\tif ($Qcourses_fees->num_rows() > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($Qcourses_fees->result_array() as $rowcourses_fees)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($rowcourses_fees['id']!=\"\" || $rowcourses_fees['id']!=NULL)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->db->WHERE('feestitleid',$rowcourses_fees['id']);\n\t\t\t\t\t\t\t\t$this->db->DELETE('tbl_university_course_fees');\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$this->db->WHERE('uni_courseid',$rowcourse['id']);\n\t\t\t\t\t$this->db->DELETE('tbl_university_courses_fees_title');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->db->WHERE('locationid',$id);\n\t\t$this->db->DELETE('tbl_university_courses');\n\n\n\t\t$this->db->WHERE('id',$id);\n\t\t$this->db->DELETE('tbl_university_location');\t\n\t}", "public function testDeleteSectionFields()\n {\n $remoteDataFolder = self::$baseRemoteFolderPath . \"/DocumentElements/Fields\";\n $localFileName = \"test_multi_pages.docx\";\n $remoteFileName = \"TestDeleteSectionFields.docx\";\n\n $this->uploadFile(\n realpath(__DIR__ . '/../../..') . \"/TestData/\" . \"Common/\" . $localFileName,\n $remoteDataFolder . \"/\" . $remoteFileName\n );\n\n $request = new DeleteFieldsRequest(\n $remoteFileName,\n \"sections/0\",\n $remoteDataFolder,\n NULL,\n NULL,\n NULL,\n NULL,\n NULL,\n NULL,\n NULL\n );\n\n Assert::assertNull($this->words->deleteFields($request));\n }", "public function rmKey($section, $element){\n\t\t$body = $this->toArray();\n\t\tunset($body[$section][$element]);\n\t\t$this->updateFile($body);\n\t}", "final public function removePages(): void\n {\n $this->pages = [];\n $this->index = [];\n }", "public function delete_all() {\n\t\t$this->_cache = array();\n\t\t$this->_collections = array();\n\t}", "public function deleteAllBlocks()\n {\n // Sometimes Word splits tags. Find and replace all of them with\n // new string surrounded by template symbol value\n $documentSymbol = explode(self::$_templateSymbol, self::$_document);\n foreach ($documentSymbol as $documentSymbolValue) {\n if (strpos(strip_tags($documentSymbolValue), 'BLOCK_') !== false) {\n self::$_document = str_replace($documentSymbolValue, strip_tags($documentSymbolValue), self::$_document);\n }\n }\n $domDocument = new DomDocument();\n $domDocument->loadXML(self::$_document);\n\n $xmlWP = $domDocument->getElementsByTagNameNS('http://schemas.openxmlformats.org/wordprocessingml/2006/main',\n 'p');\n $xpath = new DOMXPath($domDocument);\n $length = $xmlWP->length;\n $itemsWP = array();\n for ($i = 0; $i < $length; $i++) {\n $itemsWP[$i] = $xmlWP->item($i);\n }\n $query = 'w:r/w:t';\n for ($i = 0; $i < $length; $i++) {\n $variables = $xpath->query($query, $itemsWP[$i]);\n foreach ($variables as $entry) {\n $deleteCurrent = false;\n if (\n strpos($entry->nodeValue,\n self::$_templateSymbol . 'BLOCK_'\n ) !== false\n ) {\n //when we find a placeholder, we delete it\n $deleteCurrent = true;\n break;\n }\n }\n if ($deleteCurrent) {\n $padre = $itemsWP[$i]->parentNode;\n $padre->removeChild($itemsWP[$i]);\n self::$_document = $domDocument->saveXML();\n }\n }\n }", "function sections()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&amp;un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['sections'] == 1 ) ? 'Settings Group' : 'Settings Groups';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'created';\n\t\t$sectionkeys = array();\n\t\t$group = \"\";\n\t\t$groups = array();\n\t\t\n\t\tforeach ( $this->xml_array['sections_group']['section'] as $k => $v )\n\t\t{\n\t\t\t$sectionkeys[] = \"'{$v['conf_title_keyword']['VALUE']}'\";\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->do_delete( 'conf_settings_titles', \"conf_title_keyword IN (\".implode( \",\", $sectionkeys ).\")\" );\n\t\t\n\t\tif ( !$this->ipsclass->input['un'] )\n\t\t{\n\t\t\tforeach ( $this->xml_array['sections_group']['section'] as $k => $v )\n\t\t\t{\n\t\t\t\t$groups[] = $this->_add_section( $v );\n\t\t\t}\n\t\t\t\n\t\t\t$group = \"&amp;group=\".implode( \"|\", $groups );\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&amp;code=work&amp;mod={$this->ipsclass->input['mod']}&amp;step={$this->ipsclass->input['step']}{$uninstall}{$group}&amp;st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['sections']} {$object} {$operation}....\" );\n\t}", "protected function removeAllItems($type)\n\t{\n\t\t$names = ItemHelper::getItemsNameByType($this->items, $type);\n\t\tif (empty($names)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tforeach ($names as $n => $hardTrue) {\n\t\t\t$this->domain->assignment->revokeAllByItemName($n);\n\t\t}\n\t\t\n\t\t/*foreach ($this->domain->assignment->all() as $i => $assignments) {\n\t\t\tforeach ($assignments as $n => $assignment) {\n\t\t\t\tif (isset($names[$assignment->roleName])) {\n\t\t\t\t\tunset($this->assignments[$i][$n]);\n\t\t\t\t}\n\t\t\t}\n\t\t}*/\n\t\t\n\t\t$this->children = ItemHelper::removeByNames($this->children, $names);\n\t\t\n\t\t$this->saveItems();\n\t}", "public function deleteSlots(Collection $collection): Collection;", "public function deleteAll() {\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->deleteAll();\n }\n }\n }\n }\n $this->delete();\n }", "public function testRemovingAllSections() {\n $assert_session = $this->assertSession();\n $page = $this->getSession()->getPage();\n\n $this->drupalLogin($this->drupalCreateUser([\n 'configure any layout',\n 'administer node display',\n ]));\n\n $field_ui_prefix = 'admin/structure/types/manage/bundle_with_section_field';\n // Enable overrides.\n $this->drupalGet(\"{$field_ui_prefix}/display/default\");\n $this->submitForm(['layout[enabled]' => TRUE], 'Save');\n $this->drupalGet(\"{$field_ui_prefix}/display/default\");\n $this->submitForm(['layout[allow_custom]' => TRUE], 'Save');\n\n // By default, there is one section.\n $this->drupalGet('node/1');\n $assert_session->elementsCount('css', '.layout', 1);\n $assert_session->pageTextContains('The first node body');\n\n $page->clickLink('Layout');\n $assert_session->elementsCount('css', '.layout', 1);\n $assert_session->elementsCount('css', '.layout-builder__add-block', 1);\n $assert_session->elementsCount('css', '.layout-builder__add-section', 2);\n\n // Remove the only section from the override.\n $page->clickLink('Remove Section 1');\n $page->pressButton('Remove');\n $assert_session->elementsCount('css', '.layout', 0);\n $assert_session->elementsCount('css', '.layout-builder__add-block', 0);\n $assert_session->elementsCount('css', '.layout-builder__add-section', 1);\n\n // The override is still used instead of the default, despite being empty.\n $page->pressButton('Save layout');\n $assert_session->elementsCount('css', '.layout', 0);\n $assert_session->pageTextNotContains('The first node body');\n\n $page->clickLink('Layout');\n $assert_session->elementsCount('css', '.layout', 0);\n $assert_session->elementsCount('css', '.layout-builder__add-block', 0);\n $assert_session->elementsCount('css', '.layout-builder__add-section', 1);\n\n // Add one section to the override.\n $page->clickLink('Add section');\n $page->clickLink('One column');\n $page->pressButton('Add section');\n $assert_session->elementsCount('css', '.layout', 1);\n $assert_session->elementsCount('css', '.layout-builder__add-block', 1);\n $assert_session->elementsCount('css', '.layout-builder__add-section', 2);\n\n $page->pressButton('Save layout');\n $assert_session->elementsCount('css', '.layout', 1);\n $assert_session->pageTextNotContains('The first node body');\n\n // By default, the default has one section.\n $this->drupalGet(\"$field_ui_prefix/display/default/layout\");\n $assert_session->elementsCount('css', '.layout', 1);\n $assert_session->elementsCount('css', '.layout-builder__add-block', 1);\n $assert_session->elementsCount('css', '.layout-builder__add-section', 2);\n\n // Remove the only section from the default.\n $page->clickLink('Remove Section 1');\n $page->pressButton('Remove');\n $assert_session->elementsCount('css', '.layout', 0);\n $assert_session->elementsCount('css', '.layout-builder__add-block', 0);\n $assert_session->elementsCount('css', '.layout-builder__add-section', 1);\n\n $page->pressButton('Save layout');\n $page->clickLink('Manage layout');\n $assert_session->elementsCount('css', '.layout', 0);\n $assert_session->elementsCount('css', '.layout-builder__add-block', 0);\n $assert_session->elementsCount('css', '.layout-builder__add-section', 1);\n\n // The override is still in use.\n $this->drupalGet('node/1');\n $assert_session->elementsCount('css', '.layout', 1);\n $assert_session->pageTextNotContains('The first node body');\n $page->clickLink('Layout');\n $assert_session->elementsCount('css', '.layout', 1);\n $assert_session->elementsCount('css', '.layout-builder__add-block', 1);\n $assert_session->elementsCount('css', '.layout-builder__add-section', 2);\n\n // Revert the override.\n $page->pressButton('Revert to defaults');\n $page->pressButton('Revert');\n $assert_session->elementsCount('css', '.layout', 0);\n $assert_session->pageTextNotContains('The first node body');\n }", "protected function deleteSectionsRequest(Requests\\DeleteSectionsRequest $request)\n {\n // verify the required parameter 'name' is set\n if ($request->name === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $name when calling deleteSections');\n }\n\n $resourcePath = '/slides/{name}/sections';\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n // query params\n if ($request->sections !== null) {\n $queryParams['sections'] = ObjectSerializer::toQueryValue($request->sections);\n }\n // query params\n if ($request->withSlides !== null) {\n $queryParams['withSlides'] = ObjectSerializer::toQueryValue($request->withSlides);\n }\n // query params\n if ($request->password !== null) {\n $queryParams['password'] = ObjectSerializer::toQueryValue($request->password);\n }\n // query params\n if ($request->folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($request->folder);\n }\n // query params\n if ($request->storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($request->storage);\n }\n\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"name\", $request->name);\n $this->headerSelector->selectHeaders(\n $headerParams,\n ['application/json'],\n ['application/json']);\n\n return $this->createRequest($resourcePath, $queryParams, $headerParams, $httpBody, 'DELETE');\n }", "public function destroy(SectionTraining $sectionTraining)\n {\n //\n }", "function cleanyeti_sections_callback( $section_passed ) {\n\tglobal $cleanyeti_tabs;\n\t$cleanyeti_tabs = cleanyeti_get_settings_page_tabs();\n\tforeach ( $cleanyeti_tabs as $tabname => $tab ) {\n\t\t$tabsections = $tab['sections'];\n\t\tforeach ( $tabsections as $sectionname => $section ) {\n\t\t\tif ( 'cleanyeti_' . $sectionname . '_section' == $section_passed['id'] ) {\n\t\t\t\t?>\n\t\t\t\t<p><?php echo $section['description']; ?></p>\n\t\t\t\t<?php\n\t\t\t}\n\t\t}\n\t}\n}", "public function removeAllSubGroups() {}", "public function clearCategories() {\n\t\t$this->quizCategoriesTable->deleteWhere('quizId', $this->id);\n\t}", "public function clearItems()\n\t{\n\t\t$this->storage->clear();\n\t}", "public function destroy() {\n unset($this->items);\n $this->items = false;\n }", "function ciniki_courses_sapos_itemDelete($ciniki, $tnid, $invoice_id, $item) {\n\n //\n // An course offering was added to an invoice item, get the details and see if we need to \n // create a registration for this course offering\n //\n if( isset($item['object']) && $item['object'] == 'ciniki.courses.offering_registration' && isset($item['object_id']) ) {\n //\n // Check the course offering registration exists\n //\n $strsql = \"SELECT id, uuid, offering_id, customer_id, num_seats \"\n . \"FROM ciniki_course_offering_registrations \"\n . \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND id = '\" . ciniki_core_dbQuote($ciniki, $item['object_id']) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.courses', 'registration');\n if( $rc['stat'] != 'ok' ) { \n return $rc;\n }\n if( !isset($rc['registration']) ) {\n // Don't worry if can't find existing reg, probably database error\n return array('stat'=>'ok');\n }\n $registration = $rc['registration'];\n\n //\n // Remove the invoice from the registration, don't delete it\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectUpdate');\n $rc = ciniki_core_objectUpdate($ciniki, $tnid, 'ciniki.courses.offering_registration', \n $registration['id'], array('invoice_id'=>'0'), 0x04);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Update notification queue\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'courses', 'private', 'offeringNQueueUpdate');\n $rc = ciniki_courses_offeringNQueueUpdate($ciniki, $tnid, $registration['offering_id']);\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.courses.247', 'msg'=>'Unable to update notification queue', 'err'=>$rc['err']));\n }\n\n return array('stat'=>'ok');\n }\n\n return array('stat'=>'ok');\n}", "function unfoldQuestionblocks($questionblocks)\n\t{\n\t\tglobal $ilDB;\n\t\tforeach ($questionblocks as $index)\n\t\t{\n\t\t\t$affectedRows = $ilDB->manipulateF(\"DELETE FROM svy_qblk WHERE questionblock_id = %s\",\n\t\t\t\tarray('integer'),\n\t\t\t\tarray($index)\n\t\t\t);\n\t\t\t$affectedRows = $ilDB->manipulateF(\"DELETE FROM svy_qblk_qst WHERE questionblock_fi = %s AND survey_fi = %s\",\n\t\t\t\tarray('integer','integer'),\n\t\t\t\tarray($index, $this->getSurveyId())\n\t\t\t);\n\t\t}\n\t}", "public function deleteAllCourseInfo($id_course = false) {\n\t\t\t// Initialize variables\n\t\t\t$return\t\t\t\t= false;\n\t\t\t$question_ids\t\t= false;\n\t\t\t// Database Connection\n\t\t\t$db\t\t\t\t\t= $GLOBALS['db'];\n\t\t\t// If Course ID was sent\n\t\t\tif ($id_course) {\n\t\t\t\t// Delete all related Questions\n\t\t\t\t$ids\t\t\t\t\t= $this->getQuestionsIdByCourseId($id_course);\n\t\t\t\tif ($ids) {\n\t\t\t\t\tforeach ($ids as $id) {\n\t\t\t\t\t\tif ($question_ids) {\n\t\t\t\t\t\t\t$question_ids\t.= ', '.$id['id_question'];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$question_ids\t= $id['id_question'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$db->deleteRow('tb_question', 'id IN ('.$question_ids.')');\n\t\t\t\t}\n\t\t\t\t// Delete Course\n\t\t\t\t$db->deleteRow('tb_course', 'id = '.$id_course);\n\t\t\t\t// Prepare return\n\t\t\t\t$return\t\t= 'ok';\n\t\t\t}\n\t\t\treturn $return;\n\t\t}", "public function clearConcepts()\n {\n foreach ($this->relationships as $relationship) {\n $relationship->clearConcepts();\n }\n }", "function deleteEditorsBySectionId($sectionId, $journalId = null) {\n\t\tif (isset($journalId)) return $this->update(\n\t\t\t'DELETE FROM section_editors WHERE journal_id = ? AND section_id = ?',\n\t\t\tarray($journalId, $sectionId)\n\t\t);\n\t\telse return $this->update(\n\t\t\t'DELETE FROM section_editors WHERE section_id = ?',\n\t\t\t$sectionId\n\t\t);\n\t}", "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()\n {\n $this->registry = array();\n\n $this->adaptor->deleteIndex($this->section);\n }", "public function delete(&$pks)\n\t{\n\t\t\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t\n\t\t//delete all relations student;\n\t\t$conditions = array(\n\t\t\t$db->quoteName('course_id') . ' IN ('.implode(',',$pks).')'\n\t\t);\n\t\t$query->delete($db->quoteName('#__cooltouraman_course_student_relations'));\n\t\t$query->where($conditions);\n\t\t$db->setQuery($query);\n\t\t\n\t\tif(!$db->execute())\n\t\t{\n\t\t\t$this->setError($db->getError());\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$query->clear();\n\t\t//delete all relations teacher;\n\t\t$query->delete($db->quoteName('#__cooltouraman_course_teacher_relations'));\n\t\t$query->where($conditions);\n\t\t$db->setQuery($query);\n\t\t\n\t\tif(!$db->execute())\n\t\t{\n\t\t\t$this->setError($db->getError());\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tparent::delete($pks);\n\t}", "public function removeAll() {\n\t\t\tif( !$items = $this->getStats( 'items' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$memcache = $this->getMemcache();\n\t\t\tforeach ($items['items'] as $key => $item) {\n\t\t\t\t$dump = $memcache->getStats( 'cachedump', $key, $item['number'] * 2 );\n\t\t\t\tforeach( array_keys( $dump ) as $ckey ) {\n\t\t\t\t\t$memcache->delete( $ckey );\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->stats = null;\n\t\t}", "public function remove(Section $section)\n {\n unset ($this->sections[$section->getKey()]);\n }", "public function cleanAction()\n {\n set_time_limit(0);\n\n if (!$this->_getParam('id')) throw new Kwf_Exception_Client(\"required parameter --id\");\n $db = Zend_Registry::get('db');\n $tables = array();\n foreach ($db->query(\"SHOW TABLES\")->fetchAll() as $table) {\n $table = array_values($table);\n $table = $table[0];\n $hasComponentId = false;\n if ($table == 'kwf_pages') {\n $tables[] = $table;\n } else {\n foreach ($db->query(\"SHOW FIELDS FROM $table\")->fetchAll() as $field) {\n if ($field['Field'] == 'component_id') {\n $tables[] = $table;\n }\n }\n }\n }\n\n $ids = $this->_getChildIds($this->_getParam('id'));\n array_unshift($ids, $this->_getParam('id'));\n foreach ($ids as $id) {\n foreach ($tables as $table) {\n if ($table == 'kwf_pages') {\n $column = 'id';\n } else {\n $column = 'component_id';\n }\n $sql = \"DELETE FROM $table \".\n \"WHERE $column='$id' \".\n \"OR $column LIKE '\".str_replace('_', '\\_', $id).\"\\_%' \".\n \"OR $column LIKE '\".str_replace('_', '\\_', $id).\"-%'\";\n echo $sql.\"\\n\";\n //echo \".\";\n if ($this->_getParam('force')) $db->query($sql);\n }\n }\n if (!$this->_getParam('force')) echo \"\\nadd parameter --force to actually execute queries\\n\";\n exit;\n }", "public function on_course_section_end() {\n\n $this->converter->set_stash('sectioninfo', $this->currentsection, $this->currentsection['id']);\n $this->open_xml_writer('sections/section_' . $this->currentsection['id'] . '/section.xml');\n $this->write_xml('section', $this->currentsection);\n $this->close_xml_writer();\n unset($this->currentsection);\n }", "public static function deleteAllScenes($itemId){\n\t\t$scenes = Scene::all();\n\t\tforeach ($scenes as $scene) {\n\t\t\t# code...\n\t\t\tif($scene->item_id == $itemId){\n\t\t\t\tScene::destroy($scene->id);\n\t\t\t}\n\t\t}\n\t}", "public function deleteWithTasks() {\n \t$this->tasks()->delete();\n \t$this->delete();\n }", "private function delSubs($id){\n\t\t$db = Zend_Registry::get('db');\n\t\t$select = $db->select()\n\t\t\t\t\t->from('pages')\n\t\t\t\t\t->where('parent_id = ?',$id);\n\t\t$results = $db->fetchAll($select);\n\t\tif($results){\n\t\t\t$db->delete('pages',array(\n\t\t\t\t'id = ?' => $results[id],\n\t\t\t));\n\t\t\t$db->delete('routes',array(\n\t\t\t\t'type = ?' => 'content',\n\t\t\t\t'seg_id = ?' => $results[id],\n\t\t\t));\n\t\t\t// recurse through possible child items\n\t\t\t$this->delSubs($results[id]);\n\t\t}\n\t}", "public function renderSectionBody(array $section, DataCollection $collection, array $sections = [], string $sectionName = ''): void;", "function categories_delete()\n{\n // Get database information\n $dbconn = xarDBGetConn();\n $xartable = xarDBGetTables();\n\n // Delete categories table\n $query = \"DROP TABLE \".$xartable['categories'];\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n // Delete links table\n $query = \"DROP TABLE \".$xartable['categories_linkage'];\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n // Delete categories ext privileges table\n $query = \"DROP TABLE \".$xartable['categories_ext_privileges'];\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n // Delete module variables\n// xarModDelVar('categories', 'bold');\n xarModDelVar('categories', 'catsperpage');\n\n // Remove module hooks\n if (!xarModUnregisterHook('item', 'new', 'GUI',\n 'categories', 'admin', 'newhook')) return;\n if (!xarModUnregisterHook('item', 'create', 'API',\n 'categories', 'admin', 'createhook')) return;\n if (!xarModUnregisterHook('item', 'modify', 'GUI',\n 'categories', 'admin', 'modifyhook')) return;\n if (!xarModUnregisterHook('item', 'update', 'API',\n 'categories', 'admin', 'updatehook'))return;\n if (!xarModUnregisterHook('item', 'delete', 'API',\n 'categories', 'admin', 'deletehook'))return;\n if (!xarModUnregisterHook('module', 'modifyconfig', 'GUI',\n 'categories', 'admin', 'modifyconfighook'))return;\n if (!xarModUnregisterHook('module', 'updateconfig', 'API',\n 'categories', 'admin', 'updateconfighook'))return;\n if (!xarModUnregisterHook('module', 'remove', 'API',\n 'categories', 'admin', 'removehook')) return;\n\n // UnRegister blocks\n if (!xarModAPIFunc('blocks', 'admin', 'unregister_block_type',\n array('modName' => 'categories',\n 'blockType'=> 'navigation'))) return;\n\n xarTplUnregisterTag('categories-navigation');\n xarTplUnregisterTag('categories-filter');\n xarTplUnregisterTag('categories-catinfo');\n /**\n * Remove instances and masks\n */\n\n // Remove Masks and Instances\n xarRemoveMasks('categories');\n xarRemoveInstances('categories');\n\n // Deletion successful\n return true;\n}", "public function forget(string $section) /*: void*/;", "public function deleteCollection(Request $request){\n Collection::find($request->id)->books()->detach();\n\n // Removing the collection\n Collection::find($request->id)->delete();\n }", "public function clear_current_docs()\n\t{\n\t\t$this->_EE->db->empty_table('exp_dd_doc_sections');\n\t}", "public function removeAll() {\n $sql = 'SET FOREIGN_KEY_CHECKS = 0; TRUNCATE TABLE course';\n \n $connection_manager = new connection_manager();\n $conn = $connection_manager->connect();\n \n $stmt = $conn->prepare($sql);\n \n $stmt->execute();\n $count = $stmt->rowCount();\n }", "function delete() {\n\t\t$personSectionObject = DB_DataObject::factory('person_section');\n\t\t$personSectionObject->person_id = $this->person_id;\n\t\t$personSectionObject->find();\n\t\t//echo '<PRE> Found Person Section Objects'; print_r($personSectionObject); echo '<PRE>';\n\n\t\twhile ($personSectionObject->fetch()) {\n\t\t\t$deleteObject = DB_DataObject::factory('person_section');\n\t\t\t$deleteObject->id = $personSectionObject->id;\n\t\t\t$deleteObject->section_id = $personSectionObject->section_id;\n\t\t\t$deleteObject->person_id = $this->id;\n\t\t\t$deleteObject->delete();\n\t\t}\n\n\t\treturn DB_DataObject::delete(); //Call the parent method\n\t}", "protected function deleteUnusedItems(){\n $items=Item::where('serial_number','')->get();\n foreach($items as $item){\n $item->delete();\n }\n }", "public function eraseAllNews() {\n\n $this->_useSourceDatasource();\n $this->_useItemDatasource();\n\n // Mark all sources as if they've never been updated\n $this->_externalNewsSourceDatasource->markAllSourcesNotUpdated();\n\n // Delete all news items\n $this->_externalNewsItemDatasource->eraseAll();\n }", "protected function _delete()\n {\n $pages = $this->getTable('ExhibitPage')->findBy(array('exhibit'=>$this->id));\n foreach($pages as $page) {\n $page->delete();\n }\n $this->deleteTaggings();\n }", "public function cleanup()\n {\n if ($this->catalogRule != '-') {\n $this->deleteAllCatalogRule->run();\n }\n }", "public function removeSeats(){\n /** @var BlockRow $row */\n foreach ($this->rows as $row){\n $row->removeSeats();\n }\n }", "public function doRemove(SectionComponent $component) {\n if (!$this->isTemporary() && $this->exoComponentManager->entityAllowCleanup($this->entity)) {\n $configuration = $component->get('configuration');\n if (!empty($configuration['block_revision_id'])) {\n $entity_for_removal = $this->exoComponentManager->entityLoadByRevisionId($configuration['block_revision_id']);\n if ($entity_for_removal) {\n $entity_for_removal->delete();\n }\n }\n }\n return $this;\n }", "public function DeleteGroupAssessmentList() {\n\t\t\t$this->objGroupAssessmentList->UnassociateAllUsersAsAssessmentManager();\n\t\t\t$this->objGroupAssessmentList->Delete();\n\t\t}", "function Clear() {\n\t\t\t$s3objects = $this->ListAlls3objects();\n\t\t\t/* delete each one */\n\t\t\tforeach($s3objects AS $s3object) {\n\t\t\t\t$s3object->Delete();\n\t\t\t\tunset($s3object);\n\t\t\t}\n\t\t}", "protected static function cleanup(&$items)\n\t{\n\t\t$b = true;\n\n\t\tforeach ($items as $k => &$item)\n\t\t{\n\t\t\tif ($item->type == 'separator')\n\t\t\t{\n\t\t\t\tif ($b)\n\t\t\t\t{\n\t\t\t\t\t$item = false;\n\t\t\t\t}\n\n\t\t\t\t$b = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$b = false;\n\t\t\t}\n\t\t}\n\n\t\tif ($b)\n\t\t{\n\t\t\t$item = false;\n\t\t}\n\n\t\t$items = array_filter($items);\n\t}", "private function removeOldParts()\n {\n $filename = $this->substream->getFilename();\n for ($i = $this->index + 1; true; ++$i) {\n $indexed_filename = $this->getIndexPartFilename($filename, $i);\n $target = dirname($this->filename).'/'.$indexed_filename;\n if (file_exists($target)) {\n unlink($target);\n } else {\n break;\n }\n }\n }", "public function deleteItems(Collection $collection): Collection;", "public function cleanupNews() {\n\n $this->_useCategoryDatasource();\n $this->_useItemDatasource();\n\n // Delete old news items\n $this->_externalNewsItemDatasource->prune();\n\n // Identify non-permanent categories that haven't been updated in a while\n $unusedCategories = $this->_externalNewsCategoryDatasource->getPrunable();\n\n // Remove mapping links between agent users and old non-permanent categories\n $mappingDatasource = new Datasource_Cms_ExternalNews_CategoriesAgentsMap();\n $mappingDatasource->pruneByCategories($unusedCategories);\n\n // Remove old non-permanent categories\n $this->_externalNewsCategoryDatasource->prune();\n }", "function course_sections($course) {\n global $DB;\n\n $sections = $DB->get_records('course_sections', array('course' => $course), 'section', 'id,section,name,sequence');\n foreach ($sections as $key => $section) {\n if ($section->sequence != '') {\n $sections[$key]->sequence = explode(',', $section->sequence);\n }\n else {\n $sections[$key]->sequence = null;\n }\n }\n\n return $sections;\n}", "public function massDeleteAction()\n {\n $coursedocIds = $this->getRequest()->getParam('coursedoc');\n if (!is_array($coursedocIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_coursedoc')->__('Please select course docs to delete.')\n );\n } else {\n try {\n foreach ($coursedocIds as $coursedocId) {\n $coursedoc = Mage::getModel('bs_coursedoc/coursedoc');\n $coursedoc->setId($coursedocId)->delete();\n }\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_coursedoc')->__('Total of %d course docs were successfully deleted.', count($coursedocIds))\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_coursedoc')->__('There was an error deleting course docs.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "public function destroy($id)\n {\n //\n //finding user id \n $section= sections::findOrFail($id);\n //now deleting this user\n $section->delete();\n }", "public function massDestroy(Request $request)\n {\n if (!Gate::allows('course_delete')) {\n return abort(401);\n }\n if ($request->input('ids')) {\n $entries = Course::whereIn('id', $request->input('ids'))->get();\n\n foreach ($entries as $entry) {\n $entry->delete();\n }\n }\n }", "public function clearMetas(): void\n {\n $this->metas()->delete();\n }", "public function test_delete() {\n global $DB;\n\n $startcount = $DB->count_records('course_modules');\n\n // Delete the course module.\n course_delete_module($this->quiz->cmid);\n\n // Now, run the course module deletion adhoc task.\n phpunit_util::run_all_adhoc_tasks();\n\n // Try purging.\n $recyclebin = new \\tool_recyclebin\\course_bin($this->course->id);\n foreach ($recyclebin->get_items() as $item) {\n $recyclebin->delete_item($item);\n }\n\n // Item was deleted, so no course module was restored.\n $this->assertEquals($startcount - 1, $DB->count_records('course_modules'));\n $this->assertEquals(0, count($recyclebin->get_items()));\n }", "public function getAllSections();", "public function removeQuestions($lecture_id, $chapter_id, $survey_id) {\n $request_parameter = (array) Request::all();\n $questions_to_remove_array = explode(\"_\", $request_parameter['questions_to_remove']);\n\n //print_r($questions_to_remove_array);\n\n if ($this->hasPermission($lecture_id)) {\n DB::transaction(function() use ($questions_to_remove_array, $survey_id) {\n for ($x = 0; $x < sizeof($questions_to_remove_array); $x++) {\n QuestionModel::where(['survey_id' => $survey_id, 'id' => $questions_to_remove_array[$x]])->delete();\n }\n });\n } else {\n // TODO: Permission denied page\n print \"Permission denied\";\n }\n\n return redirect()->route('survey', ['lecture_id' => $lecture_id, 'chapter_id' => $chapter_id, 'survey_id' => $survey_id]);\n }", "public function remove($resourceable, $id, Section $section, Content $content)\n {\n\n $section->components()->detach([$content->id]);\n\n log_activity(' Component Removed',\n 'A Section Content was successfully removed from the Sections', $content);\n\n return redirect()->back();\n }", "public function delItem() {\n\t\t$section = $_GET['section'];\n\t\t$table = $_GET['table'];\n\t\t$id = $_GET['id'];\n\t\tswitch ($section):\n\t\tcase ('showcase'):\n\t\t\t$showcaseTables = $this->_ci->config->item('showcaseTables');\n\t\t\tif (in_array($table, $showcaseTables)):\n\t\t\t\tforeach ($showcaseTables as $showcaseTable):\n\t\t\t\t\t$this->_ci->db->delete($showcaseTable, array('id' => $id));\n\t\t\t\t\t$this->_ci->db->delete('showcase_'.$showcaseTable, array($showcaseTable.'_id' => $id));\n\t\t\t\tendforeach;\n\t\t\t\treturn TRUE;\n\t\t\tendif;\n\t\t\tif ($table == 'showcase'):\n\t\t\t\t$this->_ci->db->delete($table, array('id' => $id));\n\t\t\t\t$showcaseTables = $this->_ci->config->item('showcaseTables');\n\t\t\t\t$showcaseTables[] = 'images';\n\t\t\t\t$showcaseTables[] = 'logos';\n\t\t\t\t$showcaseTables[] = 'relatedlinks';\n\t\t\t\tforeach ($showcaseTables as $relatedTable):\n\t\t\t\t\tif ($relatedTable == 'logos'):\n\t\t\t\t\t\t$query = $this->_ci->db->get_where('showcase_logos', array('showcase_id' => $id));\n\t\t\t\t\t\tforeach ($query->result() as $row):\n\t\t\t\t\t\t\t$this->delFile('showcase', 'logo', $row->id);\n\t\t\t\t\t\tendforeach;\n\t\t\t\t\telseif ($relatedTable == 'images'):\n\t\t\t\t\t\t$query = $this->_ci->db->get_where('showcase_images', array('showcase_id' => $id));\n\t\t\t\t\t\tforeach ($query->result() as $row):\n\t\t\t\t\t\t\t$this->delFile('showcase', 'screenshot', $row->id);\n\t\t\t\t\t\tendforeach;\n\t\t\t\t\tendif;\n\t\t\t\t\t$this->_ci->db->delete('showcase_'.$relatedTable, array('showcase_id' => $id));\n\t\t\t\tendforeach;\n\t\t\t\t$this->_ci->db->delete('employee_showcase', array('showcase_id' => $id));\n\t\t\t\treturn TRUE;\n\t\t\telse:\n\t\t\t\t$showcaseId = $_GET['showcase'];\n\t\t\t\t$this->_ci->db->delete('showcase_'.$table, array($table.'_id' => $id, 'showcase_id' => $showcaseId));\n\t\t\t\treturn TRUE;\n\t\t\tendif;\n\t\tbreak;\n\t\tcase ('profile'):\n\t\t\tif (in_array($table, $this->_ci->config->item('profileTables'))):\n\t\t\t\t$this->_ci->db->delete('employee_'.$table, array('id' => $id));\n\t\t\t\treturn TRUE;\n\t\t\tendif;\n\t\tbreak;\n\t\tcase ('blog'):\n\t\t\tif ($table == 'blog'):\n\t\t\t\t$this->_ci->db->delete($table, array('id' => $id));\n\t\t\t\tforeach ($this->_ci->config->item('blogTables') as $relatedTable):\n\t\t\t\t\t$this->_ci->db->delete('blog_'.$relatedTable, array('blog_id' => $id));\n\t\t\t\tendforeach;\n\t\t\t\treturn TRUE;\n\t\t\tendif;\n\t\tbreak;\n\t\tendswitch;\n\t}", "function ondelete(){\n\t\tforeach($this->get_sections() as $one){\n\t\t\t$one->dbdelete();\n\t\t}\n\t\treturn true;\n\t}", "public function clear() {\n\t\t$sturctures = array('heading', 'body', 'footer');\n\t\tforeach ($sturctures as $sturcture) {\n\t\t\t$this->$sturcture = array();\n\t\t}\n\t}", "public function clear() {\n try{\n unset($this->Items);\n $this->Items = array();\n }catch(Exception $e){\n throw $e;\n }\n }" ]
[ "0.66487914", "0.6321584", "0.62720186", "0.6240877", "0.61194444", "0.59751457", "0.5709541", "0.56693435", "0.5663348", "0.5634714", "0.55936664", "0.55871207", "0.55744594", "0.553696", "0.5524178", "0.551769", "0.5479681", "0.5475769", "0.54636735", "0.5419111", "0.5401067", "0.54007816", "0.53994685", "0.53944016", "0.53924155", "0.5390969", "0.53901553", "0.53647304", "0.53531885", "0.5349331", "0.53229755", "0.5302532", "0.5292302", "0.5278627", "0.5262648", "0.5261891", "0.5261483", "0.52597964", "0.525132", "0.52427435", "0.52395684", "0.5239523", "0.52212864", "0.5219829", "0.5187413", "0.51754016", "0.5170874", "0.51671356", "0.51644546", "0.5140681", "0.51231825", "0.51175153", "0.5115893", "0.51095945", "0.5104269", "0.508532", "0.5083809", "0.5070584", "0.50652885", "0.5059492", "0.5055252", "0.504002", "0.50117904", "0.5004686", "0.50036395", "0.5000203", "0.49964455", "0.49935907", "0.49935386", "0.49834946", "0.4979153", "0.49745172", "0.49653038", "0.49530149", "0.4946878", "0.49410588", "0.4940975", "0.4918491", "0.491375", "0.49128148", "0.48937613", "0.4892801", "0.48915294", "0.4888515", "0.48840046", "0.48814687", "0.48786598", "0.48740578", "0.4865785", "0.48644295", "0.4862017", "0.48506588", "0.48479456", "0.48330218", "0.4825674", "0.4824302", "0.48231715", "0.482018", "0.47995248", "0.47992998" ]
0.7258376
0
Load data from database.
public function load( &$object ) { // TODO: Implement load() method. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function load()\n {\n $pdo = $this->getDbConnection();\n $query = \"SELECT * FROM {$this->dbTable}\";\n $data = $pdo->query($query)->fetchAll(\\PDO::FETCH_ASSOC);\n\n foreach ($data as ['key' => $key, 'value' => $value]) {\n $this->setData($key, $value);\n }\n }", "public function loadFromDB()\n {\n }", "protected function importDatabaseData() {}", "private function load()\r\n {\r\n $this->dbFields = MySQL::fetchRecord(MySQL::executeQuery('SELECT * FROM training_slideshow WHERE ts_id='.(int)$this->id),MySQL::fmAssoc);\r\n }", "private function _load_db()\n {\n $json_string = file_get_contents(\"dbtv.json\");\n $this->_db = json_decode($json_string, true);\n $this->_ep_list = $this->_flatten_episodes();\n }", "abstract public function loadData();", "protected function loadData(){\n\t\t//SELECT from \".self::TABLE_NAME.\"_data WHERE \".self::TABLE_NAME.\"_id=\".$this->id.\"\n\t\t\n\t\t//return the data\n\t\treturn array();\n\t}", "abstract protected function load(Connection $db);", "private function _load_db()\n {\n $json_string = file_get_contents(\"dbmov.json\");\n $this->_db = json_decode($json_string, true);\n }", "function load() {\n\t\tglobal $mysql;\n //if(!$this->exists()) return;\n \t$id \t\t= $mysql->escape($this->id);\n \t$tablename \t= $this->class_name();\n \t$this->data = $mysql->executeSql(\"SELECT * FROM \".$tablename.\" WHERE id=$id;\");\n \t$this->id\t= $this->data['id'];\n \tunset($this->data['id']);\n }", "private function load() {\n\n $db = Database::getInstance(); \n\t $con = $db->getConnection();\n \n $query = \"SELECT * FROM Products ORDER by ID DESC\";\n \n if ($result = $con->query($query)) {\n \t/* fetch object array */\n \t while ($prod = $result->fetch_object(\"Product\")) {\n\t\t\t \tarray_push($this->products, $prod);\n \t}\n \t/* free result set */\n \t$result->close();\n }\n\t}", "public function load()\n\t{\n\t\t$this->list_table->load();\n\t}", "public function _load()\n {\n $query = new Query(\n \"SELECT *\n FROM `\" . Leder::TABLE . \"`\n WHERE `arrangement_fra` = '#fra'\n AND `arrangement_til` = '#til'\",\n [\n 'fra' => $this->getArrangementFraId(),\n 'til' => $this->getArrangementTilId()\n ]\n );\n\n $res = $query->getResults();\n while( $row = Query::fetch($res) ) {\n $this->add(\n Leder::loadFromDatabaseRow( $row )\n );\n }\n }", "abstract function loadDbData($compid);", "function _load()\n\t{\n\t\tif($this->primary_key)\n\t\t{\n\t\t\t$row = $this->db->get_where($this->table_name, array(\n\t\t\t\t$this->primary_key => $this->{$this->primary_key},\n\t\t\t))->result();\n\t\t\t\n\t\t\tif(count($row))\n\t\t\t\t$this->load_db_values($row[0]);\n\t\t}\n\t}", "public function load($data);", "function load() {\n $statement = $this->db->prepare('SELECT * FROM favs WHERE id = :id');\n $statement->execute(array(':id' => $this->get('id')));\n $data = $statement->fetch(PDO::FETCH_ASSOC);\n $this->setMultiple($data);\n }", "protected function load()\n\t{\n\t\t//---------------------\n\t\t// Your code goes here\n\t\t// --------------------\n\t\t// rebuild the keys table\n\t\t$this->reindex();\n\t}", "public function loadData(){\r\n $this->host = Team::find($this->host);\r\n $this->guest = Team::find($this->guest);\r\n $this->winner = Team::find($this->winner);\r\n $this->tournament = Tournament::find($this->tournamentID); \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}", "public function readDatabase() {\n\t\t$q = $this->pdo->query(\"SELECT count(*) FROM `Articles`\");\n\t\t$count = $q->fetch(PDO::FETCH_ASSOC)[\"count(*)\"];\n\t\t$numFetched = 0;\n\t\t$start = 0;\n\t\t// Fetch only 50 articles at a time to limit the memory impact\n\t\twhile($numFetched < $count){\n\t\t\t$q = $this->pdo->query(\"SELECT \".$this->columns.\" FROM `Articles` LIMIT $start,100\");\n\t\t\tforeach($q->fetchAll(PDO::FETCH_ASSOC) as $a){\n\t\t\t\t$this->articles[] = $this->makeArticleFromDB($a);\n\t\t\t\t$numFetched += 1;\n\t\t\t}\n\t\t\t$start += 100;\n\t\t}\n\t}", "function loadData() {\n\t\t$connection = createConnection();\n\n\t\t$loggedIn = Login::checkToken($connection);\n\t\tif (!$loggedIn){\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t# Set any cookies to null to prevent the 'stuck logged in' bug\n\t\tLogin::removeSessionToken($connection);\n\n\t\techo(\"<h1>Connecting to database.</h1>\");\n\t\t# If there is no connection made we can quit, as there is an error\n\t\tif (!$connection) {\n\t\t\tdie(\"Connection failed: \" . mysqli_connect_error());\n\t\t}\n\t\techo \"Connected successfully\";\n\t\t\n\t\t# Let's import our database file\n\t\t$fileName = \"./data/orderdb_sql.ddl\";\n\t\t# Import the data from the file\n\t\t$file = file_get_contents($fileName, true);\n\t\t# Create an array of all of the file contents\n\t\t$lines = explode(\";\", $file);\n\t\techo(\"<p>\"+$lines[0]+\"</p>\");\n\n\t\techo(\"<ol>\");\n\t\t# For each line in the file\n\t\tforeach ($lines as $line){\n\t\t\t# Trime the line\n\t\t\t$line = trim($line);\n\t\t\t# As long as the line isn't blank\n\t\t\tif($line != \"\"){\n\t\t\t\t# Print it out in a list\n\t\t\t\techo(\"<li>\".$line . \";</li><br/>\");\n\t\t\t\t# Run a query on the line\n\t\t\t\t$result = $connection->query($line);\n\t\t\t\tif($result == FALSE){\n\t\t\t\t\tprintf(\"error: %s\\n\", $connection->error);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t# Finally let's close this connection\n\t\t$connection->close();\n\t\techo(\"</p><h2>Database loading complete!</h2>\");\n\t\treturn TRUE;\n\t}", "protected function fromDatabase( $data )\n\t{\n\t\tforeach ( $data AS $field => $value ) \n\t\t{\t\n\t\t\tif ( isset( static::$schema[ $field ] ) )\n\t\t\t{\n\t\t\t\tif ( is_array( static::$schema[ $field ] ) )\n\t\t\t\t{\n\t\t\t\t\t$type = static::$schema[ $field ][ 'type' ];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$type = static::$schema[ $field ];\n\t\t\t\t}\n\t\n\t\t\t\t$this->data[ $field ] = $this->sanitize( $type, $value );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->loaded = true;\n\t}", "public function loadDatabase(){\n $table = new Table('Textarea_Widgets');\n $table->add_column('Title', 'text');\n $table->add_column('Content', 'text');\n $table->add_column('WidgetName', 'text');\n $table->create();\n }", "protected function loadRow() {}", "protected function load(){\r\n\t\r\n\t$qq1 = Db::result(\"SELECT * FROM \"._SQLPREFIX_.$this->tableName.\" WHERE \".$this->fieldName.\" = \".(int)$this->id);\r\n\t$this->profileData = count($qq1)>0 ? $qq1[0]: null; \r\n\t\r\n\tif($this->metaUse){\r\n\t\t$qq2 = Db::result(\"SELECT * FROM \"._SQLPREFIX_.$this->metaTypesTableName.\" WHERE active = 1 ORDER BY public_ord, id\");\r\n\t\t$this->metaData = count($qq2)>0 ? $qq2: array(); \r\n\t}\r\n}", "public function loadDataFromId(){\r\n\t\t\t$this -> loadFromId();\r\n\t }", "public function doLoad()\n {\n $this->DataSourceInstance->doLoad();\n }", "public function load()\n {\n $result = Claroline::getDatabase()->query( \"\n SELECT\n S.id,\n S.title,\n S.publication_date,\n S.max_score,\n R.score,\n R.comment\n FROM\n `{$this->tbl['examination_session']}` AS S,\n `{$this->tbl['examination_score']}` AS R\n WHERE\n R.session_id = S.id\n AND\n R.user_id = \" . Claroline::getDatabase()->escape( $this->userId ) . \"\n ORDER BY\n S.publication_date\" );\n \n $this->resultList = array();\n \n foreach( $result as $line )\n {\n $id = $line[ 'id' ];\n $this->resultList[ $id ][ 'title' ] = $line[ 'title' ];\n $this->resultList[ $id ][ 'score' ] = $line[ 'score' ] . '/' . $line[ 'max_score' ];\n $this->resultList[ $id ][ 'comment' ] = $line[ 'comment' ];\n $this->resultList[ $id ][ 'date' ] = $line[ 'publication_date' ];\n \n }\n }", "private final function loadObjectFromDb()\n {\n # TODO: would be far preferable to use the objectsFromDestinations() code, possibly by refactoring into another shareable function. this is needed because otherwise we're in object A and OrmClass->load() is generating object B, instead of populating object A\n # TODO:NOTE01\n # TODO: must use $this->setLoadedFromDb() per class\n throw new Exception('TODO');\n }", "function loadFromDatabase(){\n global $DB;\n $resource = $DB->config->get();\n $list = array();\n while($row = $DB->fetchAssoc($resource))\n {\n if(!isset($this->sections[$row['section']])) $this->sections[$row['section']] = new ConfigSection($row['section']);\n $this->sections[$row['section']]->registerFromDatabase($row);\n }\n }", "private function load() {\r\n\t\t$sql_statement = 'SELECT no.contract_id, no.termination_date FROM '. TBL_NOTICE .' AS no WHERE no.notice_id = '. (int) $this->notice_id;\r\n\t\t$query = db_query($sql_statement);\r\n\r\n\t\tif(db_num_results($query) == 1) {\r\n\t\t\t$data = db_fetch_array($query);\r\n\t\t\t\t\r\n\t\t\t$this->contract_id = $data['contract_id'];\r\n\t\t\t$this->termination_date = $data['termination_date'];\r\n\t\t}\r\n\t}", "private function Load()\n\t{\n\t\t$sql = \"show tables\";\n\t\t$rs = $this->Server->Connection->Select($sql);\n\t\t\n\t\t// first pass load all the tables. this will initialize each object. we have to\n\t\t// do this first so that we can correctly determine and store \"Set\" information\n\t\twhile ($row = $this->Server->Connection->Next($rs))\n\t\t{\n\t\t\t$this->Tables[$row[\"Tables_in_\" . $this->Name]] = new DBTable($this,$row);\n\t\t}\n\t\t\n\t\t// now load all the keys and constraints for each table\n\t\tforeach ($this->Tables as $table)\n\t\t{\n\t\t\t$table->LoadKeys();\n\t\t}\n\n\t\t$this->Server->Connection->Release($rs);\n\t\t\n\t\t$sql = \"show table status from `\" . $this->Name . \"`\";\n\t\t$rs2 = $this->Server->Connection->Select($sql);\n\t\t\n\t\t// load the extra data\n\t\twhile ($row = $this->Server->Connection->Next($rs2))\n\t\t{\n\t\t\t$this->Tables[$row[\"Name\"]]->Engine = $row[\"Engine\"]; \n\t\t\t$this->Tables[$row[\"Name\"]]->Comment = $row[\"Comment\"];\n\t\t}\n\t\t$this->Server->Connection->Release($rs2);\n\t}", "public function loadData(){\r\n\t\t\t $pseudo = addslashes($this -> getPseudo()) ;\r\n\r\n\t\t if(! empty($pseudo)){\r\n\t\t\t$q = \"select * from UserTab where User_pseudo='\".$pseudo.\"'\";\r\n\t\t\t$r = execute($q);\r\n\t\t\twhile( $l = mysql_fetch_assoc($r) ){\r\n\t\t\t\t$this -> setFields($l);//Affectation aux champs de l'objet UserTab \r\n\t\t\t}\r\n\t\t }\r\n\r\n\t }", "public function __doLoad()\n {\n $strSQL = $this->getSelectSql();\n $_SESSION[\"logger\"]->info(\"__doLoad: \" . $strSQL);\n\n $result = $this->query($strSQL);\n $_SESSION[\"logger\"]->info(\"Results: \" . $this->rowCount($result));\n if ($result && $this->rowCount($result) > 0) {\n $this->exists = true;\n $this->dxHashToClass($this->torecord($result));\n } else {\n $this->exists = false;\n }\n }", "public function load()\n {\n $data = $this->storage->load();\n $this->collection->load($data);\n\n $this->refresh();\n }", "public function load()\n {\n return $this->loadData();\n }", "private function load() {\n\t\t\t$comments = array();\n\t\t\t\n\t\t\t$this->db->where('itemid', $this->itemid);\n\t\t\t$rows = $this->db->get('comments');\n\t\t\t\n\t\t\tforeach($rows as $row) {\n\t\t\t\t$comments['author'] = $row['author'];\n\t\t\t\t$comments['via'] = $row['via'];\n\t\t\t\t$comments['date'] = $row['date'];\n\t\t\t\t$comments['comment'] = $row['comment'];\n\t\t\t\t$comments['avatar'] = $row['avatar'];\n\t\t\t\t$this->data[] = $comments;\n\t\t\t}\n\t\t}", "protected function load_database()\n\t{\n\t\t$this->db= load_class(\"DB\", 'database');\n\t}", "public function loadFromDb()\n {\n $this->getLogger()->debug(\"Reading {$this->tableName} from DB.\");\n $query = $this->getQueryFactory()->createSelectAllQuery($this->tableName);\n $res = $query->execute();\n $fields = array();\n foreach ($res->fetchAll(\\PDO::FETCH_ASSOC) as $row) {\n $fields[$row['id']] = $row;\n }\n ksort($fields);\n return $fields;\n }", "abstract public function loadAll();", "function loadQuestionsFromDb() \n\t{\n\t\tglobal $ilDB;\n\t\t$this->questions = array();\n\t\t$result = $ilDB->queryF(\"SELECT * FROM svy_svy_qst WHERE survey_fi = %s ORDER BY sequence\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getSurveyId())\n\t\t);\n\t\twhile ($data = $ilDB->fetchAssoc($result)) \n\t\t{\n\t\t\t$this->questions[$data[\"sequence\"]] = $data[\"question_fi\"];\n\t\t}\n\t}", "function database_load_all()\n {\n if( !is_resource($this->_last_resource) )\n {\n return FALSE;\n }\n \n $resource = $this->_last_resource;\n $return_data = array();\n while( $data = $this->database_fetch_assoc($resource) )\n {\n $return_data[] = $data;\n }\n \n return $return_data;\n\t}", "abstract public function loadColumns();", "protected function loadData()\n\t{\n\t\t$delimiter = \"|||---|||---|||\";\n\t\t$command = 'show --pretty=format:\"%an'.$delimiter.'%ae'.$delimiter.'%cd'.$delimiter.'%s'.$delimiter.'%B'.$delimiter.'%N\" ' . $this->hash;\n\n\t\t$response = $this->repository->run($command);\n\n\t\t$parts = explode($delimiter,$response);\n\t\t$this->_authorName = array_shift($parts);\n\t\t$this->_authorEmail = array_shift($parts);\n\t\t$this->_time = array_shift($parts);\n\t\t$this->_subject = array_shift($parts);\n\t\t$this->_message = array_shift($parts);\n\t\t$this->_notes = array_shift($parts);\n\t}", "public function loadFromName($name) {\n $data = $this->table->select(array('name'=>$name))->current();\n if (is_object($data))\n $this->data = $data->getArrayCopy();\n }", "public function load(array $data);", "public function load()\n {\n if (count($this->table)) {\n $this->value = array_pop($this->table);\n }\n }", "public function loadData()\n {\n $this->sendApiCall(self::ACTION_RETRIEVE, $this->getCreateUrl());\n }", "public static function load_from_db() {\n // Sanitize $view;\n $view = isset($_GET['view']) ? (integer) $_GET['view'] : 0;\n $view = $view ? $view : false;\n System::$instances = db_get($view);\n }", "protected function loadFromDatabase()\n\t{\n\t\t/** @global \\CUserTypeManager $USER_FIELD_MANAGER */\n\t\tglobal $USER_FIELD_MANAGER;\n\n\t\tif (!isset($this->fields) && $this->iblockId > 0)\n\t\t{\n\t\t\t$userFields = $USER_FIELD_MANAGER->getUserFields(\n\t\t\t\t\"IBLOCK_\".$this->iblockId.\"_SECTION\",\n\t\t\t\t$this->id\n\t\t\t);\n\t\t\tforeach ($userFields as $id => $uf)\n\t\t\t{\n\t\t\t\t$this->addField(substr($id, 3), $id, $uf[\"VALUE\"]);\n\t\t\t}\n\t\t}\n\t\treturn is_array($this->fields);\n\t}", "protected function process_load($data)\n\t{\n\t\t$parsed_data = array();\n\t\tforeach ($data as $key => $value)\n\t\t{\n\t\t\tif (strpos($key, ':'))\n\t\t\t{\n\t\t\t\tlist($table, $field) = explode(':', $key);\n\t\t\t\tif ($table == $this->_table_name)\n\t\t\t\t{\n\t\t\t\t\t$parsed_data[$field] = $value;\n\t\t\t\t}\n\t\t\t\telseif ($field)\n\t\t\t\t{\n\t\t\t\t\t$this->_lazy[inflector::singular($table)][$field] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$parsed_data[$key] = $value;\n\t\t\t}\n\t\t}\n\t\t$this->_data = $parsed_data;\n\t}", "function loadFromDb()\n\t{\n\t\tglobal $ilDB;\n\t\t$result = $ilDB->queryF(\"SELECT * FROM svy_svy WHERE obj_fi = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getId())\n\t\t);\n\t\tif ($result->numRows() == 1) \n\t\t{\n\t\t\t$data = $ilDB->fetchAssoc($result);\n\t\t\t$this->setSurveyId($data[\"survey_id\"]);\n\t\t\t$this->setAuthor($data[\"author\"]);\n\t\t\tinclude_once(\"./Services/RTE/classes/class.ilRTE.php\");\n\t\t\t$this->setIntroduction(ilRTE::_replaceMediaObjectImageSrc($data[\"introduction\"], 1));\n\t\t\tif (strcmp($data[\"outro\"], \"survey_finished\") == 0)\n\t\t\t{\n\t\t\t\t$this->setOutro($this->lng->txt(\"survey_finished\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->setOutro(ilRTE::_replaceMediaObjectImageSrc($data[\"outro\"], 1));\n\t\t\t}\n\t\t\t$this->setInvitation($data[\"invitation\"]);\n\t\t\t$this->setInvitationMode($data[\"invitation_mode\"]);\n\t\t\t$this->setShowQuestionTitles($data[\"show_question_titles\"]);\n\t\t\t$this->setStartDate($data[\"startdate\"]);\n\t\t\t$this->setEndDate($data[\"enddate\"]);\n\t\t\t$this->setAnonymize($data[\"anonymize\"]);\n\t\t\t$this->setEvaluationAccess($data[\"evaluation_access\"]);\n\t\t\t$this->loadQuestionsFromDb();\n\t\t\t$this->setStatus($data[\"status\"]);\n\t\t\t$this->setMailNotification($data['mailnotification']);\n\t\t\t$this->setMailAddresses($data['mailaddresses']);\n\t\t\t$this->setMailParticipantData($data['mailparticipantdata']);\n\t\t\t$this->setTemplate($data['template_id']);\n\t\t\t$this->setPoolUsage($data['pool_usage']);\n\t\t\t// 360°\n\t\t\t$this->set360Mode($data['mode_360']);\n\t\t\t$this->set360SelfEvaluation($data['mode_360_self_eval']);\n\t\t\t$this->set360SelfRaters($data['mode_360_self_rate']);\n\t\t\t$this->set360SelfAppraisee($data['mode_360_self_appr']);\n\t\t\t$this->set360Results($data['mode_360_results']);\n\t\t\t$this->set360SkillService($data['mode_360_skill_service']);\n\t\t\t// reminder/notification\n\t\t\t$this->setReminderStatus($data[\"reminder_status\"]);\n\t\t\t$this->setReminderStart($data[\"reminder_start\"] ? new ilDate($data[\"reminder_start\"], IL_CAL_DATE) : null);\n\t\t\t$this->setReminderEnd($data[\"reminder_end\"] ? new ilDate($data[\"reminder_end\"], IL_CAL_DATE) : null);\n\t\t\t$this->setReminderFrequency($data[\"reminder_frequency\"]);\n\t\t\t$this->setReminderTarget($data[\"reminder_target\"]);\n\t\t\t$this->setReminderLastSent($data[\"reminder_last_sent\"]);\n\t\t\t$this->setTutorNotificationStatus($data[\"tutor_ntf_status\"]);\n\t\t\t$this->setTutorNotificationRecipients(explode(\";\", $data[\"tutor_ntf_reci\"]));\n\t\t\t$this->setTutorNotificationTarget($data[\"tutor_ntf_target\"]);\n\t\t\t\n\t\t\t$this->setViewOwnResults($data[\"own_results_view\"]);\n\t\t\t$this->setMailOwnResults($data[\"own_results_mail\"]);\n\t\t}\n\t\t\n\t\t// moved activation to ilObjectActivation\n\t\tif($this->ref_id)\n\t\t{\n\t\t\tinclude_once \"./Services/Object/classes/class.ilObjectActivation.php\";\n\t\t\t$activation = ilObjectActivation::getItem($this->ref_id);\t\t\t\n\t\t\tswitch($activation[\"timing_type\"])\n\t\t\t{\t\t\t\t\n\t\t\t\tcase ilObjectActivation::TIMINGS_ACTIVATION:\t\n\t\t\t\t\t$this->setActivationLimited(true);\n\t\t\t\t\t$this->setActivationStartDate($activation[\"timing_start\"]);\n\t\t\t\t\t$this->setActivationEndDate($activation[\"timing_end\"]);\n\t\t\t\t\t$this->setActivationVisibility($activation[\"visible\"]);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\t\t\t\n\t\t\t\t\t$this->setActivationLimited(false);\n\t\t\t\t\tbreak;\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public function load()\n {\n }", "public function load()\n {\n }", "public function load()\n {\n }", "public function load()\n {\n }", "public function load()\n {\n }", "function import_data() {\n\t\t$sync_tables = $this->config->item('sync_tables');\n\n\t\t$this->db_tools->import_data( $sync_tables );\n\t\t$this->db_tools->echo_import_data();\n\t}", "protected function load()\n {\n if($this->id == 0){\n return;\n }\n\n # Load the core application data using the parent class\n if(!parent::load()){\n return false;\n }\n\n # Load the application-specific data\n $db = new PHPWS_DB('hms_summer_application');\n\n if(PHPWS_Error::logIfError($db->loadObject($this))){\n $this->id = 0;\n return false;\n }\n\n return true;\n }", "public function load()\n {\n $input = $this->getCleanInput();\n $this->populate($input);\n }", "protected function loadPosts() {\r\n $this->posts = new \\App\\Table\\PostTable(App::getInstance()->getDb());\r\n \r\n }", "public function load() {\n\t\t\t$this->arList = array(); \n\t\t\t\n\t\t\t$oDB = new database(); \n\t\t\t\n\t\t\t$strSQL = \"select g.* from tblGroups g \";\n\t\t\tforeach ($this->arJoin as $strJoin) $strSQL .= $strJoin; \n\t\t\tif (count($this->arWhere)>0) $strSQL .= \" where \" . implode(\" and \", $this->arWhere); \n\t\t\t$this->arOrder[] = \"g.naam\"; \n\t\t\t$strSQL .= \" order by \" . implode(\",\", $this->arOrder); \n\t\t\t$oDB->sql($strSQL); \n\t\t\t$oDB->execute(); \n\t\t\twhile ($oDB->nextRecord()) {\n\t\t\t\t$oGroep = new group(); \n\t\t\t\t$oGroep->id($oDB->get(\"id\")); \n\t\t\t\t$oGroep->naam($oDB->get(\"naam\")); \n\t\t\t\t$oGroep->info($oDB->get(\"info\")); \n\t\t\t\t$oGroep->admin($oDB->get(\"admin\")); \n\t\t\t\t$oGroep->website($oDB->get(\"website\")); \n\t\t\t\t$this->arList[] = $oGroep; \n\t\t\t}\t\n\t\t}", "public function load($id)\n {\n $this->data = $this->db->query('SELECT ' . $this->db->fieldName('id') . ', ' . $this->db->fieldName('voting_id') . ', ' . $this->db->fieldName('player_id') . ', ' . $this->db->fieldName('type') . ', ' . $this->db->fieldName('comment') . ' FROM ' . $this->db->tableName('p_democracy_votes') . ' WHERE ' . $this->db->fieldName('id') . ' = ' . (int) $id)->fetch();\n }", "function loadLabelsFromDB( $sql ) \n {\n // execute given SQL statment\n $this->db->runSQL( $sql );\n \n // for each returned label\n while ($row = $this->db->retrieveRow() ) {\n \n // store in labels array\n $this->labels[ $row['label_key'] ][ $row['language_id'] ] = $row['label_label'];\n \n } // next label\n \n }", "public function load( $id ){\n\t\ttry {\n\t\t\tif( empty($id) ){\n\t\t\t\tthrow Exception('Can not load '.$this->_table.' entry, no id given.');\n\t\t\t}\n\n\t\t\t$res = $this->_db->prepare(\"\n\t\t\t\tSELECT t.* FROM \".$this->_table.\" t WHERE id = :id\n\t\t\t\");\n\n\t\t\t$res->execute( array(':id' => $id) );\n\n\t\t\t$entry = $res->fetch();\n\t\t\tif( !empty($entry) ){\n\t\t\t\tforeach( self::$_fields[$this->_table] as $v ){\n\t\t\t\t\t$this->_data[$v] = $entry[$v];\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch ( PDOException $e ){\n\t\t\terreur_pdo( $e, get_class( $this ), __FUNCTION__ );\n\t\t}\n\t}", "public static function loadAll()\n\t{\n\t\t//set up database connection\n\t\t//\n\t\t$databaseConnection = self::getDataBaseConnection();\n\t\t\t\n\t\t//prep our sql statment load all from the student database\n\t\t//\n\t\t$sqlStatement = self::$SQLLoadAllStatement;\n\t\t\t\n\t\t$result = $databaseConnection->query($sqlStatement);\n\t\t\n\t\t$listOfStudents = $result->fetchALL(PDO::FETCH_CLASS, self::$NameOfDatabase);\n\t\t\n\t\t$databaseConnection = null;\n\t\treturn $listOfStudents;\n\t}", "public function load();", "public function load();", "public function load();", "public function load();", "public function load();", "public function load();", "public function load();", "public function load();", "public function load();", "public function load();", "public function load();", "public function load();", "public function load();", "function load_from_database () : bool {\n $db = $this->getDatabase();\n\n $id = $db->escape($this->id);\n $sql = \"SELECT * FROM content_files WHERE content_id = '\" . $id . \"'\";\n if ( !($result = $db->query($sql)) ) {\n message_die(SQL_ERROR, \"Unable to query content\", '', __LINE__, __FILE__, $sql);\n }\n if (!$row = $db->fetchRow($result)) {\n $this->lastError = \"Content unknown: \" . $this->id;\n return false;\n }\n $this->load_from_row($row);\n return true;\n }", "public function load($id){\n\t\t$sql = 'SELECT * FROM aluno WHERE id = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->getRow($sqlQuery);\n\t}", "public function getFromDB() {}", "private function loadTrack(){\n \t$query = 'SELECT * FROM ' . $this->prefix . 'track WHERE track_id = ' . $this->track_id;\n \t$result = db_query($query);\n\n \twhile($row = mysqli_fetch_array($result)){\n $this->track_name = $row['track_name'];\n \t\t$this->track_primary_color = $row['track_primary_color'];\n $this->track_secondary_color = $row['track_secondary_color'];\n \t\t$this->track_date_insert = $row['track_date_insert'];\n \t\t$this->track_last_update = $row['track_last_update'];\n \t}\n }", "public function loadById($id){\n\t\t$sql = new Sql();\n\n\t\t$results = $sql->select(\"SELECT * FROM TB_USUARIOS WHERE IDUSUARIO = :ID\",array(':ID'=>$id));\n\t\t\n\t\tif (isset($results[0])) {\n\n\t\t\t$this->setData($results[0]);\n\t\t}\n\t}", "public function load_data($data) {\n if(!is_array($data) || sizeof($data) <= 0)\n return;\n\n $columns_info = array();\n\n foreach($this->get_columns_information() as $column) \n $columns_info[] = $column['column_name'];\n\n foreach($data as $column => $value)\n if(in_array($column, $columns_info))\n $this->$column = $this->{'_' . $column} = $value;\n\n $this->new_register = false;\n }", "public function load($data){\n\t\t\t\n\t\t$this->db->select('*')->from($this->table);\n\t\t\n\t\tif (is_array($data)) {\n\t\t\t$this->db->where($data);\n\t\t} else {\n\t\t\t$this->db->where($this->primary_key, $data);\n\t\t}\n\t\t\n\t\t$q = $this->db->build_query();\n\t\t\n\t\tif (Model_Provider::has($q)) {\n\t\t\t$this->db->reset();\n\t\t\t\n\t\t\t$obj = Model_Provider::get($q);\n\t\t\t// echo \"<div class='alert alert-success'>$q</div>\";\n\t\t\t\n\t\t\t$this->fill($obj->to_array());\n\t\t\t\n\t\t\treturn $obj;\n\t\t} else {\n\t\t\t$result = $this->db->get_one();\n\n\t\t\t$this->data = $result;\n\t\t\t\n\t\t\tModel_Provider::set($this->db->last_query, $this);\n\t\t\t\n\t\t\treturn $this;\n\t\t}\n\t}", "public function load() { }", "public function load()\n\t{\n\t\tif (!$infile = $this->arguments->getOpt(3))\n\t\t{\n\t\t\t$this->output->error('Please provide an input file');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (!is_file($infile))\n\t\t\t{\n\t\t\t\t$this->output->error(\"'{$infile}' does not appear to be a valid file\");\n\t\t\t}\n\t\t}\n\n\t\t// First, set some things aside that we need to reapply after the update\n\t\t$params = [];\n\t\t$params['com_system'] = \\Component::params('com_system');\n\t\t$params['com_tools'] = \\Component::params('com_tools');\n\t\t$params['com_usage'] = \\Component::params('com_usage');\n\t\t$params['com_users'] = \\Component::params('com_users');\n\t\t$params['plg_projects_databases'] = \\Plugin::params('projects', 'databases');\n\n\t\t$tables = App::get('db')->getTableList();\n\n\t\t// See if we should drop all tables first\n\t\tif ($this->arguments->getOpt('drop-all-tables'))\n\t\t{\n\t\t\t$this->output->addLine('Dropping all tables...');\n\t\t\tforeach ($tables as $table)\n\t\t\t{\n\t\t\t\tApp::get('db')->dropTable($table);\n\t\t\t}\n\t\t}\n\n\t\t// Craft the command to be executed\n\t\t$infile = escapeshellarg($infile);\n\t\t$cmd = \"mysql -u \" . Config::get('user') . \" -p'\" . Config::get('password') . \"' -D \" . Config::get('db') . \" < {$infile}\";\n\n\t\t$this->output->addLine('Loading data from ' . $infile . '...');\n\n\t\t// Now push the big red button\n\t\texec($cmd);\n\n\t\t$migration = new Migration(App::get('db'));\n\n\t\t// Now load some things back up\n\t\tforeach ($params as $k => $v)\n\t\t{\n\t\t\tif (!empty($v))\n\t\t\t{\n\t\t\t\t$migration->saveParams($k, $v);\n\t\t\t}\n\t\t}\n\n\t\t$this->output->addLine('Load complete!', 'success');\n\t}", "public function testLoad()\n {\n $fixture = new Mad_Test_Fixture_Base($this->_conn, 'unit_tests');\n $this->assertEquals('0', $this->_countRecords());\n\n $fixture->load();\n $this->assertEquals('6', $this->_countRecords());\n }", "abstract public function load();", "abstract public function load();", "abstract protected function loadData(ObjectManager $em);", "public function loadModel()\n {\n $data = ModelsPegawai::find($this->dataId);\n $this->name = $data->name;\n $this->email = $data->email;\n $this->username = $data->username;\n $this->password = $data->password;\n $this->level = $data->level;\n\n }", "public function load($id){\n\n /*\n * select from the database\n */\n $query = $this->db->get_where($this::DB_TABLE, array($this::DB_TABLE_PK => $id));\n\n /**\n * Populate to an object\n */\n if(!empty($query->row())){\n $this->populate($query->row());\n return true;\n } else {\n return false;\n }\n }", "function load(){\n $sql = 'SELECT * FROM worlds where id=?';\n $w = $this->app['db']->fetchAssoc($sql, array($this->id));\n if(!$w){ \n return false;\n }\n $this->name = $w['name'];\n $this->world = $w['world_json'];\n return true;\n }", "public abstract function load();", "function load($pid)\r\n\t{\r\n\t\tglobal $debug;\r\n\t\t$dbh = getOpenedConnection();\r\n\t\t\r\n\t\tif ($dbh == null) {\r\n\t\t\t$dbh = openDB();\r\n\t\t\tif ($dbh == null)\r\n\t\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif ($pid == \"\")\r\n\t\t\treturn;\r\n\t\t\t\t\t\r\n\t\t$sql = \"\r\n\t\t\tselect\r\n\t\tId,\r\n\t\tCompetitionId,\r\n\t\tDayNo,\r\n\t\tFirstStart,\r\n\t\tLastStart,\r\n\t\tMaxStation,\r\n\t\tPatrolSpace\r\n\t\tfrom tbl_Pistol_CompetitionDay\r\n\t\twhere Id = $pid;\r\n\t\t\";\r\n\r\n\t\t$result = mysqli_query($dbh,$sql);\r\n\t\tif ($obj = mysqli_fetch_object($result))\r\n\t\t{\r\n\t\t\t$this->id = $obj->Id;\r\n\t\t\t$this->competitionId = $obj->CompetitionId;\r\n\t\t\t$this->dayNo = $obj->DayNo;\r\n\t\t\t$this->firstStart = $obj->FirstStart;\r\n\t\t\t$this->lastStart = $obj->LastStart;\r\n\t\t\t$this->maxStation = $obj->MaxStation;\r\n\t\t\t$this->patrolSpace = $obj->PatrolSpace;\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tmysqli_free_result($result);\r\n\t}", "protected function loadUsers() {\r\n $this->users = new \\App\\Table\\UserTable(App::getInstance()->getDb());\r\n }", "public function load($id);", "public function load($id);" ]
[ "0.8267042", "0.7571787", "0.73001933", "0.7213787", "0.7183212", "0.7155459", "0.7127596", "0.70964694", "0.7095224", "0.70246226", "0.69239914", "0.6905577", "0.6827652", "0.6752483", "0.6698043", "0.65772843", "0.6571402", "0.65293396", "0.6520576", "0.6507463", "0.6505651", "0.6501806", "0.6488447", "0.6441821", "0.6401985", "0.6368935", "0.6357172", "0.6354301", "0.6351818", "0.63509077", "0.63485056", "0.6345547", "0.6340627", "0.62743086", "0.6261804", "0.6201028", "0.61926836", "0.61465853", "0.6119025", "0.6116742", "0.6093999", "0.6058257", "0.60545754", "0.6026726", "0.5965962", "0.59651434", "0.5960378", "0.59411263", "0.59393847", "0.5936755", "0.5931464", "0.59277844", "0.5917625", "0.5909808", "0.59096783", "0.5908917", "0.5908917", "0.5908917", "0.5896195", "0.5889202", "0.5863613", "0.5861426", "0.58563375", "0.585519", "0.5853819", "0.5846469", "0.5841342", "0.5836092", "0.5836092", "0.5836092", "0.5836092", "0.5836092", "0.5836092", "0.5836092", "0.5836092", "0.5836092", "0.5836092", "0.5836092", "0.5836092", "0.5836092", "0.58228546", "0.58142734", "0.5803108", "0.5797308", "0.5784447", "0.57770944", "0.5774266", "0.5770851", "0.57595354", "0.5745628", "0.5745558", "0.5745558", "0.57444465", "0.57370925", "0.5713886", "0.5711022", "0.5704422", "0.5703969", "0.56998134", "0.56806886", "0.56806886" ]
0.0
-1
Get course sections ids and set data to cache.
public function read_sections_ids() { // Get course's sections id data from cache $ids = LP_Object_Cache::get( 'course-' . $this->course_id, 'learn-press/course-sections-ids' ); if ( ! $ids ) { global $wpdb; // get sections id $ids = $wpdb->get_col( $wpdb->prepare( "SELECT section_id FROM {$wpdb->prefix}learnpress_sections WHERE section_course_id = %d", $this->course_id ) ); // Set cache LP_Object_Cache::set( 'course-' . $this->course_id, $ids, 'learn-press/course-sections-ids' ); } return $ids; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cps_sections($course, $where=null) {\n global $CFG;\n\n $sql = \"SELECT s.*, c.department, c.course_number\n FROM {$CFG->prefix}block_courseprefs_sections s,\n {$CFG->prefix}block_courseprefs_courses c\n WHERE s.coursesid = c.id\n AND s.idnumber = '{$course->idnumber}'\n \".(($where) ? \"AND {$where}\" : '').\"\n ORDER BY s.section_number\";\n return get_records_sql($sql);\n}", "public function sections_get() {\n $response = array();\n $auth_token = $_GET['auth_token'];\n $course_id = $_GET['course_id'];\n $logged_in_user_details = json_decode($this->token_data_get($auth_token), true);\n\n if ($logged_in_user_details['user_id'] > 0) {\n $response = $this->api_model->sections_get($course_id, $logged_in_user_details['user_id']);\n }else{\n }\n return $this->set_response($response, REST_Controller::HTTP_OK);\n }", "public static function get_sections_course($courseid) {\n\n $context = get_context_instance(CONTEXT_SYSTEM);\n self::validate_context($context);\n require_capability('moodle/course:view', $context); \n $sections = glueserver_course_db::glueserver_get_sections_course($courseid);\n $returns = array();\n foreach ($sections as $section) {\n $section = new glueserver_section($section);\n $returns[] = $section->get_data();\n }\n return $returns;\n }", "function course_sections($course) {\n global $DB;\n\n $sections = $DB->get_records('course_sections', array('course' => $course), 'section', 'id,section,name,sequence');\n foreach ($sections as $key => $section) {\n if ($section->sequence != '') {\n $sections[$key]->sequence = explode(',', $section->sequence);\n }\n else {\n $sections[$key]->sequence = null;\n }\n }\n\n return $sections;\n}", "private function course_section_updated($event) {\n global $DB;\n $courseid = $event->courseid;\n $course = $DB->get_record('course', array('id' => $courseid), 'visible');\n $coursecontext = context_course::instance($courseid);\n\n $users = $this->get_google_authenticated_users($courseid);\n $sectionnumber = $event->other['sectionnum'];\n $cms = $this->get_section_course_modules($sectionnumber);\n\n $insertcalls = array();\n $deletecalls = array();\n\n foreach ($cms as $cm) {\n $cmid = $cm->id;\n $cmcontext = context_module::instance($cmid);\n $fileids = $this->get_fileids($cmid);\n if ($fileids) {\n foreach ($fileids as $fileid) {\n foreach ($users as $user) {\n if (has_capability('moodle/course:view', $coursecontext, $user->userid)) {\n // Manager; do nothing.\n } elseif (is_enrolled($coursecontext, $user->userid, null, true) && has_capability('moodle/course:manageactivities', $cmcontext, $user->userid)) {\n // Teacher (enrolled) (active); do nothing.\n } elseif (is_enrolled($coursecontext, $user->userid, null, true)) {\n // Student (enrolled) (active); continue checks.\n if ($course->visible == 1) {\n // Course is visible, continue checks.\n rebuild_course_cache($courseid, true);\n $modinfo = get_fast_modinfo($courseid, $user->userid);\n $cminfo = $modinfo->get_cm($cmid);\n $sectionnumber = $this->get_cm_sectionnum($cmid);\n $secinfo = $modinfo->get_section_info($sectionnumber);\n if ($cminfo->uservisible && $secinfo->available) {\n // Course module and section are visible and available; insert reader permission.\n $call = new stdClass();\n $call->fileid = $fileid;\n $call->gmail = $user->gmail;\n $call->role = 'reader';\n $insertcalls[] = $call;\n if (count($insertcalls) == 1000) {\n $this->batch_insert_permissions($insertcalls);\n $insertcalls = array();\n }\n } else {\n // User cannot access course module or section, delete permission.\n try {\n $permissionid = $this->service->permissions->getIdForEmail($user->gmail);\n $permission = $this->service->permissions->get($fileid, $permissionid->id);\n if ($permission->role != 'owner') {\n $call = new stdClass();\n $call->fileid = $fileid;\n $call->permissionid = $permissionid->id;\n $deletecalls[] = $call;\n if (count($deletecalls) == 1000) {\n $this->batch_delete_permissions($deletecalls);\n $deletecalls = array();\n }\n }\n } catch (Exception $e) {\n debugging($e);\n }\n } \n }\n // Course is not visible; do nothing (course visibility would not have changed during this event).\n }\n // Unenrolled user; do nothing (user enrolment would not have changed during this event).\n }\n }\n }\n }\n\n // Call any remaining batch requests.\n if (count($insertcalls) > 0) {\n $this->batch_insert_permissions($insertcalls);\n }\n\n if (count($deletecalls) > 0) {\n $this->batch_delete_permissions($deletecalls);\n }\n }", "public function course_data($courses = array()) {\n\t\tforeach ($courses as $key => $course) {\n\t\t\t$courses[$key]['requirements'] = json_decode($course['requirements']);\n\t\t\t$courses[$key]['outcomes'] = json_decode($course['outcomes']);\n\t\t\t$courses[$key]['thumbnail'] = $this->get_image('course_thumbnail', $course['id']);\n\t\t\tif ($course['is_free_course'] == 1) {\n\t\t\t\t$courses[$key]['price'] = get_phrase('free');\n\t\t\t}else{\n\t\t\t\tif ($course['discount_flag'] == 1){\n\t\t\t\t\t$courses[$key]['price'] = currency($course['discounted_price']);\n\t\t\t\t}else{\n\t\t\t\t\t$courses[$key]['price'] = currency($course['price']);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$total_rating = $this->crud_model->get_ratings('course', $course['id'], true)->row()->rating;\n\t\t\t$number_of_ratings = $this->crud_model->get_ratings('course', $course['id'])->num_rows();\n\t\t\tif ($number_of_ratings > 0) {\n\t\t\t\t$courses[$key]['rating'] = ceil($total_rating / $number_of_ratings);\n\t\t\t}else {\n\t\t\t\t$courses[$key]['rating'] = 0;\n\t\t\t}\n\t\t\t$courses[$key]['number_of_ratings'] = $number_of_ratings;\n\t\t\t$instructor_details = $this->user_model->get_all_user($course['user_id'])->row_array();\n\t\t\t$courses[$key]['instructor_name'] = $instructor_details['first_name'].' '.$instructor_details['last_name'];\n\t\t\t$courses[$key]['total_enrollment'] = $this->crud_model->enrol_history($course['id'])->num_rows();\n\t\t\t$courses[$key]['shareable_link'] = site_url('home/course/'.slugify($course['title']).'/'.$course['id']);\n\t\t}\n\n\t\treturn $courses;\n\t}", "private function retrieveSections() {\n\t\t$this->sections = array();\n\n\t\t$dbResult = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t'*',\n\t\t\tself::TABLE_SECTIONS,\n\t\t\t'content_uid = ' . $this->getContentUid() .\n\t\t\t\ttx_oelib_db::enableFields(self::TABLE_SECTIONS),\n\t\t\t'',\n\t\t\t'sorting'\n\t\t);\n\t\tif (!$dbResult) {\n\t\t\tthrow new Exception(DATABASE_QUERY_ERROR);\n\t\t}\n\n\t\twhile ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($dbResult)) {\n\t\t\t$GLOBALS['TSFE']->sys_page->versionOL(self::TABLE_SECTIONS, $row);\n\t\t\t$GLOBALS['TSFE']->sys_page->fixVersioningPid(\n\t\t\t\tself::TABLE_SECTIONS, $row\n\t\t\t);\n\t\t\tif ($GLOBALS['TSFE']->sys_language_content > 0) {\n\t\t\t\t$row = $GLOBALS['TSFE']->sys_page->getRecordOverlay(\n\t\t\t\t\tself::TABLE_SECTIONS,\n\t\t\t\t\t$row,\n\t\t\t\t\t$GLOBALS['TSFE']->sys_language_content,\n\t\t\t\t\t$GLOBALS['TSFE']->sys_language_contentOL\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$this->sections[] = $row;\n\t\t}\n\t}", "public function __allSections()\n\t{\n\t\t//current user course\n\t\t$userCourse = $this->Session->read('UserData.usersCourses');\n\t\t$user_course_section = $userCourse[0];\n\t\t//get Course and section name\n\t\t$course_info = $this->getCourseNameOfUser($user_course_section);\n\t\t$course_name = $course_info->course_name;\n\t\t$course_section = $course_info->section_name;\n\t\t$sectionList = array();\n\t\t//getting the course in section/all section setting(changed on 16 April, 2014)\n\t $setting = $this->__getDbSetting($user_course_section);\n\t\tif ($setting == 2) {\n\t\t\t$sections = $this->PleSetting->find('all',array('conditions'=>array('PleSetting.course'=>$course_name,'PleSetting.setting_value'=>2),'fields'=>array('section')));\n\t\t\tforeach ($sections as $section) {\n\t\t\t\t$sectionList[] = trim($section['PleSetting']['section']);\n\t\t\t}\n\t\t\t$sectionList[] = $course_section;\n\t } else {\n\t\t\t//add current user login section\n\t\t\t$sectionList[] = $course_section;\n\t }\n\t\t$tz = array_unique($sectionList);\n\t\treturn $tz;\n\t}", "public function getCourses()\n {\n return $this->hasMany(Section::className(), ['course_id' => 'course_id', 'sec_id' => 'sec_id', 'semester' => 'semester', 'year' => 'year'])->viaTable('teaches', ['ID' => 'ID']);\n }", "function assignSectionIdSetLecture()\n {\n /* Query a list of sections for the current lecture. */\n $parents = $this->dbQuerySectionIdSetLecture();\n /* Remember it ... */\n $this->assign('section_parents', $parents);\n }", "public function getCourseList()\n {\n $course_list = [];\n\n foreach($this->sections as $section)\n {\n $course_list[$section->getCourseId()] = $section->course_subject.' '.$section->course_number.' '.$section->course_name;\n }\n\n return $course_list;\n }", "public function on_course_sections_end() {\n $this->converter->set_stash('sectionidslist', $this->sectionids);\n unset($this->sectionids);\n }", "abstract protected function getAllByCourse($id);", "function &getSectionItems(&$params)\n\t{\n\t\t$db\t\t= &JFactory::getDBO();\n\t\t$user\t= &JFactory::getUser();\n\t\t$aid\t= $user->get('aid');\n\n\t\t// get some date values for the query\n\t\t$date\t\t= &JFactory::getDate();\n\t\t$now\t\t= $date->toMySQL();\n\t\t$nullDate\t= $db->getNullDate();\n\t\t\n\t\t//JXComments integration\n\t\t$jxcomments = (int)$params->get('jxcomments');\n\n\t\t// get and sanitize the category ids\n\t\tjimport('joomla.utilities.arrayhelper');\n\t\t$section_ids = (array)$params->get('sec_ids');\n\t\tJArrayHelper::toInteger($section_ids);\n\n\t\t// build the query to get article information\n\t\t$db->setQuery(\n\t\t\t'SELECT a.*, cc.description as catdesc, cc.title as cattitle, s.description as secdesc, s.title as sectitle,'.\n\t\t\t' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(\":\", a.id, a.alias) ELSE a.id END as slug,'.\n\t\t\t' CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(\":\", cc.id, cc.alias) ELSE cc.id END as catslug,'.\n\t\t\t' CASE WHEN CHAR_LENGTH(s.alias) THEN CONCAT_WS(\":\", s.id, s.alias) ELSE s.id END as secslug'.\n\t\t\t' FROM #__content AS a'.\n\t\t\t' INNER JOIN #__categories AS cc ON cc.id = a.catid'.\n\t\t\t' INNER JOIN #__sections AS s ON s.id = a.sectionid'.\n\t\t\t' WHERE a.state = 1'.\n\t\t\t' AND a.access <= '.(int) $aid.' AND cc.access <= '.(int) $aid.' AND s.access <= '.(int) $aid .\n\t\t\t' AND (a.publish_up = '.$db->Quote($nullDate).' OR a.publish_up <= '.$db->Quote($now).' ) '.\n\t\t\t' AND (a.publish_down = '.$db->Quote($nullDate).' OR a.publish_down >= '.$db->Quote($now).' )'.\n\t\t\t' AND (a.sectionid = '.implode(' OR a.sectionid = ', $section_ids).' )' .\n\t\t\t' AND cc.section = s.id'.\n\t\t\t' AND cc.published = 1'.\n\t\t\t' AND s.published = 1'.\n\t\t\t' ORDER BY a.created DESC',\n\t\t\t0, (int)$params->get('num_items')\n\t\t);\n\t\t$rows = $db->loadObjectList();\n\n\t\t// import library dependencies\n\t\trequire_once (JPATH_SITE.DS.'components'.DS.'com_content'.DS.'helpers'.DS.'route.php');\n\n\t\tfor ($i=0,$n=count($rows); $i < $n; $i++)\n\t\t{\n\t\t\t$rows[$i]->article_link = JRoute::_(ContentHelperRoute::getArticleRoute($rows[$i]->slug, $rows[$i]->catslug, $rows[$i]->sectionid));\n\t\t\t$rows[$i]->category_link = JRoute::_(ContentHelperRoute::getCategoryRoute($rows[$i]->catslug, $rows[$i]->sectionid));\n\t\t\t$rows[$i]->section_link = JRoute::_(ContentHelperRoute::getSectionRoute($rows[$i]->sectionid));\n\t\t\t$rows[$i]->date = $rows[$i]->created;\n\t\t\t$rows[$i]->text = modAnnouncmentHelper::processText($rows[$i], $params);\n\t\t\tif($jxcomments)\n\t\t\t{\n\t\t\t\t$rows[$i]->num_comments = modAnnouncmentHelper::getNumComments($rows[$i]->id);\n\t\t\t}\n\t\t}\n\n\t\treturn $rows;\n\t}", "public function GetCourses()\n\t\t{\n $course_students = CourseStudent::GetAll(['student_id' => $this->GetAttribute(static::$primary_key)]);\n $courses = array();\n\n foreach ($course_students as $course_student) {\n $courses[] = Course::GetFromPrimaryKey($course_student->GetAttribute('course_id'));\n }\n\n return $courses;\n\t\t}", "public function multiLoad_0() {\n\t\treturn $this->clean($this->get(self::table, -1, '', array(), array(), array('column' => 'course', 'order' => 'ASC')));\n\t}", "public function clear() {\n\n\t\t$sections_ids = LP_Object_Cache::get( 'course-' . $this->course_id, 'learn-press/course-sections-ids' );\n\n\t\tif ( ! $sections_ids ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tglobal $wpdb;\n\n\t\tdo_action( 'learn-press/before-clear-section', $this->course_id );\n\n\t\t// Remove all items in course's sections\n\t\t$wpdb->query( $wpdb->prepare( \"DELETE FROM {$wpdb->prefix}learnpress_section_items WHERE %d AND section_id IN(\" . join( ',', $sections_ids ) . ')', 1 ) );\n\t\tlearn_press_reset_auto_increment( 'learnpress_section_items' );\n\t\t// delete sections ids cache\n\t\t// wp_cache_delete( 'course-' . $this->course_id, 'learn-press/course-sections-ids' );\n\n\t\t// delete sections in course\n\t\t$wpdb->query( $wpdb->prepare( \"DELETE FROM {$wpdb->prefix}learnpress_sections WHERE section_course_id = %d\", $this->course_id ) );\n\t\tlearn_press_reset_auto_increment( 'learnpress_sections' );\n\t\t// delete sections cache\n\t\t// wp_cache_delete( 'course-' . $this->course_id, 'learn-press/course-sections' );\n\n\t\tLP_Course_Utils::set_cache_db_sections( $this->course_id, false );\n\n\t\treturn true;\n\t}", "function get_courses_for_the_gift_voucher($voucher_code)\n {\n \n $enrolled_course_ids = array();\n $course_array = array();\n $coure_list_html = '';\n if(isset($this->session->userdata['student_logged_in']['id'])) \n { \n $user_id = $this->session->userdata['student_logged_in']['id'];\n $enrolled_courses = $this->user_model->get_courses_student($user_id);\n if($enrolled_courses)\n {\n foreach($enrolled_courses as $en_course)\n {\n $enrolled_course_ids[] = $en_course->course_id; \n } \n }\n }\n //$content['course_array'] = $this->sales_model->get_course_by_language($this->language,$enrolled_course_ids);\n \n if(isset($voucher_code))\n { \n $voucherDetails = $this->gift_voucher_model->getDetails_of_vcode($voucher_code); \n $content['course_cat']=$this->gift_voucher_model->get_course_categories(); \n $content['voucher_type'] = $voucherDetails[0]->voucher_type; \n \n if($voucherDetails[0]->courses_idcourses==\"\"||$voucherDetails[0]->courses_idcourses==0)\n {\n $content['course_set']=$this->gift_voucher_model->get_course_in_cat_name_order($this->session->userdata['language'],$enrolled_course_ids);\n $content['voucher_type_course_count']=1; \n //$content['temp']='inside if for course_set'; \n }\n else\n {\n $course_ids = explode(\",\",$voucherDetails[0]->courses_idcourses); \n $course_ids = array_diff($course_ids,$enrolled_course_ids); \n if(!empty($course_ids)) \n { \n $content['course_set']=$this->gift_voucher_model->get_these_courses_for_voucher($course_ids);\n //$content['temp']='inside elseif for course_set';\n //$content['course_set']=$this->db->last_query();\n }\n else\n {\n //$content['temp']='inside else for course_set';\n $content['course_set'] = array();\n }\n \n if($voucherDetails[0]->voucher_type =='one_course_from_list')\n {\n $content['voucher_type_course_count'] = 1;\n }\n elseif($voucherDetails[0]->voucher_type =='two_course_from_list')\n {\n $content['voucher_type_course_count'] = 2;\n }\n elseif($voucherDetails[0]->voucher_type =='four_course_from_list')\n {\n $content['voucher_type_course_count'] = 4;\n }\n elseif($voucherDetails[0]->voucher_type =='one_or_more_predefined')\n {\n $content['voucher_type_course_count'] = count($course_ids);\n }\n else\n {\n $content['voucher_type_course_count'] = 1;\n }\n }\n $content['err_msg'] = 0;\n }\n else\n {\n $content['err_msg'] = 1;\n }\n \n //echo \"<pre>\"; print_r($content); exit;\n \n echo json_encode($content); \n exit;\n \n }", "static function get_section_info_all($modinfo) {\n global $DB;\n\n if (method_exists($modinfo, 'get_section_info_all')) {\n // Moodle >= 2.3\n return $modinfo->get_section_info_all();\n }\n\n // Moodle <= 2.2\n $info = array();\n $params = array('course' => $modinfo->get_course_id());\n if ($sections = $DB->get_records('course_sections', $params, 'section')) {\n foreach ($sections as $section) {\n $sectionnum = $section->section;\n $info[$sectionnum] = $section;\n }\n }\n return $info;\n }", "public function course_details_by_id_get($user_id = \"\", $course_id = \"\") {\n\t\t$course_details = $this->crud_model->get_course_by_id($course_id)->result_array();\n\t\t$response = $this->course_data($course_details);\n\t\tforeach ($response as $key => $resp) {\n\t\t\t$response[$key]['sections'] = $this->sections_get($course_id);\n\t\t\t$response[$key]['is_wishlisted'] = $this->is_added_to_wishlist($user_id, $course_id);\n\t\t\t$response[$key]['includes'] = array(\n\t\t\t\t$this->crud_model->get_total_duration_of_lesson_by_course_id($course_id).' '.get_phrase('on_demand_videos'),\n\t\t\t\t$this->crud_model->get_lessons('course', $course_id)->num_rows().' '.get_phrase('lessons'),\n\t\t\t\tget_phrase('high_quality_videos'),\n\t\t\t\tget_phrase('life_time_access'),\n\t\t\t);\n\t\t}\n\t\treturn $response;\n\t}", "private function getCourseSection() {\n $this->openConn();\n\n $courseID = $_POST['courseID'];\n\n $sql = \"SELECT Course.courseID, subject, courseNum,\n Section.sectionID, secNo, daysMet, startTime, endTime, totalEnrolment\n FROM Course, Section\n LEFT JOIN SectionTA ON Section.sectionID = SectionTA.sectionID\n LEFT JOIN TA ON SectionTA.taID = TA.taID\n LEFT JOIN Student ON TA.sID = Student.sID\n LEFT JOIN UserAccount ON Student.uID = UserAccount.uID\n WHERE Section.courseID = Course.courseID\n and Course.courseID = :courseID\";\n $stmt = $this->conn->prepare($sql);\n $stmt->execute(array(':courseID'=>$courseID));\n\n $this->results = \"\";\n // Loop through every row\n while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $subject = $row['subject'];\n $courseNum = $row['courseNum'];\n $sectionID = $row['sectionID'];\n $secNo = $row['secNo'];\n $daysMet = $row['daysMet'];\n $startTime = $row['startTime'];\n $endTime = $row['endTime'];\n $totalEnrolment = $row['totalEnrolment'];\n\n\n //display rows\n $this->results = $this->results .'\n <tr class=\"lab-info-row\" name='.$sectionID.'>\n <td><input id=\"sectioncheckbox\" type=\"checkbox\"></td>\n <td id=\"lab-id\" >'.$secNo.'</td>\n <td id=\"lab-time\">'.$daysMet.' | '.$startTime.' - '.$endTime.'</td>\n <td id=\"lab-num\">'.$totalEnrolment.'</td>\n </tr>';\n }\n\n $this->closeConn();\n return $this->results;\n\n }", "private function course_updated($event) {\n global $DB;\n $courseid = $event->courseid;\n $course = $DB->get_record('course', array('id' => $courseid), 'visible');\n $coursecontext = context_course::instance($courseid);\n $coursemodinfo = get_fast_modinfo($courseid, -1);\n $cms = $coursemodinfo->get_cms();\n\n $users = $this->get_google_authenticated_users($courseid);\n $insertcalls = array();\n $deletecalls = array();\n\n foreach ($cms as $cm) {\n $cmid = $cm->id;\n $cmcontext = context_module::instance($cmid);\n $fileids = $this->get_fileids($cmid);\n if ($fileids) {\n foreach ($fileids as $fileid) {\n foreach ($users as $user) {\n if (has_capability('moodle/course:view', $coursecontext, $user->userid)) {\n // Manager; do nothing.\n } elseif (is_enrolled($coursecontext, $user->userid, null, true) && has_capability('moodle/course:manageactivities', $cmcontext, $user->userid)) {\n // Teacher (enrolled) (active); do nothing.\n } elseif (is_enrolled($coursecontext, $user->userid, null, true)) {\n // Student (enrolled); continue checks for reader permissions.\n if ($course->visible == 1) {\n // Course is visible, continue checks.\n rebuild_course_cache($courseid, true);\n $modinfo = get_fast_modinfo($courseid, $user->userid);\n $cminfo = $modinfo->get_cm($cmid);\n $sectionnumber = $this->get_cm_sectionnum($cmid);\n $secinfo = $modinfo->get_section_info($sectionnumber);\n if ($cminfo->uservisible && $secinfo->available) {\n // User can view and access course module and can access section; insert reader permission.\n $call = new stdClass();\n $call->fileid = $fileid;\n $call->gmail = $user->gmail;\n $call->role = 'reader';\n $insertcalls[] = $call;\n if (count($insertcalls) == 1000) {\n $this->batch_insert_permissions($insertcalls);\n $insertcalls = array();\n }\n }\n // User cannot access course module, do nothing (course module availability won't change here).\n } else {\n // Course not visible, delete permission.\n try {\n $permissionid = $this->service->permissions->getIdForEmail($user->gmail);\n $permission = $this->service->permissions->get($fileid, $permissionid->id);\n if ($permission->role != 'owner') {\n $call = new stdClass();\n $call->fileid = $fileid;\n $call->permissionid = $permissionid->id;\n $deletecalls[] = $call;\n if (count($deletecalls) == 1000) {\n $this->batch_delete_permissions($deletecalls);\n $deletecalls = array();\n }\n }\n } catch (Exception $e) {\n debugging($e);\n }\n }\n }\n // Unenrolled user; do nothing (user enrolment would not have changed during this event).\n }\n }\n }\n }\n\n // Call any remaining batch requests.\n if (count($insertcalls) > 0) {\n $this->batch_insert_permissions($insertcalls);\n }\n\n if (count($deletecalls) > 0) {\n $this->batch_delete_permissions($deletecalls);\n }\n }", "protected function generateCourses()\n {\n /**\n * Let's go through the archane paths that lead us to the actual\n * table of grades.\n */\n $mainTable = $this->__transcriptDOM\n ->getElementsByTagName('table')->item(0);\n\n $rowOfGrades = $mainTable->childNodes->item(4);\n $gradesTable = $rowOfGrades->firstChild->firstChild;\n\n $this->courses = [];\n\n foreach ($gradesTable->childNodes as $row) {\n // The rows containing the grades have 13 columns.\n if ($row->childNodes->length == 13) {\n $data = $row->childNodes;\n $course = new Course;\n\n $course->code = strtoupper($data->item(0)->nodeValue.$data->item(1)->nodeValue);\n $course->semester = $data->item(2)->nodeValue;\n $course->section = $data->item(3)->nodeValue;\n $course->description = $data->item(4)->nodeValue;\n $course->creditsWorth = $data->item(5)->nodeValue;\n $course->grade = $data->item(6)->nodeValue;\n $course->gpaEarned = $data->item(7)->nodeValue;\n $course->classAvg = $data->item(8)->nodeValue;\n $course->classSize = $data->item(9)->nodeValue;\n $course->creditsEarned = $data->item(10)->nodeValue;\n\n $this->courses[$course->code] = $course;\n }\n }\n }", "protected function get_course_settings()\n {\n if (! isset($this->course_settings_cache))\n {\n $course_settings = DataManager::retrieve_course_settings_with_tools();\n while ($course_setting = $course_settings->next_result())\n {\n $this->course_settings_cache[$course_setting[CourseSetting::PROPERTY_ID]] = $course_setting;\n }\n }\n \n return $this->course_settings_cache;\n }", "function get_sections($crn,$term,$course) {\n global $dbh;\n \n // get all courses offered in same term with same course name\n $query = 'SELECT term_code,crn FROM courses WHERE term_code = ? and concat(subject_code,\" \",course_number) = ? ORDER BY section_number';\n \n $resultset = prepared_query($dbh, $query, array($term,$course));\n \n $sections = array();\n while ($row = $resultset->fetchRow(MDB2_FETCHMODE_ASSOC)) {\n // if the CRN does not match current course, add it as a different section\n if ($row['crn'] != $crn) $sections[] = '<a href=\"javascript:void(0);\" onclick=\"getDetail('.$row['term_code'].','.$row['crn'].')\">'.$row['crn'].'</a>';\n }\n return $sections; \n}", "function get_courses_json($library) {\n\n $json = \\Drupal::cache()->get('ares_course_list')->data;\n if (!$json) {\n //global $courses_url;\n $courses_url = 'https://mannservices.mannlib.cornell.edu/LibServices/showCourseReserveList.do?output=json&library=';\n // static $ares_courses_json;\n $cid = 'ares_courses_' . $library;\n $url = $courses_url . $library;\n $response = \\Drupal::httpClient()->get($url, ['verify' => false]);\n $json = json_decode((string) $response->getBody(), true);\n \\Drupal::cache()->set('ares_course_list', $json, time() + 600); # 10-minute cache time\n }\n\n return $json;\n }", "protected function obtainDataReferences()\n\t{\n\t\t$obCache = new CPHPCache;\n\t\tif ($obCache->StartDataCache($this->arParams[\"CACHE_TIME\"],\n\t\t\tLANGUAGE_ID.\n\t\t\tSITE_ID\n\t\t\t))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$cachedData = array();\n\n\t\t\t\t/////////////////////\n\t\t\t\t/////////////////////\n\n\t\t\t\t// Person type\n\t\t\t\t$dbPType = CSalePersonType::GetList(array(\"SORT\"=>\"ASC\"));\n\t\t\t\twhile ($arPType = $dbPType->Fetch())\n\t\t\t\t\t$cachedData['PERSON_TYPE'][$arPType[\"ID\"]] = $arPType;\n\n\t\t\t\t// Tax list\n\t\t\t\t$dbTaxList = CSaleOrderTax::GetList(array(\"APPLY_ORDER\" => \"ASC\"));\n\t\t\t\twhile ($arTaxList = $dbTaxList->Fetch())\n\t\t\t\t\t$cachedData['TAX'] = $arTaxList;\n\n\t\t\t\t// Save statuses for Filter form\n\t\t\t\t$dbStatus = CSaleStatus::GetList(array(\"SORT\"=>\"ASC\"), array(\"LID\"=>LANGUAGE_ID));\n\t\t\t\twhile ($arStatus = $dbStatus->Fetch())\n\t\t\t\t\t$cachedData['STATUS'][$arStatus[\"ID\"]] = $arStatus;\n\n\t\t\t\t$dbPaySystem = CSalePaySystem::GetList(array(\"SORT\"=>\"ASC\"));\n\t\t\t\twhile ($arPaySystem = $dbPaySystem->Fetch())\n\t\t\t\t\t$cachedData['PAYSYS'][$arPaySystem[\"ID\"]] = $arPaySystem;\n\n\t\t\t\t$dbDelivery = CSaleDelivery::GetList(array(\"SORT\"=>\"ASC\"));\n\t\t\t\twhile ($arDelivery = $dbDelivery->Fetch())\n\t\t\t\t\t$cachedData['DELIVERY'][$arDelivery[\"ID\"]] = $arDelivery;\n\n\t\t\t\t$dbDelivery = CSaleDeliveryHandler::GetList(array(), array(array(\"SITE_ID\" => SITE_ID)));\n\t\t\t\twhile ($arDeliveryHandler = $dbDelivery->Fetch())\n\t\t\t\t\t$cachedData['DELIVERY_HANDLERS'][$arDeliveryHandler[\"SID\"]] = $arDeliveryHandler;\n\n\t\t\t\t/////////////////////\n\t\t\t\t/////////////////////\n\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\t$obCache->AbortDataCache();\n\t\t\t\tthrow $e;\n\t\t\t}\n\n\t\t\t$obCache->EndDataCache($cachedData);\n\n\t\t}\n\t\telse\n\t\t\t$cachedData = $obCache->GetVars();\n\n\t\t$this->dbResult = array_merge($this->dbResult, $cachedData);\n\t}", "function subpage_get_coursemodule_info($cm) {\n global $DB, $CFG;\n $subpage = $DB->get_record('subpage', array('id' => $cm->instance), '*', MUST_EXIST);\n if ($subpage->enablesharing) {\n // Work out current value.\n require_once($CFG->dirroot . '/mod/sharedsubpage/locallib.php');\n $content = serialize(sharedsubpage_gather_data($subpage));\n $hash = sha1($subpage->name . \"\\n\" . $content);\n\n if ($hash != $subpage->sharedcontenthash) {\n // Update on all shared versions.\n $DB->execute(\"UPDATE {sharedsubpage} SET content=?, name=? WHERE subpageid=?\",\n array($content, sharedsubpage_get_name($subpage->name), $subpage->id));\n // Clear modinfo on all courses that include shared versions.\n $courses = $DB->get_fieldset_sql(\n \"SELECT DISTINCT course FROM {sharedsubpage} WHERE subpageid = ?\",\n array($subpage->id));\n foreach ($courses as $courseid) {\n rebuild_course_cache($courseid, true);\n }\n\n // Update OSEP theme shared subpages.\n if (class_exists('\\mod_oustudyplanshare\\backend')) {\n // Update on all shared versions.\n $DB->execute('UPDATE {oustudyplanshare} SET content = ?, name = ? ' .\n 'WHERE oustudyplansubpageid = ?', array($content,\n \\mod_oustudyplanshare\\backend::get_share_name($subpage->name),\n -$subpage->id));\n // Clear modinfo on all courses that include shared versions.\n $courses = $DB->get_fieldset_sql(\n \"SELECT DISTINCT course FROM {oustudyplanshare} WHERE oustudyplansubpageid = ?\",\n array(-$subpage->id));\n foreach ($courses as $courseid) {\n rebuild_course_cache($courseid, true);\n }\n }\n\n // Set hash so we don't do that again.\n $DB->set_field('subpage', 'sharedcontenthash', $hash, array('id' => $subpage->id));\n }\n }\n // Add the all the sectionids within this subpage to the customdata.\n $info = new cached_cm_info();\n $sectionids = array();\n $sectionstealth = array();\n $sections = $DB->get_records('subpage_sections',\n array('subpageid' => $subpage->id), 'pageorder');\n foreach ($sections as $section) {\n $sectionids[] = $section->sectionid;\n $sectionstealth[$section->sectionid] = $section->stealth;\n }\n $info->customdata = (object)array('sectionids' => $sectionids,\n 'sectionstealth' => $sectionstealth);\n return $info;\n}", "public function get_courses(){\n return $this->courses;\n }", "function list_enrollments ( $CourseID ){\n\tglobal $access_token, $canvas_base_url;\n\t\n\t//get it ready for later\n\t$enrolled=array();\n\t\n\t$url=$canvas_base_url.\"/api/v1/courses/\".$CourseID.\"/enrollments?per_page=100&access_token=\".$access_token;\n\t\n\t// Get cURL resource\n\t$curl = curl_init();\n\t// Set some options - we are passing in a useragent too here\n\tcurl_setopt_array($curl, array(\n\t CURLOPT_RETURNTRANSFER => 1,\n\t CURLOPT_CUSTOMREQUEST => 'GET',\n\t CURLOPT_URL => $url,\n\t CURLOPT_USERAGENT => 'Matt Loves cURLing Things'\n\t));\n\t// Send the request & save response to $resp\n\t$resp = json_decode(curl_exec($curl));\n\t\n\t//print_r($resp);\n\t\n\t// Close request to clear up some resources\n\tcurl_close($curl);\n\n\t$counter=0;\n\tforeach ($resp as $enrollment) {\n\t\tif ($enrollment->type==\"StudentEnrollment\" && $enrollment->user->name != \"Test Student\") {\n\t\t\t$enrolled[$enrollment->user->sis_user_id]=array('name'=>$enrollment->user->name,'id'=>$enrollment->user->sis_user_id,'participations'=>0);\n\t\t}\n\t\t$counter++;\n\t}\t\n\treturn $enrolled;\n}", "public function getData() {\r\n\r\n\t\t$sodexo_domain = 'http://www.sodexo.fi/';\r\n\t\t$path = 'ruokalistat/output/daily_json/';\r\n\r\n\t\tforeach ($this->id_arr as $key => $value) {\r\n\r\n\t\t\t$json_data = file_get_contents($sodexo_domain . $path . $value . '/' . $this->pvm .'/fi');\r\n\r\n\t\t\t$course_info = $this->toObjectArray($json_data);\r\n\t\t\t\r\n\t\t\t$this->id_arr[$key] = $course_info;\r\n\t\t}\r\n\t}", "public function courseStudents()\n {\n $courseClasses=CourseClasses::where('courses_id',$this->id)->get();\n $students = new Collection();\n foreach ($courseClasses as $class){\n $classStudents=Students::where(['classes_id'=>$class->classes_id,'sections_id'=>$class->sections_id])->get();\n $students = $students->merge($classStudents);\n }\n return $students;\n }", "function get_all_courses()\n\t{\n\t\t// fetch all data\n\t\treturn $this->db->query('SELECT * FROM courses')->result_array();\n\t}", "public function category_wise_course_get() {\n $category_id = $_GET['category_id'];\n $courses = $this->api_model->category_wise_course_get($category_id);\n $this->set_response($courses, REST_Controller::HTTP_OK);\n }", "function i4_lms_get_courses() {\n global $wpdb, $wpcwdb;\n\n $SQL = \"SELECT course_id, course_title\n\t\t\tFROM $wpcwdb->courses\n\t\t\tORDER BY course_title ASC\n\t\t\t\";\n\n $courses = $wpdb->get_results($SQL);\n\n return $courses;\n }", "abstract public function retrieve_course_summary_data();", "function i4_get_all_courses() {\n global $wpcwdb, $wpdb;\n\n $course_table_name = $wpdb->prefix . 'wpcw_courses';\n\n $wpdb->show_errors();\n\n $SQL = \"SELECT course_id, course_title FROM $course_table_name ORDER BY course_title\";\n $results = $wpdb->get_results($SQL, OBJECT_K);\n return $this->results_to_course_array($results);\n }", "public function course_object_by_id_get() {\n\t\t$course_id = $_GET['course_id'];\n\t\t$course = $this->crud_model->get_course_by_id($course_id)->row_array();\n\t\t$course['requirements'] = json_decode($course['requirements']);\n\t\t$course['outcomes'] = json_decode($course['outcomes']);\n\t\t$course['thumbnail'] = $this->get_image('course_thumbnail', $course['id']);\n\t\tif ($course['is_free_course'] == 1) {\n\t\t\t$course['price'] = get_phrase('free');\n\t\t}else{\n\t\t\tif ($course['discount_flag'] == 1){\n\t\t\t\t$course['price'] = currency($course['discounted_price']);\n\t\t\t}else{\n\t\t\t\t$course['price'] = currency($course['price']);\n\t\t\t}\n\t\t}\n\t\t$total_rating = $this->crud_model->get_ratings('course', $course['id'], true)->row()->rating;\n\t\t$number_of_ratings = $this->crud_model->get_ratings('course', $course['id'])->num_rows();\n\t\tif ($number_of_ratings > 0) {\n\t\t\t$course['rating'] = ceil($total_rating / $number_of_ratings);\n\t\t}else {\n\t\t\t$course['rating'] = 0;\n\t\t}\n\t\t$course['number_of_ratings'] = $number_of_ratings;\n\t\t$instructor_details = $this->user_model->get_all_user($course['user_id'])->row_array();\n\t\t$course['instructor_name'] = $instructor_details['first_name'].' '.$instructor_details['last_name'];\n\t\t$course['total_enrollment'] = $this->crud_model->enrol_history($course['id'])->num_rows();\n\t\t$course['shareable_link'] = site_url('home/course/'.slugify($course['title']).'/'.$course['id']);\n\t\treturn $course;\n\t}", "public static function getCourses()\n {\n global $cont;\n $courses = $cont->prepare(\"SELECT courses.id AS courseId , courses.title AS title , courses.price AS price , courses.body AS body , courses.image AS `image` , categories.name AS catName FROM courses INNER JOIN categories ON courses.catagory_id = categories.id\");\n $courses->execute();\n return $courses;\n }", "function connect() {\n\t\n\t\n\t\t// if none cache course code info\n\t\tif($this->course_cache === false) {\n\t\t\t\n\t\t\t$this->course_cache = array();\n\t\t\t$search_query = \"\n\t\t\tSELECT idCourse, code, name\n\t\t\tFROM \".$GLOBALS['prefix_lms'].\"_course\";\n\t\t\t$re_course = sql_query($search_query);\n\t\t\tif(!$re_course) return false;\n\t\t\twhile(list($id_course, $code, $name) = sql_fetch_row($re_course)) {\n\t\t\t\t\n\t\t\t\t$this->course_cache[$name]['id'] = $id_course; \n\t\t\t\t$this->course_cache[$name]['course_name'] = $name; \n\t\t\t}\n\t\t}\n\n\n\t\tif($this->test_cache === false) {\n\t\t\t\n\t\t\t$this->test_cache = array();\n\t\t\t$query_test = \"SELECT org.idOrg, org.idCourse, te.idTest, te.title\n\t\t\tFROM \".$GLOBALS['prefix_lms'].\"_organization AS org JOIN \".$GLOBALS['prefix_lms'].\"_test AS te \n\t\t\t\tON ( org.objectType='test' AND org.idResource = te.idTest )\";\n\t\t\t$re_test = sql_query($query_test);\n\t\t\t\n\t\t\t\n\t\t\tif(!$re_test) die($query_test.\" \".mysql_error());//return false;\n\t\t\twhile(list($idOrg, $idCourse, $idTest, $name) = sql_fetch_row($re_test)) {\n\t\t\t\t\n\t\t\t\t$name = strtolower($name);\n\t\t\t\t$this->test_cache[$idCourse.'_'.$name]['id_org'] = $idOrg; \n\t\t\t\t$this->test_cache[$idCourse.'_'.$name]['id_test'] = $idTest; \n\t\t\t}\n\t\t}\n\t\t\n\t\tprint_r($this->test_cache);\n\t}", "public function get_courses(){\n\t\t$query = $this->db->get('course');\n\t\treturn $query->result();\n\t}", "public function getAllCourses()\n {\n $courses = TableRegistry::getTableLocator()->get('Courses');\n $courses = $courses->find('all')->distinct('id')->toArray();\n return $courses;\n }", "function GetCourseList($courseIdFilterRegex = null)\r\n\t{\r\n $maxCount = 0;\r\n $more = null;\r\n $courseList = array();\r\n\r\n $courseListSchema = $this->courseApiClient->getCourses();\r\n do {\r\n //parse the url that is return from newer api\r\n //so that we can get the continuation token (more=)\r\n //and continue another call after this one (if there is more).\r\n $parts = parse_url($courseListSchema->more);\r\n $more = null;\r\n if(array_key_exists(\"query\",$parts))\r\n {\r\n parse_str($parts['query'], $query);\r\n $more = $query['more'];\r\n }\r\n\r\n //loop thru the courses that are returned.\r\n foreach ($courseListSchema->courses as $course)\r\n {\r\n $id = $course->id;\r\n $title = $course->title;\r\n if(isset($courseIdFilterRegex)){\r\n if(!preg_match($courseIdFilterRegex,$id)){\r\n continue;\r\n }\r\n }\r\n\r\n\r\n //since this method was aggregating\r\n //courses we shall keep a hash if we've already\r\n //process the course, since there is\r\n //no registration count returned just set to -1.\r\n //var_dump($course);\r\n if (!array_key_exists($id, $courseList)) {\r\n $courseData = new CourseData(null);\r\n $courseData = $courseData->BuildFromAPI($id, 1, $course->registrationCount,$title);\r\n $courseList[$id] = $courseData;\r\n }\r\n\r\n //count the versions for the given course.\r\n $version = $courseList[$id]->getNumberOfVersions()+1;\r\n $courseList[$id]->setVersions($version);\r\n }\r\n\r\n //count number of calls we are making\r\n // to the newer api, we don't want to exceed\r\n //the max count (see while condition below).\r\n $maxCount++;\r\n\r\n //if there are more courses to get, then get them\r\n //note we stop after the number of calls exceeds\r\n //the MAX_COURSE_LIST_CALLS calls (don't want to kill the server).\r\n if(!is_null($more))\r\n {\r\n $courseListSchema = $this->courseApiClient->getCoursesBySinceByMore('1900-01-17T00:00:00+00:00', $more);\r\n }\r\n }while($more != null && $maxCount <= self::MAX_COURSE_LIST_CALLS);\r\n\r\n\r\n //if there were more, then the last data item that came back, could have the wrong version count.\r\n //so we remove said element. (pop removes last element of an array).\r\n //if(!@is_null($more))\r\n //{\r\n // array_pop($courseList);\r\n //}\r\n //var_dump($courseList);\r\n return array_values($courseList);\r\n\t}", "public function getCourses()\n {\n return $this->courses;\n }", "public function get_all_sections() {\n\t\t$sql = \"SELECT section_id FROM peducator_sections \n\t\tWHERE peducator_id='$this->peducator_id'\";\n\t\t$result = mysqli_query($this->connect_to_db, $sql);\n\n\t\t$arr = [];\n\t\twhile ($row = mysqli_fetch_array($result)) {\n\t\t\tarray_push($arr, get_section($row['section_id']));\n\t\t}\n\n\t\treturn $arr;\t\n\t}", "public function multiLoad_1($where) {\n\t\treturn $this->clean($this->get(self::table, -1, '', $where, array(), array('column' => 'course', 'order' => 'ASC')));\n\t}", "public function getAllSections();", "public static function courses(){\n return Catalog::where('active',1)\n ->where('for_sale', 1)\n ->where('litmos_deleted', 0)\n ->orderBy('name')\n ->lists( 'name', 'id');\n }", "function get_course_infos($courseid, $DB){\n\n\n $final_course_infos=new stdClass();\n\n $course_allowedfields='id,category,fullname,shortname,summary,format,lang,timecreated,timemodified,courseurl';\n $course_allowedfieldsarray=explode(',',$course_allowedfields);\n $category_allowedfields='id,name,description,parent,coursecount,depth,path';\n $category_allowedfieldsarray=explode(',',$category_allowedfields);\n $module_allowedfields='id,course,module,instance,section,added,score,modname,moduleurl';\n $module_allowedfieldsarray=explode(',',$module_allowedfields);\n $moduleinstance_allowedfields='id,course,name,intro,introformat';\n $moduleinstance_allowedfieldsarray=explode(',',$moduleinstance_allowedfields);\n $context_allowedfields='id,contextlevel,instanceid,path,depth';\n $context_allowedfieldsarray=explode(',',$context_allowedfields);\n $file_allowedfields='id,contextid,component,filearea,filepath,filename,filesize,mimetype,source,author,license,timecreated,timemodified,sortorder,referencefileid,fileurl';\n $file_allowedfieldsarray=explode(',',$file_allowedfields);\n $licence_allowedfields='id,shortname,fullname,source,enabled,version';\n $licence_allowedfieldsarray=explode(',',$licence_allowedfields);\n\n $course_mods = get_course_mods($courseid);\n $final_course_infos->course_gen_infos= $DB->get_record('course', array('id' =>$courseid));\n //Addition of 'CourseURl' as attribute\n $final_course_infos->course_gen_infos->courseurl= $GLOBALS['GLBMDL_CFG']->wwwroot.\"/course/view.php?id=\".$final_course_infos->course_gen_infos->id;\n $final_course_infos->course_cat_infos= $DB->get_record('course_categories', array('id' =>$final_course_infos->course_gen_infos->category ));\n\n\n $result = array();\n if($course_mods) {\n foreach($course_mods as $course_mod) {\n\n //Addition of 'ModuleURl' as attribute\n $course_mod->moduleurl= $GLOBALS['GLBMDL_CFG']->wwwroot.\"/mod/\".$course_mod->modname.\"/view.php?id=\".$course_mod->id;\n $course_mod->course_module_instance = $DB->get_record($course_mod->modname, array('id' =>$course_mod->instance ));\n $course_mod->course_module_context = $DB->get_record('context', array('instanceid' =>$course_mod->id, 'contextlevel' => 70 ));\n\n\n $course_mod->course_module_file = $DB->get_record('files', array('contextid' =>$course_mod->course_module_context->id, 'sortorder' => 1));\n $course_mod->course_module_file_licence= null;\n if($course_mod->course_module_file){\n\n $course_mod->course_module_file_licence = $DB->get_record('license', array('shortname' =>$course_mod->course_module_file->license));\n //Addition of 'FileURl' as attribute\n $course_mod->course_module_file->fileurl= $GLOBALS['GLBMDL_CFG']->wwwroot.\"/pluginfile.php/\".$course_mod->course_module_context->id.\"/\".$course_mod->course_module_file->component.\"/\".$course_mod->course_module_file->filearea.\"/\".$course_mod->course_module_file->itemid.$course_mod->course_module_file->filepath.$course_mod->course_module_file->filename;\n\n }\n //$course_mod=module_filesandrelatedlicences($DB, $course_mod, array('content'));\n $result[$course_mod->id] = $course_mod;\n\n }\n }\n $final_course_infos->course_modules=$result;\n $final_course_infos->response_notice=\"Response success\";\n\n //Return only the needed infos: allowed infos to the frontEnd side.\n $finalfinal_course_infos=new stdClass();\n $finalfinal_course_infos->course_gen_infos=json_encode( clean_object($final_course_infos->course_gen_infos, $course_allowedfieldsarray));\n $finalfinal_course_infos->course_cat_infos=json_encode( clean_object($final_course_infos->course_cat_infos, $category_allowedfieldsarray));\n $finalfinal_course_infos->course_modules=null;\n foreach ($final_course_infos->course_modules as $key => $value) {\n\n $finalcoursemodule =new stdClass();\n $finalcoursemodule->course_module_geninfos=clean_object($value, $module_allowedfieldsarray);\n $finalcoursemodule->course_module_instance=clean_object($value->course_module_instance, $moduleinstance_allowedfieldsarray);\n $finalcoursemodule->course_module_context=clean_object($value->course_module_context, $context_allowedfieldsarray);\n $finalcoursemodule->course_module_file=clean_object($value->course_module_file, $file_allowedfieldsarray);\n $finalcoursemodule->course_module_file_licence=clean_object($value->course_module_file_licence, $licence_allowedfieldsarray);\n\n $finalfinal_course_infos->course_modules[\"$key\"]=$finalcoursemodule;\n $finalcoursemodule=null;\n }\n\n\n $finalfinal_course_infos->course_modules= json_encode( $finalfinal_course_infos->course_modules);\n\n return $final_course_infos;\n }", "public static function getMyCourses($id,$needCourseDetail=True)\r\n { \r\n $courses = MyCourses::where('user_id', '=', $id)->get();\r\n foreach ($courses as &$value) {\r\n unset($value->updated_at);\r\n unset($value->created_at);\r\n $enrollment = Enrollment::where('user_id',$id)->where('course_id',$value->course_id)->first();\r\n if($needCourseDetail) {\r\n $course = Course::find($value->course_id);\r\n $value->name = $course->name;\r\n $value->shortDescription = $course->shortDescription;\r\n $value->price = $course->price;\r\n }\r\n if($enrollment) {\r\n $value->enrollment_status = $enrollment->status;\r\n $value->enrollment_status_updated_at = $enrollment->updated_at;\r\n $value->enrollment_at = $enrollment->created_at;\r\n }\r\n }\r\n return json_encode($courses);\r\n }", "private function course_category_updated($event) {\n global $DB;\n $categoryid = $event->objectid;\n $courses = $DB->get_records('course', array('category' => $categoryid), '', 'id, visible');\n\n $insertcalls = array();\n $deletecalls = array();\n\n foreach ($courses as $course) {\n $courseid = $course->id;\n $coursecontext = context_course::instance($courseid);\n\n $users = $this->get_google_authenticated_users($courseid);\n $coursemodinfo = get_fast_modinfo($courseid, -1);\n $cms = $coursemodinfo->get_cms();\n\n foreach ($cms as $cm) {\n $cmid = $cm->id;\n $cmcontext = context_module::instance($cmid);\n $fileids = $this->get_fileids($cmid);\n if ($fileids) {\n foreach ($fileids as $fileid) {\n foreach ($users as $user) {\n if (has_capability('moodle/course:view', $coursecontext, $user->userid)) {\n // Manager; do nothing.\n } elseif (is_enrolled($coursecontext, $user->userid, null, true) && has_capability('moodle/course:manageactivities', $cmcontext, $user->userid)) {\n // Teacher (enrolled) (active); do nothing.\n } elseif (is_enrolled($coursecontext, $user->userid, null, true)) {\n // Student (enrolled) (active); continue checks.\n if ($course->visible == 1) {\n // Course is visible, continue checks.\n rebuild_course_cache($courseid, true);\n $modinfo = get_fast_modinfo($courseid, $user->userid);\n $cminfo = $modinfo->get_cm($cmid);\n $sectionnumber = $this->get_cm_sectionnum($cmid);\n $secinfo = $modinfo->get_section_info($sectionnumber);\n if ($cminfo->uservisible && $secinfo->available) {\n // User can view and access course module and can access section; insert reader permission.\n $call = new stdClass();\n $call->fileid = $fileid;\n $call->gmail = $user->gmail;\n $call->role = 'reader';\n $insertcalls[] = $call;\n if (count($insertcalls) == 1000) {\n $this->batch_insert_permissions($insertcalls);\n $insertcalls = array();\n }\n }\n // User cannot access course module, do nothing (course module availability won't change here).\n } else {\n // Course not visible, delete permission.\n try {\n $permissionid = $this->service->permissions->getIdForEmail($user->gmail);\n $permission = $this->service->permissions->get($fileid, $permissionid->id);\n if ($permission->role != 'owner') {\n $call = new stdClass();\n $call->fileid = $fileid;\n $call->permissionid = $permissionid->id;\n $deletecalls[] = $call;\n if (count($deletecalls) == 1000) {\n $this->batch_delete_permissions($deletecalls);\n $deletecalls = array();\n }\n }\n } catch (Exception $e) {\n debugging($e);\n }\n }\n } else {\n // Unenrolled user; do nothing (user enrolment would not have changed during this event).\n }\n }\n }\n }\n }\n }\n\n // Call any remaining batch requests.\n if (count($insertcalls) > 0) {\n $this->batch_insert_permissions($insertcalls);\n }\n\n if (count($deletecalls) > 0) {\n $this->batch_delete_permissions($deletecalls);\n }\n }", "public function fetchCourses()\n {\n $courses = Course::get();\n\n return DataTables::of($courses)\n ->addColumn('name', function ($course) {\n return $course->name;\n })\n ->addColumn('description', function ($course) {\n return $course->description;\n })\n ->addColumn('duration', function ($course) {\n return $course->duration;\n })\n ->addColumn('level', function ($course) {\n return $course->level;\n })\n ->addColumn('language', function ($course) {\n return $course->language;\n })\n ->addColumn('doctor', function ($course) {\n return $course->doctor->name;\n })\n ->addColumn('doc1', function ($course) {\n return '<a href=\"/courses/courseEvaluations/'.$course->id.'/doc1\" class=\"btn btn-sm btn-info\">Evaluation 1</a>';\n })\n ->addColumn('doc2', function ($course) {\n return '<a href=\"/courses/courseEvaluations/'.$course->id.'/doc2\" class=\"btn btn-sm btn-info\">Evaluation 2</a>';\n })\n ->addColumn('doc3', function ($course) {\n return '<a href=\"/courses/courseEvaluations/'.$course->id.'/doc3\" class=\"btn btn-sm btn-info\">Evaluation 3</a>';\n })\n ->addColumn('lectures_count', function ($course) {\n return $course->lectures_count;\n })\n ->addColumn('students_count', function ($course) {\n return $course->students_count;\n })\n ->addColumn('image', function ($course) {\n return '<img src=\"'.$course->image.'\" style=\"width:60px;\">';\n })\n ->addColumn('action', function ($course) {\n if(Auth::user()->role == \"subAdmin\"){\n return '';\n }\n return '<a class=\"btn action-btn\" href=\\'/courses/edit/'.$course->id.'\\'><span class=\"fa fa-pencil\"></span></a>\n <a class=\"btn action-btn\" onclick=\\'deleteCourse('.$course->id.')\\'><span class=\"fa fa-trash-o\"></span></a>';\n })\n ->rawColumns(['action', 'image', 'doc1', 'doc2', 'doc3'])\n ->make(true);\n }", "function getSplittableCourses($refresh = false) {\n\n if (!$refresh && $this->courses_splittable) {\n return $this->courses_splittable;\n }\n\n $filters = array('crosslist', 'teamteach');\n $this->courses_splittable = $this->getValidSections($filters, true, true, 1);\n return $this->courses_splittable;\n }", "public static function get_all_courses() {\n\n $context = get_context_instance(CONTEXT_SYSTEM);\n self::validate_context($context);\n require_capability('moodle/course:view', $context); \n $courses = glueserver_course_db::glueserver_get_all_courses();\n $returns = array();\n foreach ($courses as $course) {\n $course = new glueserver_course($course);\n $returns[] = $course->get_data();\n }\n return $returns;\n }", "static function getInstructor_Courses() {\n $sql = \"SELECT Distinct Instructor.FirstName,Instructor.LastName,Course.CourseShortName,Course.CourseLongName,\n Instructor_Course.InstructorID,Instructor_Course.CourseID\n FROM Instructor join Course \n join Instructor_Course\n on Instructor.InstructorID=Instructor_Course.InstructorID\n and Instructor_Course.CourseID = Course.CourseID;\";\n\n //Prepare the Query\n self::$_db->query($sql);\n self::$_db->execute();\n //Return the results\n return self::$_db->resultset();\n //Return row\n }", "private function LoadClusterCollection($location, $clusterIDList){\n\t\t$collection = array();\n\t\tif(in_array($location, array('Stage', 'Publish', 'Archive'))){\n\t\t\t$clusterTable = \"CSE\" . $location . \"Clusters\";\n\t\t\t$groupTable = \"CSE\" . $location . \"Groups\";\n\t\t\t$courseTable = \"CSE\" . $location . \"Courses\"; \n\n\t\t\tforeach($clusterIDList as $id) {\n\t\t\t\t$query = \"SELECT * FROM \" . $clusterTable . \" A \n\t\t\t\t\t\t\tLEFT JOIN \" . $groupTable . \" B ON A.recordID = B.clusterID\n\t\t\t\t\t\t\tLEFT JOIN \" . $courseTable . \" C ON B.recordID = C.groupID\n\t\t\t\t\t\t\tWHERE A.recordID = :id\";\n\t\t\t\n\t\t\t\t$bindings = array(':id' => $id);\n\t\n\t\t\t\tif($rows = $this->SelectQueryHelper($query, $bindings)) {\n\t\t\t\t\t$clusterData = array();\n\t\t\t\t\t$clusterGroups = array();\n\t\n\t\t\t\t\t$check = false;\n\t\t\t\t\tforeach($rows as $row) {\n\t\t\t\t\t\tif(!$check) {\n\t\t\t\t\t\t\t$clusterHeader = array( \"clusterNumber\" => $row['clusterNumber'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"expirationTerm\" => $row['expirationTerm'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"title\" => $row['title'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"description\" => $row['description'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"note\" => $row['note'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"academicDiscipline\" => $row['academicDiscipline'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"academicDepartment\" => $row['academicDepartment']);\n\t\n\t\t\t\t\t\t\t$clusterData[\"header\"] = $clusterHeader;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$check = true;\n\t\t\t\t\t\t} \n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!isset($clusterGroups[$row['groupID']])) {\n\t\t\t\t\t\t\t$clusterGroups[$row['groupID']] = array(\"groupDescription\" => $row['groupDescription'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"groupOrder\" => $row['groupOrder'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"courses\" => array());\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t$course = array(\"courseNumber\" => $row['courseNumber'],\n\t\t\t\t\t\t\t\t\t\t\"courseTitle\" => $row['courseTitle'],\n\t\t\t\t\t\t\t\t\t\t\"validStart\" => $row['validStart'],\n\t\t\t\t\t\t\t\t\t\t\"validEnd\" => $row['validEnd'],\n\t\t\t\t\t\t\t\t\t\t\"courseOrder\" => $row['courseOrder']);\n\t\n\t\t\t\t\t\t$clusterGroups[$row['groupID']]['courses'][] = $course;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\n\t\t\t\t\tforeach($clusterGroups as $key => $value)\n\t\t\t\t\t\t$clusterData['groups'][] = $value;\n\t\n\t\t\t\t\t$collection[] = $clusterData;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $collection;\n\t}", "public function courses( $id ){\r\n $select = \"SELECT `courses`.`id`, `courses`.`name` \r\n FROM `courses`\r\n LEFT JOIN `enrollment`\r\n ON `enrollment`.`course_id` = `courses`.`id`\r\n WHERE `enrollment`.`student_id`=:id\";\r\n $sth = $this->db->pdo->prepare($select );\r\n $sth->bindParam( ':id', $id );\r\n $sth->execute();\r\n $result = $sth->fetchAll( PDO::FETCH_ASSOC );\r\n return $result;\r\n }", "public function my_courses_get() {\n $response = array();\n $auth_token = $_GET['auth_token'];\n $logged_in_user_details = json_decode($this->token_data_get($auth_token), true);\n\n if ($logged_in_user_details['user_id'] > 0) {\n $response = $this->api_model->my_courses_get($logged_in_user_details['user_id']);\n }else{\n\n }\n return $this->set_response($response, REST_Controller::HTTP_OK);\n }", "public static function fill_subscription_cache_for_course($courseid, $userid) {\n global $DB;\n\n if (!isset(self::$reactforumcache[$userid])) {\n self::$reactforumcache[$userid] = array();\n }\n\n $sql = \"SELECT\n f.id AS reactforumid,\n s.id AS subscriptionid\n FROM {reactforum} f\n LEFT JOIN {reactforum_subscriptions} s ON (s.reactforum = f.id AND s.userid = :userid)\n WHERE f.course = :course\n AND f.forcesubscribe <> :subscriptionforced\";\n\n $subscriptions = $DB->get_recordset_sql($sql, array(\n 'course' => $courseid,\n 'userid' => $userid,\n 'subscriptionforced' => REACTFORUM_FORCESUBSCRIBE,\n ));\n\n foreach ($subscriptions as $id => $data) {\n self::$reactforumcache[$userid][$id] = !empty($data->subscriptionid);\n }\n $subscriptions->close();\n }", "function load_product_info()\n {\n if (self::get_total_number_of_courses() > 0) {\n //cycle through course(s), load productInfo if available\n foreach ($this->courses as $key => $course) {\n $this->courses[$key] = array_merge($course,$this->get_product_info($course['course_id']));\n foreach ($course['modules'] as $module){\n $course['modules'][$module['module_id']]['product_info'] = $this->get_product_info($module['module_id']);\n }\n }\n }\n }", "public function index(Course $course)\n {\n $sections = $course->sections;\n\n return SectionResource::collection($sections);\n }", "public function frontpage_available_courses() {\n\n global $CFG , $DB;\n $coursecontainer = '';\n $chelper = new coursecat_helper();\n $chelper->set_show_courses(self::COURSECAT_SHOW_COURSES_EXPANDED)->set_courses_display_options( array(\n 'recursive' => true,\n 'limit' => $CFG->frontpagecourselimit,\n 'viewmoreurl' => new moodle_url('/course/index.php'),\n 'viewmoretext' => new lang_string('fulllistofcourses')\n ));\n\n $chelper->set_attributes( array( 'class' => 'frontpage-course-list-all frontpageblock-theme' ) );\n\n $courses = core_course_category::get(0)->get_courses( $chelper->get_courses_display_options() );\n\n $totalcount = core_course_category::get(0)->get_courses_count( $chelper->get_courses_display_options() );\n\n $rcourseids = array_keys( $courses );\n\n //$acourseids = array_chunk( $rcourseids, 6);\n $acourseids = $rcourseids;\n $tcount = count($acourseids);\n\n $newcourse = get_string( 'availablecourses' );\n $header = \"\";\n $header .= html_writer::tag('div', \"<div></div>\", array('class' => 'bgtrans-overlay'));\n\n $header .= html_writer::start_tag('div',\n array( 'class' => 'available-courses', 'id' => 'available-courses') );\n $header .= html_writer::start_tag('div', array( 'class' => 'available-overlay' ) );\n $header .= html_writer::start_tag('div', array( 'class' => 'available-block' ) );\n $header .= html_writer::start_tag('div', array('class' => 'container'));\n $header .= html_writer::tag('h2', get_string('availablecourses'));\n\n /* if ($tcount > '1') {\n $header .= html_writer::start_tag('div', array('class' => 'pagenav slider-nav') );\n $header .= html_writer::tag('button', '', array('class' => 'slick-prev nav-item previous', 'type' => 'button') );\n $header .= html_writer::tag('button', '', array('class' => 'slick-next nav-item next', 'type' => 'button') );\n $header .= html_writer::tag('div', '', array('class' => 'clearfix') );\n $header .= html_writer::end_tag('div');\n }*/\n $sliderclass = 'course-slider';\n $header .= html_writer::start_tag('div', array('class' => 'row') );\n $header .= html_writer::start_tag('div', array( 'class' => \" $sliderclass col-md-12\") );\n\n $footer = html_writer::end_tag('div');\n $footer .= html_writer::end_tag('div');\n $footer .= html_writer::end_tag('div');\n $footer .= html_writer::end_tag('div');\n if (count($rcourseids) > 0) {\n $i = '0';\n /* foreach ($acourseids as $courseids) {\n\n $rowcontent = '<div class=\"slider-row \">';*/\n $rowcontent = '';\n foreach ($acourseids as $courseid) {\n $container = '';\n $course = get_course($courseid);\n $noimgurl = $this->output->image_url('no-image', 'theme');\n $courseurl = new moodle_url('/course/view.php', array('id' => $courseid ));\n\n if ($course instanceof stdClass) {\n $course = new core_course_list_element($course);\n }\n\n $imgurl = '';\n $context = context_course::instance($course->id);\n\n foreach ($course->get_course_overviewfiles() as $file) {\n $isimage = $file->is_valid_image();\n $imgurl = file_encode_url(\"$CFG->wwwroot/pluginfile.php\",\n '/'. $file->get_contextid(). '/'. $file->get_component(). '/'.\n $file->get_filearea(). $file->get_filepath(). $file->get_filename(), !$isimage);\n if (!$isimage) {\n $imgurl = $noimgurl;\n }\n }\n\n if (empty($imgurl)) {\n $imgurl = $noimgurl;\n }\n\n $container .= html_writer::start_tag('div', array( 'class' => 'col-md-2') );\n $container .= html_writer::start_tag('div', array( 'class' => 'available-content'));\n $container .= html_writer::start_tag('div', array( 'class' => 'available-img'));\n\n $container .= html_writer::start_tag('a', array( 'href' => $courseurl) );\n $container .= html_writer::empty_tag('img',\n array(\n 'src' => $imgurl,\n 'width' => \"249\",\n 'height' => \"200\",\n 'alt' => $course->get_formatted_name() ) );\n $container .= html_writer::end_tag('a');\n $container .= html_writer::end_tag('div');\n $container .= html_writer::tag('h6', html_writer::tag('a',\n $course->get_formatted_name(),\n array( 'href' => $courseurl ) ),\n array('class' => 'title-text') );\n $container .= html_writer::end_tag('div');\n $container .= html_writer::end_tag('div');\n\n $rowcontent .= $container;\n }\n $i++;\n /*$rowcontent .= html_writer::end_tag('div');*/\n $coursecontainer .= $rowcontent;\n // }\n\n }\n $footer .= html_writer::end_tag('div');\n $footer .= html_writer::end_tag('div');\n $coursehtml = $header.$coursecontainer.$footer;\n return $coursehtml;\n\n if (!$totalcount && !$this->page->user_is_editing() && has_capability('moodle/course:create', context_system::instance())) {\n // Print link to create a new course, for the 1st available category.\n echo $this->add_new_course_button();\n }\n }", "public function get_all_courses() {\n\t\t$sql = \"SELECT course_id FROM peducator_courses \n\t\tWHERE peducator_id='$this->peducator_id'\";\n\t\t$result = mysqli_query($this->connect_to_db, $sql);\n\n\t\t$arr = [];\n\t\twhile ($row = mysqli_fetch_array($result)) {\n\t\t\tarray_push($arr, get_course($row['course_id']));\n\t\t}\n\n\t\treturn $arr;\n\n\t}", "private function get_section_data() {\n\t\t$sections = apply_filters( 'toolset_get_troubleshooting_sections', array() );\n\t\t\n\t\tif( !is_array( $sections ) ) {\n\t\t\t$sections = array();\n\t\t}\n\t\t\n\t\treturn $sections;\n\t}", "public function meCourses()\n {\n return Course::where('user_id', Auth::user()->id)->simplePaginate(10);\n }", "function turnitintooltwo_get_courses_from_tii($tiiintegrationids, $coursetitle, $courseintegration,\n $courseenddate = null, $requestsource = \"mod\") {\n global $CFG, $DB, $OUTPUT, $USER;\n set_time_limit(0);\n\n $_SESSION[\"stored_tii_courses\"] = array();\n $return = array();\n $return[\"aaData\"] = array();\n $secho = optional_param('sEcho', 0, PARAM_INT);\n\n $ssortdir = optional_param('sSortDir_0', 'desc', PARAM_ALPHA);\n $isortcol = optional_param('iSortCol_0', '6', PARAM_INT);\n\n $turnitincomms = new turnitintooltwo_comms();\n $turnitincall = $turnitincomms->initialise_api();\n\n $class = new TiiClass();\n $class->setTitle($coursetitle);\n if ($courseenddate != null) {\n $class->setDateFrom(gmdate(\"Y-m-d\", strtotime($courseenddate)).'T00:00:00Z' );\n }\n if (array_key_exists($courseintegration, $tiiintegrationids)) {\n $class->setIntegrationId($courseintegration);\n }\n\n if (!is_siteadmin()) {\n $turnitintooltwouser = new turnitintooltwo_user($USER->id, 'Instructor');\n $tiiinstructorid = $turnitintooltwouser->tiiuserid;\n $class->setUserId($tiiinstructorid);\n $class->setUserRole('Instructor');\n }\n\n try {\n $response = $turnitincall->findClasses($class);\n $findclass = $response->getClass();\n $classids = $findclass->getClassIds();\n\n } catch (Exception $e) {\n turnitintooltwo_activitylog(get_string('migrationcoursegeterror', 'turnitintooltwo'), \"REQUEST\");\n $classids = array();\n }\n\n // Get currently linked courses.\n $currentcourses = array();\n if (!empty($classids)) {\n list($insql, $inparams) = $DB->get_in_or_equal($classids);\n\n $currentcourses[\"PP\"] = $DB->get_records_sql(\"SELECT tc.turnitin_cid FROM {turnitintooltwo_courses} tc \".\n \"RIGHT JOIN {course} c ON c.id = tc.courseid \".\n \"WHERE tc.course_type = 'PP' AND tc.turnitin_cid \".$insql, $inparams);\n\n $currentcourses[\"TT\"] = $DB->get_records_sql(\"SELECT tc.turnitin_cid FROM {turnitintooltwo_courses} tc \".\n \"RIGHT JOIN {course} c ON c.id = tc.courseid \".\n \"WHERE tc.course_type = 'TT' AND tc.turnitin_cid \".$insql, $inparams);\n }\n\n $class = new TiiClass();\n $class->setClassIds($classids);\n\n $tiicourses = array();\n $i = 0;\n if (!empty($classids)) {\n try {\n $response = $turnitincall->readClasses($class);\n $readclasses = $response->getClasses();\n\n foreach ($readclasses as $readclass) {\n if (array_key_exists($readclass->getIntegrationId(), $tiiintegrationids)) {\n $_SESSION[\"stored_tii_courses\"][$readclass->getClassId()] = $readclass->getTitle();\n\n // If we're coming from block we don't need any information, just the number of records.\n if ($requestsource == \"mod\") {\n $linkpage = (is_siteadmin()) ? \"settings_extras.php\" : \"extras.php\";\n\n $titlecell = html_writer::link($CFG->wwwroot.'/mod/turnitintooltwo/'.$linkpage.\n '?cmd=class_recreation&id='.$readclass->getClassId().\n '&view_context=box&sesskey='.sesskey(),\n $readclass->getTitle(), array(\"class\" => \"course_recreate\",\n \"id\" => \"course_\".$readclass->getClassId()));\n $datecell = html_writer::link('.mod_turnitintooltwo_edit_course_end_date_form',\n html_writer::tag('span',\n userdate(strtotime($readclass->getEndDate()),\n get_string('strftimedate', 'langconfig')),\n array(\"id\" => $readclass->getClassId().\"_\".\n gmdate(\"j\", strtotime($readclass->getEndDate())).\"_\".\n gmdate(\"n\", strtotime($readclass->getEndDate())).\"_\".\n gmdate(\"Y\", strtotime($readclass->getEndDate())))).\" \".\n html_writer::tag('i', '', array('class' => 'fa fa-pencil fa-lg grey')),\n array(\"class\" => \"edit_course_end_link\", \"id\" => \"course_date_\".$readclass->getClassId()));\n\n $checkbox = '';\n $class = '';\n if (empty($currentcourses[\"PP\"][$readclass->getClassId()]) &&\n empty($currentcourses[\"TT\"][$readclass->getClassId()])) {\n $class = 'hidden_class';\n $checkbox = html_writer::checkbox('check_'.$readclass->getClassId(), $readclass->getClassId(),\n false, '', array(\"class\" => \"browser_checkbox\"));\n }\n\n $moodlecell = $OUTPUT->pix_icon('tick', get_string('moodlelinked', 'turnitintooltwo'),\n 'mod_turnitintooltwo', array('class' => $class, 'id' => 'tick_'.$readclass->getClassId()));\n\n $tiicourses[$i] = array($checkbox, $titlecell, $tiiintegrationids[$readclass->getIntegrationId()],\n $datecell, $readclass->getClassId(), $moodlecell, $readclass->getTitle(),\n userdate(strtotime($readclass->getEndDate()),\n get_string('strftimedate', 'langconfig')));\n }\n $i++;\n\n // Keep course names in case of course recreation.\n $_SESSION['tii_classes'][$readclass->getClassId()] = $readclass->getTitle();\n }\n }\n\n if (count($tiicourses) > 0 && $requestsource == \"mod\") {\n turnitintooltwo_sort_array($tiicourses, $isortcol, $ssortdir);\n\n $j = 0;\n foreach ($tiicourses as $class) {\n $return[\"aaData\"][$j] = $class;\n $j++;\n }\n }\n\n } catch (Exception $e) {\n $turnitincomms->handle_exceptions($e, 'coursegettiierror');\n }\n }\n\n $return[\"iTotalRecords\"] = $i;\n $return[\"iTotalDisplayRecords\"] = $i;\n $return[\"sEcho\"] = $secho;\n $return[\"blockHTML\"] = ($i == 0) ? '' : get_string('coursestomigrate', 'mod_turnitintooltwo', $i);\n\n return $return;\n}", "function _prime_site_caches($ids, $update_meta_cache = \\true)\n {\n }", "public function get_grade_items($sectionIds = NULL, $startDate = NULL, $endDate = NULL) {\r\n\r\n \r\n //Note: A unique ID must always be the first column in the result. Otherwise $DV->get_records_sql \r\n // will group up the results by whatever the first column is.\r\n global $DB;\r\n $sql = \"select \r\n {grade_items}.id,\r\n {grade_items}.categoryid, \r\n {grade_items}.itemname, \r\n {grade_items}.itemtype, \r\n {grade_items}.itemmodule, \r\n {grade_items}.itemnumber, \r\n {grade_items}.grademax,\r\n {course}.idnumber as SectionId\r\n from \r\n {grade_items}, \r\n {course} \r\n where \r\n {course}.id = courseid and ({grade_items}.itemtype = 'mod' OR {grade_items}.itemtype = 'manual' or {grade_items}.itemtype='course')\";\r\n\r\n //Add the additional criteria to the query\r\n\r\n $addAnd = \" and \";\r\n $params = array ();\r\n //die(var_export($sectionIds,true));\r\n // Add sectionIds to the query\r\n if (strlen($sectionIds) > 0) {\r\n //add quotes to incoming list\r\n $SectionIdList = explode(\",\", $sectionIds);\r\n $firstInList = true;\r\n $SectionOutput = \"\";\r\n foreach ($SectionIdList as $id) {\r\n if ($firstInList) {\r\n $firstInList = false;\r\n } else {\r\n $SectionOutput .= \",\";\r\n }\r\n\r\n $SectionOutput .= \"'\" . clean_param($id, PARAM_TEXT) . \"'\";\r\n }\r\n\r\n $sql .= $addAnd . \" {course}.idnumber in ( $SectionOutput ) \";\r\n }\r\n\r\n //Add the start date to the query\r\n if ($startDate != null) {\r\n $sql .= $addAnd . \" {grade_items}.timemodified > ? \";\r\n $params[] = $startDate;\r\n }\r\n //Add the end date to the query\r\n if ($endDate != null) {\r\n $sql .= $addAnd . \" {grade_items}.timemodified < ? \";\r\n $params[] = $endDate;\r\n }\r\n\r\n //TODO: how to format this error\r\n if (count($params) < 1) {\r\n throw new Exception(\"Error, atleast one parameter is required\");\r\n }\r\n\r\n $data = $DB->get_records_sql($sql, $params);\r\n\r\n $response = array ();\r\n foreach ($data as $item) {\r\n $dataresponse = array (\r\n 'item' => array (\r\n 'id' => $item->id,\r\n 'categoryid' => $item->categoryid,\r\n 'itemtype' => $item->itemtype,\r\n 'itemname' => $item->itemname,\r\n 'grademax' => $item->grademax,\r\n 'sectionid' => $item->sectionid,\r\n 'itemmodule' => $item->itemmodule\r\n )\r\n );\r\n $response[] = $dataresponse;\r\n }\r\n\r\n return $this->response->standard($response);\r\n }", "public function getCourses ($username) {\t\t\t\n\t\t\t$user = mysql_real_escape_string($username);\n $query = \"SELECT DISTINCT Enrollments.course_id FROM Courses, Enrollments WHERE Enrollments.user_id = '\" . $user . \"';\"; \n if (($result = $this->dbm->query($query)) == null) { \n return null;\n }\n else { \n if (mysql_num_rows($result) == 0) { \n $courses = null;\n }\n // Iterate as long as we have rows in the result set \n $courses = array();\n while ($row = mysql_fetch_assoc($result)) { \n array_push($courses, $row['course_id']);\n } \n return $courses;\n }\n }", "function cache_set($cid, $data, $table = 'cache', $expire = CACHE_PERMANENT, $headers = NULL) {\n global $trampoline_cache;\n\n //Use a simple variable based cache.\n //Cache will automatically expire after request completion\n if (!isset($trampoline_cache)) {\n $trampoline_cache = array();\n }\n $trampoline_cache[$table.'_'.$cid] = $data;\n}", "public function preloadIds()\n\t{\n\t\tif (func_num_args() == 1) {\n\t\t\t$keys = (array)func_get_arg(1);\n\t\t} else {\n\t\t\t$keys = func_get_args();\n\t\t}\n\n\t\tforeach ($keys as &$k) {\n\t\t\tif (!array_key_exists($k, $this->loaded)) {\n\t\t\t\t$k = $this->id_prefix . $k;\n\t\t\t} else {\n\t\t\t\t$k = 0;\n\t\t\t}\n\t\t}\n\t\tunset($k);\n\n\t\t$keys = Arrays::removeFalsey($keys);\n\t\tif (!$keys) {\n\t\t\treturn;\n\t\t}\n\n\t\t$keys_in = \"'\" . implode(\"','\", $keys) . \"'\";\n\n\t\t$date = date('Y-m-d H:i:s');\n\n\t\ttry {\n\t\t\t$records = $this->db->fetchAll(\"\n\t\t\t\tSELECT id, data\n\t\t\t\tFROM cache\n\t\t\t\tWHERE id IN ($keys_in) AND (date_expire IS NULL OR date_expire > ?)\n\t\t\t\", array($date));\n\t\t} catch (\\Exception $e) {\n\t\t\t$records = array();\n\t\t\tif (!$this->silence_exceptions) {\n\t\t\t\tthrow $e;\n\t\t\t}\n\t\t}\n\n\t\t$got_keys = array();\n\t\tforeach ($records as $rec) {\n\t\t\t$got_keys[$rec['id']];\n\t\t\t$this->loaded[$rec['id']] = $rec['data'];\n\t\t}\n\n\t\t// Fill loaded with nulls for keys we know are missing\n\t\tif (count($got_keys) != count($keys)) {\n\t\t\t$missing_keys = array_diff($keys, $got_keys);\n\t\t\tforeach ($missing_keys as $k) {\n\t\t\t\t$this->loaded[$k] = null;\n\t\t\t}\n\t\t}\n\t}", "public static function getCourses($idUser)\r\n { \r\n $app = \\Slim\\Slim::getInstance();\r\n if (!User::find($idUser)) {\r\n $app->response->setStatus(400);\r\n return \"User does not exist\";\r\n }\r\n $courses = Course::where('isPublished',1)->get();\r\n foreach ($courses as &$value) {\r\n unset($value->isPublished);\r\n $enrollment = User::find($idUser)->enrollment()->where('course_id',$value->id)->first();\r\n unset($enrollment->user_id);\r\n unset($enrollment->course_id);\r\n $value->enrollment = $enrollment;\r\n $value->saved = MyCourses::where('user_id',$idUser)->where('course_id',$value->id)->count();\r\n //$value->info = Course::find($value->idCourse);\r\n }\r\n return json_encode($courses);\r\n }", "public function getByCriteria() {\n $ret = array();\n $sql = \"SELECT DISTINCT C.courseID FROM Course C INNER JOIN Section S ON C.courseID=S.courseID WHERE S.sessionYear = :sessionYear AND S.sessionCode = :sessionCode AND S.term = :term\";\n $params = array(':sessionCode' => $this->code, ':sessionYear' => $this->year, ':term' => $this->term);\n foreach($this->filters as $name => $val) {\n $sql .= ' AND '.$name.'=:'.$name;\n $params[':'.$name] = $val;\n }\n $stmt = $this->conn->prepare($sql);\n $stmt->execute($params);\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $ret[] = new Course($row['courseID'], $this->head);\n echo $row['courseID'];\n }\n return $ret;\n return (!empty($ret)) ? $ret : false;\n }", "private function getSections() {\n\t\t$sections = array();\n\t\tforeach (Craft::$app->getSections()->getEditableSections() as $section) {\n\t\t\t$sections[$section->id] =['value'=>$section->handle, 'label' =>Craft::t('site',$section->name)];\n\t\t}\n\t\treturn $sections;\n\t}", "public function get_course_students($params) {\n global $DB, $PAGE;\n\n if(isset($params['report_params'])) {\n $reportparams = json_decode($params['report_params'], true);\n } else {\n $reportparams = [];\n }\n\n $limit = 0;\n $offset = 0;\n\n /** Limit and offset */\n if(isset($reportparams['limit'])) {\n $limit = $reportparams['limit'];\n }\n\n if(isset($reportparams['offset'])) {\n $offset = $reportparams['offset'];\n }\n\n $where = \"cx.contextlevel = :courselvl AND cx.instanceid > 1\";\n $sqlparams = ['courselvl' => CONTEXT_COURSE];\n\n if (!empty($reportparams['courses'])) {\n $coursesfilter = new in_filter($reportparams['courses'], \"crsc\");\n $where .= ' AND cx.instanceid ' . $coursesfilter->get_sql();\n $sqlparams = array_merge($coursesfilter->get_params(), $sqlparams);\n }\n\n if ($reportparams['inactive_users'] == 0) {\n $enroljoin = 'JOIN {enrol} e ON e.courseid = c.id\n JOIN {user_enrolments} ue ON ue.userid = u.id AND ue.enrolid = e.id';\n $sqlenrolfilter = 'AND ue.status = 0';\n } else {\n $enroljoin = $sqlenrolfilter = '';\n }\n\n $rolefilter = new in_filter($this->get_student_roles(), \"srole\");\n list($sql, $sqlparams) = $this->buildSqlRequest(\n \"SELECT CONCAT(u.id, '_', c.id) AS unique_f, u.*, c.id AS course_id,\n c.shortname AS course_short_name, c.fullname AS course_full_name, gg.finalgrade AS grade, gi.grademax AS grademax\n FROM {context} cx\n JOIN {role_assignments} ra ON ra.contextid = cx.id AND\n ra.roleid \" . $rolefilter->get_sql() . \"\n JOIN {user} u ON u.id = ra.userid\n JOIN {course} c ON c.id = cx.instanceid\n {$enroljoin}\n LEFT JOIN {grade_items} gi ON gi.courseid = c.id AND gi.itemtype = 'course'\n LEFT JOIN {grade_grades} gg ON gg.itemid = gi.id AND gg.userid = u.id\n WHERE {$where} {$sqlenrolfilter}\n GROUP BY u.id, c.id, gg.finalgrade, gi.grademax\",\n array_merge($sqlparams, $rolefilter->get_params()),\n $reportparams\n );\n\n $students = $DB->get_records_sql($sql, $sqlparams, $offset, $limit);\n\n foreach($students as &$student) {\n $user_picture = new user_picture($student);\n $user_picture->size = 100;\n $student->picture = $user_picture->get_url($PAGE)->out();\n }\n\n return $students;\n }", "private function getCourses($year, $quarter, $em, $parents) {\n if (!$parents) {\n $repo = $em->getRepository('CCDataBundle:Curriculum');\n $parents = $repo->findBy(array());\n }\n\n $courses = [];\n // for each curricula\n foreach($parents as $curriculum) {\n\n // get all courses\n $url = 'https://ws.admin.washington.edu/student/v4/public/course.json'.\n '?year='.$year.\n '&quarter='.$quarter.\n '&future_terms=0'.\n '&curriculum_abbreviation='.rawurlencode($curriculum->getAbbreviation()).\n '&page_size=500';\n $data = $this->getJsonObject($url);\n\n // then split each \n $courseChunks = array_chunk($data->Courses, 100);\n foreach($courseChunks as $courseChunk) {\n $urlArray = [];\n foreach($courseChunk as $chunk) {\n $courseUrl = 'https://ws.admin.washington.edu/student/v4/public/course/'.\n $year.','.\n $quarter.','.\n rawurlencode($curriculum->getAbbreviation()).','.\n $chunk->CourseNumber.'.json';\n $urlArray[] = $courseUrl;\n }\n $result = $this->getJsonObjects($urlArray);\n\n foreach($result as $course) {\n $crs = new Course();\n $crs->setNumber($course->CourseNumber)\n ->setTitle($course->CourseTitle)\n ->setLongTitle($course->CourseTitleLong)\n ->setCurriculum($curriculum)\n ->setDescription($course->CourseDescription)\n ->setCreditControl($course->CreditControl)\n ->setGradingSystem($course->GradingSystem)\n ->setMaxCredits($course->MaximumCredit)\n ->setMaxTermCredits($course->MaximumTermCredit)\n ->setMinTermCredits($course->MinimumTermCredit)\n ->setGenEd($course->GeneralEducationRequirements);\n $em->merge($crs);\n\n $courses[] = $crs;\n }\n }\n $em->flush();\n }\n return $courses;\n }", "function cicleinscription_get_courses_by_cicle_and_courseid($courseid, $cicleinscriptionid){\n\tglobal $DB;\n\t$sql = \"SELECT\n\t\t\t\tccp.*,\n\t\t\t\tc.fullname,\n\t\t\t\tc.shortname\n\t\t\tFROM \n\t\t\t\tmdl_ci_course_prematriculation as ccp\n\t\t\tINNER JOIN\n\t\t\t\tmdl_course c\n\t\t\tON\n\t\t\t\tc.id = ccp.courseid\n\t\t\tWHERE \n\t\t\t\tccp.cicleinscriptionid = ? AND ccp.courseid = ?\";\n\treturn $DB->get_record_sql($sql, array($cicleinscriptionid, $courseid));\n}", "function get_video_course_ids () {\n\t$ids = array();\n\t$courses = get_user_paid_orders(); // Get paid courses IDs (products)\n\t\n\tif ( !empty($courses) ) { // If user have purchased courses\n\t\tforeach ($courses as $j => $product_id) {\n\t\t\tif (have_rows('lesson', $product_id)) {\n\t\t\t\t$i = 1; // Inner counter from 1 because haven't free lesson\n\t\t\t\twhile (have_rows('lesson', $product_id)) {\n\t\t\t\t\tthe_row();\n\t\t\t\t\t$ids[\"courseVideo_$j\" . \"_$i\"] = get_sub_field('video_id');\n\t\t\t\t\t$i += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn $ids;\n}", "public static function get_sections_course_returns() {\n return new external_multiple_structure(\n glueserver_section::get_class_structure()\n );\n }", "function get_course_infos_clean( $courseid ){\n\n $DB=$GLOBALS['GLBMDL_DB'];\n return cleanresponse_course_infos( get_course_infos($courseid, $DB) );\n\n }", "public static function courses()\n {\n return Course::all()->toArray();\n }", "function spr_get_sections() {\n\tglobal $spr_sql_fields;\n\n\t$sql_tables = safe_pfx('txp_section');\n\t$rs = safe_query(\"SELECT \".$spr_sql_fields.\" FROM \".$sql_tables.\" WHERE name != 'default' ORDER BY name\");\n\twhile ($a = nextRow($rs)) {\n\t\textract($a); // set 'name','title','parent' etc in $a\n\t\t$out[$name] = $a;\n\t}\n\treturn $out;\n}", "function get_tag_resources($tag, $course = null) {\n global $DB, $OUTPUT;\n\n $resources = array();\n if ($course) {\n $modinfo = get_fast_modinfo($course);\n $sql = \"SELECT cm.id as cmid, cm.section as sectionid, cs.name as sectionname\n FROM mdl_tag_instance tagi\n JOIN mdl_course_modules cm ON cm.id = tagi.itemid\n JOIN mdl_course_sections cs ON cs.id = cm.section\n WHERE tagi.itemtype like 'course_modules' AND cm.course = $course->id AND tagi.tagid = $tag->id AND cm.visible = 1\n ORDER BY cm.section\";\n $items = $DB->get_recordset_sql($sql);\n\n foreach ($items as $item) {\n $resources[$item->sectionid][] = $modinfo->get_cm($item->cmid);\n }\n\n return $resources;\n } else {\n $items = course_get_tagged_course_modules($tag);\n $resources = $items;\n }\n\n return $resources;\n}", "public function getSections(): iterable;", "public function getAllSectionsRefData()\n {\n if (empty($this->allSectionsRefData)) {\n $this->allSectionsRefData =\n $this->refDataService->fetchListOptions(\n 'submission_section'\n );\n }\n\n return $this->allSectionsRefData;\n }", "public function get_section_items( $section_id ) {\n\t\t$course = learn_press_get_course( $this->course_id );\n\n\t\t$sections = $course->get_curriculum_raw();\n\n\t\t$return = array();\n\n\t\tif ( ! empty( $sections ) ) {\n\t\t\tforeach ( $sections as $section ) {\n\t\t\t\tif ( $section['id'] == $section_id ) {\n\t\t\t\t\tif ( isset( $section['items'] ) && is_array( $section['items'] ) ) {\n\t\t\t\t\t\t$return = $section['items'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tLP_Object_Cache::set( 'course-' . $this->course_id . '-' . $section_id, $return, 'learn-press/course-section-items' );\n\n\t\treturn $return;\n\t}", "public function getCoursesByFieldId($id = false) {\n\t\t\t// Database Connection\n\t\t\t$db\t\t\t\t= $GLOBALS['db_q'];\n\t\t\t// Initialize variables\n\t\t\t$return\t\t\t= false;\n\t\t\t// Query set up\t\n\t\t\t$table\t\t\t= 'tb_course';\n\t\t\t$select_what\t= 'id, vc_course AS vc_name';\n\t\t\t$conditions\t\t= \"id_field = {$id} ORDER BY vc_course ASC\";\n\t\t\t$return\t\t\t= ($id) ? $db->getAllRows_Arr($table, $select_what, $conditions) : false;\n\t\t\t// Return\n\t\t\treturn $return;\n\t\t}", "public function __invoke(Request $request)\n {\n $user = Auth::user();\n $rs = [];\n if ($user->role == UserRole::Instructor) {\n $courses = $user->ownerCourses;\n $courseIds = $courses->pluck('id');\n\n $sections = Section::whereIn('course_id', $courseIds)->get();\n $sectionIds = $sections->pluck('id');\n\n $liveLessons = LiveLesson::with('section:id,course_id', 'section.course:id')->select('id', 'name', 'start_time', 'end_time', 'section_id')\n ->whereIn('section_id', $sectionIds)->get();\n\n } else if ($user->role == UserRole::Admin) {\n $courses = Course::get();\n $courseIds = $courses->pluck('id');\n\n $sections = Section::whereIn('course_id', $courseIds)->get();\n $sectionIds = $sections->pluck('id');\n\n $liveLessons = LiveLesson::with('section:id,course_id', 'section.course:id')->select('id', 'name', 'start_time', 'end_time', 'section_id')\n ->whereIn('section_id', $sectionIds)->get();\n } else {\n $liveLessons = LiveLesson::with('section:id,course_id', 'section.course:id')->select('id', 'name', 'start_time', 'end_time', 'section_id')->whereIn('section_id', function ($query) use ($user) {\n $query->select('sections.id')->from('sections')\n ->whereIn('course_id', function ($query) use ($user) {\n $query->select('course_id')->from('course_student')\n ->where('student_id', $user->id);\n });\n })->get();\n\n $courses = $user->boughtCourses;\n $courseIds = $courses->pluck('id');\n\n $sections = Section::whereIn('course_id', $courseIds)->get();\n $sectionIds = $sections->pluck('id');\n\n $liveLessons = LiveLesson::with('section:id,course_id', 'section.course:id')->select('id', 'name', 'start_time', 'end_time', 'section_id')\n ->whereIn('section_id', $sectionIds)->get();\n }\n return response()->json([\n 'status' => 'success',\n 'schedules' => ScheduleResource::collection($liveLessons),\n 'courseResources' => CourseScheduleResource::collection($courses),\n 'sectionResources' => SectionScheduleResource::collection($sections)\n ]);\n }", "abstract protected function cacheData();", "public function articlesSectionCategories()\n\t{\n\t\terror_reporting(0);\n\t\t$input = new JInput;\n\t\t$secId = $input->get('secId', '', 'int');\n\n\t\t$model = & $this->getModel('mediafile');\n\t\t$items = & $model->getArticlesSectionCategories($secId);\n\n\t\treturn $items;\n\t}", "function components_rebuildcache()\n\t{\n\t\t$this->ipsclass->cache['components'] = array();\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'com_id,com_enabled,com_section,com_filename,com_url_uri,com_url_title,com_position',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'components',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'com_enabled=1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'order' => 'com_position ASC' ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\twhile ( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$this->ipsclass->cache['components'][] = $r;\n\t\t}\n\n\t\t$this->ipsclass->update_cache( array( 'name' => 'components', 'array' => 1, 'deletefirst' => 1 ) );\n\t}", "private function initData()\n {\n $data = $this->cache->load($this->cacheId);\n if (false === $data) {\n /** @var Reader $reader */\n $reader = $this->readerFactory->create(\n ['fileName' => sprintf(self::SEARCH_PATTERN, $this->componentName)]\n );\n $data = $reader->read();\n $this->cache->save($this->serializer->serialize($data), $this->cacheId);\n } else {\n $data = $this->serializer->unserialize($data);\n }\n\n if (!empty($data)) {\n $this->data[$this->componentName] = [Converter::DATA_ATTRIBUTES_KEY => ['name' => $this->componentName]];\n $this->merge([$this->componentName => $data]);\n $this->data = $this->evaluateComponentArguments($this->data);\n }\n }", "private function collectData()\n {\n return $this->cache->remember('Moloni_MaturityDates', function() {\n $availableMaturityDates = $this->maturityDatesApi->getAll(CredentialsInterface::MOLONI_CREDENTIALS_COMPANYID);\n\n $maturityDates = [];\n\n foreach($availableMaturityDates as $maturityDate) {\n $maturityDates[$maturityDate['days']] = $maturityDate['maturity_date_id'];\n }\n\n return $maturityDates;\n });\n }", "public function course_request_by_id($request_id){\n\t\t\t$load = new Load();\n\t\t\t$request_model = $load->model('course_request_model');\n\t\t\t$request_info = $request_model->get_all_course_request_by_id('course_request',$request_id);\n \n\t\t\treturn $request_info;\n\t\t}", "function get_e2l_courses($USER){\n $_SESSION['offset'] = 0;\n\n $servername = \"localhost\";\n $username = \"moodleuser\";\n $password = \"password\";\n $dbname = \"moodle\";\n\n // Create connection\n $conn = mysqli_connect($servername, $username, $password, $dbname);\n\n // Check connection\n if (!$conn) {\n die(\"Connection failed: \" . mysqli_connect_error());\n } \n\n /*GET ALL ENROLLED CLASSES FOR A STUDENT*/\n/* $sql = \"SELECT mc.id as id, mu.id as uid, mc.fullname \".\n \"FROM mdl_user as mu, mdl_course as mc, mdl_user_students as mus \".\n\t \"WHERE mu.id = mus.userid \".\n\t \"AND mus.course = mc.id \".\n\t \"AND mu.id = \".$USER->id.\" order by mc.id\";*/\n\n //ALL COURSES NOT IN THE 'Tasks' CATEGORY\t \n $sql = \"SELECT mc.id as id, mu.id as uid, mc.fullname \".\n \"FROM mdl_user as mu, mdl_course as mc, mdl_user_students as mus, mdl_course_categories as mcc \".\n \"WHERE mu.id = mus.userid \".\n \"AND mus.course = mc.id \".\n \"AND mu.id = \".$USER->id.\" \".\n \"AND mc.category = mcc.id \".\n \"AND mcc.name = 'Tasks' order by mc.id\";\t \n\n //(select id, name from mdl_lesson where course=7) union (select id, name from mdl_assignment where course=7) order by id;\n $result = mysqli_query($conn, $sql);\n\n echo \"<table class=\\\"left_box\\\">\";\n echo \"<tr><td id=\\\"parent_box\\\">\";\n echo \"<div>\";\n echo \"<div id=\\\"course_label\\\"><b>Tasks:</b></div>\";\n $entries = mysqli_num_rows($result); \n if ($entries > 0) {\n while($row = mysqli_fetch_assoc($result)) {\n\t $arr[] = $row[\"id\"];\n\t echo \"<div class=\\\"e2l_tasks e2l_font\\\" id=\\\"e2l_\".$row['id'].\"\\\" onmouseout=\\\"end_hilite(\".$row[\"id\"].\")\\\" onmouseover=\\\"start_hilite(\".$row[\"id\"].\")\\\" onclick=\\\"generate_tasks(\".$row[\"id\"].\")\\\">\". $row[\"fullname\"].\"</div>\";\n }\n }\n echo \"</div>\";\n echo \"</td></tr>\";\n echo \"</table>\";\n/* echo \"<table border='0' style='width:100%; height: 665px; background: #CDF3F3; border-radius: 25px; margin: 0px;'>\";\n echo \"<tr><th style=\\\"width: 252px; height: 41px\\\">TASK NAME:</th></tr>\";\n echo \"<tr><td style=\\\"width: 252px; height: 41px\\\">&nbsp;</td></tr>\";\n $entries = mysqli_num_rows($result); \n if ($entries > 0) {\n // output data of each row\n\n while($row = mysqli_fetch_assoc($result)) {\n\t $arr[] = $row[\"id\"];\n// echo \"<tr ><td style=\\\"width: 252px; height: 42px\\\"><div onclick='( generate_lessons(\".$row[\"id\"].\") )'><center>\". $row[\"fullname\"].\"</center></div></td><tr>\";\n echo \"<tr id=\\\"e2l_courses\\\" ><td style=\\\"width: 252px; height: 41px\\\" onclick='( generate_tasks(\".$row[\"id\"].\") )'><div style='padding-left: 20px;'>\". $row[\"fullname\"].\"</div></td><tr>\";\n\n }\n } else {\n echo \"<tr><td style=\\\"width: 252px; height: 41px\\\" colspan='1'>No Enrolled Courses:</td></tr>\";\n }\n $total = 12;\n while($entries < $total){\n $entries++;\n echo \"<tr><td style=\\\"width: 252px; height: 41px\\\">&nbsp;</td></tr>\"; \n }\n echo \"<tr><td style=\\\"width: 252px; height: 41px\\\">&nbsp;</td></tr>\";\n echo \"</table>\";*/\n\n \n\n mysqli_close($conn); \n echo \"<script>window.onload = function() { init_hilite(\".$arr[0].\"); }</script>\";\n return $arr[0];\n}", "public function run()\n\t{\n\t\tDB::table('course_sections')->delete();\n\n\t\t$course_sections = array(\n array(\n 'id' => '1CCN1M',\n 'num_section' => 1,\n 'course_id' => '1CC',\n 'turn_id' => 'TM101',\n 'classroom_id' => 'CR101'\n ),\n array(\n 'id' => '1CCN2M',\n 'num_section' => 2,\n 'course_id' => '1CC',\n 'turn_id' => 'TM101',\n 'classroom_id' => 'CR112'\n ),\n array(\n 'id' => '2CCN1M',\n 'num_section' => 1,\n 'course_id' => '2CC',\n 'turn_id' => 'TM102',\n 'classroom_id' => 'CR112'\n )\n\t\t);\n\n\t\t// Uncomment the below to run the seeder\n\t\tDB::table('course_sections')->insert($course_sections);\n\t}", "function get_course_data($from, $number_of_items, $column, $direction)\r\n{\r\n\t$course_table = Database :: get_main_table(TABLE_MAIN_COURSE);\r\n\t$users_table = Database :: get_main_table(TABLE_MAIN_USER);\r\n\t$course_users_table = Database :: get_main_table(TABLE_MAIN_COURSE_USER);\r\n\t$diplomas_course_table = Database :: get_main_table(TABLE_DIPLOMAS_COURSES);\r\n \r\n\t$sql = \"SELECT c.code AS col0,\r\n\t c.visual_code AS col1,\r\n\t\t\t\t c.title AS col2,\r\n\t\t\t\t c.course_language AS col3,\r\n\t\t\t\t\t c.category_code AS col4,\r\n\t\t\t\t\t c.subscribe AS col5,\r\n\t\t\t\t\t c.unsubscribe AS col6,\r\n\t\t\t\t\t c.code AS col7,\r\n\t\t\t\t\t\t c.tutor_name as col8,\r\n\t\t\t\t\t\t c.code AS col9,\r\n\t\t\t\t\t\t c.visibility AS col10,\r\n\t\t\t\t\t\t c.expiration_date AS col11,\r\n d.design_id as col12\r\n\t\t\tFROM $course_table c,$diplomas_course_table d where c.code=d.course_code\";\r\n\tif (isset ($_GET['keyword']))\r\n\t{\r\n\t\t$keyword = Database::escape_string($_GET['keyword']);\r\n\t\t$sql .= \" and d.course_code LIKE '%\".$keyword.\"%'\";\r\n\t}\r\n\telseif (isset ($_GET['keyword_code']))\r\n\t{\r\n\t\t$keyword_code = Database::escape_string($_GET['keyword_code']);\r\n\t\t$sql .= \" AND d.course_code LIKE '%\".$keyword_code.\"%'\";\r\n\t}\r\n\t$sql .= \" LIMIT $from,$number_of_items\";\r\n\t$res = api_sql_query($sql, __FILE__, __LINE__);\r\n\t$courses = array ();\r\n\t\r\n\r\n\twhile ($course = Database::fetch_row($res))\r\n\t{\r\n $herramientas = ' <a target=\"_self\" href=\"courses_edit.php?code='. $course[1] . '\"><img title=\"'. get_lang(\"edit\").'\" src=\"../../img/edit.gif\"></a> <a target=\"_self\" href=\"courses.php?action=delete&code='. $course[1] . '\"><img title=\"'. get_lang(\"delete\").'\" src=\"../../img/delete.gif\" return false;\" onclick=\"javascript:if(!confirm('.\"'\".addslashes(htmlentities(get_lang(\"Confirmdelete\"),ENT_QUOTES,$charset)).\"'\".'))\"></a>';\r\n \r\n\t\t\r\n\t\t$course[1] = get_course_visibility_icon($course[10]).$course[1];\r\n\t\t$course[5] = $course[5] == SUBSCRIBE_ALLOWED ? get_lang('Yes') : get_lang('No');\r\n\t\t// $course[6] = $course[6] == UNSUBSCRIBE_ALLOWED ? get_lang('Yes') : get_lang('No');\r\n // Get design\r\n $design_table = Database :: get_main_table(TABLE_DIPLOMAS_DESIGN);\r\n $sql = \"select * from $design_table where id=\" . $course[12];\r\n $res2 = api_sql_query($sql, __FILE__, __LINE__);\r\n $design = Database::fetch_row($res2);\r\n \r\n if (count($design)>1)\r\n {\r\n $course[6] = $design[2] . ' | <a href=\"design/' . $design[1] .'\" target=\"_blank\">Ver imagen</a>'; \r\n }\r\n else\r\n {\r\n $course[6] = \"-\";\r\n }\r\n \r\n \r\n\t\t$course[7] = CourseManager :: is_virtual_course_from_system_code($course[7]) ? get_lang('Yes') : get_lang('No');\r\n\t\t$course_rem = array($course[1] . ' / ' . $course[2],$course[3],$course[4],$course[5],$course[6],$course[8],$herramientas);\r\n\t\t$courses[] = $course_rem;\r\n\t}\r\n\treturn $courses;\r\n}", "function i4_get_assigned_courses($user_id) {\n global $wpcwdb, $wpdb;\n\n $wpdb->show_errors();\n //SELECT `course_title` FROM `wp_wpcw_user_courses` LEFT JOIN wp_wpcw_courses ON wp_wpcw_user_courses.course_id=wp_wpcw_courses.course_id WHERE `user_id`= 3\n\n $SQL = $wpdb->prepare(\"SELECT $wpcwdb->courses.course_id, $wpcwdb->courses.course_title FROM $wpcwdb->user_courses LEFT JOIN $wpcwdb->courses ON $wpcwdb->user_courses.course_id=$wpcwdb->courses.course_id WHERE user_id = %d ORDER BY LOWER($wpcwdb->courses.course_title)\", $user_id);\n $results = $wpdb->get_results($SQL, OBJECT_K);\n return $this->results_to_course_array($results);\n }", "public function getCoursesByInstructor($id)\n {\n $courses = $this->coursesService->getCoursesByInstructor($id);\n $statuscode = ($courses) ? 200 : 404;\n $allData = [];\n $allData['status'] = ($courses) ? true : false;\n $allData['message'] = ($courses) ? 'All Courses' : 'No courses Found';\n $allData['errors'] = [];\n $allData['data'] = $courses;\n\n return response()->json($allData,$statuscode);\n }", "private function get_current_info($courseid) {\n $info = array();\n\n $currentroles = $this->get_current_roles($courseid);\n foreach ($currentroles as $role) {\n if (!isset($info[$role->courseid])) {\n $info[$role->courseid] = array();\n }\n\n if (isset($info[$role->courseid][$role->username])) {\n $infoblock = $info[$role->courseid][$role->username];\n } else {\n $infoblock = new \\stdClass();\n $infoblock->roles = array();\n $infoblock->enrols = array();\n }\n\n $infoblock->userid = $role->userid;\n $infoblock->roles[$role->roleid] = $role;\n\n $info[$role->courseid][$role->username] = $infoblock;\n }\n unset($currentroles);\n\n $currentenrols = $this->get_current_enrols($courseid);\n foreach ($currentenrols as $enrol) {\n if (!isset($info[$enrol->courseid])) {\n $info[$enrol->courseid] = array();\n }\n\n if (isset($info[$enrol->courseid][$enrol->username])) {\n $infoblock = $info[$enrol->courseid][$enrol->username];\n } else {\n $infoblock = new \\stdClass();\n $infoblock->enrols = array();\n $infoblock->roles = array();\n }\n\n $infoblock->userid = $enrol->userid;\n $infoblock->enrols[$enrol->enrolid] = $enrol->enrol;\n\n $info[$enrol->courseid][$enrol->username] = $infoblock;\n }\n unset($currentenrols);\n\n return $info;\n }" ]
[ "0.59357667", "0.59320796", "0.5871032", "0.57993835", "0.5718446", "0.55946755", "0.5591114", "0.55224067", "0.54742247", "0.5418272", "0.53859776", "0.53786755", "0.5375423", "0.53107166", "0.5306244", "0.5278273", "0.5261577", "0.52611536", "0.5258073", "0.52108526", "0.51950586", "0.5182428", "0.5154209", "0.5148223", "0.51342034", "0.51181215", "0.5116807", "0.51117235", "0.5106187", "0.5091786", "0.5085536", "0.5073822", "0.505512", "0.50539947", "0.5050539", "0.50494224", "0.50459623", "0.503448", "0.5029013", "0.5019913", "0.501638", "0.5015396", "0.5007151", "0.5004186", "0.50023156", "0.5000262", "0.49974975", "0.49861506", "0.49697962", "0.49261525", "0.48985118", "0.48945865", "0.48910865", "0.48897433", "0.48888925", "0.48880738", "0.48750532", "0.48720586", "0.48618564", "0.48611093", "0.4860299", "0.48593584", "0.48537153", "0.48484915", "0.48452917", "0.48368812", "0.48333618", "0.48313355", "0.48294222", "0.48240504", "0.48224247", "0.48216313", "0.48137045", "0.48120898", "0.48106685", "0.48085538", "0.4805285", "0.48042023", "0.48039338", "0.48038656", "0.47995904", "0.4799331", "0.4778818", "0.47758868", "0.47753805", "0.4766246", "0.47660425", "0.47609267", "0.47583845", "0.47577056", "0.47447306", "0.47410867", "0.4739382", "0.47344893", "0.47334617", "0.4729743", "0.47292835", "0.4727179", "0.47165132", "0.47106603" ]
0.7451631
0
Read all items from DB
public function read_items( $section_id ) { global $wpdb; $query = $wpdb->prepare( " SELECT item_id id FROM {$wpdb->learnpress_section_items} si INNER JOIN {$wpdb->learnpress_sections} s ON si.section_id = s.section_id INNER JOIN {$wpdb->posts} c ON c.ID = s.section_course_id INNER JOIN {$wpdb->posts} it ON it.ID = si.item_id WHERE s.section_id = %d AND it.post_status = %s ORDER BY si.item_order, si.section_item_id ASC ", $section_id, 'publish' ); return $wpdb->get_col( $query ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function readAll(){\n $rq = \"SELECT * FROM Objets\";\n $stmt = $this->pdo->prepare($rq);\n $data = array();\n if(!$stmt->execute($data)){\n throw new Exception($pdo->errorInfo());\n }\n return $result = $stmt->fetchAll();\n }", "public function readAll()\n {\n $sql = 'SELECT id_producto, nombre_producto, descripcion_producto, precio_producto, imagen_producto, stock, nombre_marca, estado_producto \n FROM productos INNER JOIN marca USING(id_marca) \n ORDER BY nombre_producto';\n $params = null;\n return Database::getRows($sql, $params);\n }", "public function readDatabase() {\n\t\t$q = $this->pdo->query(\"SELECT count(*) FROM `Articles`\");\n\t\t$count = $q->fetch(PDO::FETCH_ASSOC)[\"count(*)\"];\n\t\t$numFetched = 0;\n\t\t$start = 0;\n\t\t// Fetch only 50 articles at a time to limit the memory impact\n\t\twhile($numFetched < $count){\n\t\t\t$q = $this->pdo->query(\"SELECT \".$this->columns.\" FROM `Articles` LIMIT $start,100\");\n\t\t\tforeach($q->fetchAll(PDO::FETCH_ASSOC) as $a){\n\t\t\t\t$this->articles[] = $this->makeArticleFromDB($a);\n\t\t\t\t$numFetched += 1;\n\t\t\t}\n\t\t\t$start += 100;\n\t\t}\n\t}", "public function readItems() {\r\n include('connect.php');\r\n\r\n $query = \"SELECT *\r\n FROM Items\r\n WHERE CharItem_id = ?\";\r\n $myquery = $db->prepare($query);\r\n $myquery->bindValue(1, $this->charStats->Char_id);\r\n $myquery->execute();\r\n while ($result = $myquery->fetchObject()) {\r\n $this->items[] = new Item($result->Item_id, $result->ItemName, $result->ItemWeight, $result->ItemValue, $result->ItemType);\r\n }\r\n }", "public function readAll();", "public function readAll(){\r\n $query = \"SELECT * FROM docente;\";\r\n $statement = $this->cdb->prepare($query);\r\n $statement->execute();\r\n $rows = $statement->fetchAll(\\PDO::FETCH_OBJ);\r\n return $rows; \r\n }", "public function readAll()\n {\n $read = $this->find()->fetch(true);\n\n if ($read) {\n $this->Result = $read;\n $this->Error = \"Sucesso!\";\n } else {\n $this->Result = false;\n $this->Error = \"Não foi possível consultar!\";\n }\n }", "function readAll(){\n\n\t\t$query = \"SELECT * FROM \" . $this->table_name .\"\";\n\t\t$stmt = $this->conn->prepare($query);\n\t\t$stmt->execute();\n\t\treturn $stmt;\n\t}", "function readAll() {\n $query = \"SELECT \n id, name, description\n FROM\n \" . $this->table_name . \" \n ORDER BY\n name\";\n\n $stmt = $this->conn->prepare($query);\n\n //execute query\n $stmt->execute();\n\n return $stmt;\n }", "public function readAll ()\n {\n\n $query = \"SELECT\n book_id,type_id,name,isbn,author,publisher,price\n FROM \". \" $this->table_name \";\n\n\n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n// $row = $stmt->fetch(PDO::FETCH_ASSOC);\n return $stmt;\n }", "public function getAll(){\n\t\t\t//return $this->db->get('item'); \n\t\t}", "private function readAll(){\r\n $results = array();\r\n \r\n if ( null !== $this->getDB() ) {\r\n $dbs = $this->getDB()->prepare('select * from about_page');\r\n \r\n if ( $dbs->execute() && $dbs->rowCount() > 0 ) {\r\n $results = $dbs->fetchAll(PDO::FETCH_ASSOC);\r\n }\r\n \r\n } \r\n return $results;\r\n }", "public function retrieveItems() {\n $this->all = array();\n $this->_backlog = array();\n $this->_progress = array();\n $this->_done = array();\n $table_name = \"items\";\n $connection = db_connect();\n if ($connection->connect_error) {\n die(\"Connection failed: \" . $connection->connect_error);\n }\n $sql = \"SELECT * FROM $table_name ORDER BY id\";\n $result = @mysqli_query($connection, $sql) or die(mysqli_error($connection));\n while ($row = mysqli_fetch_array($result)) {\n $id = $row['id'];\n $category = $row['category'];\n $text = $row['text'];\n $item = new Item($id, $category, $text);\n array_push($this->all, $item);\n if ($category == 1) {\n array_push($this->_backlog, $item);\n } else if ($category == 2) {\n array_push($this->_progress, $item);\n } else if ($category == 3) {\n array_push($this->_done, $item);\n }\n }\n }", "public static function readAll() {\n try {\n $database = SModel::getInstance();\n $query = \"select * from producteur\";\n $statement = $database->prepare($query);\n $statement->execute();\n $results = $statement->fetchAll(PDO::FETCH_CLASS, \"ModelProducteur\");\n return $results;\n } catch (PDOException $e) {\n printf(\"%s - %s<p/>\\n\", $e->getCode(), $e->getMessage());\n return NULL;\n }\n }", "public function read()\n {\n $query = $this->queryBuilder->new($this->entityName)\n ->select()\n ->get();\n\n return $this->executeQueryForMultipleResults($query);\n }", "public function readAll(){\n //select all data\n $query = \"SELECT\n id, num_compte, cle_rib, num_agence, duree_epargne, frais, solde, created\n FROM\n \" . $this->table_name . \"\n ORDER BY\n num_compte\";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n \n return $stmt;\n }", "function read_all_items() {\n $db = GetGlobal('db');\n\t $lan = GetReq('lan')>=0?GetReq('lan'):getlocal();\t//in case of post sitemap set lan param uri \n\t $itmname = $lan?'itmname':'itmfname';\n\t $itmdescr = $lan?'itmdescr':'itmfdescr';\t \n\t $start = GetReq('start');\n\t //$headcat = GetReq('headcat')?GetReq('headcat'):\"\";\t \n\t //$meter = $start?$start-1:0; \t \n\t \n\t \t\n $sSQL = \"select id,itmname,itmfname,cat0,cat1,cat2,cat3,cat4,itmdescr,itmfdescr,itmremark,\".$this->getmapf('code').\" from products \";\n\t $sSQL .= \" WHERE \";\n\t $sSQL .= \"itmactive>0 and active>0 \";\t\n\t //$sSQL .= \" GROUP BY cat0,$itmname\";\n\t $sSQL .= \" ORDER BY cat0,cat1,cat2,cat3,cat4,$itmname asc \";\n\t $sSQL .= $start ? \" LIMIT $start,10000\" : \" LIMIT 10000\";\t\t\t\n\t //echo $sSQL;\n\t\t\n\t $resultset = $db->Execute($sSQL,2);\t\n\t // $result = $resultset;\n\t $this->result = $resultset; \n \t $this->max_items = $db->Affected_Rows();//count($this->result);\t \n return (null);//$this->max_items);\t\t \n\t}", "abstract protected function doFetchAll();", "public abstract function fetchAll();", "function readAll(){\n \n $query = \"SELECT * FROM \".$this->table_name.\" ORDER BY id_alternatif ASC\";\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n\n return $stmt;\n }", "public function readAll(){\n\t\t\t$req = \"SELECT recette.idRec, recette.nom AS lib, descriptif, difficulte, prix, nbPersonnes, \n\t\t\t\t\tdureePreparation, dureeCuisson, dureeTotale, qteCalories, qteProteines, qteGlucides, qteLipides, \n\t\t\t\t\tutilisateur.nom AS utilNom, utilisateur.prenom AS utilprenom, illustration.adresse\n\t\t\t\t\tFROM recette \n\t\t\t\t\tINNER JOIN utilisateur\n\t\t\t\t\tON recette.idUtil = utilisateur.idUtil\n\t\t\t\t\tINNER JOIN illustration\n\t\t\t\t\tON recette.idRec = illustration.idRec\n\t\t\t\t\tORDER BY recette.nom ASC\";\n\t\t\t$curseur=$this->cx->query($req);\n\t\t\treturn $curseur;\n\t\t}", "public function read()\n {\n $query = \"SELECT * FROM category \";\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n $rows = $stmt->fetchAll();\n return $rows;\n }", "function read(){\n //select all data\n $query = \"SELECT * FROM \" . $this->table_name . \" ORDER BY id\";\n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n return $stmt;\n }", "public abstract function fetchAllObjects();", "function fetch_all() {\n $query = \"SELECT * FROM ReadingList\";\n $statement = $this->connect->prepare($query);\n if($statement->execute()) {\n while($row = $statement->fetch(PDO::FETCH_ASSOC))\n {\n $data[] = $row;\n }\n return $data;\n } else {\n return \"error\";\n }\n }", "function readAll(){\r\n $query = \"SELECT SubjectID, SubjectName\r\n FROM \" . $this->table_name . \r\n \" ORDER BY SubjectName\";\r\n \r\n $stmt = $this->dbConn->prepare( $query );\r\n $stmt->execute();\r\n \r\n return $stmt;\r\n }", "public function readall(){ //read\r\n\r\n $sql=\"select * from proveedor\";\r\n $resul=mysqli_query($this->con(),$sql);\r\n while($row=mysqli_fetch_assoc($resul)){\r\n $this->proveedores[]=$row;\r\n }\r\n return $this->proveedores;\r\n }", "function readItems() {return $this->_items;}", "function database_load_all()\n {\n if( !is_resource($this->_last_resource) )\n {\n return FALSE;\n }\n \n $resource = $this->_last_resource;\n $return_data = array();\n while( $data = $this->database_fetch_assoc($resource) )\n {\n $return_data[] = $data;\n }\n \n return $return_data;\n\t}", "public function readAll(){\r\n\t\t\treturn $this->pessoaModel->readAll();\r\n\t\t}", "function read(){\n \n // select all query\n $query = \"SELECT * from \" . $this->table_name . \"\";\n \n // prepare query statement\n $stmt = $this->conn->prepare($query);\n \n // execute query\n $stmt->execute();\n \n return $stmt;\n }", "public function fetchAll();", "public function fetchAll();", "public function fetchAll();", "public function fetchAll();", "public function load()\n {\n $pdo = $this->getDbConnection();\n $query = \"SELECT * FROM {$this->dbTable}\";\n $data = $pdo->query($query)->fetchAll(\\PDO::FETCH_ASSOC);\n\n foreach ($data as ['key' => $key, 'value' => $value]) {\n $this->setData($key, $value);\n }\n }", "public function get_all_items()\r\n\t{\r\n\t\t$sql = \"SELECT *\r\n\t\t\t\tFROM tbl_item i\r\n\t\t\t\tORDER by i.item_id DESC\r\n\t\t\";\r\n\t\t$result = $this->getRows($sql);\r\n\t\treturn $result;\r\n\t}", "public function read() {\n\n //create query\n //$query = 'SELECT * FROM products ORDER BY created_at DESC';\n $query = \"SELECT * FROM $this->table ORDER BY created_at DESC\";\n \n $stmt = $this->conn->prepare($query);\n\n $stmt->execute();\n \n $result = $stmt->get_result();\n \n //fetch resulting as array\n $products = mysqli_fetch_all($result, MYSQLI_ASSOC);\n\n return $products; \n \n }", "function readAll()\n {\n }", "public function read()\n {\n // select all data\n $query = \"SELECT `id`,`name` from `\" . $this->table_name . \"` order by `name`;\";\n // $stmt = $this->conn->prepare($query);\n // var_dump($stmt);\n $q= 'select * from `categories`;';\n $stmt = ($this->conn)->query($q);\n \n $stmt->execute();\n \n return $stmt;\n }", "public static function getAll(){\n\t\t$sql = \"select * from \".self::$tablename;\n\t\t$query = Executor::doit($sql);\n\t\treturn Model::many($query[0],new TemparioData());\n\t}", "function readAll() {\r\n $todo = [];\r\n $sql = 'SELECT id, nombre\r\n FROM deportes\r\n ORDER BY nombre';\r\n $stmt = $this->pdo->prepare($sql);\r\n $stmt->execute();\r\n while ($datos = $stmt->fetch()) {\r\n $todo[] = $this->convertRecord($datos);\r\n }\r\n return $todo;\r\n }", "public function get_all()\n {\n $stm = $this->prepare(\"select * from readings where system_id = 1\");\n $stm->execute();\n $res = $stm->fetchAll(PDO::FETCH_CLASS); // returns array of objects\n log($res);\n if (count($res) > 0)\n return $res;\n else\n return FALSE;\n }", "public function readAll()\n {\n\n \t$list = $this->dao->readAll();\n\n if (!is_array($list) && $list != false){ // si no hay nada cargado, readall devuelve false\n $array[] = $list; \n $list = $array; // para que devuelva un arreglo en caso de haber solo 1 objeto // esto para cuando queremos hacer foreach al listar, ya que no se puede hacer foreach sobre un objeto ni sobre un false\n }\n\n return $list;\n }", "public function readAll( ) {\n\n\t\treturn $this->_data;\n\t}", "public function ReadAll() {\n\t\t\t$sql = \"\n\t\t\t\tSELECT\n\t\t\t\t\t t1.id,\n\t\t\t\t\t t1.tipo_funcionario,\n\t\t\t\t\t t1.nome,\n\t\t\t\t\t t1.idade,\n\t\t\t\t\t t1.genero,\n\t\t\t\t\t t1.email,\n\t\t\t\t\t t1.cpf,\n\t\t\t\t\t t1.celular,\n\t\t\t\t\t t1.senha\n\t\t\t\tFROM\n\t\t\t\t\tfuncionarios AS t1\n\n\n\t\t\t\";\n\n\n\t\t\t$DB = new DB();\n\t\t\t$DB->open();\n\t\t\t$Data = $DB->fetchData($sql);\n\t\t\t$realData;\n\t\t\tif($Data ==NULL){\n\t\t\t\t$realData = $Data;\n\t\t\t}\n\t\t\telse{\n\n\t\t\t\tforeach($Data as $itemData){\n\t\t\t\t\tif(is_bool($itemData)) continue;\n\t\t\t\t\telse{\n\t\t\t\t\t\t$realData[] = $itemData;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$DB->close();\n\t\t\treturn $realData;\n\t\t}", "public function getAll()\n {\n $sql = \"SELECT * FROM \" . self::table . \";\";\n\n $conn = $this->dbc->Get();\n $statement = $conn->prepare($sql);\n $statement->execute();\n $data = $statement->fetchAll();\n $conn = null;\n\n return $data;\n }", "function ReadAll(){\n\n\t\t//Instanciamos y nos conectamos a la bd\n\t\t$Conexion = floopets_BD::Connect();\n\t\t$Conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t//Crear el query que vamos a realizar\n\t\t$consulta = \"SELECT tipo_denuncia.*,denuncia.* FROM denuncia INNER JOIN tipo_denuncia ON denuncia.td_cod_tipo_denuncia=tipo_denuncia.td_cod_tipo_denuncia WHERE denuncia.de_estado='Pendiente'\";\n\t\t$query = $Conexion->prepare($consulta);\n\t\t$query->execute();\n\t\t//Devolvemos el resultado en un arreglo\n\t\t//Fetch: es el resultado que arroja la consulta en forma de un vector o matriz segun sea el caso\n\t\t//Para consultar donde arroja mas de un dato el fatch debe ir acompañado con la palabra ALL\n\t\t$resultado = $query->fetchALL(PDO::FETCH_BOTH);\n\t\treturn $resultado;\n\t\tfloopets_BD::Disconnect();\n\t}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM recibo';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function read(){\n \n //select all data\n $query = \"SELECT\n id, id, num_compte, cle_rib, duree_epargne, frais, solde, created\n FROM\n \" . $this->table_name . \"\n ORDER BY\n created\";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n \n return $stmt;\n }", "public function ReadAll() {\r\n\t\t$sql = \"\r\n\t\tSELECT\r\n\t\tt1.id,\r\n\t\tt1.,\r\n\t\tt1.cpf,\r\n\t\tt1.email,\r\n\t\tt1.status\r\n\t\tFROM\r\n\t\tredefinicao_senha AS t1\r\n\t\t\r\n\r\n\t\t\";\r\n\t\t\r\n\t\t\r\n\t\t$DB = new DB();\r\n\t\t$DB->open();\r\n\t\t$Data = $DB->fetchData($sql);\r\n\t\t$realData;\r\n\t\tif($Data ==NULL){\r\n\t\t\t$realData = $Data;\r\n\t\t}\r\n\t\telse{\r\n\t\t\t\r\n\t\t\tforeach($Data as $itemData){\r\n\t\t\t\tif(is_bool($itemData)) continue;\r\n\t\t\t\telse{\r\n\t\t\t\t\t$realData[] = $itemData;\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$DB->close();\r\n\t\treturn $realData; \r\n\t}", "public function read(){\n try {\n // query to get all users\n $this->_query = \"SELECT * FROM \" . $this->_dbtable;\n\n //preparing query\n $statement = $this->_conn->prepare($this->_query);\n\n // executing query\n $statement->execute();\n\n return $statement;\n }\n catch(PDOException $ex){\n echo \"Error\" . $ex->getMessage();\n }\n }", "public function fetchAll(){\n $adapter = $this->adapter;\n $sql = new Sql($this->adapter);\n $select = $sql->select();\n $select->from('flota');\n $selectString = $sql->getSqlStringForSqlObject($select);\n $data = $adapter->query($selectString, $adapter::QUERY_MODE_EXECUTE);\n \n return $data;\n }", "function getItems($db, $resource_pk) {\r\n\r\n $prefix = DB_TABLENAME_PREFIX;\r\n $sql = <<< EOD\r\nSELECT i.item_pk, i.item_title, i.item_text, i.item_url, i.max_rating mr, i.step st, i.visible vis, i.sequence seq,\r\n i.created cr, i.updated upd, COUNT(r.user_pk) num, SUM(r.rating) total\r\nFROM {$prefix}item i LEFT OUTER JOIN {$prefix}rating r ON i.item_pk = r.item_pk\r\nWHERE (i.resource_link_pk = :resource_pk)\r\nGROUP BY i.item_pk, i.item_title, i.item_text, i.item_url, i.max_rating, i.step, i.visible, i.sequence, i.created, i.updated\r\nORDER BY i.sequence\r\nEOD;\r\n\r\n $query = $db->prepare($sql);\r\n $query->bindValue('resource_pk', $resource_pk, PDO::PARAM_INT);\r\n $query->execute();\r\n\r\n $rows = $query->fetchAll(PDO::FETCH_CLASS, 'Item');\r\n if ($rows === FALSE) {\r\n $rows = array();\r\n }\r\n\r\n return $rows;\r\n\r\n }", "function read_all(){\n \n // select all query\n $query = \"SELECT\n *\n FROM\n \" . $this->table_name . \"\n ORDER BY\n date DESC\";\n //SELECT id, username, date, content, IF(private, 'true', 'false') private\n \n // prepare query statement\n $stmt = $this->conn->prepare($query);\n \n // execute query\n $stmt->execute();\n \n return $stmt;\n }", "protected function fetchStorageRecords() {}", "public function readAll() {\n $this->query = \"\n SELECT *\n FROM chistes\n \";\n\n $this->get_results_from_query();\n\n if (count($this->rows) > 1) {\n $this->mensaje = \"Chistes encontrados\";\n }\n else {\n $this->mensaje = \"Chistes no encontrados\";\n }\n\n return $this->rows;\n }", "public function read(){\n $query = \"SELECT ordine.id_ordine, ordine.id_fornitore, fornitore.nome as fornitore, ordine.articolo, articolo.taglia, ordine.stato \n FROM \" . $this->table_name . \" LEFT JOIN fornitore ON ordine.id_fornitore = fornitore.id_fornitore INNER JOIN articolo ON ordine.id_ordine = articolo.id_ordine\";\n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n return $stmt;\n }", "public function getAll(){\n\t\treturn $this->db->get($this->table);\n\t}", "public function readAll()\n {\n $query = 'SELECT * FROM '.$this->table;\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n\n $categories = array();\n $num = $stmt->rowCount();\n if ($num > 0) {\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n array_push($categories, $row);\n }\n }\n return $categories;\n }", "abstract public function getAll();", "abstract public function getAll();", "abstract public function getAll();", "public function get()\n {\n return self::fetchAll();\n }", "static public function getAll()\n {\n $db = DataBase::getInstance();\n $query = \"SELECT * FROM Modulo\";\n return $db->query($query);\n }", "function read(){\n $query = \"SELECT\n pantry_item_id, item_name, user_id\n FROM\n \" . $this->table_name . \";\";\n\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n\n // execute query\n $stmt->execute();\n\n return $stmt;\n }", "function get_all_records(){\n\t\tglobal $db;\n\t\t$sql=\"SELECT * FROM $this->table order by id asc\";\n\t\t$db->query($sql);\n\t\t$row=$db->fetch_assoc_all();\n\t\treturn $row;\n\t}", "function read(){\n $dbh = $this->connect();\n $sentencia = \"SELECT * FROM doctor\";\n $stmt = $dbh->prepare($sentencia);\n $stmt->execute();\n $rows = $stmt->fetchAll();\n return $rows;\n }", "public static function getAll() {\n $conn = self::connect();\n $row = $conn->getAll(self::baseQuery());\n return $row;\n }", "public abstract function getAll();", "private function load() {\n\n $db = Database::getInstance(); \n\t $con = $db->getConnection();\n \n $query = \"SELECT * FROM Products ORDER by ID DESC\";\n \n if ($result = $con->query($query)) {\n \t/* fetch object array */\n \t while ($prod = $result->fetch_object(\"Product\")) {\n\t\t\t \tarray_push($this->products, $prod);\n \t}\n \t/* free result set */\n \t$result->close();\n }\n\t}", "public function getAll()\n {\n $sql = \"SELECT * FROM \".$this->table;\n $req = Database::getBdd()->prepare($sql);\n $req->execute();\n return $req->fetchAll(PDO::FETCH_OBJ);\n \n }", "function read(){\n \n // select all query\n $query = \"SELECT inv.`id`, inv.`local_id`, loc.`nombre` as local_nom, inv.`producto_id`, \n pro.`codigo`, pro.`nombre`, inv.`cantidad`, inv.`minimo_stock`\n FROM `inventario_local` as inv\n JOIN `locales` as loc ON (loc.`id` = inv.`local_id`)\n JOIN `productos` as pro ON (pro.`id` = inv.`producto_id`)\n WHERE loc.`empresa_id` = 1\";\n \n // prepare query statement\n $stmt = $this->conn->prepare($query);\n \n // execute query\n $stmt->execute();\n \n return $stmt;\n }", "public function retrieveAll(){\r\n $conn = new ConnectionManager();\r\n $pdo = $conn->getConnection();\r\n \r\n\r\n // Add your codes here\r\n\r\n\r\n return $result;\r\n }", "function read(){\n $query = \"SELECT * FROM \" . $this->table_name;\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n return $stmt;\n }", "public function fetchAll()\n {\n }", "protected function getAll() {}", "public function read(){\n $query = \"SELECT * FROM {$this->table}\";\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n return $stmt;\n }", "public function read ()\n {\n\n $query = \"SELECT type_id, type FROM \" . $this->table_namee .\" \". \"ORDER BY type_id\";\n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n return $stmt;\n\n }", "public static function readAll($db) {\n // Prepares and executes the query.\n $query = \"SELECT * From \" . Bill::$table_name . \" ORDER BY date DESC\";\n\n $stmt = $db->prepare($query);\n $stmt->execute();\n\n // Create a Bill object array\n $bill_array = array();\n\n // Traverses the Resultset of the query Execution.\n // Adds a new element to the array for each record.\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){\n $bill = new Bill($db);\n Bill::updateAttributes($bill, $row);\n // Adds the Bill object to the array\n $bill_array[] = $bill;\n }\n\n return $bill_array;\n }", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM material';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "public function get_data()\n {\n return $this->retrieve('SELECT * FROM isys_import LIMIT 1000;');\n }", "public function fetchAllForBase3();", "public function index()\n {\n return $this->itemRepo->findAll();\n }", "protected function _readRecords() {}", "public function retrieve()\n {\n return $this->getRepository()->findAll();\n }", "public function read()\n {\n \n // select all query\n $query = \"SELECT * FROM \" . $this->table_name . \" ORDER BY date_offer DESC\";\n \n // prepare query statement\n $stmt = $this->pdo->prepare($query);\n \n // execute query\n $stmt->execute();\n \n return $stmt;\n }", "function read($a_force_db = false)\n\t{\n\t\tparent::read($a_force_db);\n\t\t$this->loadFromDb();\n\t}", "public function getAll()\n {\n $sql = \"SELECT * FROM `%s`\";\n $this->_sql[] = sprintf($sql, $this->_table);\n $this->_parameters[] = array();\n return $this->run();\n }", "public function read() {\n // Create query\n $query = \"SELECT * FROM \" . $this->table;\n\n // Prepare the statement\n $stmt = $this->conn->prepare($query);\n\n // Execute the prepared statement and check for errors in running it\n if ($this->runPrepStmtChkErr($stmt) === false) {\n return false;\n }\n\n // Return all rows of the table\n // Note: 'PDO::FETC_ASSOC' means only the associative, \n // and not positional (numerically indexed) array will be returned\n return $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "public function modelFetchAll(){\n\t\t\t//lay bien ket noi de thao tac csdl\n\t\t\t$conn = Connection::getInstance();\n\t\t\t//thuc hien truy van, tra ket qua ve mot object\n\t\t\t$query = $conn->query(\"select * from phongban\");\n\t\t\t//tra ve tat ca cac ban ghi\n\t\t\treturn $query->fetchAll();\n\t\t}", "function getList()\n {\n global $db;\n $sql = \" select * from \".$this->table.\" \"; \n $db->SetFetchMode(ADODB_FETCH_ASSOC);\n\t\t$info = $db->execute($sql);\n \t\t$item = $info->GetRows();\t\n\t\treturn $item;\n }", "public function read(){\n //Create query\n $query = 'SELECT *\n FROM ' . $this->table . '\n ORDER BY created_at DESC';\n\n //Prepare statement\n $stmt = $this->conn->prepare();\n\n //Execute query\n $stmt->execute();\n\n return $stmt;\n }", "public final function get_all()\n {\n }", "function read(){\n //select all data\n $query = \"SELECT\n id, name, status\n FROM\n \" . $this->table_name . \"\n ORDER BY\n id DESC\"; \n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n \n return $stmt;\n }", "public function Read()\n {\n $query = $this->db->prepare(\"SELECT * FROM users\");\n $query->execute();\n $data = array();\n while ($row = $query->fetch(PDO::FETCH_ASSOC)) {\n $data[] = $row;\n }\n return $data;\n }", "public function fetchAll()\r\n {\r\n \t// get from mem if available\r\n \t$memcache = new \\Memcached();\r\n \t$memcache->addServer('localhost', 11211);\r\n \t$key = md5(catalogProductList::MEMCACHED_FETCH_ALL);\r\n \t$cache_data = $memcache->get($key);\r\n \tif ($cache_data) {\r\n \t\t$this->log->addInfo('cache hit', array(\"key\" => $key));\r\n \t\t$this->data = $cache_data;\r\n \t} else {\r\n\t\t\t$this->data = $this->client->catalogProductList($this->sessionid);\r\n\t\t\t$memcache->set($key, $this->data, 60*1);\r\n \t}\r\n }", "public function read(){\r\n $conn = $this->connDB();\r\n $sql = \"SELECT * FROM car_info ORDER BY car_id\";\r\n $stmt = $conn->prepare($sql);\r\n $stmt->execute();\r\n $cars = [];\r\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\r\n $cars[] = [\r\n 'car_id' => $row['car_id'],\r\n 'car_brand' => $row['car_brand'],\r\n 'car_plate' => $row['car_plate'],\r\n 'car_current_location' => $row['car_current_location'],\r\n 'car_owner' => $row['car_owner'],\r\n 'is_lost' => $row['is_lost'],\r\n 'created_by' => $row['created_by'],\r\n 'created_date' => $row['created_date'],\r\n 'modify_by' => $row['modify_by'],\r\n 'modify_date' => $row['modify_date']\r\n ];\r\n }\r\n return $cars;\r\n }", "function retrieveAll ()\n {\n\n $q = Doctrine_Query::create ()\n ->from ( 'MtnPriceListComponent mplc' )\n ->innerJoin ( 'mplc.MtnComponent mc' )\n ->innerJoin ( 'mplc.MtnPriceList mpl' );\n\n\n return $q->execute ();\n }", "public function readAll() : Traversable;", "function getAllArticle()\n{\n $bdd = dbConnection();\n $rs = $bdd->query(\"select * from article\");\n $articleList = $rs->fetchAll(PDO::FETCH_ASSOC);\n $rs->closeCursor();\n return $articleList;\n}" ]
[ "0.7575424", "0.7401428", "0.7333486", "0.7299486", "0.7276709", "0.7237937", "0.7162551", "0.7152545", "0.71513945", "0.7086844", "0.7081333", "0.69926614", "0.69513094", "0.6946167", "0.6897857", "0.68818337", "0.6875963", "0.686948", "0.6834118", "0.6809249", "0.68037647", "0.67691016", "0.67541677", "0.67447066", "0.671157", "0.6699094", "0.66731024", "0.6657999", "0.66268814", "0.66054416", "0.65884584", "0.6577941", "0.6577941", "0.6577941", "0.6577941", "0.6576637", "0.6575389", "0.6555227", "0.64858365", "0.6482998", "0.647939", "0.64544857", "0.64502805", "0.64476794", "0.644607", "0.64451355", "0.641605", "0.641575", "0.64013034", "0.64002156", "0.6399088", "0.63952523", "0.63813746", "0.636601", "0.63643885", "0.63609", "0.6354079", "0.63534933", "0.6348679", "0.6339591", "0.6335917", "0.6335917", "0.6335917", "0.6330919", "0.6329286", "0.6315018", "0.6311312", "0.63108015", "0.63093925", "0.63014036", "0.6296976", "0.6264518", "0.6264383", "0.62606853", "0.62512565", "0.6250485", "0.6244718", "0.6233049", "0.62322766", "0.62262076", "0.6223691", "0.6220556", "0.62199575", "0.6219401", "0.6204514", "0.61964643", "0.61946374", "0.61871713", "0.6186434", "0.6181263", "0.61664444", "0.6160002", "0.6158938", "0.6153876", "0.6150945", "0.6150281", "0.61461484", "0.61436504", "0.61420846", "0.61368454", "0.6135466" ]
0.0
-1
Get list items of section.
public function get_section_items( $section_id ) { $course = learn_press_get_course( $this->course_id ); $sections = $course->get_curriculum_raw(); $return = array(); if ( ! empty( $sections ) ) { foreach ( $sections as $section ) { if ( $section['id'] == $section_id ) { if ( isset( $section['items'] ) && is_array( $section['items'] ) ) { $return = $section['items']; } } } } LP_Object_Cache::set( 'course-' . $this->course_id . '-' . $section_id, $return, 'learn-press/course-section-items' ); return $return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getList(){\n $sections = $this->Section->find('list', array('fields'=>array('id','NOM'),'order'=>array('NOM'=>'asc'),'recursive'=>-1));\n return $sections;\n }", "public function getSections(): iterable;", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function items() {\n return $this->list;\n }", "function getItems();", "function getItems();", "public function getItemsList(){\n return $this->_get(4);\n }", "public function getAllSections();", "public function getSections(): array\n {\n return $this->sections;\n }", "public function getSections(){\n\t\treturn $this->sections;\n\t}", "public function getSections()\n {\n return $this->sections;\n }", "public function getItems()\n {\n }", "public function getItemList()\r\n {\r\n return $this->item_list;\r\n }", "public function getSection() {\n try {\n $client = new SoapClient($this->SECTION_WSDL);\n $res = $client->findAllActiveSection();\n return $res;\n //print_r($res);\n } catch (Zend_Exception $e) {\n var_dump($e);\n }\n }", "public function getItems(){\n\t\treturn $this->_makeCall('items?');\n\t}", "public function getItems(): array;", "public function getItems(): array;", "public function getItems()\n {\n return $this->items;\n }", "function &getSectionItems(&$params)\n\t{\n\t\t$db\t\t= &JFactory::getDBO();\n\t\t$user\t= &JFactory::getUser();\n\t\t$aid\t= $user->get('aid');\n\n\t\t// get some date values for the query\n\t\t$date\t\t= &JFactory::getDate();\n\t\t$now\t\t= $date->toMySQL();\n\t\t$nullDate\t= $db->getNullDate();\n\t\t\n\t\t//JXComments integration\n\t\t$jxcomments = (int)$params->get('jxcomments');\n\n\t\t// get and sanitize the category ids\n\t\tjimport('joomla.utilities.arrayhelper');\n\t\t$section_ids = (array)$params->get('sec_ids');\n\t\tJArrayHelper::toInteger($section_ids);\n\n\t\t// build the query to get article information\n\t\t$db->setQuery(\n\t\t\t'SELECT a.*, cc.description as catdesc, cc.title as cattitle, s.description as secdesc, s.title as sectitle,'.\n\t\t\t' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(\":\", a.id, a.alias) ELSE a.id END as slug,'.\n\t\t\t' CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(\":\", cc.id, cc.alias) ELSE cc.id END as catslug,'.\n\t\t\t' CASE WHEN CHAR_LENGTH(s.alias) THEN CONCAT_WS(\":\", s.id, s.alias) ELSE s.id END as secslug'.\n\t\t\t' FROM #__content AS a'.\n\t\t\t' INNER JOIN #__categories AS cc ON cc.id = a.catid'.\n\t\t\t' INNER JOIN #__sections AS s ON s.id = a.sectionid'.\n\t\t\t' WHERE a.state = 1'.\n\t\t\t' AND a.access <= '.(int) $aid.' AND cc.access <= '.(int) $aid.' AND s.access <= '.(int) $aid .\n\t\t\t' AND (a.publish_up = '.$db->Quote($nullDate).' OR a.publish_up <= '.$db->Quote($now).' ) '.\n\t\t\t' AND (a.publish_down = '.$db->Quote($nullDate).' OR a.publish_down >= '.$db->Quote($now).' )'.\n\t\t\t' AND (a.sectionid = '.implode(' OR a.sectionid = ', $section_ids).' )' .\n\t\t\t' AND cc.section = s.id'.\n\t\t\t' AND cc.published = 1'.\n\t\t\t' AND s.published = 1'.\n\t\t\t' ORDER BY a.created DESC',\n\t\t\t0, (int)$params->get('num_items')\n\t\t);\n\t\t$rows = $db->loadObjectList();\n\n\t\t// import library dependencies\n\t\trequire_once (JPATH_SITE.DS.'components'.DS.'com_content'.DS.'helpers'.DS.'route.php');\n\n\t\tfor ($i=0,$n=count($rows); $i < $n; $i++)\n\t\t{\n\t\t\t$rows[$i]->article_link = JRoute::_(ContentHelperRoute::getArticleRoute($rows[$i]->slug, $rows[$i]->catslug, $rows[$i]->sectionid));\n\t\t\t$rows[$i]->category_link = JRoute::_(ContentHelperRoute::getCategoryRoute($rows[$i]->catslug, $rows[$i]->sectionid));\n\t\t\t$rows[$i]->section_link = JRoute::_(ContentHelperRoute::getSectionRoute($rows[$i]->sectionid));\n\t\t\t$rows[$i]->date = $rows[$i]->created;\n\t\t\t$rows[$i]->text = modAnnouncmentHelper::processText($rows[$i], $params);\n\t\t\tif($jxcomments)\n\t\t\t{\n\t\t\t\t$rows[$i]->num_comments = modAnnouncmentHelper::getNumComments($rows[$i]->id);\n\t\t\t}\n\t\t}\n\n\t\treturn $rows;\n\t}", "function getItems(){\r\n\t\t\treturn $this->items;\r\n\t\t}", "public function listItems()\n {\n return null;\n }", "public function getItems() : array;", "public function getItems()\n {\n return $this->items;\n }", "public function getItems()\n {\n return $this->items;\n }", "public function getItems()\n {\n return $this->items;\n }", "public function getItems()\n {\n return $this->items;\n }", "public function getItems()\n {\n return $this->items;\n }", "public function getItems()\n {\n return $this->items;\n }", "public function getItems()\n {\n return $this->items;\n }", "public function getItems()\n {\n return $this->items;\n }", "public function getItems()\n {\n return $this->items;\n }", "public function getItems()\n {\n return $this->items;\n }", "public function getItems() {\r\n return $this->items;\r\n }", "public abstract function get_lists();", "public function items()\n {\n return $this->items;\n }", "private function getSections() {\n\t\t$sections = array();\n\t\tforeach (Craft::$app->getSections()->getEditableSections() as $section) {\n\t\t\t$sections[$section->id] =['value'=>$section->handle, 'label' =>Craft::t('site',$section->name)];\n\t\t}\n\t\treturn $sections;\n\t}", "protected function getAllItems()\n {\n $sectionModel = new SectionModel();\n\n $categories = $sectionModel->where('is_deleted', 0)->select('id, name, question_type_id')->findAll();\n\n $questions = array();\n\n foreach($categories as $category) {\n // Get type of question\n $qType_id = $category['question_type_id'];\n // get choices and store in a list with the\n // category name as the key\n $choices[$category['name']] = $this->getChoices($qType_id);\n\n $result = $sectionModel->getQuestions($category['id']);\n $questions[$category['name']] = $result;\n }\n\n return [$questions, $choices];\n }", "public function getItem_list()\r\n {\r\n return $this->item_list;\r\n }", "public function getListItems()\n {\n return $this->getArticles();\n }", "public function getItems() {\n return $this->items;\n }", "public function getItems() {\n return $this->items;\n }", "public function getItems() {\n return $this->items;\n }", "public function getItems() {\n return $this->items;\n }", "public function getItems() {\n return $this->items;\n }", "public function getItems()\n\t{\n\t\treturn $this->items;\n\t}", "public function getItems()\n\t{\n\t\treturn $this->items;\n\t}", "public function getItems()\n\t{\n\t\treturn $this->items;\n\t}", "protected function getItems()\r\n\t{\r\n\t\treturn $this->_items;\r\n\t}", "function spr_get_sections() {\n\tglobal $spr_sql_fields;\n\n\t$sql_tables = safe_pfx('txp_section');\n\t$rs = safe_query(\"SELECT \".$spr_sql_fields.\" FROM \".$sql_tables.\" WHERE name != 'default' ORDER BY name\");\n\twhile ($a = nextRow($rs)) {\n\t\textract($a); // set 'name','title','parent' etc in $a\n\t\t$out[$name] = $a;\n\t}\n\treturn $out;\n}", "public function items()\n {\n return $this->items;\n }", "public function items()\n {\n return $this->items;\n }", "public function items()\n {\n return $this->items;\n }", "public function getItems()\r\n {\r\n return $this->_items;\r\n }", "function readItems() {return $this->_items;}", "public function getItems()\n {\n return $this['ITEMS'];\n }", "public function getSections(){\n return $this->getSite()->getSections();\n }", "public function getSections()\r\n {\r\n $sql=\"SELECT * FROM sections\";\r\n $query=$this->db->query($sql);\r\n return $query->result_array();\r\n }", "public function getItems()\n\t{\n\t\t$items = parent::getItems();\n\t\t\n\n\t\treturn $items;\n\t}", "public function getItems() {\n\n $store = $this->getStoreId();\n $app = JFactory::getApplication();\n $limit = $app->get('list_limit');\n // Try to load the data from internal storage.\n if (isset($this->cache[$store])) {\n return $this->cache[$store];\n }\n $query = $this->getListQuery();\n $this->query = $query;\n\n $db = JFactory::getDbo();\n $db->setQuery($query, JRequest::getInt('start', 0), $limit);\n $items = $db->loadObjectList();\n// $this->cache[$store] = $rows;\n// $this->items = $rows;\n// $items = array_slice($rows, JRequest::getInt('start', 0), $limit);\n\n return $items;\n }", "public function get_all_sections() {\n\t\t$sql = \"SELECT section_id FROM peducator_sections \n\t\tWHERE peducator_id='$this->peducator_id'\";\n\t\t$result = mysqli_query($this->connect_to_db, $sql);\n\n\t\t$arr = [];\n\t\twhile ($row = mysqli_fetch_array($result)) {\n\t\t\tarray_push($arr, get_section($row['section_id']));\n\t\t}\n\n\t\treturn $arr;\t\n\t}", "public function getEntriesList(){\n return $this->_get(2);\n }", "public function getItemsArray();", "public function getItems()\n {\n $this->loadItems();\n return $this->items;\n }", "final public function getItems()\n\t{\n\t\treturn $this->items;\n\t}", "public function items()\n\t{\n\t\treturn $this->items;\n\t}", "private function retrieveSections() {\n\t\t$this->sections = array();\n\n\t\t$dbResult = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t'*',\n\t\t\tself::TABLE_SECTIONS,\n\t\t\t'content_uid = ' . $this->getContentUid() .\n\t\t\t\ttx_oelib_db::enableFields(self::TABLE_SECTIONS),\n\t\t\t'',\n\t\t\t'sorting'\n\t\t);\n\t\tif (!$dbResult) {\n\t\t\tthrow new Exception(DATABASE_QUERY_ERROR);\n\t\t}\n\n\t\twhile ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($dbResult)) {\n\t\t\t$GLOBALS['TSFE']->sys_page->versionOL(self::TABLE_SECTIONS, $row);\n\t\t\t$GLOBALS['TSFE']->sys_page->fixVersioningPid(\n\t\t\t\tself::TABLE_SECTIONS, $row\n\t\t\t);\n\t\t\tif ($GLOBALS['TSFE']->sys_language_content > 0) {\n\t\t\t\t$row = $GLOBALS['TSFE']->sys_page->getRecordOverlay(\n\t\t\t\t\tself::TABLE_SECTIONS,\n\t\t\t\t\t$row,\n\t\t\t\t\t$GLOBALS['TSFE']->sys_language_content,\n\t\t\t\t\t$GLOBALS['TSFE']->sys_language_contentOL\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$this->sections[] = $row;\n\t\t}\n\t}", "public function get_list($visibility=null) {\n if($visibility==null):\n $conditions[] = \"1=1\";\n elseif ($visibility != '' && $visibility != '0' && userAuth('WIDEAREA')== 0):\n $conditions[] = 'Section.id = '.userAuth('section_id');\n elseif ($visibility != '' && $visibility != '0' && userAuth('WIDEAREA')!= 0):\n $ObjUtilisateurs = new UtilisateursController();\n $sections = $ObjUtilisateurs->get_str_section_utilisateurs();\n $conditions[] = \"Section.id IN (\".$sections.\")\"; \n else:\n $conditions[] = 'Section.id = '.userAuth('section_id');\n endif;\n return $this->Section->find('list',array('fields'=>array('id','NOM'),'conditions'=>$conditions,'order'=>array('NOM'=>'asc'),'recursive'=>-1));\n }", "public function _list()\n {\n return header_list();\n }", "public function getItems(): array\n {\n return $this->items;\n }", "function getItems(){return $this->items;}", "public function articlesSectionCategories()\n\t{\n\t\terror_reporting(0);\n\t\t$input = new JInput;\n\t\t$secId = $input->get('secId', '', 'int');\n\n\t\t$model = & $this->getModel('mediafile');\n\t\t$items = & $model->getArticlesSectionCategories($secId);\n\n\t\treturn $items;\n\t}", "public function getList();", "public function getList();", "function items()\n\t{\n\t\treturn $this->_items;\n\t}", "public function get_section()\n\t\t{\n\t\t\t$retArr = null;\n\n\t\t\t// Scaffolding Code For Array:\n\t\t\t$objs = $this->obj->find_all();\n\t\t\tforeach($objs as $obj)\n\t\t\t{\n\t\t\t\t$retArr[] = $obj->getBasics();\n\t\t\t}\n\n\t\t\treturn $retArr;\n\t\t}", "public function getList()\n {\n return $this->get(self::_LIST);\n }", "public function getItems(): array\n\t{\n\t\treturn $this->items;\n\t}", "public function getInfoList() {\n return $this->_get(3);\n }", "public function get_section_list($kuesioner_id=0,$is_active=2,$is_order=0)\r\n\t{\r\n\t\t$query = \"SELECT * FROM GES_M_section WHERE kuesioner_id = $kuesioner_id\";\r\n\t\tif ($is_active == 0 or $is_active == 1) {\r\n\t\t\t$query .= \" AND is_active = $is_active\";\r\n\t\t}\r\n\t\tif ($is_order) {\r\n\t\t\t$query .= \" ORDER BY [order] ASC\";\r\n\t\t}\r\n\t\treturn $this->survey->query($query)->result();\r\n\t}", "public function getSections(): array {\n\t\t\n\t\tif (isset($this->sections)) {\n\t\t\treturn $this->sections;\n\t\t}\n\t\t\n\t\t$this->sections = [];\n\t\t\n\t\t$sections = elgg_extract('sections', $this->config, []);\n\t\tforeach ($sections as $section) {\n\t\t\t$this->sections[] = new Section($section);\n\t\t}\n\t\t\n\t\treturn $this->sections;\n\t}", "public function getInfoList() {\n return $this->_get(21);\n }", "public function all(){\r\n return $this->items;\r\n }", "public function &items();", "private function get_items() {\n return $this->menuitems;\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 getItems($type);" ]
[ "0.7256286", "0.7229692", "0.71249014", "0.71249014", "0.71249014", "0.71249014", "0.71249014", "0.71249014", "0.71249014", "0.71249014", "0.71249014", "0.71249014", "0.71249014", "0.71249014", "0.71249014", "0.6961299", "0.68529665", "0.68529665", "0.6802857", "0.6723238", "0.6651309", "0.65535176", "0.6536933", "0.6498227", "0.6456524", "0.6450842", "0.6380473", "0.6374374", "0.6374374", "0.63639086", "0.63445324", "0.63358825", "0.6334403", "0.6316276", "0.63043475", "0.63043475", "0.63043475", "0.63043475", "0.63043475", "0.63043475", "0.63043475", "0.63043475", "0.63043475", "0.63043475", "0.6292214", "0.6289162", "0.62642235", "0.62630063", "0.62585145", "0.6246787", "0.62439984", "0.62340075", "0.62340075", "0.62340075", "0.62340075", "0.62340075", "0.6227631", "0.6227631", "0.6227631", "0.6219852", "0.6197207", "0.6194483", "0.6194483", "0.6194483", "0.6181489", "0.6172231", "0.6170962", "0.61541796", "0.61532426", "0.6134195", "0.611591", "0.6109039", "0.6105912", "0.61052114", "0.6100444", "0.6088949", "0.6078629", "0.60779613", "0.60676694", "0.60529214", "0.6017191", "0.6015198", "0.6007513", "0.6006819", "0.6006819", "0.60068005", "0.6001838", "0.6000193", "0.599367", "0.5986164", "0.59792113", "0.5973762", "0.59725344", "0.5970052", "0.59654015", "0.59627014", "0.5962164", "0.5962164", "0.5962164", "0.5949887" ]
0.631695
33
Create new section item and add to course.
public function new_item( $section_id, $item ) { // course author, for case co-instructor add new items. $author_id = get_current_user_id(); if ( ! $author_id ) { $author_id = get_post_field( 'post_author', $this->course_id ) ? get_post_field( 'post_author', $this->course_id ) : learn_press_get_current_user_id(); } // $item = wp_parse_args( $item, array( 'title' => '', 'type' => '' ) ); $item = array_merge( array( 'title' => '', 'type' => '', ), $item ); $args = array( 'title' => $item['title'], 'author' => $author_id, ); if ( ! empty( $item['id'] ) ) { $item['old_id'] = $item ['id']; } if ( $item['type'] == LP_LESSON_CPT ) { $lesson_curd = new LP_Lesson_CURD(); $item['id'] = $lesson_curd->create( $args ); } elseif ( $item['type'] == LP_QUIZ_CPT ) { $quiz_curd = new LP_Quiz_CURD(); $item['id'] = $quiz_curd->create( $args ); } else { $item['id'] = apply_filters( 'learn-press/new-section-item-data', $item['id'], $item, $args, $this->course_id ); } if ( is_wp_error( $item['id'] ) || ! $item['id'] ) { return false; } $item['preview'] = get_post_meta( $item['id'], '_lp_preview', true ) == 'yes'; // allow hook do_action( 'learn-press/after-new-section-item', $item['id'], $section_id, $this->course_id ); // add item to section return $this->add_items_section( $section_id, array( $item ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create( &$args ) {\n\n\t\tglobal $wpdb;\n\n\t\t$section = $this->parse( $args );\n\t\t$section = stripslashes_deep( $section );\n\t\t$section['section_order'] = $this->get_last_number_order( $section['section_course_id'] ) + 1;\n\t\t$insert_data = array(\n\t\t\t'section_course_id' => $this->course_id,\n\t\t\t'section_name' => $section['section_name'],\n\t\t\t'section_order' => $section['section_order'],\n\t\t\t'section_description' => $section['section_description'],\n\t\t);\n\n\t\t$wpdb->insert(\n\t\t\t$wpdb->learnpress_sections,\n\t\t\t$insert_data,\n\t\t\tarray( '%d', '%s', '%d', '%s' )\n\t\t);\n\t\t$section['section_id'] = $wpdb->insert_id;\n\n\t\t// allow hook\n\t\tdo_action( 'learn-press/after-create-section', $this->course_id, $section );\n\n\t\treturn $section;\n\t}", "public function addSection($sectionId);", "public function addSectionData()\n\t\t{\n\t\t\t_is_logged_in();\n\n\t\t\t$data = array();\n\n\t\t\tif ($_POST) {\n\n\t\t\t\tforeach ($this->input->post() as $key => $value) {\n\n\t\t\t\t\tif ($key == 'section_name') {\n\t\t\t\t\t\t$data['section_slug'] = url_title(convert_accented_characters($value));\n\t\t\t\t\t}\n\t\t\t\t\t$data[$key] = $value;\n\t\t\t\t}\n\n\t\t\t\t$data['language'] = $this->session->userdata('language');\n\t\t\t}\n\n\t\t\t// Send data\n\t\t\t$query = $this->co_pages_model->add_section($data);\n\n\t\t\tif ($query > 0) {\n\t\t\t\tredirect('admin/co_pages/add_section?action=success');\n\t\t\t} else {\n\t\t\t\tredirect('admin/co_pages/add_section?action=error');\n\t\t\t}\n\n\t\t}", "public function create()\n\t{\n\t\t//\n\t\t$us = Auth::user();\n\t\tif( ! $us->hasPermission(50))\n\t\t\treturn Redirect::to('portal')\n\t\t\t\t->with('type', 'alert')\n\t\t\t\t->with('message', 'Not enough permissions');\n\n\t\t$cat = Category::all();\n\t\treturn $this->layout->content = View::make('layouts.create',\n\t\tarray(\n\t\t\t'class'\t=> 'Section',\n\t\t\t'title'\t=> 'Create new Section',\n\t\t\t'form'\t=> array('url' => 'sections', 'class'=>'form-signup'),\n\t\t\t'field' => array(\n\t\t\t\t\t\t\tarray('text', 'name', 'field', 'Section Name'),\n\t\t\t\t\t\t\tarray('textarea', 'description', 'field', 'Description'),\n\t\t\t\t\t\t\tarray('checkbox', 'enabled', 'checkbox', 'Enabled')),\n\t\t\t'sel'\t=>\t'category',\n\t\t\t'sel_it'=>\t$cat\n\t\t));\n\t}", "public function addNewSection()\n {\n if($this::check_session()){\n $this->form_validation->set_rules('newSection', 'Section', 'required');\n $formData = ['ex_section' => $this->input->post('newSection')];\n\n if($this->form_validation->run()) { \n $this->Admin_model->addNewSection($formData);\n $this->addSectionQuestionsTab();\n }else{\n $this->addSectionQuestionsTab();\n } \n }\n }", "public function store(Course $course)\n {\n $this->validate(request(), [\n 'title' => 'required|spamfree'\n ]);\n\n $section = Section::add([\n 'title' => request('title'),\n 'course_id' => $course->id,\n 'description' => request('description')\n ], $course);\n\n return $section;\n }", "public function actionCreate($sectionid)\n {\n $model = new News();\n // $sections = SecNews::find()->select(['id','header'])->asArray()->all();\n $sections = SecNews::find()->select(['id','header'])->all();\n $sections = ArrayHelper::map($sections,'id','header');\n // echo \"<pre>\";\n // var_dump($a);\n // die;\n $params = [\n 'prompt' => 'Выберите секцию…'\n ];\n if (isset($sectionid)) {\n $params['options'] = [$sectionid => ['Selected'=>'selected']];\n }\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'sections' => $sections,\n 'params' => $params,\n ]);\n }\n }", "private function addSection() {\n // courseid, secNo, daysMet, startTime, endTime, totalReleasedSeats, building, room\n\n $courseID = $_POST['courseID'];\n $secNo = $_POST['secNo'];\n $daysMet = $_POST['daysMet'];\n $startTime = $_POST['startTime'];\n $endTime = $_POST['endTime'];\n $totalReleasedSeats = $_POST['totalReleasedSeats'];\n $building = $_POST['building'];\n $room = $_POST['room'];\n\n $this->openConn();\n\n $sql = \"SELECT DISTINCT term, secStartDate, secEndDate, sessionYear, sessionCode FROM Section WHERE courseID = :courseID\";\n $stmt = $this->conn->prepare($sql);\n $stmt->execute(array(':courseID'=> $courseID));\n\n while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $term = $row['term'];\n $secStartDate = $row['secStartDate'];\n $secEndDate = $row['secEndDate'];\n $sessionYear = $row['sessionYear'];\n $sessionCode = $row['sessionCode'];\n }\n\n $totalEnrolment = 0;\n $isOptimized = 0;\n $secType = \"LAB\";\n\n // if($row){\n //\n // }\n\n $sql2 = \"INSERT INTO Section (courseID, secNo, daysMet, startTime, endTime, totalReleasedSeats, totalEnrolment, building, room,\n term, isOptimized, secStartDate, secEndDate, sessionYear, sessionCode, secType)\n VALUES (:courseID, :secNo, :daysMet, :startTime, :endTime, :totalReleasedSeats, :totalEnrolment, :building, :room,\n :term, :isOptimized, :secStartDate, :secEndDate, :sessionYear, :sessionCode, :secType)\";\n $stmt2 = $this->conn->prepare($sql2);\n $stmt2->execute(array(':courseID'=> $courseID, ':secNo'=> $secNo, ':daysMet'=> $daysMet, ':startTime'=> $startTime, ':endTime'=> $endTime, ':totalReleasedSeats'=> $totalReleasedSeats, ':totalEnrolment'=> $totalEnrolment, ':building'=> $building, ':room'=> $room,\n ':term'=> $term, ':isOptimized'=> $isOptimized, ':secStartDate'=> $secStartDate, ':secEndDate'=> $secEndDate, ':sessionYear'=> $sessionYear, ':sessionCode'=> $sessionCode, ':secType'=> $secType));\n\n $this->closeConn();\n\n }", "public function store(CreatesectionRequest $request)\n {\n $input = $request->all();\n\n $section = $this->sectionRepository->create($input);\n\n $content = new content();\n $content->section_id = $section->id;\n $content->fill($input);\n $content->save();\n Flash::success('Section guardada con exito.');\n\n return redirect(route('sections.index'));\n }", "public function add_items_section( $section_id, $items = array() ) {\n\t\t$order = 1;\n\t\t$current_items = $this->get_section_items( $section_id );\n\t\t// allow hook\n\t\tdo_action( 'learn-press/before-add-items-section', $items, $section_id, $this->course_id );\n\n\t\tglobal $wpdb;\n\n\t\t$all_items = array_merge( $current_items, $items );\n\t\t$result = array();\n\t\tforeach ( $all_items as $item ) {\n\n\t\t\t$item = (array) $item;\n\t\t\t$exist = $this->item_section_exist( $section_id, $item['id'] );\n\n\t\t\tif ( $exist ) {\n\t\t\t\t$a = $wpdb->update(\n\t\t\t\t\t$wpdb->learnpress_section_items,\n\t\t\t\t\tarray( 'item_order' => $order ),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'section_id' => $section_id,\n\t\t\t\t\t\t'item_id' => $item['id'],\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$a = $wpdb->insert(\n\t\t\t\t\t$wpdb->learnpress_section_items,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'section_id' => $section_id,\n\t\t\t\t\t\t'item_id' => $item['id'],\n\t\t\t\t\t\t'item_order' => $order,\n\t\t\t\t\t\t'item_type' => $item['type'],\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\t// get WP Post\n\t\t\t$post = get_post( $item['id'] );\n\t\t\t$item = array_merge(\n\t\t\t\t$item,\n\t\t\t\tarray(\n\t\t\t\t\t'id' => $post->ID,\n\t\t\t\t\t'title' => $post->post_title,\n\t\t\t\t\t'type' => $post->post_type,\n\t\t\t\t\t'preview' => get_post_meta( $post->ID, '_lp_preview', true ) == 'yes',\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tif ( ! $exist ) {\n\t\t\t\tdo_action( 'learn-press/added-item-to-section', $item, $section_id, $this->course_id );\n\t\t\t} else {\n\t\t\t\tdo_action( 'learn-press/updated-item-to-section', $item, $section_id, $this->course_id );\n\t\t\t}\n\n\t\t\t$result[] = $item;\n\t\t\t$order ++;\n\t\t}\n\n\t\tLP_Object_Cache::set( 'course-' . $this->course_id . '-' . $section_id, $all_items, 'learn-press/course-section-items' );\n\n\t\treturn $result;\n\t}", "public function add_sections()\n {\n }", "public function create()\n {\n $model = new Section();\n return view('admin.section.create', compact('model'));\n }", "public function addSection()\n\t{\n\t\t// Create the setting section with the WordPress Settings Api\n\t\tadd_settings_section(\n\t\t\t$this->section_id,\n\t\t\t$this->section_options['title'],\n\t\t\tarray($this->section_callback, 'callback'),\n\t\t\t$this->section_options['parent_id']\n\t\t);\n\t}", "public function create($id_section)\n {\n return view('test.add-test')->with('id_section', $id_section);\n }", "public function store($data) {\n $this->validate($data);\n $item = $this->repo->create($data['section']);\n return $item;\n }", "public function store(CreateSectionRequest $request)\n {\n $input = $request->all();\n\n $section = $this->sectionRepository->create($input);\n\n\n Log::info('Admin has been create new section like => '.$request->name);\n\n\n Flash::success('Section saved successfully.');\n\n return redirect(route('sections.index'));\n }", "function pnq_add_section( $section ) {\n\tglobal $pnq_settings_sections;\t\n\tif( ! array_key_exists( $section['id'], $pnq_settings_sections ) ) {\n\t\t$pnq_settings_sections[$section['id']] = $section;\n\t\treturn $section;\t\n\t}\n}", "public function addSection($section){\n\t\t\t//$this->sections[$section->uuid] = $section;\n\t\t\tarray_push($this->sections, $section);\n\t\t}", "public function create(Section $section){\n if(empty($section->section_adviser) || $section->section_adviser == 1){\n throw new Exception(\"Invalid Advisor ID\");\n }\n\n $stmt = $this->db->prepare(\"SELECT * FROM `sections` WHERE curr_id = :curr_id AND level_id = :level_id AND section_adviser = :section_adviser\");\n $stmt->execute([':curr_id'=>$section->curr,\n\t ':section_adviser'=>$section->section_adviser,\n\t ':level_id'=>$section->level_id]);\n $result = $stmt->fetchAll();\n\n if($result){\n \treturn false;\n }\n $stmt = $this->db->prepare(\"INSERT INTO `sections`\n (\n `section_name`,\n `section_adviser`,\n `level_id`,\n `curr_id`\n )\n\n VALUES (\n :section_name,\n :section_adviser,\n :level_id,\n :curr_id\n )\n \n \");\n\n\n $stmt->execute([\n \"section_name\" => $section->section_name,\n \"section_adviser\" => $section->section_adviser,\n \"level_id\" => $section->level_id,\n \"curr_id\" => $section->curr\n ]);\n\n if($stmt->rowCount() > 0){\n return true;\n }\n\n return false;\n }", "public function create_sections() {\n\t\tif ( count( $this->sections ) > 0 ) {\n\t\t\tforeach ( $this->sections as $k => $v ) {\n\t\t\t\tadd_settings_section( $k, $v['name'], array( $this, 'section_description' ), $this->token );\n\t\t\t}\n\t\t}\n\t}", "public function addCourse()\n {\n Logger::Log(\n 'starts POST AddCourse',\n LogLevel::DEBUG\n );\n\n $body = $this->app->request->getBody();\n\n $course = Course::decodeCourse($body);\n\n foreach ( $this->_createCourse as $_link ){\n $result = Request::routeRequest(\n 'POST',\n '/course',\n array(),\n Course::encodeCourse($course),\n $_link,\n 'course'\n );\n\n // checks the correctness of the query\n if ( $result['status'] >= 200 &&\n $result['status'] <= 299 ){\n\n $this->app->response->setStatus( 201 );\n if ( isset( $result['headers']['Content-Type'] ) )\n $this->app->response->headers->set(\n 'Content-Type',\n $result['headers']['Content-Type']\n );\n\n } else {\n\n /* if ($course->getId()!==null){\n $this->deleteCourse($course->getId());\n }*/\n\n Logger::Log(\n 'POST AddCourse failed',\n LogLevel::ERROR\n );\n $this->app->response->setStatus( isset( $result['status'] ) ? $result['status'] : 409 );\n $this->app->response->setBody( Course::encodeCourse( $course ) );\n $this->app->stop( );\n }\n }\n\n $this->app->response->setBody( Course::encodeCourse( $course ) );\n }", "public function create()\n\t{\n\t\treturn view('sections.create');\n\t}", "public function create($resourceable, $id, Section $section)\n {\n $resource = Str::plural($resourceable, 1);\n $resourceable = Str::singular($resourceable, 1);\n\n $model_name = str_replace('-', ' ',ucwords($resourceable));\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 $back = url()->previous();\n\n return $this->view('resources.sections.components.content')->with('section', $section)->with('resource', $resourceable)->with('resourceable', $model)->with('back', $back);\n }", "public function store(SchoolSectionsCreateRequest $request)\n {\n $section = new SchoolSection;\n\n $section->course_id = $request->input('course_id');\n $section->fork_id = $request->input('fork_id');\n $section->title = $request->input('title');\n\n // Save section\n if($section->save()){\n // If everything is ok, return category list\n return $this\n ->responseSuccess(\n [],\n 'Sections save successfully'\n );\n } else {\n // Error if section don't save\n return $this->responseError('Error. Section don\\'t save');\n }\n }", "public function addNewSectionQuestion()\n {\n if($this->check_session()){\n $this->form_validation->set_rules('sections', 'Section', 'required');\n $this->form_validation->set_rules('newSectionQues', 'Question', 'required');\n \n if($this->form_validation->run()){\n $formData = ['ex_section_question' => html_escape($this->input->post('newSectionQues')),\n 'ex_sections_id' => $this->input->post('sections')];\n $this->Admin_model->addNewSectionQuestion($formData);\n $this->getSectionQuestionsTable($this->input->post('sections'));\n }else{\n\n }\n }\n }", "public function createNewItem();", "public function create()\n {\n return view('admin.pages.section.create');\n }", "public function add()\n {\n $course_description = new CourseDescription();\n $session_id = api_get_session_id();\n $course_description->set_session_id($session_id);\n\n $data = array();\n if (strtoupper($_SERVER['REQUEST_METHOD']) == \"POST\") {\n if (!empty($_POST['title']) && !empty($_POST['contentDescription'])) {\n if (1) {\n $title = $_POST['title'];\n $content = $_POST['contentDescription'];\n $description_type = $_POST['description_type'];\n if ($description_type >= ADD_BLOCK) {\n $course_description->set_description_type($description_type);\n $course_description->set_title($title);\n $course_description->set_content($content);\n $course_description->insert(api_get_course_int_id());\n }\n\n Display::addFlash(\n Display::return_message(\n get_lang('CourseDescriptionUpdated')\n )\n );\n }\n $this->listing(false);\n } else {\n $data['error'] = 1;\n $data['default_description_titles'] = $course_description->get_default_description_title();\n $data['default_description_title_editable'] = $course_description->get_default_description_title_editable();\n $data['default_description_icon'] = $course_description->get_default_description_icon();\n $data['question'] = $course_description->get_default_question();\n $data['information'] = $course_description->get_default_information();\n $data['description_title'] = $_POST['title'];\n $data['description_content'] = $_POST['contentDescription'];\n $data['description_type'] = $_POST['description_type'];\n $this->view->set_data($data);\n $this->view->set_layout('layout');\n $this->view->set_template('add');\n $this->view->render();\n }\n } else {\n $data['default_description_titles'] = $course_description->get_default_description_title();\n $data['default_description_title_editable'] = $course_description->get_default_description_title_editable();\n $data['default_description_icon'] = $course_description->get_default_description_icon();\n $data['question'] = $course_description->get_default_question();\n $data['information'] = $course_description->get_default_information();\n $data['description_type'] = $course_description->get_max_description_type();\n // render to the view\n $this->view->set_data($data);\n $this->view->set_layout('layout');\n $this->view->set_template('add');\n $this->view->render();\n }\n }", "function add_sections_and_fields(): void {}", "public function createSection($sectionName) {\n try {\n //$client = new Zend_Soap_Client($this->SECTION_WSDL);\n $client = new SoapClient($this->SECTION_WSDL,\n array('soap_version' => SOAP_1_1,\n 'encoding' => 'ISO-8859-1',\n 'cache_wsdl' => WSDL_CACHE_NONE,\n 'trace' => 1\n ));\n $result = $client->createSection(\n $this->toXml(\n array(\n 'companyId' => 0, \n 'isActive' => true, \n 'primaryKey' => 0, \n 'sectionId' => 0, \n 'sectionName' => $sectionName, \n 'updatedby' => $_SESSION['Username'], \n 'updatedt' => date('Y-m-d') . 'T' . date('H:i:s') . 'Z')\n , $rootNodeName = 'CreateSection')\n );\n return $result;\n } catch (Exception $e) {\n var_dump($e);\n }\n }", "public function create()\n {\n return view('admin.section.create');\n }", "public function create()\n {\n return view('admin.section.create');\n }", "public function insertSection()\n\t{\n\t\t$data = [\n\t\t\t'nama_section' => $this->input->post('nama_section', true),\n\t\t\t'konten_section' => $this->input->post('konten_section')\n\t\t];\n\n\t\t$this->db->insert('section', $data);\n\t\t$this->lomo->insertLog('Section <b>' . $data['nama_section'] . '</b> berhasil ditambahkan');\n\t\t$this->session->set_flashdata('message-success', 'Section ' . $data['nama_section'] . ' berhasil ditambahkan');\n\t\tredirect('section/index');\n\t}", "public function store()\n\t{\n\t\t//\n\t\t\t\t//\n\t\t$validator = Validator::make(Input::all(), Section::$rules);\n\t\n\t if ($validator->passes()) {\n\t\t// validation has passed, save user in DB\n\t\t $sec = new Section;\n\t\t $sec->name = Input::get('name');\n\t\t $sec->description = Input::get('description');\n \t\t $sec->enabled = Input::get('enabled');\n \t\t $sec->category_id = Input::get('category_id');\n\t\t $sec->save();\n\t\t return Redirect::to('sections')\n\t\t\t\t->with('type', 'success')\n\t\t\t\t->with('message', 'New section created');\n\t } else {\n\t\t// validation has failed, display error messages \n\t\treturn Redirect::to('sections/create')\n\t\t\t\t->with('type', 'alert')\n\t\t\t\t->with('message', 'The following errors occurred')\n\t\t\t\t->withErrors($validator)\n\t\t\t\t->withInput();\n\n\t }\n\t}", "function createCourse ($id, $name, $description) {\n\t\t\t\n\t\t}", "public function addSection(FW_Html_Section $section){\n\t\t$this->sections->add($section);\n\t}", "function dynamic_section( $sections ) {\n //$sections = array();\n $sections[] = array(\n 'title' => __( 'Section via hook', 'slova' ),\n 'desc' => __( '<p class=\"description\">This is a section created by adding a filter to the sections array. Can be used by child themes to add/remove sections from the options.</p>', 'slova' ),\n 'icon' => 'el-icon-paper-clip',\n // Leave this as a blank section, no options just some intro text set above.\n 'fields' => array()\n );\n\n return $sections;\n }", "public function create()\n {\n $id = \\Request::get('id');\n $section = Section::find($id);\n\n if(!$section){\n return $this->index();\n }\n return view('classes.create',compact('section'));\n }", "public function addContentData()\n\t\t{\n\t\t\t_is_logged_in();\n\n\t\t\t$data = array();\n\n\t\t\tif ($_POST) {\n\n\t\t\t\tforeach ($this->input->post() as $key => $value) {\n\n\t\t\t\t\tif ($key == 'section_name') {\n\t\t\t\t\t\t$data['section_slug'] = url_title(convert_accented_characters($value));\n\t\t\t\t\t}\n\t\t\t\t\t$data[$key] = $value;\n\t\t\t\t}\n\n\t\t\t\t$data['language'] = $this->session->userdata('language');\n\t\t\t}\n\n\t\t\t// Send data\n\t\t\t$query = $this->co_pages_model->add_section($data);\n\n\t\t\tif ($query > 0) {\n\t\t\t\tredirect('admin/co_pages/add_content?action=success');\n\t\t\t} else {\n\t\t\t\tredirect('admin/co_pages/add_content?action=error');\n\t\t\t}\n\n\t\t}", "public function store(Request $request)\n {\n $this->validate(\n $request,\n [\n 'title' => 'required|max:100',\n 'content' => 'nullable|string',\n 'alignment_type' => [\n 'required',\n Rule::in(\n [\n Section::ALIGNMENT_TYPE_LEFT,\n Section::ALIGNMENT_TYPE_CENTER,\n Section::ALIGNMENT_TYPE_RIGHT,\n ]\n ),\n ],\n 'background_type' => [\n 'required',\n Rule::in(\n [\n Section::BACKGROUND_TYPE_WHITE,\n Section::BACKGROUND_TYPE_SOFT_GRAY,\n Section::BACKGROUND_TYPE_BRAND_COLOR,\n ]\n ),\n ],\n 'image_url' => 'nullable|max:300',\n 'listable_bonus' => 'nullable|array',\n 'listable_bonus.*' => 'nullable|max:300',\n 'button_label' => 'nullable|max:300',\n 'button_url' => 'nullable|max:300',\n 'site_id' => 'required|exists:site,id',\n ]\n );\n\n $section = Section::create(\n $request->all()\n );\n\n return new SectionResource($section);\n }", "function dynamic_section( $sections ) {\n //$sections = array();\n $sections[] = array(\n 'title' => __( 'Section via hook', 'redux-framework-demo' ),\n 'desc' => __( '<p class=\"description\">This is a section created by adding a filter to the sections array. Can be used by child themes to add/remove sections from the options.</p>', 'redux-framework-demo' ),\n 'icon' => 'el el-paper-clip',\n // Leave this as a blank section, no options just some intro text set above.\n 'fields' => array()\n );\n\n return $sections;\n }", "function _add_section( $data=array() )\n\t{\n\t\t$section = array();\n\t\t\n\t\t$section['conf_title_title'] = $data['conf_title_title']['VALUE'];\n\t\t$section['conf_title_desc'] = $data['conf_title_desc']['VALUE'];\n\t\t$section['conf_title_count'] = 0;\n\t\t$section['conf_title_noshow'] = $data['conf_title_noshow']['VALUE'];\n\t\t$section['conf_title_keyword'] = $data['conf_title_keyword']['VALUE'];\n\t\t$section['conf_title_module'] = $data['conf_title_module']['VALUE'];\n\t\t\n\t\t$this->ipsclass->DB->do_insert( 'conf_settings_titles', $section );\n\t\t\n\t\treturn $this->ipsclass->DB->get_insert_id();\n\t}", "function add_section($title, $section_id = '', $priority = false) {\n $this->customizer_map_array[] = array(\n 'command' => 'add_section',\n 'title' => $title,\n 'section_id' => $section_id,\n 'priority' => $priority\n );\n\n\n }", "public function add()\n {\n $item = new stdClass();\n $item->item_id = null;\n $item->barcode = null;\n $item->price = null;\n $item->stock = null;\n $item->name = null;\n $item->category_id = null;\n $query_category = $this->categorys_m->get();\n $query_unit = $this->units_m->get();\n $unit[null] = '-Pilih-';\n foreach ($query_unit->result() as $u) {\n\n $unit[$u->unit_id] = $u->name;\n };\n $data = [\n 'page' => 'add',\n 'row' => $item,\n 'category' => $query_category,\n 'unit' => $unit,\n 'selectedunit' => null\n ];\n $this->template->load('template', 'product/item/item_add', $data);\n }", "protected function create_section_data() {\n\t\t$this->enable();\n\t\t$this->post_types();\n\t\t$this->headings();\n\t\t$this->min_headings_num();\n\t\t$this->exclude_keywords();\n\t\t$this->title_to_id();\n\t\t$this->id_prefix();\n\t\t$this->in_widget();\n\t\t$this->customize_css();\n\t\t$this->shotcut();\n\t\t$this->fixed_menu_selector();\n\t\t$this->scroll_offset();\n\t}", "public function add_section( $id, $label, $fields ) {\n\t\t$section = new FormLift_Settings_Section( $id, $this->name, $label, $fields );\n\t\tarray_push( $this->sections, $section );\n\t}", "protected function _createItem($data, $config)\n {\n $item = new Rx_Struct_Model_Translate_Section(array(\n 'id' => $data['id'],\n 'subids' => $data['can_have_subids'],\n 'patches' => $data['can_have_patches'],\n 'raw' => $data['raw_keys_allowed'],\n ));\n if ($config['get_descriptions']) {\n $item->description = $data['description'];\n }\n return ($item);\n }", "public function store(Request $request)\n {\n\n \t//Log::info($request);\n\n \t$user = Auth::user();\n\n \tif ($request['section_id']) {\n\n \t\t$templateSection = TemplateSection::find($request['section_id']);\n\n\t\t\tif ($request['section_title']) {\n\t\t\t\tif ($request['section_title'] != $templateSection->section_title) {\n\t\t\t\t\t$this->validate($request, [\n \t'section_title' => 'filled|unique:template_sections,section_title,NULL,id,template_id,'.$request['template_id'].'' \n \t\t]); \n\t\t\t\t\t$templateSection->section_title = $request['section_title'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($request['section_description']) $templateSection->description = $request['section_description'];\n\n\t\t\t$templateSection->save();\n \t}\n \telse {\n\n \t\t$this->validate($request, [\n 'section_title' => 'required|unique:template_sections,section_title,NULL,id,template_id,'.$request['template_id'].''\n ]); \n\n $templateSection = TemplateSection::create([\n 'section_title' => $request['section_title'],\n 'template_id' => $request['template_id'],\n 'order' => $request['order'],\n 'created_by_user_id' => $user->id,\n 'updated_by_user_id' => $user->id,\n ]);\n \t}\n\n \treturn $templateSection;\n\n }", "public function add()\n {\n $category = new stdClass();\n $category->category_id = null;\n $category->name = null;\n $data = [\n 'page' => 'add',\n 'row' => $category\n ];\n $this->template->load('template', 'product/category/category_add', $data);\n }", "public function create()\n {\n\n return view('sections.create');\n }", "public function create()\n {\n // Not needed cause this is coming from the item listing\n }", "public function add(Section $section)\n {\n $this->sections[$section->getKey()] = $section;\n }", "public function add_course_view(){\n\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/add_course';\n\t\t$mainData = array(\n\t\t\t'pagetitle'=> 'Add course',\n\t\t\t'course_list'=> $this->setting_model->Get_All('course'),\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\n\t}", "function addPage(& $page, & $sectionElement) {\n\t\t$pageElement =& $this->_document->createElement('page');\n\t\t$sectionElement->appendChild($pageElement);\n\t\t\n\t\t$this->addCommonProporties($page, $pageElement);\n\t\t\n\t\t// Display options\n\t\tif (!$order = $page->getField('storyorder'))\n\t\t\t$order = \"custom\";\n\t\t$pageElement->setAttribute('story_order', $order);\n\t\t$pageElement->setAttribute('horizontal_rule', (($page->getField('showhr'))?\"TRUE\":\"FALSE\"));\n\t\t$pageElement->setAttribute('show_creator', (($page->getField('showcreator'))?\"TRUE\":\"FALSE\"));\n\t\t$pageElement->setAttribute('show_editor', (($page->getField('showeditor'))?\"TRUE\":\"FALSE\"));\n\t\t$pageElement->setAttribute('show_versions', (($page->getField('showversions'))?\"TRUE\":\"FALSE\"));\n\t\t$pageElement->setAttribute('show_date', (($page->getField('showdate'))?\"TRUE\":\"FALSE\"));\n\t\tif (!$archiving = $page->getField('archiveby'))\n\t\t\t$archiving = \"none\";\n\t\t$pageElement->setAttribute('archiving', $archiving);\n\t\t\n\t\tif ($page->getField('location') == 'right')\n\t\t\t$pageElement->setAttribute('location', 'right');\n\t\telse\n\t\t\t$pageElement->setAttribute('location', 'left');\n\t\t\t\n\t\t$pageElement->setAttribute('type', $page->getField('type'));\n\t\t\n// \t\tif (strlen($page->getField('url')))\n// \t\t\t$pageElement->appendChild($this->_document->createElement('url'))->appendChild(\n// \t\t\t\t$this->_document->createCDATASection($page->getField('url')));\n\t\t\n\t\tforeach ($page->stories as $key => $val) {\n \t\t\tif ($page->stories[$key]->getField('type') == 'link')\n \t\t\t\t$this->addLink($page->stories[$key], $pageElement);\n \t\t\telse if ($page->stories[$key]->getField('type') == 'rss')\n \t\t\t\t$this->addRss($page->stories[$key], $pageElement);\n \t\t\telse if ($page->stories[$key]->getField('type') == 'file')\n \t\t\t\t$this->addFile($page->stories[$key], $pageElement);\n \t\t\telse if ($page->stories[$key]->getField('type') == 'image')\n \t\t\t\t$this->addImage($page->stories[$key], $pageElement);\n \t\t\telse\n\t\t\t\t$this->addStory($page->stories[$key], $pageElement);\n\t\t}\n\n\t}", "public function create ($id_user) {\n\t\t\n\t\t$user = SystemUser::with('entry')->find($id_user);\n\t\t$this->data['user'] = & $user;\n\t\t\n\t\t// Add combo objects\n\t\tself::addCombos($user);\n\t\t\n\t\tif (Request::isMethod('post')) {\n\t\t\t\n\t\t\t// validator\n\t\t\tparent::useCustomValidator();\n\t\t\t$post = Input::all();\n\t\t\t\n\t\t\t$validator = Validator::make($post, $this->rules);\n\t\t\t$validator->setAttributeNames($this->niceNames);\n\t\t\t\n\t\t\tif ( !$validator->passes() ) {\n\t\t\t\t\n\t\t\t\t// store fields\n\t\t\t\tInput::flash();\n\t\t\t\treturn View::make('admin.user.form-sections')->with($this->data)\n\t\t\t\t\t->withErrors($validator->messages());\n\t\t\t}\n\t\t\t\n\t\t\t// Checks if association already exists\n\t\t\t$ss = StudentSectionService::getStudentSection(Input::get('id_section'), $id_user);\n\t\t\tif ($ss) {\n\t\t\t\treturn Redirect::route('admin.user.section.list', [$user->id_user])\n\t\t\t\t\t->withErrors(['Association already exists.']);\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t// create\n\t\t\t$ss = self::populate();\n\t\t\t\n\t\t\tif ( StudentSectionService::save($ss) ) {\n\t\t\t\t\n\t\t\t\t// success\n\t\t\t\tSession::flash('success', 'Successfully added.');\n\t\t\t\t\n\t\t\t\treturn Redirect::route('admin.user.section.list', [$user->id_user]);\n\t\t\t}\n\t\t\t\n\t\t\treturn View::make('admin.user.form-sections')->with($this->data)\n\t\t\t\t->withErrors('Error while trying to add.');\n\t\t}\n\n\t\treturn View::make('admin.user.form-sections')->with($this->data);\n\t}", "public function testEditNewSection() {\n\t\t$name = 'Help:ApiEditPageTest_testEditNewSection';\n\n\t\t// Test on a page that does not already exist\n\t\t$this->assertFalse( Title::newFromText( $name )->exists() );\n\t\tlist( $re ) = $this->doApiRequestWithToken( array(\n\t\t\t'action' => 'edit',\n\t\t\t'title' => $name,\n\t\t\t'section' => 'new',\n\t\t\t'text' => 'test',\n\t\t\t'summary' => 'header',\n\t\t));\n\n\t\t$this->assertEquals( 'Success', $re['edit']['result'] );\n\t\t// Check the page text is correct\n\t\t$text = WikiPage::factory( Title::newFromText( $name ) )\n\t\t\t->getContent( Revision::RAW )\n\t\t\t->getNativeData();\n\t\t$this->assertEquals( \"== header ==\\n\\ntest\", $text );\n\n\t\t// Now on one that does\n\t\t$this->assertTrue( Title::newFromText( $name )->exists() );\n\t\tlist( $re2 ) = $this->doApiRequestWithToken( array(\n\t\t\t'action' => 'edit',\n\t\t\t'title' => $name,\n\t\t\t'section' => 'new',\n\t\t\t'text' => 'test',\n\t\t\t'summary' => 'header',\n\t\t));\n\n\t\t$this->assertEquals( 'Success', $re2['edit']['result'] );\n\t\t$text = WikiPage::factory( Title::newFromText( $name ) )\n\t\t\t->getContent( Revision::RAW )\n\t\t\t->getNativeData();\n\t\t$this->assertEquals( \"== header ==\\n\\ntest\\n\\n== header ==\\n\\ntest\", $text );\n\t}", "public function store(SectionRequest $request)\n {\n $section = new Section($request->all());\n $section->school_id = session('current_school');\n $section->save();\n return redirect('/section');\n }", "function add_another_section($sections){\n\t\n\t//$sections = array();\n\t$sections[] = array(\n\t\t\t\t'title' => __('A Section added by hook', 'nhp-opts'),\n\t\t\t\t'desc' => __('<p class=\"description\">This is a section created by adding a filter to the sections array, great to allow child themes, to add/remove sections from the options.</p>', 'nhp-opts'),\n\t\t\t\t//all the glyphicons are included in the options folder, so you can hook into them, or link to your own custom ones.\n\t\t\t\t//You dont have to though, leave it blank for default.\n\t\t\t\t'icon' => trailingslashit(get_template_directory_uri()).'options/img/glyphicons/glyphicons_062_attach.png',\n\t\t\t\t//Lets leave this as a blank section, no options just some intro text set above.\n\t\t\t\t'fields' => array()\n\t\t\t\t);\n\t\n\treturn $sections;\n\t\n}", "public function register_listing_form_section($id, $section=array()) {\n $section = array_merge( array(\n 'title' => '',\n 'display' => null,\n 'process' => null,\n 'save' => null\n ), $section);\n\n if (!$section['display'] && !$section['process'])\n return false;\n\n $section['id'] = $id;\n $this->_extra_sections[$id] = (object) $section;\n\n return true;\n }", "public function store(Request $request)\n {\n $courseData = $request->course;\n unset($courseData['status']);\n\n DB::beginTransaction();\n try {\n $courseData['instructor_id'] = Auth::user()->id;\n if (isset($courseData['id'])) {\n $course = $this->courseRepository->update($courseData['id'], shallow_copy_array($courseData));\n } else {\n $course = $this->courseRepository->create(shallow_copy_array($courseData));\n // Update index of elastic search\n }\n\n if (isset($courseData[\"sections\"])) {\n $newSectionsData = [];\n $oldSectionsData = [];\n if (isset($courseData['id'])) {\n foreach ($courseData[\"sections\"] as $sectionData) {\n if (!isset($sectionData['id'])) {\n if (!Section::where('uuid', $sectionData['uuid'])->first()) {\n $newSectionsData[] = $sectionData;\n }\n } else {\n $oldSectionsData[] = $sectionData;\n }\n }\n } else {\n $newSectionsData = $courseData[\"sections\"];\n }\n if (count($newSectionsData) > 0) {\n $sections = $course->sections()->createMany(shallow_copy_array_of_array($newSectionsData));\n for ($i = 0; $i < count($sections); $i++) {\n $section = $sections[$i];\n $sectionData = $newSectionsData[$i];\n $lessons = $section->lessons()->createMany($sectionData['lessons']);\n foreach ($lessons as $lesson) {\n $lesson->room()->create();\n }\n $liveLessons = $section->liveLessons()->createMany($sectionData['live_lessons']);\n foreach ($liveLessons as $liveLesson) {\n $liveLesson->room()->create();\n }\n $section->questions()->createMany($sectionData['questions']);\n foreach ($sectionData['questions'] as $questionData) {\n if (isset($questionData['answers'])) {\n $this->answerRepository->createMany($questionData['answers']);\n }\n }\n }\n }\n foreach ($oldSectionsData as $sectionData) {\n $section = $this->sectionRepository->update($sectionData['id'], shallow_copy_array($sectionData));\n $newLessonsData = [];\n $oldLessonsData = [];\n $newLiveLessonsData = [];\n $oldLiveLessonsData = [];\n $newQuestionsData = [];\n $oldQuestionsData = [];\n if (isset($sectionData[\"lessons\"])) {\n foreach ($sectionData[\"lessons\"] as $lessonData) {\n if (!isset($lessonData['id'])) {\n if (!Lesson::where('uuid', $lessonData['uuid'])->first()) {\n $newLessonsData[] = $lessonData;\n }\n } else {\n $oldLessonsData[] = $lessonData;\n }\n }\n }\n if (isset($sectionData[\"live_lessons\"])) {\n foreach ($sectionData[\"live_lessons\"] as $liveLessonData) {\n if (!isset($liveLessonData['id'])) {\n if (!LiveLesson::where('uuid', $liveLessonData['uuid'])->first()) {\n $newLiveLessonsData[] = $liveLessonData;\n }\n } else {\n $oldLiveLessonsData[] = $liveLessonData;\n }\n }\n }\n if (isset($sectionData[\"questions\"])) {\n foreach ($sectionData[\"questions\"] as $questionData) {\n if (!isset($questionData['id'])) {\n if (!Question::where('uuid', $questionData['uuid'])->first()) {\n $newQuestionsData[] = $questionData;\n }\n } else {\n $oldQuestionsData[] = $questionData;\n }\n }\n }\n\n $lessons = $section->lessons()->createMany(shallow_copy_array_of_array($newLessonsData));\n foreach ($lessons as $lesson) {\n $lesson->room()->create();\n }\n foreach ($oldLessonsData as $lessonData) {\n $this->lessonRepository->update($lessonData['id'], $lessonData);\n }\n\n $liveLessons = $section->liveLessons()->createMany(shallow_copy_array_of_array($newLiveLessonsData));\n foreach ($liveLessons as $liveLesson) {\n $liveLesson->room()->create();\n }\n foreach ($oldLiveLessonsData as $liveLessonData) {\n $this->liveLessonRepository->update($liveLessonData['id'], $liveLessonData);\n }\n\n $section->questions()->createMany(shallow_copy_array_of_array($newQuestionsData));\n foreach ($oldQuestionsData as $questionData) {\n $question = $this->questionRepository->update($questionData['id'], $questionData);\n $newAnswersData = [];\n $oldAnswersData = [];\n if (isset($questionData[\"answers\"])) {\n foreach ($questionData[\"answers\"] as $answerData) {\n if (!isset($answerData['id'])) {\n if (!Answer::where('uuid', $answerData['uuid'])->first()) {\n $newAnswersData[] = $answerData;\n }\n } else {\n $oldAnswersData[] = $answerData;\n }\n }\n }\n $question->answers()->createMany($newAnswersData);\n foreach ($oldAnswersData as $answerData) {\n $this->answerRepository->update($answerData['id'], $answerData);\n }\n }\n }\n }\n $this->sectionRepository->whereIn('id', $request->deleteSections)->delete();\n $this->lessonRepository->whereIn('id', $request->deleteLessons)->delete();\n $this->liveLessonRepository->whereIn('id', $request->deleteLiveLessons)->delete();\n $this->questionRepository->whereIn('id', $request->deleteQuestions)->delete();\n $this->answerRepository->whereIn('id', $request->deleteAnswers)->delete();\n DB::commit();\n return \\response()\n ->json([\n \"status\" => \"success\",\n \"course\" => $this->courseRepository\n ->with(['topics', 'sections', 'sections.lessons', 'sections.liveLessons', 'sections.questions', 'sections.questions.answers'])\n ->find($course->id)\n ]);\n } catch (Exception $e) {\n DB::rollBack();\n// throw $e;\n return \\response([\"status\" => \"error\", \"message\" => $e]);\n }\n }", "private function addSection(string $sectionTitle): Section\n {\n foreach ($this->sections as $section) {\n if ($section->getTitle() === $sectionTitle) {\n return $section;\n }\n }\n\n $section = new Section($sectionTitle);\n $this->sections[] = $section;\n sort($this->sections);\n return $section;\n }", "public function run()\n {\n $section = new Section();\n $section->page = 'home';\n $section->title = 'Our Mission';\n $section->Description = 'Our Mission Section';\n $section->text = 'Our passion and Commitment to the industry from Property owners to tenants makes us stand out from the rest. Be assured that your property will be managed with experience professionals that value your investments. Let us help you simplify your property’s day to day operations or we can also help as you go with projects as needed. We specialize in Single family homes, Townhouses, Condos, & Multifamily. Contact Us Today!';\n $section->section_id = 1;\n $section->save();\n\n $section = new Section();\n $section->page = 'home';\n $section->title = 'Let us do the hard work';\n $section->Description = 'Additional Section-1';\n $section->text = 'Our approach is simple. We provide professional, trustworthy property management services, from tenant screening to leasing to resident retention. Whether you are an investor with several rentals or a single home landlord, we have your solution.';\n $section->section_id = 2;\n $section->save();\n\n $section = new Section();\n $section->page = 'home';\n $section->title = 'Profit without the hassle';\n $section->Description = 'Additional Section-2';\n $section->text = 'Owning rental homes can be challenging and costly. The right property management company can make all the difference. Home Vision Property Management is here to to help. Contact us today!';\n $section->section_id = 3;\n $section->save();\n\n $section = new Section();\n $section->page = 'about';\n $section->title = 'about us';\n $section->Description = 'About Us Section';\n $section->text = 'Based out of the San Gabriel Valley and 15 years in California Property Management business, we continue thrive in the dynamic fast paced housing market. Our expertise and knowledge for any changes, updates in our management business is consistently achieved. At Home Visions Property Management we understand your hard work investments. We dedicate ourselves in providing highest quality housing.';\n $section->section_id = 4;\n $section->save();\n\n $section = new Section();\n $section->page = 'property_management';\n $section->title = 'Services Overview';\n $section->Description = 'Main Services Section';\n $section->text = 'Our services range upon customers diverse needs. Whether you need various services or just a one time project we are here to help you. Our expertise in leasing and getting you the right candidates for rentals will have your returns made easy. No stress!';\n $section->section_id = 5;\n $section->save();\n\n $section = new Section();\n $section->page = 'property_management';\n $section->title = 'California Law';\n $section->Description = 'Additional Services Section-1';\n $section->text = 'We are experienced in all fields and practices of fair housing laws and regulations. New laws and practices are always our top priority, Homevision superior practice and knowledgement in all management aspects, we reassure you peace of mind.';\n $section->section_id = 6;\n $section->save();\n }", "public static function add_section($title, $data)\n\t{\n\t\tself::$_custom_sections[] = [$title, $data];\n\t}", "public function getAddSection($sectionType=null,$sectionId=null)\n { \n try {\n if(($sectionType !='how-it-works') && ($sectionType !='our-promises') && ($sectionType !='faqs') && ($sectionType !='features') && ($sectionType !='eqho-by-numbers') && ($sectionType !='clients') && ($sectionType !='banner-image') && ($sectionType !='banner-bottom-logos') && ($sectionType !='banner-info') && ($sectionType !='header-menus') && ($sectionType !='what-we-translate') && ($sectionType !='header-image')){\n return view('errors.404');\n }\n switch($sectionType){\n case 'our-promises';\n $view='our-promises.add_OurPromises';\n break;\n case 'how-it-works';\n $view='how-it-works.add_HowItWorks';\n break;\n case 'faqs';\n $view='faqs.add_Faqs';\n break;\n case 'features';\n $view='features.add_Features';\n break;\n case 'eqho-by-numbers';\n $view='eqho-by-numbers.add_EqhoByNumbers';\n break;\n case 'clients';\n $view='clients.add_Clients';\n break;\n case 'banner-image';\n $view='banner-image.add_BannerImage';\n break;\n case 'banner-bottom-logos';\n $view='banner-bottom-logos.add_BannerBottomLogo';\n break;\n case 'banner-info';\n $view='banner-info.add_BannerInfo';\n break;\n case 'header-menus';\n $view='header-menus.add_HeaderMenu';\n break;\n case 'what-we-translate';\n $view='what-we-translate.add_WhatWeTranslate';\n break;\n case 'header-image';\n $view='header-image.add_HeaderImage';\n break;\n default:\n $view='our-promises.add_OurPromises';\n break;\n }\n $sections=array();\n if($sectionId !=''){\n $section=Section::where('section_type',$sectionType)->where('id',decrypt($sectionId))->first(); \n }\n return view('backend.sections.'.$view,compact('section','sectionId'));\n }catch (\\Exception $e) \n {\n $result = ['exception_message' => $e->getMessage()];\n return view('errors.error', $result);\n }\n }", "public function create()\n {\n\n if(Auth::user()) {\n\n if(Auth::user()->hasRole('user admin')) {\n return view('pages.new_section');\n }\n } \n return back();\n }", "public function actionCreateItem()\r\n {\r\n $catalogItem = new CatalogItem(['scenario' => 'create']);\r\n\r\n if($catalogItem->load(Yii::$app->request->post()) && $catalogItem->save())\r\n {\r\n $this->redirect(['/admin/catalog/index', 'id' => $catalogItem->id]);\r\n }\r\n\r\n $catalog = new Catalog();\r\n\r\n return $this->render(\r\n 'create',\r\n [\r\n 'catalog' => $catalog,\r\n 'catalogItem' => $catalogItem,\r\n ]\r\n );\r\n }", "function addSection(& $section, & $siteElement) {\n\t\t$sectionElement =& $this->_document->createElement('section');\n\t\t$siteElement->appendChild($sectionElement);\n\t\t\n\t\t$this->addCommonProporties($section, $sectionElement);\n\t\t\t\n\t\tforeach ($section->pages as $key => $val) {\n \t\t\tif ($section->pages[$key]->getField('type') == 'link')\n \t\t\t\t$this->addPageNavLink($section->pages[$key], $sectionElement);\n \t\t\telse if ($section->pages[$key]->getField('type') == 'heading')\n \t\t\t\t$this->addHeading($section->pages[$key], $sectionElement);\n \t\t\telse if ($section->pages[$key]->getField('type') == 'divider')\n \t\t\t\t$this->addDivider($section->pages[$key], $sectionElement);\n \t\t\telse if ($section->pages[$key]->getField('type') == 'content')\n \t\t\t\t$this->addPageContent($section->pages[$key], $sectionElement);\n \t\t\telse if ($section->pages[$key]->getField('type') == 'rss')\n \t\t\t\t$this->addPageRSS($section->pages[$key], $sectionElement);\n \t\t\telse if ($section->pages[$key]->getField('type') == 'participants')\n \t\t\t\t$this->addParticipantList($section->pages[$key], $sectionElement);\n \t\t\telse if ($section->pages[$key]->getField('type') == 'tags')\n \t\t\t\t$this->addCategoryList($section->pages[$key], $sectionElement);\n \t\t\telse\n \t\t\t\t$this->addPage($section->pages[$key], $sectionElement);\n\t\t}\n\t}", "public function store(Request $request)\n {\n $rules = \n [\n 'name' => 'required'\n ];\n $this->validate($request, $rules);\n $data = $request->all();\n $section = Section::create($data);\n return $this->showOne($section, 200);\n }", "public function create()\n { \n $pages = page::all();\n return view('sections.create')\n ->with('pages', $pages);\n }", "public function store(Request $request)\n {\n $input = Input::all();\n $validation=Validator::make($input,Section::$rules);\n if($validation->fails())\n {\n return(Redirect::back()->withErrors($validation)->withInput());\n }\n $data = [\n 'name'=>$request ->name,\n 'description'=>$request->description,\n \n ];\n $sections=Section::create($data);\n return(redirect('sections'));\n }", "function add_another_section($sections){\r\n\t\r\n\t$sections = array();\r\n\t$sections[] = array(\r\n\t\t\t\t'title' => __('A Section added by hook', 'SimpleKey'),\r\n\t\t\t\t'desc' => __('<p class=\"description\">This is a section created by adding a filter to the sections array, great to allow child themes, to add/remove sections from the options.</p>', 'SimpleKey'),\r\n\t\t\t\t//all the glyphicons are included in the options folder, so you can hook into them, or link to your own custom ones.\r\n\t\t\t\t//You dont have to though, leave it blank for default.\r\n\t\t\t\t'icon' => trailingslashit(get_template_directory_uri()).'options/img/glyphicons/glyphicons_062_attach.png',\r\n\t\t\t\t//Lets leave this as a blank section, no options just some intro text set above.\r\n\t\t\t\t'fields' => array()\r\n\t\t\t\t);\r\n\t\r\n\treturn $sections;\r\n\t\r\n}", "public function makeSection($sectionFields = [])\n {\n /** @var SectionRepository $sectionRepo */\n $sectionRepo = App::make(SectionRepository::class);\n $theme = $this->fakeSectionData($sectionFields);\n return $sectionRepo->create($theme);\n }", "function additem()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '新增轮播图';\n $this->global['pageName'] = 'carousel_add';\n $data = '';\n\n $this->loadViews(\"carousel_add\", $this->global, $data, NULL);\n }\n }", "public function store(hodCourseRequest $request)\n {\n Course::create($request->all());\n return redirect()->route('courseParticular.index')->with('message', 'item has been added successfully.');\n }", "public function create()\n {\n //\n return view(\"course.create\");\n }", "public function store(Request $request)\n {\n $section = Section::create([\n 'section_name' => $request->section_name,\n 'room_number' => $request->room_number\n ]);\n\n return redirect()->route('section.index');\n }", "function addCategory() {\n var_dump($this->request->data);\n if ($this->request->is('post') || $this->request->is('put')) {\n $ci = $this->CategoryItem->create();\n var_dump($ci);\n if ($this->CategoryItem->save($this->request->data)) {\n $this->Session->setFlash(__('The %s has been saved', __('link')), 'flash/success');\n } else {\n $this->Session->setFlash(__('The %s could not be saved. Please, try again.', __('link')), 'flash/failure');\n }\n// $this->redirect(array('action' => 'edit', $this->Item->id));\n } else {\n $this->redirect(array('action' => 'index'));\n }\n }", "public static function AddMetaToSection($Data){\n if(empty($Data['title']) || empty($Data['section'])){\n return false;\n }\n $Meta = new \\UpfModels\\Meta();\n\n /*** Index ***/\n $Meta->alias = \\Mascame\\Urlify::filter(isset($Data['title'])?$Data['title']:'');\n\n /*** Content ***/\n $Meta->title = isset($Data['title'])?$Data['title']:'';\n $Meta->description = isset($Data['description'])?$Data['description']:'';\n $Meta->keywords = isset($Data['keywords'])?$Data['keywords']:'';\n\n /*** Filters ***/\n $Meta->category_id = isset($Data['category_id'])?$Data['category_id']:0;\n $Meta->region_id = isset($Data['region_id'])?$Data['region_id']:0;\n\n /*** Relations ***/\n $Meta->section = $Data['section'];\n $Meta->user_id = isset($Data['user_id'])?$Data['user_id']:0;\n $Meta->comments_id = \\UpfSeeds\\CommentsSeeder::AddCommentsToSection($Data['section']);\n\n /*** Statuses ***/\n $Meta->status = isset($Data['status'])?$Data['status']:\\Config::get('models/Fields.status.default');\n $Meta->privileges = isset($Data['privileges'])?$Data['privileges']:\\Config::get('models/Fields.status.privileges');\n $Meta->rating = isset($Data['rating'])?$Data['rating']:0;\n $Meta->favorite = isset($Data['favorite'])?$Data['favorite']:0;\n\n if($Meta->save()){\n return $Meta->id;\n }else{\n return false;\n }\n }", "public function run()\n {\n Section::create([\n 'name' => 'Section A',\n 'type' => 1,\n ]);\n\n Section::create([\n 'name' => 'Section B',\n 'type' => 2,\n ]);\n }", "public function store(Request $request)\n {\n //\n $section = new section();\n $section->name = $request['section'];\n $section->save();\n\n return redirect('/section');\n }", "public function createItem( $preparedItem ) {\n\t}", "public function create()\n {\n return view(\"guardian.pages.courses.create\");\n }", "function method_createitem($request)\n{\n $log = Loggermanager::getLogger('swim.createitem');\n $user = Session::getUser();\n \n checkSecurity($request, true, true);\n \n RequestCache::setNoCache();\n \n if (($user->isLoggedIn())&&($user->hasPermission('documents',PERMISSION_WRITE)))\n {\n if ($request->hasQueryVar('targetvariant') && $request->hasQueryVar('targetsection')\n && $request->hasQueryVar('class'))\n {\n $class = FieldSetManager::getClass($request->getQueryVar('class'));\n $section = FieldSetManager::getSection($request->getQueryVar('targetsection'));\n if (($section !== null) && ($class !== null))\n {\n $item = Item::createItem($section, $class);\n if ($item !== null)\n {\n $variant = $item->createVariant($request->getQueryVar('targetvariant'));\n if ($variant !== null)\n {\n $version = $variant->createNewVersion();\n if ($version !== null)\n {\n if ($request->hasQueryVar('parentitem') && $request->hasQueryVar('parentsequence'))\n {\n $parent = Item::getItem($request->getQueryVar('parentitem'));\n $sequence = $parent->getSequence($request->getQueryVar('parentsequence'));\n if ($sequence !== null)\n $sequence->appendItem($item);\n }\n $req = new Request();\n $req->setMethod('admin');\n $req->setPath('items/edit.tpl');\n $req->setQueryVar('item', $item->getId());\n $req->setQueryVar('version', $version->getVersion());\n redirect($req);\n }\n else\n {\n $log->warn('Unable to create version');\n displayServerError($request);\n }\n }\n else\n {\n $log->warn('Unable to create variant');\n displayServerError($request);\n }\n }\n else\n {\n $log->warn('Unable to create item');\n displayServerError($request);\n }\n }\n else\n {\n $log->warn('Section does not exist.');\n displayNotFound($request);\n }\n }\n else\n {\n $log->error('Invalid paramaters specified.');\n displayServerError($request);\n }\n }\n else\n {\n displayAdminLogin($request);\n }\n}", "public function create()\n {\n //$categories = ['' => 'دسته بندی ها'] + CategoryModel::orderby('id', 'desc');\n $contents = CourseModel::orderby('id', 'desc')->get();\n\n\n return View('web.admin.course.add', ['contents' => $contents]);\n }", "public function store(Request $request)\n {\n $section = $request->validate([\n 'title' => ['required']\n ]);\n\n Section::create($section);\n\n session()->flash('msg' , 's: section created successfully');\n return redirect(route('admin.sections.index'));\n }", "public function store(Request $request)\n {\n\n $validate = $request->validate([\n 'section_name' => 'required | unique:sections',\n 'description' => 'required'\n ], [\n 'section_name.required' => 'يرجي ادخال اسم القسم ',\n 'section_name.unique' => 'هذا القسم موجود مسبقا',\n 'description.required' => 'يرجي ادخال وصف للقسم '\n ]);\n\n\n Section::create([\n 'section_name' => $request->section_name,\n 'description' => $request->description,\n 'created_by' => (Auth::user()->name)\n ]);\n session()->flash('insert', 'تم اضافة القسم نجاح');\n return redirect()->route('sections.index');\n }", "public function createSectionRecord($sections,$producer_id){\n if(isset($sections) && count($sections) && $producer_id){\n foreach($sections as $sectionData){\n $createSectionsData = array(\n 'name' => $sectionData['name'],\n 'name_key' => $sectionData['name_key'],\n 'type' => 1\n ); \n //$createdSections = Section::where($sections['id'],$sectionData['id'])->update($createSectionsData);\n //$createdSections = Section::where(['id'=>isset($sectionData['id'])?$sectionData['id']:null])->update($createSectionsData);\n \n if(isset($sectionData['id']) && $sectionData['id']!=NULL){\n Section::where('id',$sectionData['id'])->update($createSectionsData);\n $SectionsId = $sectionData['id'];\n }\n else{\n $getSectionExist=Section::where(['name'=>$sectionData['name'],'type'=>1])->first(); \n if(empty($getSectionExist)){\n $createdSections = Section::create($createSectionsData);\n $SectionsId = $createdSections->id;\n }\n else{\n // $sectionData['id']=$getSectionExist->id;\n $SectionsId = $getSectionExist->id;\n }\n }\n // $SectionsId = ($sectionData['id']!=null)?$sectionData['id']:$createdSections->id;\n $fieldsidsArray = array();\n if(isset($sectionData['custom_fields']) && count($sectionData['custom_fields'])){\n if(count($sectionData['custom_fields'])){\n \n if(isset($sectionData['custom_fields']['name']) && count($sectionData['custom_fields']['name'])){\n foreach($sectionData['custom_fields']['name'] as $key2=>$customFieldsName){\n $createColumn = array(\n 'name' => $customFieldsName,\n 'producer_id' => $producer_id,\n 'section_id' => $SectionsId,\n 'type' => $sectionData['custom_fields']['type'][$key2],\n 'item_list' => $sectionData['custom_fields']['item_list'][$key2]\n );\n $create_Fields=CustomFields::create($createColumn);\n array_push($fieldsidsArray,$create_Fields->id);\n }\n }\n }\n }\n if(isset($sectionData['custom_rows']) && count($sectionData['custom_rows'])){\n if(count($sectionData['custom_rows'])){\n if(isset($sectionData['custom_rows']['customdata']) && count($sectionData['custom_rows']['customdata'])){\n \n if(isset($sectionData['custom_rows']['customdata'][0]['value']) && count($sectionData['custom_rows']['customdata'][0]['value'])){\n $rowsIdsArray = array(); $rowCount = count($sectionData['custom_rows']['customdata'][0]['value']); \n \n foreach($sectionData['custom_fields']['name'] as $RowKey=>$customFieldsName){\n \n if(isset($sectionData['custom_rows']['customdata'][0]['value']) && count($sectionData['custom_rows']['customdata'][0]['value'])){\n \n $i =0;\n foreach($sectionData['custom_rows']['customdata'][$RowKey]['value'] as $key => $customdata){\n if(isset($rowsIdsArray) && (count($rowsIdsArray) == $rowCount ) ){\n // echo $rowCount; \n // echo $key; \n // print_r($rowsIdsArray);\n // echo $rowsIdsArray[$i]; \n // die; \n if(isset($rowsIdsArray[$i]) && ($rowsIdsArray[$i]!=\"\" || $rowsIdsArray[$i]!='NULL') ){\n $createdRowId = $rowsIdsArray[$i]; \n }\n else{\n $createdRowId = NULL;\n }\n }else{\n $ceateRow = array(\n 'producer_id' => $producer_id,\n 'section_id' => $SectionsId\n );\n $createcustom_rows=CustomRows::create($ceateRow);\n array_push($rowsIdsArray,$createcustom_rows->id);\n $createdRowId = $createcustom_rows->id;\n }\n\n $createCustomProducer = array(\n 'producer_id' => $producer_id,\n 'custom_field_id' => $fieldsidsArray[$RowKey]?$fieldsidsArray[$RowKey]:$customdata['custom_field_id'],\n 'custom_row_id' => $createdRowId?$createdRowId:null,\n 'value' => $customdata?$customdata:0\n );\n CustomProducerData::create($createCustomProducer);\n $i++;\n }\n }\n }\n } \n\n }\n }\n }\n \n \n } /* end of the Section*/\n }\n }", "public function run()\n {\n $data=[\n ['name'=>'section 1',\n 'display_name'=>'section 1'],\n ['name'=>'section 2',\n 'display_name'=>'section 2'],\n ['name'=>'section 3',\n 'display_name'=>'section 3'\n ]\n \n ];\n Section::insert($data);\n }", "public function create()\n {\n $sections = section::all();\n return view('configs.create')\n ->with('sections', $sections);\n }", "public function run()\n {\n Section::insert([\n ['bid' => 1, 'section'=> 'Section A'],\n ['bid' => 1, 'section'=> 'Section B'],\n ['bid' => 1, 'section'=> 'Section C'],\n ['bid' => 1, 'section'=> 'Section D'],\n ]);\n }", "public function addItem(Collection $collection, ItemCreateStruct $itemCreateStruct): Item;", "public function newAction($id, $section_id)\n\t{\n\t\t$em = $this->getDoctrine()->getManager();\n\t\t$block = $em->getRepository('NovuscomCMFBundle:Block')->find($id);\n\t\t$crumbs = $this->get(\"apy_breadcrumb_trail\");\n\t\t$crumbs->add('ACMF', 'cmf_admin_homepage');\n\t\t$crumbs->add('Инфоблоки', 'admin_block');\n\t\t$crumbs->add($block->getName(), 'admin_block_show', array('id' => $block->getId()));\n\t\tif ($section_id) {\n\t\t\t$section = $em->getRepository('NovuscomCMFBundle:Section')->find($section_id);\n\t\t\t$parentsSection = $em->getRepository('NovuscomCMFBundle:Section')->createQueryBuilder('s')\n\t\t\t\t->where(\"s.block=:block\")\n\t\t\t\t->andWhere(\"s.lft<:left\")\n\t\t\t\t->andWhere(\"s.rgt>:right\")\n\t\t\t\t->andWhere(\"s.lvl<:level\")\n\t\t\t\t->andWhere(\"s.root=:root\")\n\t\t\t\t->setParameters(array(\n\t\t\t\t\t'block' => $block,\n\t\t\t\t\t'left' => $section->getLft(),\n\t\t\t\t\t'right' => $section->getRgt(),\n\t\t\t\t\t'level' => $section->getLvl(),\n\t\t\t\t\t'root' => $section->getRoot(),\n\t\t\t\t))\n\t\t\t\t->orderBy('s.lft', 'ASC')\n\t\t\t\t->getQuery()\n\t\t\t\t->getResult();\n\t\t\tforeach ($parentsSection as $p) {\n\t\t\t\t$crumbs->add($p->getName(), 'admin_block_show_section', array('id' => $block->getId(), 'section_id' => $p->getId()));\n\t\t\t}\n\t\t\t$crumbs->add($section->getName(), 'admin_block_show_section', array('id' => $block->getId(), 'section_id' => $section->getId()));\n\t\t}\n\n\n\t\t$entity = new Element();\n\t\t$entity->setSort(500);\n\t\t$entity->setActive(true);\n\t\t$form = $this->createCreateForm($entity);\n\n\t\t$crumbs->add('Создание элемента');\n\t\treturn $this->render('NovuscomCMFBundle:Element:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}", "public function actionCreate() {\n $model = new Course();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public static function AddMetaToSection($Data){\n if(empty($Data['title']) || empty($Data['section'])){\n return false;\n }\n $Meta = new \\UpfModels\\Meta();\n\n /*** Index ***/\n $Meta->alias = $Meta->CreateUniqueAlias(\\Mascame\\Urlify::filter(isset($Data['title'])?$Data['title']:''),'\\UpfModels\\\\Meta');\n\n /*** Content ***/\n $Meta->title = isset($Data['title'])?$Data['title']:'';\n $Meta->description = isset($Data['description'])?$Data['description']:'';\n $Meta->keywords = isset($Data['keywords'])?$Data['keywords']:'';\n\n /*** Filters ***/\n $Meta->category_id = isset($Data['category_id'])?$Data['category_id']:0;\n $Meta->region_id = isset($Data['region_id'])?$Data['region_id']:0;\n\n /*** Relations ***/\n $Meta->section = $Data['section'];\n //$Meta->comments_id = \\UpfSeeds\\CommentsSeeder::AddCommentsToSection($Data['section']);\n $Meta->comments_id = \\UpfModels\\Meta::max('comments_id') + 1;\n\n /*** Statuses ***/\n $Meta->status = isset($Data['status'])?$Data['status']:\\Config::get('models/Fields.status.default');\n $Meta->privileges = isset($Data['privileges'])?$Data['privileges']:\\Config::get('models/Fields.status.privileges');\n $Meta->rating = isset($Data['rating'])?$Data['rating']:0;\n $Meta->favorite = isset($Data['favorite'])?$Data['favorite']:0;\n\n\n// Todo :: Relation Tags\n// if(isset($Data->tags)){\n// $Meta->tags()->sync($Data->tags);\n// }\n\n if($Meta->save()){\n return [$Meta->id,$Meta->alias];\n }else{\n return false;\n }\n }", "public function create()\n {\n //\n // $item = Item::with(['unit','category'])->first();\n $section_header = \"Create Item\";\n $unit= Unit::all();\n $category = Category::all();\n return view('product.item.item_create',compact(['unit','category','section_header']));\n }", "public function create()\n {\n $sections = Section::all();\n return view('cursos.create')->withSections($sections);\n }", "public function create()\n {\n $departments = (new Department)->getDepartmentsByPluck()->toArray();\n return view('admin.section.add', ['departments' => $departments, 'active' => 'section']);\n }", "public function createItem($data);", "public function store(Request $request)\n {\n\n $validatedData = $request->validate([\n 'section_name' => ['required', 'unique:sections', 'max:255'],\n ],\n [\n 'section_name.required' => 'اسم القسم مطلوب',\n 'section_name.unique' => 'قيمة حقل القسم مُستخدمة من قبل'\n ]);\n\n Section::create([\n 'section_name' => $request->section_name,\n 'description' => $request->description,\n 'created_by' => (Auth::user()->name),\n ]);\n\n return redirect()->back()->with('add', 'اضافة قسم');\n\n }", "public function create()\n\t{\n\t\t$this->auth->restrict('Phases.Content.Create');\n\n\t\tif (isset($_POST['save']))\n\t\t{\n\t\t\tif ($insert_id = $this->save_phases())\n\t\t\t{\n\t\t\t\t// Log the activity\n\t\t\t\t$this->activity_model->log_activity($this->current_user->id, lang('phases_act_create_record').': ' . $insert_id . ' : ' . $this->input->ip_address(), 'phases');\n\n\t\t\t\tTemplate::set_message(lang('phases_create_success'), 'success');\n\t\t\t\tredirect(SITE_AREA .'/content/phases');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tTemplate::set_message(lang('phases_create_failure') . $this->phases_model->error, 'error');\n\t\t\t}\n\t\t}\n\t\tAssets::add_module_js('phases', 'phases.js');\n\n\t\tTemplate::set('toolbar_title', lang('phases_create') . ' Phases');\n\t\tTemplate::render();\n\t}" ]
[ "0.67035383", "0.6679118", "0.64909226", "0.6433807", "0.6403132", "0.63927436", "0.62755406", "0.6270302", "0.62680274", "0.6252667", "0.62281173", "0.61910504", "0.61681443", "0.6112842", "0.60703045", "0.60674065", "0.6058572", "0.6055943", "0.6049221", "0.6023801", "0.59770006", "0.5968835", "0.59653425", "0.59447855", "0.5931809", "0.5892699", "0.58889025", "0.5880611", "0.58746856", "0.5868142", "0.58672863", "0.58672863", "0.5864046", "0.58603436", "0.5831646", "0.5788055", "0.57840943", "0.5766935", "0.57428426", "0.5740924", "0.57293755", "0.5726379", "0.5716043", "0.57033575", "0.5698491", "0.5672978", "0.5659005", "0.56325114", "0.56291723", "0.56233925", "0.56073904", "0.56064516", "0.56012595", "0.5594772", "0.5584828", "0.5578432", "0.55508715", "0.5541873", "0.55398554", "0.5533581", "0.55313486", "0.5522405", "0.5518798", "0.5509144", "0.55087376", "0.5490331", "0.5489916", "0.5482956", "0.54802316", "0.54757", "0.5464049", "0.54332", "0.54251426", "0.5401342", "0.54003453", "0.5376849", "0.5372497", "0.5362632", "0.5359306", "0.53580314", "0.5355788", "0.5350071", "0.5344417", "0.5337408", "0.5335527", "0.5335076", "0.5315722", "0.531479", "0.5313075", "0.5304497", "0.530229", "0.5289544", "0.5282815", "0.5280638", "0.5274237", "0.5260933", "0.52515256", "0.52502084", "0.5248628", "0.52438617" ]
0.7669505
0
Add list new items to section.
public function add_items_section( $section_id, $items = array() ) { $order = 1; $current_items = $this->get_section_items( $section_id ); // allow hook do_action( 'learn-press/before-add-items-section', $items, $section_id, $this->course_id ); global $wpdb; $all_items = array_merge( $current_items, $items ); $result = array(); foreach ( $all_items as $item ) { $item = (array) $item; $exist = $this->item_section_exist( $section_id, $item['id'] ); if ( $exist ) { $a = $wpdb->update( $wpdb->learnpress_section_items, array( 'item_order' => $order ), array( 'section_id' => $section_id, 'item_id' => $item['id'], ) ); } else { $a = $wpdb->insert( $wpdb->learnpress_section_items, array( 'section_id' => $section_id, 'item_id' => $item['id'], 'item_order' => $order, 'item_type' => $item['type'], ) ); } // get WP Post $post = get_post( $item['id'] ); $item = array_merge( $item, array( 'id' => $post->ID, 'title' => $post->post_title, 'type' => $post->post_type, 'preview' => get_post_meta( $post->ID, '_lp_preview', true ) == 'yes', ) ); if ( ! $exist ) { do_action( 'learn-press/added-item-to-section', $item, $section_id, $this->course_id ); } else { do_action( 'learn-press/updated-item-to-section', $item, $section_id, $this->course_id ); } $result[] = $item; $order ++; } LP_Object_Cache::set( 'course-' . $this->course_id . '-' . $section_id, $all_items, 'learn-press/course-section-items' ); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_sections()\n {\n }", "function add_sections_and_fields(): void {}", "public function add( EchoContainmentList $list ) {\n\t\t$this->lists[] = $list;\n\t}", "public function append($items);", "public function addItems(array $items);", "protected function setupListOperation()\n {\n CRUD::setFromDb();\n\n $this->crud->addButtonFromView('line', 'more_items', 'more.items', 'end');\n }", "function add_another_section($sections){\n\t\n\t//$sections = array();\n\t$sections[] = array(\n\t\t\t\t'title' => __('A Section added by hook', 'nhp-opts'),\n\t\t\t\t'desc' => __('<p class=\"description\">This is a section created by adding a filter to the sections array, great to allow child themes, to add/remove sections from the options.</p>', 'nhp-opts'),\n\t\t\t\t//all the glyphicons are included in the options folder, so you can hook into them, or link to your own custom ones.\n\t\t\t\t//You dont have to though, leave it blank for default.\n\t\t\t\t'icon' => trailingslashit(get_template_directory_uri()).'options/img/glyphicons/glyphicons_062_attach.png',\n\t\t\t\t//Lets leave this as a blank section, no options just some intro text set above.\n\t\t\t\t'fields' => array()\n\t\t\t\t);\n\t\n\treturn $sections;\n\t\n}", "public function append(...$items): self;", "public function add(...$items);", "public function create_sections() {\n\t\tif ( count( $this->sections ) > 0 ) {\n\t\t\tforeach ( $this->sections as $k => $v ) {\n\t\t\t\tadd_settings_section( $k, $v['name'], array( $this, 'section_description' ), $this->token );\n\t\t\t}\n\t\t}\n\t}", "function fill_in_additional_list_fields()\r\n\t{\r\n\t}", "function add_another_section($sections){\r\n\t\r\n\t$sections = array();\r\n\t$sections[] = array(\r\n\t\t\t\t'title' => __('A Section added by hook', 'SimpleKey'),\r\n\t\t\t\t'desc' => __('<p class=\"description\">This is a section created by adding a filter to the sections array, great to allow child themes, to add/remove sections from the options.</p>', 'SimpleKey'),\r\n\t\t\t\t//all the glyphicons are included in the options folder, so you can hook into them, or link to your own custom ones.\r\n\t\t\t\t//You dont have to though, leave it blank for default.\r\n\t\t\t\t'icon' => trailingslashit(get_template_directory_uri()).'options/img/glyphicons/glyphicons_062_attach.png',\r\n\t\t\t\t//Lets leave this as a blank section, no options just some intro text set above.\r\n\t\t\t\t'fields' => array()\r\n\t\t\t\t);\r\n\t\r\n\treturn $sections;\r\n\t\r\n}", "function register_block_core_page_list_item()\n {\n }", "public function addSection($section){\n\t\t\t//$this->sections[$section->uuid] = $section;\n\t\t\tarray_push($this->sections, $section);\n\t\t}", "abstract public function add_item();", "function dynamic_section( $sections ) {\n //$sections = array();\n $sections[] = array(\n 'title' => __( 'Section via hook', 'slova' ),\n 'desc' => __( '<p class=\"description\">This is a section created by adding a filter to the sections array. Can be used by child themes to add/remove sections from the options.</p>', 'slova' ),\n 'icon' => 'el-icon-paper-clip',\n // Leave this as a blank section, no options just some intro text set above.\n 'fields' => array()\n );\n\n return $sections;\n }", "function dynamic_section( $sections ) {\n //$sections = array();\n $sections[] = array(\n 'title' => __( 'Section via hook', 'redux-framework-demo' ),\n 'desc' => __( '<p class=\"description\">This is a section created by adding a filter to the sections array. Can be used by child themes to add/remove sections from the options.</p>', 'redux-framework-demo' ),\n 'icon' => 'el el-paper-clip',\n // Leave this as a blank section, no options just some intro text set above.\n 'fields' => array()\n );\n\n return $sections;\n }", "function tt_add_menu_items(){\n\tadd_menu_page('Example Plugin List Table', 'List Table Example', 'activate_plugins', 'tt_list_test', 'tt_render_list_page');\n}", "function set_items() { \n\n\t\t$this->items = $this->get_items();\n\n\t}", "function theme_thumbwhere_contentcollectionitem_add_list($variables) {\n\n\n //$content = $variables['content'];\n $output = '';\n /*\n if ($content) {\n $output = '<dl class=\"thumbwhere_contentcollectionitem-type-list\">';\n foreach ($content as $item) {\n $output .= '<dt>' . l($item['title'], $item['href']) . '</dt>';\n $output .= '<dd>' . filter_xss_admin($item['description']) . '</dd>';\n }\n $output .= '</dl>';\n }\n else {\n if (user_access('administer thumbwhere_contentcollectionitem types')) {\n $output = '<p>' . t('ThumbWhereContentCollectionItem Entities cannot be added because you have not created any thumbwhere_contentcollectionitem types yet. Go to the <a href=\"@create-thumbwhere_contentcollectionitem-type\">thumbwhere_contentcollectionitem type creation page</a> to add a new thumbwhere_contentcollectionitem type.', array('@create-thumbwhere_contentcollectionitem-type' => url('admin/structure/thumbwhere_contentcollectionitem_types/add'))) . '</p>';\n }\n else {\n $output = '<p>' . t('No thumbwhere_contentcollectionitem types have been created yet for you to use.') . '</p>';\n }\n }\n */\n return $output;\n}", "public function addItem($item) {\n\t\t$this->result .= '<li>' . $item . '</li>' . PHP_EOL;\n\t}", "public function addListItem($text, $depth = 0, $styleFont = null, $styleList = null, $styleParagraph = null) {\n\t\t$text = utf8_encode($text);\n\t\t$listItem = new PHPWord_Section_ListItem($text, $depth, $styleFont, $styleList, $styleParagraph);\n\t\t$this->_elementCollection[] = $listItem;\n\t\treturn $listItem;\n\t}", "function startEndArray ($items, $newItem)\n{\n echo 'Add new item to (S)tart or (E)nd of list? ' . PHP_EOL;\n $option = getInput(true);\n\n if ($option == 's') {\n array_unshift($items, $newItem);\n } else {\n array_push($items, $newItem);\n }\n\n return $items; \n}", "function additem()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '新增轮播图';\n $this->global['pageName'] = 'carousel_add';\n $data = '';\n\n $this->loadViews(\"carousel_add\", $this->global, $data, NULL);\n }\n }", "public function addSection()\n\t{\n\t\t// Create the setting section with the WordPress Settings Api\n\t\tadd_settings_section(\n\t\t\t$this->section_id,\n\t\t\t$this->section_options['title'],\n\t\t\tarray($this->section_callback, 'callback'),\n\t\t\t$this->section_options['parent_id']\n\t\t);\n\t}", "public function addPage() {\n $item = menu_get_item();\n $content = system_admin_menu_block($item);\n\n if (count($content) == 1) {\n $item = array_shift($content);\n drupal_goto($item['href']);\n }\n\n return theme('thumbwhere_contentcollectionitem_add_list', array('content' => $content));\n }", "function template_preprocess_multibanner_add_list(&$variables) {\n $variables['bundles'] = [];\n if (!empty($variables['content'])) {\n foreach ($variables['content'] as $bundle) {\n /** @var \\Drupal\\multibanner\\MultibannerBundleInterface $bundle */\n $variables['bundles'][$bundle->id()] = [\n 'type' => $bundle->id(),\n 'add_link' => Link::createFromRoute($bundle->label(), 'multibanner.add', ['multibanner_bundle' => $bundle->id()]),\n 'description' => [\n '#markup' => $bundle->getDescription(),\n ],\n ];\n }\n }\n}", "public static function add_section($title, $data)\n\t{\n\t\tself::$_custom_sections[] = [$title, $data];\n\t}", "public function add($items) {\n\t\tforeach(func_get_args() as $item) {\n\t\t\t$this->list[$this->count++] = $item;\n\t\t}\n\t}", "function addItem(SitemapItem $item){\r\n $this->items[] = $item;\r\n }", "public function add($item)\n {\n $this->addArray('content', $item, array('ButtonContainer', 'Container', 'Form', 'Heading', 'HTML', 'Image', 'Checkbox', 'Email', 'HiddenField', 'Label', 'Password', 'Phone', 'RadioButtons', 'SelectMenu', 'TextInput', 'TextArea', 'Upload', 'XList', 'Table'));\n }", "public function addItems($items)\n {\n foreach ($items as $item)\n {\n $this->addItem($item);\n }\n }", "public function addItem($item)\n {\n // Push item into list of array\n array_push($this->items, $item);\n }", "public function add_custom_list_item() {\n\t\t//verify nonce\n\t\tcheck_ajax_referer( 'fsn-admin-edit', 'security' );\n\t\t\n\t\t//verify capabilities\n\t\tif ( !current_user_can( 'edit_post', intval($_POST['post_id']) ) )\n\t\t\tdie( '-1' );\n\t\t\n\t\tglobal $fsn_custom_lists;\t\n\t\t$listID = sanitize_text_field($_POST['listID']);\n\t\t$params = $fsn_custom_lists[$listID]['params'];\n\t\t$uniqueID = uniqid();\t\n\t\techo '<div class=\"custom-list-item\">';\t\t\n\t\t\techo '<div class=\"custom-list-item-details\">';\t\t\t\t\n\t\t\t\tforeach($params as $param) {\n\t\t\t\t\t$param_value = '';\n\t\t\t\t\t$param['param_name'] = (!empty($param['param_name']) ? $param['param_name'] : '') . '-paramid'. $uniqueID;\n\t\t\t\t\t$param['nested'] = true;\n\t\t\t\t\t//check for dependency\n\t\t\t\t\t$dependency = !empty($param['dependency']) ? true : false;\n\t\t\t\t\tif ($dependency === true) {\n\t\t\t\t\t\t$depends_on_field = $param['dependency']['param_name']. '-paramid'. $uniqueID;\n\t\t\t\t\t\t$depends_on_not_empty = !empty($param['dependency']['not_empty']) ? $param['dependency']['not_empty'] : false;\n\t\t\t\t\t\tif (!empty($param['dependency']['value']) && is_array($param['dependency']['value'])) {\n\t\t\t\t\t\t\t$depends_on_value = json_encode($param['dependency']['value']);\n\t\t\t\t\t\t} else if (!empty($param['dependency']['value'])) {\n\t\t\t\t\t\t\t$depends_on_value = $param['dependency']['value'];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$depends_on_value = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$dependency_callback = !empty($param['dependency']['callback']) ? $param['dependency']['callback'] : '';\n\t\t\t\t\t\t$dependency_string = ' data-dependency-param=\"'. esc_attr($depends_on_field) .'\"'. ($depends_on_not_empty === true ? ' data-dependency-not-empty=\"true\"' : '') . (!empty($depends_on_value) ? ' data-dependency-value=\"'. esc_attr($depends_on_value) .'\"' : '') . (!empty($dependency_callback) ? ' data-dependency-callback=\"'. esc_attr($dependency_callback) .'\"' : '');\n\t\t\t\t\t}\n\t\t\t\t\techo '<div class=\"form-group'. ( !empty($param['class']) ? ' '. esc_attr($param['class']) : '' ) .'\"'. ( $dependency === true ? $dependency_string : '' ) .'>';\n\t\t\t\t\t\techo FusionCore::get_input_field($param, $param_value);\n\t\t\t\t\techo '</div>';\n\t\t\t\t}\n\t\t\t\techo '<a href=\"#\" class=\"collapse-custom-list-item\">'. __('collapse', 'fusion') .'</a>';\n\t \t\techo '<a href=\"#\" class=\"remove-custom-list-item\">'. __('remove', 'fusion') .'</a>';\n\t\t\techo '</div>';\n\t\techo '</div>';\n\t\texit;\n\t}", "public function new_item( $section_id, $item ) {\n\t\t// course author, for case co-instructor add new items.\n\t\t$author_id = get_current_user_id();\n\n\t\tif ( ! $author_id ) {\n\t\t\t$author_id = get_post_field( 'post_author', $this->course_id ) ? get_post_field( 'post_author', $this->course_id ) : learn_press_get_current_user_id();\n\t\t}\n\n\t\t// $item = wp_parse_args( $item, array( 'title' => '', 'type' => '' ) );\n\t\t$item = array_merge(\n\t\t\tarray(\n\t\t\t\t'title' => '',\n\t\t\t\t'type' => '',\n\t\t\t),\n\t\t\t$item\n\t\t);\n\n\t\t$args = array(\n\t\t\t'title' => $item['title'],\n\t\t\t'author' => $author_id,\n\t\t);\n\n\t\tif ( ! empty( $item['id'] ) ) {\n\t\t\t$item['old_id'] = $item ['id'];\n\t\t}\n\t\tif ( $item['type'] == LP_LESSON_CPT ) {\n\t\t\t$lesson_curd = new LP_Lesson_CURD();\n\t\t\t$item['id'] = $lesson_curd->create( $args );\n\t\t} elseif ( $item['type'] == LP_QUIZ_CPT ) {\n\t\t\t$quiz_curd = new LP_Quiz_CURD();\n\t\t\t$item['id'] = $quiz_curd->create( $args );\n\t\t} else {\n\t\t\t$item['id'] = apply_filters( 'learn-press/new-section-item-data', $item['id'], $item, $args, $this->course_id );\n\t\t}\n\n\t\tif ( is_wp_error( $item['id'] ) || ! $item['id'] ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$item['preview'] = get_post_meta( $item['id'], '_lp_preview', true ) == 'yes';\n\n\t\t// allow hook\n\t\tdo_action( 'learn-press/after-new-section-item', $item['id'], $section_id, $this->course_id );\n\n\t\t// add item to section\n\t\treturn $this->add_items_section( $section_id, array( $item ) );\n\t}", "public function addItem($item){\n $this->items[] = $item;\n }", "protected function setListActions()\n\t{\n\t\t$user = JFactory::getUser();\n\t\tif ($user->authorise('k2.extrafields.manage', 'com_k2'))\n\t\t{\n\t\t\tK2Response::addAction('add', 'K2_ADD', array('data-action' => 'add'));\n\t\t}\n\t}", "function add($item);", "public function addSectionData()\n\t\t{\n\t\t\t_is_logged_in();\n\n\t\t\t$data = array();\n\n\t\t\tif ($_POST) {\n\n\t\t\t\tforeach ($this->input->post() as $key => $value) {\n\n\t\t\t\t\tif ($key == 'section_name') {\n\t\t\t\t\t\t$data['section_slug'] = url_title(convert_accented_characters($value));\n\t\t\t\t\t}\n\t\t\t\t\t$data[$key] = $value;\n\t\t\t\t}\n\n\t\t\t\t$data['language'] = $this->session->userdata('language');\n\t\t\t}\n\n\t\t\t// Send data\n\t\t\t$query = $this->co_pages_model->add_section($data);\n\n\t\t\tif ($query > 0) {\n\t\t\t\tredirect('admin/co_pages/add_section?action=success');\n\t\t\t} else {\n\t\t\t\tredirect('admin/co_pages/add_section?action=error');\n\t\t\t}\n\n\t\t}", "public function addPage() {\n $item = menu_get_item();\n $content = system_admin_menu_block($item);\n\n if (count($content) == 1) {\n $item = array_shift($content);\n drupal_goto($item['href']);\n }\n\n return theme('thumbwhere_contentcollection_add_list', array('content' => $content));\n }", "public function addItems(array $items)\n {\n // array += array save key ordering instead of array_merge func\n $this->items += $items;\n }", "public function addMultipleItems($items){\r\n if(!empty($items)){foreach($items as $item){ //lopp through the items\r\n $this->addSimpleItem($item); //And add them 1 by 1\r\n }}\r\n }", "function privAddList($p_filedescr_list, &$p_result_list, &$p_options)\n {\n }", "public function addSection(FW_Html_Section $section){\n\t\t$this->sections->add($section);\n\t}", "function addContent($content) {\n\t\t$this->_items[] = array('content', $content);\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"detail_avaluo\"\n\t\t$item = &$this->ListOptions->Add(\"detail_avaluo\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->AllowList(CurrentProjectID() . 'avaluo') && !$this->ShowMultipleDetails;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\tif (!isset($GLOBALS[\"avaluo_grid\"])) $GLOBALS[\"avaluo_grid\"] = new cavaluo_grid;\n\n\t\t// Multiple details\n\t\tif ($this->ShowMultipleDetails) {\n\t\t\t$item = &$this->ListOptions->Add(\"details\");\n\t\t\t$item->CssClass = \"text-nowrap\";\n\t\t\t$item->Visible = $this->ShowMultipleDetails;\n\t\t\t$item->OnLeft = TRUE;\n\t\t\t$item->ShowInButtonGroup = FALSE;\n\t\t}\n\n\t\t// Set up detail pages\n\t\t$pages = new cSubPages();\n\t\t$pages->Add(\"avaluo\");\n\t\t$this->DetailPages = $pages;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = FALSE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "public function addAdminMenuEntries(): void {\n foreach ($this->adminPages as $page) {\n (new $page($this->container));\n }\n }", "function theme_thumbwhere_contentcollection_add_list($variables) {\n\n\n //$content = $variables['content'];\n $output = '';\n /*\n if ($content) {\n $output = '<dl class=\"thumbwhere_contentcollection-type-list\">';\n foreach ($content as $item) {\n $output .= '<dt>' . l($item['title'], $item['href']) . '</dt>';\n $output .= '<dd>' . filter_xss_admin($item['description']) . '</dd>';\n }\n $output .= '</dl>';\n }\n else {\n if (user_access('administer thumbwhere_contentcollection types')) {\n $output = '<p>' . t('ThumbWhereContentCollection Entities cannot be added because you have not created any thumbwhere_contentcollection types yet. Go to the <a href=\"@create-thumbwhere_contentcollection-type\">thumbwhere_contentcollection type creation page</a> to add a new thumbwhere_contentcollection type.', array('@create-thumbwhere_contentcollection-type' => url('admin/structure/thumbwhere_contentcollection_types/add'))) . '</p>';\n }\n else {\n $output = '<p>' . t('No thumbwhere_contentcollection types have been created yet for you to use.') . '</p>';\n }\n }\n */\n return $output;\n}", "function SetupListOptions() {\r\n\t\tglobal $Security, $Language;\r\n\r\n\t\t// \"edit\"\r\n\t\t$item = &$this->ListOptions->Add(\"edit\");\r\n\t\t$item->CssStyle = \"white-space: nowrap;\";\r\n\t\t$item->Visible = $Security->CanEdit();\r\n\t\t$item->OnLeft = TRUE;\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "private function addItemsToFeed()\n {\n foreach ($this->items as $item) {\n /** @var SimpleXMLElement $feedItemNode */\n $feedItemNode = $this->feed->channel->addChild('item');\n foreach ($item->nodes() as $itemNode) {\n if (is_array($itemNode)) {\n foreach ($itemNode as $node) {\n $feedItemNode->addChild($node->get('name'), $node->get('value'), $node->get('_namespace'));\n }\n } else {\n $itemNode->attachNodeTo($feedItemNode);\n }\n }\n }\n }", "function appendItemMetadataList(&$item) {\n $mda = array();\n\n // Static metadata\n $mda = $this->getHardCodedMetadataList(true);\n foreach($mda as $md) {\n $md->setValue($item->getHardCodedMetadataValue($md->getLabel()));\n $item->addMetadata($md);\n unset($md);\n }\n \n // Dynamic metadata\n $mdIter = $this->getRealMetadataIterator(true);\n $mdIter->rewind();\n while($mdIter->valid()) {\n $md = $mdIter->current();\n $this->addMetadataValueToItem($item, $md);\n $mdIter->next();\n }\n }", "function addItem($title, $html, $actions = []) {\n\t\t$this->dashboard_items[] = ['title' => $title, 'html', 'actions' => $actions];\n\t}", "function setItems($items);", "function toc_additem($id, $text, $level) {\n global $conf;\n\n //handle TOC\n if($level >= $conf['toptoclevel'] && $level <= $conf['maxtoclevel']) {\n $this->toc[] = html_mktocitem($id, $text, $level - $conf['toptoclevel'] + 1);\n }\n }", "public function listView(): void\n {\n $this->_data = $this->_entity->fetch();\n if (!$this->special) {\n $newData = $this->_builder->submitCreate();\n if ($newData) {\n array_push($this->_data, $newData);\n }\n }\n require VF . \"{$this->route}/list.php\";\n require VF . \"{$this->route}/create.php\";\n }", "function listcontent_open() {\n $this->doc .= '<div class=\"li\">';\n }", "function addItemAtBeginOfTodos($item){\n\t\t\t\t$arTmp = array();\n\n\t\t\t\t//corro los indices en uno asi puedo insertar el item\n\t\t\t\tif (count($this->Todos())>0)\n\t\t\t\t{\n\t\t\t\t\tforeach($this->Todos() as $k => $r){\n\t\t\t\t\t\t$k++;\n\t\t\t\t\t\t$arTmp[$k] = $r;\n\t\t\t\t\t}\n\t\t\t\t}\n \n\t\t\t\t$this->todos = $arTmp;\n\t\t\t\t$arTmp = null;\n\t\t\t\t$this->addItemAtBeginOf($this->todos, $item);\n\t\t\t}", "private function addItemToCollection()\n {\n $this->collection->items[$this->cart_hash] = $this;\n\n }", "function add_list( $name, $creator, $can_delete, $items )\n\t{\n $this->db->trans_start();\n\n $this->db->set('name', $name );\n $this->db->set('creator', $creator );\n if( $can_delete !== NULL ) {\n $this->db->set('can_delete', $can_delete );\n } \n $this->db->insert('lists');\n\t\t$id = $this->db->insert_id();\n\n\t\tfor( $i = 0; $i < count($items); $i++ ) {\n\t\t\t\t$this->db->set('list_id', $id );\n $this->db->set('data_id', $items[$i]['id']);\n\t\t\t\t$this->db->set('title', $items[$i]['title']);\n\t\t\t\t$this->db->set('type', $items[$i]['type'] );\n\t\t\t\t$this->db->set('sort_order', $i + 1);\n\t\t\t\t$this->db->insert('list_items');\n }\n\n $this->db->trans_complete();\n\t}", "function uc_order_pane_line_items_add($form, &$form_state) {\n $order = &$form_state['order'];\n $type = $form_state['values']['li_type_select'];\n\n uc_order_line_item_add($order->order_id, $type, _uc_line_item_data($type, 'title'), 0);\n $order->line_items = uc_order_load_line_items($order);\n\n $form_state['rebuild'] = TRUE;\n}", "public function action_addList() {\n $data = Arr::extract($_POST, array('listname', 'rating', 'description', 'typelist'));\n //Arr::_print($data);\n //$data['name'] = trim($this->request->post('listname'));\n// $rating = trim($this->request->post('rating'));\n// $description = trim($this->request->post('description'));\n// $type = $this->reques->post('type');\n if(!$this->user->id) exit('error - action_addList - not user');\n \n $list_id = Model::factory('ElectList')->add($this->user->id, $data);\n\n $res = Model::factory('ElectUserList')->add($this->user->id, $list_id);\n if(!$res) exit('error - action_addList');\n else $this->redirect('/');\n }", "public function define_sections() {\r\n\t\t$this->options->sections = $this->to_array();\n\t}", "function appendMetadataValueList(&$md, $onlyActive = true) {\n if(is_a($md, 'Docman_ListMetadata')) {\n $mdLoveFactory = new Docman_MetadataListOfValuesElementFactory();\n $mdLoveArray = $mdLoveFactory->getListByFieldId($md->getId(), $md->getLabel(), $onlyActive);\n $md->setListOfValueElements($mdLoveArray);\n }\n }", "protected function setupListOperation()\n {\n $this->crud->addColumns([\n [\n 'name' => 'name',\n 'label' => 'Название',\n ],\n [\n 'name' => 'description',\n 'label' => 'Описание',\n\n ],\n [\n 'name' => 'price',\n 'label' => 'Цена',\n ],\n [\n 'name' => 'time_start',\n 'label' => 'Дата начало',\n 'type' => \"date\",\n ],\n [\n 'name' => 'time_finish',\n 'label' => 'Дата финиша',\n 'type' => \"date\",\n ],\n [\n 'name' => 'car_id',\n 'label' => 'Автомобиль',\n 'type' => 'select',\n 'entity' => 'car',\n 'attribute' => 'register_id',\n 'model' => 'App\\Models\\Car',\n ],\n [\n 'name' => 'employee_id',\n 'label' => 'Сотрудник',\n 'type' => 'select',\n 'entity' => 'employee',\n 'attribute' => 'full_name',\n 'model' => 'App\\Models\\Employee',\n ],\n ]);\n }", "function SetupListOptions() {\n\t\tglobal $Security, $scholarship_package;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"detail_scholarship_payment\"\n\t\t$this->ListOptions->Add(\"detail_scholarship_payment\");\n\t\t$item =& $this->ListOptions->Items[\"detail_scholarship_payment\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->AllowList('scholarship_payment');\n\t\t$item->OnLeft = FALSE;\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($scholarship_package->Export <> \"\" ||\n\t\t\t$scholarship_package->CurrentAction == \"gridadd\" ||\n\t\t\t$scholarship_package->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "protected function setupListOperation()\n {\n // $this->crud->setFromDb();\n $this->crud->addColumns([\n ['name' => 'name', 'type' => 'text', 'label' => 'Name'],\n ['name' => 'description', 'type' => 'text', 'label' => 'Description'],\n ['name' => 'location' , 'type' => 'text' , 'label' => 'Location'],\n ['name' => 'date' , 'type' => 'date' , 'label' => 'Date'],\n [\n 'label' => \"Image\",\n 'name' => \"image\",\n 'type' => 'image',\n 'upload' => true,\n 'crop' => false,\n 'aspect_ratio' => 0,\n ],\n [ // Select\n 'label' => \"Instructor\",\n 'type' => 'select',\n 'name' => 'user_id', // the db column for the foreign key\n 'entity' => 'user', // the method that defines the relationship in your Model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n ]\n ]);\n // $this->crud->addButton();\n $this->crud->filters();\n }", "public function setItems(string $view): void\n {\n\n $this->items = match($view)\n {\n CONTENT => [\n // YOUTUBE => Playlist::navigation()\n ]\n };\n }", "function SetupListOptions() {\r\n\t\tglobal $Security, $Language;\r\n\r\n\t\t// \"view\"\r\n\t\t$item = &$this->ListOptions->Add(\"view\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanView();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// \"edit\"\r\n\t\t$item = &$this->ListOptions->Add(\"edit\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanEdit();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// \"copy\"\r\n\t\t$item = &$this->ListOptions->Add(\"copy\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanAdd();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// \"delete\"\r\n\t\t$item = &$this->ListOptions->Add(\"delete\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanDelete();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "public function buildListLayout(): void\n {\n $this->addColumn('name', 3)\n ->addColumn('pseudo', 3)\n ->addColumn('role_id', 3)\n ->addColumn('created_at', 3);\n }", "public function add()\n {\n $item = new stdClass();\n $item->item_id = null;\n $item->barcode = null;\n $item->price = null;\n $item->stock = null;\n $item->name = null;\n $item->category_id = null;\n $query_category = $this->categorys_m->get();\n $query_unit = $this->units_m->get();\n $unit[null] = '-Pilih-';\n foreach ($query_unit->result() as $u) {\n\n $unit[$u->unit_id] = $u->name;\n };\n $data = [\n 'page' => 'add',\n 'row' => $item,\n 'category' => $query_category,\n 'unit' => $unit,\n 'selectedunit' => null\n ];\n $this->template->load('template', 'product/item/item_add', $data);\n }", "public function AddArtworkList(): void{\n\n if(!Session::isLogin())\n exit;\n\n if(!ArtworkVerifier::removeList($_POST))\n exit;\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([\n 'user_id' => Session::getUser()['id'],\n 'artwork_id' => $_POST['artwork_id']\n ])->insert();\n }", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// \"view\"\n\t\t$item = &$this->ListOptions->Add(\"view\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"copy\"\n\t\t$item = &$this->ListOptions->Add(\"copy\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanAdd();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"delete\"\n\t\t$item = &$this->ListOptions->Add(\"delete\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanDelete();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"userpermission\"\n\t\t$item = &$this->ListOptions->Add(\"userpermission\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsAdmin();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t}", "public function append($section){\n\t\t$body = $this->toArray();\n\t\t$_section = $this->get($section);\n\t\t$temp_body = [];\n\t\t$i = 0;\n\t\t$j = sizeof($body);\n\t\tforeach ($body as $key => $value) {\n\t\t\tif($key != $section){\n\t\t\t\tif($i == ($j - 1)){\n\t\t\t\t\t$temp_body[$key] = $value;\n\t\t\t\t\t$temp_body[$section] = $_section;\n\t\t\t\t} else {\n\t\t\t\t\t$temp_body[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\t$this->updateFile($temp_body);\n\t}", "abstract protected function onBeforeAdd($oItem);", "function SetupListOptions() {\n\t\tglobal $Security, $tbl_slide;\n\n\t\t// \"view\"\n\t\t$this->ListOptions->Add(\"view\");\n\t\t$item =& $this->ListOptions->Items[\"view\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"copy\"\n\t\t$this->ListOptions->Add(\"copy\");\n\t\t$item =& $this->ListOptions->Items[\"copy\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"delete\"\n\t\t$this->ListOptions->Add(\"delete\");\n\t\t$item =& $this->ListOptions->Items[\"delete\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($tbl_slide->Export <> \"\" ||\n\t\t\t$tbl_slide->CurrentAction == \"gridadd\" ||\n\t\t\t$tbl_slide->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "public function insertItem($item){\n\t\t$hour = date ( 'H', strtotime ( $item->list_time ) );\n\t\t$this->hours[$hour][DayShelfStrategy::HOUR_FIELD_ITEMLIST][] = $item;\n\t}", "public function pushDetailsList($list)\n {\n $this->data['ecommerce']['detail']['actionField']['list'] = $list;\n }", "public function addAction()\r\n {\r\n $form = $this->getEditItemForm();\r\n $response = $this->getResponse();\r\n $content = $this->renderViewModel('dots-nav-block/item-add', array('form' => $form));\r\n $response->setContent($content);\r\n return $response;\r\n }", "public function add($item);", "public function add($item);", "public function action_addListMenu() {\n $list_id = $this->request->post('list_id');\n $res = Model::factory('ElectUserList')->add($this->user->id, $list_id);\n if($res) echo $res[1];\n else echo 'not';\n exit();\n }", "protected function addItems($items)\n {\n foreach ($items as $item) {\n $this->addItem($item);\n }\n }", "public function addItem($value) {\n return $this->add('items', func_get_args());\n }", "public function addItem($value) {\n return $this->add('items', func_get_args());\n }", "public function addItem($value) {\n return $this->add('items', func_get_args());\n }", "public function addItem($value) {\n return $this->add('items', func_get_args());\n }", "public function addContentData()\n\t\t{\n\t\t\t_is_logged_in();\n\n\t\t\t$data = array();\n\n\t\t\tif ($_POST) {\n\n\t\t\t\tforeach ($this->input->post() as $key => $value) {\n\n\t\t\t\t\tif ($key == 'section_name') {\n\t\t\t\t\t\t$data['section_slug'] = url_title(convert_accented_characters($value));\n\t\t\t\t\t}\n\t\t\t\t\t$data[$key] = $value;\n\t\t\t\t}\n\n\t\t\t\t$data['language'] = $this->session->userdata('language');\n\t\t\t}\n\n\t\t\t// Send data\n\t\t\t$query = $this->co_pages_model->add_section($data);\n\n\t\t\tif ($query > 0) {\n\t\t\t\tredirect('admin/co_pages/add_content?action=success');\n\t\t\t} else {\n\t\t\t\tredirect('admin/co_pages/add_content?action=error');\n\t\t\t}\n\n\t\t}", "public function add($item)\n {\n $this->addArray('content', $item, 'Element');\n }", "private function add_sections(&$data)\n\t{\n\t\t$data['header']\t\t\t= $this->load->controller('common/header');\n\t\t$data['column_left']\t= $this->load->controller('common/column_left');\n\t\t$data['footer']\t\t\t= $this->load->controller('common/footer');\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"view\"\n\t\t$item = &$this->ListOptions->Add(\"view\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"copy\"\n\t\t$item = &$this->ListOptions->Add(\"copy\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanAdd();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"delete\"\n\t\t$item = &$this->ListOptions->Add(\"delete\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanDelete();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "function addItem(&$item) {\n\t\tglobal $CONF ; \n\t\t$this->items [$item->alias] = $item;\n\t\t$item->menu = $this ;\n\t}", "public function updateExtList() {}", "protected function setupListOperation()\n {\n $this->crud->addColumn([\n 'name' => 'name',\n 'type' => 'test',\n 'label' => 'Название',\n ]);\n $this->crud->addColumn([\n 'name' => 'category_id',\n 'type' => 'select',\n 'label' => 'Категория',\n 'entity' => 'category',\n 'attribute' => \"name\",\n 'model' => Category::class,\n ]);\n }", "function _add_section( $data=array() )\n\t{\n\t\t$section = array();\n\t\t\n\t\t$section['conf_title_title'] = $data['conf_title_title']['VALUE'];\n\t\t$section['conf_title_desc'] = $data['conf_title_desc']['VALUE'];\n\t\t$section['conf_title_count'] = 0;\n\t\t$section['conf_title_noshow'] = $data['conf_title_noshow']['VALUE'];\n\t\t$section['conf_title_keyword'] = $data['conf_title_keyword']['VALUE'];\n\t\t$section['conf_title_module'] = $data['conf_title_module']['VALUE'];\n\t\t\n\t\t$this->ipsclass->DB->do_insert( 'conf_settings_titles', $section );\n\t\t\n\t\treturn $this->ipsclass->DB->get_insert_id();\n\t}", "public function addSectionAction($values)\n\t{\n\t\t$this->vars['section_action'][] = (object) $values;\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<div class=\\\"checkbox\\\"><label><input class=\\\"magic-checkbox\\\" type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\"><span></span></label></div>\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "public function renderListContent() {}", "function addFields($config)\n {\n global $TSFE,$LANG;\n $this->storagePid = $this->getStorageFolderPid();\n // print_r($this->storagePid);\n if(!empty($this->storagePid)) {\n $sql = \"AND pid=$this->storagePid\";\n }else{\n $sql = '';\n }\n\n $optionList = array();\n // exec_SELECTquery\n // $res = $GLOBALS['TYPO3_DB']->sql(TYPO3_db, \"SELECT uid,cat FROM tx_sbdownloader_cat WHERE hidden=0 AND deleted=0 $sql\");\n $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\"uid,cat\", \"tx_sbdownloader_cat\", \"hidden=0 AND deleted=0 $sql\");\n\n $optionList[0] = array(0 => 'all', 1 => 0);\n $i = 1;\n // while($row = mysql_fetch_object($res)){\n while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n $optionList[$i] = array(0 => $row['cat'], 1 => $row['uid']);\n $i++;\n }\n\n $config['items'] = array_merge($config['items'], $optionList);\n\n return $config;\n }", "public function addItemList($key, $value)\n {\n return $this->client->sAdd($key, $value);\n }", "public function appendItem($item): CollectionInterface;" ]
[ "0.6659867", "0.6456882", "0.5959395", "0.59136796", "0.5868306", "0.5815828", "0.5779685", "0.5767449", "0.57223123", "0.57215476", "0.5599624", "0.5575782", "0.55415595", "0.55338484", "0.55134887", "0.55125314", "0.5466961", "0.5464491", "0.54484403", "0.5446306", "0.54362404", "0.53977865", "0.53963006", "0.53826874", "0.5363428", "0.5361786", "0.5357032", "0.5350254", "0.5338648", "0.53321606", "0.5322249", "0.53178066", "0.5302715", "0.52843446", "0.5282662", "0.52665156", "0.5254096", "0.52469146", "0.52413344", "0.5228338", "0.5207528", "0.52058357", "0.5201274", "0.51947594", "0.5187473", "0.5184237", "0.51829827", "0.51809883", "0.51795846", "0.5177262", "0.5175412", "0.5175074", "0.5172145", "0.5168767", "0.51684964", "0.51667744", "0.5164225", "0.51632375", "0.51560676", "0.515519", "0.5140229", "0.51323825", "0.5124304", "0.5123975", "0.5118454", "0.51180303", "0.5115218", "0.5112195", "0.50977", "0.50976515", "0.50931", "0.5091579", "0.5091205", "0.5084801", "0.5084702", "0.508275", "0.5082237", "0.50796854", "0.5074725", "0.5074725", "0.50706875", "0.5069073", "0.5065511", "0.5065511", "0.5065511", "0.5065511", "0.50613344", "0.50506777", "0.5048172", "0.5044641", "0.5030633", "0.502184", "0.5019338", "0.5016168", "0.5013778", "0.50069535", "0.50057983", "0.50037193", "0.5001327", "0.4998135" ]
0.6392661
2
Check item was been added to any section.
private function item_section_exist( $section_id, $item_id ) { global $wpdb; $section_id = intval( $section_id ); $item_id = intval( $item_id ); $query = $wpdb->prepare( "SELECT * FROM {$wpdb->learnpress_section_items} WHERE section_id = %d AND item_id = %d", $section_id, $item_id ); $item = $wpdb->get_row( $query, ARRAY_A ); return ! ! $item; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function has_items()\n {\n }", "private function check_section() {\n $cond = NULL;\n if($this->type_post != 'add') {\n $cond = \"AND sec_id != {$this->get_id}\";\n }\n $ch = $this->select(\"*\", \"jops_sections\", \"WHERE sec_unique = ? {$cond}\");\n $ch->execute(array($this->unique));\n $info = $ch->rowCount();\n if($info > 0) {\n return true;\n }\n return false;\n }", "public function hasUseradditem(){\n return $this->_has(24);\n }", "public function hasItems(){\n return $this->_has(13);\n }", "public function hasItems()\n {\n return $this->getItemsCount() > 0;\n }", "public static function hasItems() {\n\t\treturn self::itemCount() > 0;\n\t}", "public function hasItems(){\n return $this->_has(4);\n }", "public function has_items() {\n\n\t\treturn count( $this->items ) > 0;\n\t}", "public function isAdded($id) {\n return in_array($id, $this->getItems());\n }", "public function hasItemdata(){\n return $this->_has(6);\n }", "public function hasItemdata(){\n return $this->_has(22);\n }", "public function hasItems(): bool\n {\n return count($this->items) > 0 ? true : false;\n }", "public function hasItemInfo(){\n return $this->_has(3);\n }", "public function hasSection($delta = 0) {\n $section_storage = $this->sectionStorage;\n $sections = $section_storage->getSections();\n return isset($sections[$delta]);\n }", "public function has_sections() {\n\t\t\tif ( !isset( $this->registered_sections ) ) {\n\t\t\t\tglobal $wp_settings_sections;\n\t\t\t\t$i = 1;\n\t\t\t\tforeach ( $wp_settings_sections[$this->default_group] as $id => $section ) {\n\t\t\t\t\t$this->registered_sections[$i]['id'] = $id;\n\t\t\t\t\t$this->registered_sections[$i]['title'] = $section['title'];\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\t$this->_display_count++;\n\t\t\t\n\t\t\tif ( isset( $this->registered_sections[$this->_display_count] ) ) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t$this->_display_count = 0;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function has_items() {\n\t\tif ( $this->{$this->loop_vars['item_count']} ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function hasSubItems() {\n return count($this->subItems) > 0;\n }", "public function valid()\n {\n return isset($this->collection->getItems()[$this->position]);\n }", "public function hasDataCollectionEventSummaries() {\n return $this->_has(3);\n }", "abstract protected function onBeforeAdd($oItem);", "public function testAddItem()\n {\n $this->addItem();\n $this->addItem();\n\n $this->assertEquals(1, $this->laracart->count(false));\n $this->assertEquals(2, $this->laracart->count());\n }", "public function hasSub()\n {\n if(is_null($this->items) || !count($this->items)) return false;\n return true;\n }", "function updateSection($sectionName,$sectionID) {\n if (!isset($this->sectionList[$sectionName])) { \n $this->sectionList[$sectionName] = new SM_sectionTag($sectionName); \n return true;\n }\n else {\n $this->debugLog(\"updateSection: sectionName [$sectionName] already existed, ignoring.\",6);\n return false;\n }\n }", "public function hasItemid(){\n return $this->_has(13);\n }", "public function has(IdentifiableCollectionItem $item): bool\n {\n $id = $item->identity();\n if (isset($this->added[$id])) {\n return true;\n }\n \n if (isset($this->removed[$id])) {\n return false;\n }\n \n /** @var IdentifiableCollectionItem $item */\n foreach ($this->getItemsWithChanges() as $item) {\n if ($id === $item->identity()) {\n return true;\n }\n }\n \n return false;\n }", "function OnAfterIBlockSectionAddHandler(&$arFields)\r\n {\r\n if($arFields['IBLOCK_ID'] != IBLOCK_PROJECTS)\r\n\t\t\treturn true;\r\n\r\n\t\tforeach (self::checkLinkedIblocks(self::$linkedIblocks) as $iblock) {\r\n\t\t\tself::addSection($iblock, $arFields);\r\n\t\t};\r\n }", "public function valid(){\n return isset($this->items[$this->key()]);\n }", "public function valid(){\n return isset($this->items[$this->key()]);\n }", "public function areAllSectionsLoaded()\n {\n return $this->_loadedSection === null;\n }", "public function hasAdditionalInfosList()\n {\n return $this->AdditionalInfos !== null;\n }", "public function has_items() {\n global $DB;\n if (!is_null($this->cards)) {\n return !empty($this->cards);\n }\n $result = $DB->count_records('swipe_item', array('swipeid' => $this->cm->instance));\n return !empty($result);\n }", "public function hasEntries(){\n return $this->_has(2);\n }", "function checkSection($section) {\n\t\treturn in_array(\"*\", $this->_sections) || in_array($section, $this->_sections);\n\t}", "function onBeforeAdd() {\n\t\treturn true;\n\t}", "public function valid() {\n return $this->pointer < count($this->items);\n }", "public function hasItemid(){\n return $this->_has(11);\n }", "public function hasSections()\n {\n return null !== @$this->sections;\n }", "public function add_sections()\n {\n }", "public function eventExists()\n {\n return $this->getTalk()->getSpeaker()->exists();\n }", "public function Inserted() {\n\t\t\t// Define sub menu selection\n\t\t\t$GLOBALS['menu']['items']['opt1_css'] = 'details_item_on';\n\t\t\t// Render view\n\t\t\tView::render('itemsInserted');\n \t\t}", "function sectionIDexists($sectionID) {\n return isset($this->varList[$sectionID]);\n }", "public function hasAddhp(){\r\n return $this->_has(20);\r\n }", "function sectionExists($sectionName, $sectionID='') {\n // if section doesn't exist at all, return\n if (!isset($this->sectionList[$sectionName])) {\n return false;\n }\n // check for sectionID?\n if ($sectionID == '') {\n return true;\n }\n else {\n return $this->sectionList[$sectionName]->sectionIDexists($sectionID);\n }\n }", "function testSaveASingleItemWithSections(){\n\t\tTestsHelper::Print(\"testing magratheaConfig saving a config file with sections...\");\n\t\t$confs = array(\n\t\t\t'this_section' => array(\n\t\t\t\t'this_var' => 'ok' )\n\t\t );\n\t\t$this->magConfig->setConfig($confs);\n\t\t$this->magConfig->Save(true);\n\t\t$this->assertTrue(file_exists($this->configPath.\"/\".$this->fileName));\n\t}", "public function add_items_section( $section_id, $items = array() ) {\n\t\t$order = 1;\n\t\t$current_items = $this->get_section_items( $section_id );\n\t\t// allow hook\n\t\tdo_action( 'learn-press/before-add-items-section', $items, $section_id, $this->course_id );\n\n\t\tglobal $wpdb;\n\n\t\t$all_items = array_merge( $current_items, $items );\n\t\t$result = array();\n\t\tforeach ( $all_items as $item ) {\n\n\t\t\t$item = (array) $item;\n\t\t\t$exist = $this->item_section_exist( $section_id, $item['id'] );\n\n\t\t\tif ( $exist ) {\n\t\t\t\t$a = $wpdb->update(\n\t\t\t\t\t$wpdb->learnpress_section_items,\n\t\t\t\t\tarray( 'item_order' => $order ),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'section_id' => $section_id,\n\t\t\t\t\t\t'item_id' => $item['id'],\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$a = $wpdb->insert(\n\t\t\t\t\t$wpdb->learnpress_section_items,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'section_id' => $section_id,\n\t\t\t\t\t\t'item_id' => $item['id'],\n\t\t\t\t\t\t'item_order' => $order,\n\t\t\t\t\t\t'item_type' => $item['type'],\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\t// get WP Post\n\t\t\t$post = get_post( $item['id'] );\n\t\t\t$item = array_merge(\n\t\t\t\t$item,\n\t\t\t\tarray(\n\t\t\t\t\t'id' => $post->ID,\n\t\t\t\t\t'title' => $post->post_title,\n\t\t\t\t\t'type' => $post->post_type,\n\t\t\t\t\t'preview' => get_post_meta( $post->ID, '_lp_preview', true ) == 'yes',\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tif ( ! $exist ) {\n\t\t\t\tdo_action( 'learn-press/added-item-to-section', $item, $section_id, $this->course_id );\n\t\t\t} else {\n\t\t\t\tdo_action( 'learn-press/updated-item-to-section', $item, $section_id, $this->course_id );\n\t\t\t}\n\n\t\t\t$result[] = $item;\n\t\t\t$order ++;\n\t\t}\n\n\t\tLP_Object_Cache::set( 'course-' . $this->course_id . '-' . $section_id, $all_items, 'learn-press/course-section-items' );\n\n\t\treturn $result;\n\t}", "public function testHasItem()\n {\n self::assertFalse($this->object->hasItem('test'));\n }", "function checkAuthors () {\n\t\tif ( count ( $this->authors) == 0 ) return ;\n\t\n\t\tif ( isset($this->existing_q) ) {\n\t\t\t$this->wd->loadItem ( $this->existing_q ) ;\n\t\t\t$i = $this->wd->getItem ( $this->existing_q ) ;\n\t\t\t$c1 = $i->getClaims ( $this->props['author'] ) ;\n\t\t\t$c2 = $i->getClaims ( $this->props['short author'] ) ;\n\t\t\t$this->invalidateExistingAuthors ( $c1 ) ;\n\t\t\t$this->invalidateExistingAuthors ( $c2 ) ;\n\t\t\t\n\t\t\t// Special case: Single author, one author already in item...\n\t\t\tif ( count($this->authors) == 1 && count($c1)+count($c2) == 1 ) {\n\t\t\t\t$this->authors[1]->hadthat = true ;\n\t\t\t}\n\t\t}\n\t}", "public function hasComplete(){\n return $this->_has(2);\n }", "function testSaveASingleItemWithSections(){\n\t\t\techo \"testing magratheaConfig saving a config file with sections... <br/>\";\n\t\t\t$confs = array(\n\t\t\t\t'this_section' => array(\n\t\t\t\t\t'this_var' => 'ok' )\n\t\t\t );\n\t\t\t$this->magConfig->setConfig($confs);\n\t\t\t$this->magConfig->Save(true);\n\t\t\t$this->assertTrue(file_exists($this->configPath.\"test_conf.conf\"));\n\t\t}", "public function hasAddhp(){\r\n return $this->_has(23);\r\n }", "public function valid(): bool\n {\n return (current($this->items) !== false);\n }", "public function hasItems () {\n\n $order = $this->getOrder();\n\n if ( !$order ) {\n return false;\n }\n\n return $order->hasItems();\n }", "protected function _checkExistence($item = null)\n { \n if (empty($item)) {\n $this->_showError(__('Item does not exist'));\n return;\n }\n }", "public function hasEquipmentingItem()\n {\n return count($this->get(self::EQUIPMENTING_ITEM)) !== 0;\n }", "public function questionLoadingFailed()\r\n {\r\n return (!isset($this->questionInfo->items));\r\n }", "public function testAddExistingItem(): void {\n $item = new Item(1, \"test\", 20);\n $this->itemCollection->add($item, 2);\n\n $this->itemCollection->add($item, 10);\n\n $this->assertEquals(12, $this->itemCollection->getAmount($item));\n }", "public function hasItemLevel()\n {\n return $this->item_level !== null;\n }", "protected function CheckBasketContents()\n {\n if ('basket' !== $this->fieldSystemname) {\n $oBasket = $this->getShopService()->getActiveBasket();\n if ($oBasket->dTotalNumberOfArticles <= 0) {\n $oBasketStep = TdbShopOrderStep::GetStep('basket');\n $this->JumpToStep($oBasketStep);\n }\n }\n }", "public function hasHavingItem()\n {\n return count($this->get(self::HAVING_ITEM)) !== 0;\n }", "public function testHasItemInBox()\n {\n $box = new Box(['cat', 'toy', 'torch']);\n //Se espera que para esta entrada se regrese un True como respuesta,\n //puesto que el elemento toy existe.\n $this->assertTrue($box->has('toy'));\n //Se espera que para esta entrada se regrese un False como respuesta,\n //puesto que el elemento ball no existe.\n $this->assertFalse($box->has('ball'));\n }", "public function hasLineItems();", "public function hasSection($section){\n\t\t$array = $this->toArray();\n\t\tif(array_key_exists($section, $array)){\n\t\t\treturn true;\n\t\t} return false;\n\t}", "public function hasItemtype(){\n return $this->_has(40);\n }", "public function hasItemId(){\n return $this->_has(7);\n }", "public function exists($key){return array_key_exists($key,$this->items_array);}", "public function enable_block_item_when_finish(): bool {\n\t\t\treturn 'yes' === $this->get_data( 'block_course_finished' );\n\t\t}", "public function hasPendingInsertions()\n {\n return ! empty($this->documentInsertions);\n }", "public function hasCheckInTaskList(){\n return $this->_has(2);\n }", "function check_cart_items() {\n\t\t\tglobal $cmdeals;\n\t\t\t\n\t\t\t$result = $this->check_cart_item_stock();\n\t\t\tif (is_wp_error($result)) $cmdeals->add_error( $result->get_error_message() );\n\t\t}", "public function hasChangedEntries();", "public function valid()\n\t{\n\t\treturn $this->key() < $this->_totalItemCount;\n\t}", "public function check_added_handle($handle){\n\t\tif(isset($this->added_handles[$handle])){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function isSection()\n {\n return false;\n }", "private function previously_added_fields_available() {\n $fields = wpcf_admin_fields_get_fields( true, true, false, $this->type );\n\n // abort if no fields created yet\n if( empty( $fields ) )\n return false;\n\n // already used fields in current group\n $already_used_fields = isset( $_REQUEST['current'] ) && is_array( $_REQUEST['current'] )\n ? $_REQUEST['current']\n : array();\n\n // if there's the same amount of fields and used fields we have no fields left to show,\n // as one field can't be assigned twice to a group\n if( count( $fields ) == count( $already_used_fields ) )\n return false;\n\n // add this point we definitely have previously added fields which weren't used yet.\n return true;\n }", "public static function item_has_events($item_id, $module_id, $course_id, $item_type) {\r\n return count_item_events($item_id, $module_id, $course_id, $item_type) > 0;\r\n }", "public function valid()\n {\n return isset($this->items[$this->k]);\n }", "protected function checkUsage(){\n $modId = $this->getModId();\n $oDeclarator = AMI_ModDeclarator::getInstance();\n $parentModId = $oDeclarator->getParent($modId);\n return\n AMI::issetAndTrueOption($parentModId, 'use_categories');\n }", "protected function canAdd()\n {\n return $this->hasStrategy(self::STRATEGY_ADD);\n }", "public function isCorrect()\n\t{\n\t\treturn ($this->m_items) || ($this->m_item);\n\t}", "public function hasItems() {\n foreach ($this->items as $item) {\n if ($item === self::SEPARATOR) {\n continue;\n }\n if ($item instanceof MenuItem) {\n return true;\n }\n if ($item->hasItems()) {\n return true;\n }\n }\n\n return false;\n }", "public function hasData(){\n return $this->_has(1);\n }", "public function isInInventorySection() {\n if (Mage::app()->getRequest()->getParam('inventoryplus') == '1') {\n return true;\n }\n return false;\n }", "public function hasPartsToIssue(): bool\n {\n return count($this->issuedItems) > 0;\n }", "public function hasItemLevelSet()\n {\n return $this->item_level_set !== null;\n }", "public function hasOptItem(){\n return $this->_has(2);\n }", "public function hasDataCollectionEventId() {\n return $this->_has(3);\n }", "public function valid()\n {\n return $this->key() < $this->getTotalItemCount();\n }", "public function existAuthItem()\n {\n if ($this->type === Item::TYPE_PERMISSION) {\n $authItem = Yii::$app->authManager->getPermission($this->name);\n } else {\n $authItem = Yii::$app->authManager->getRole($this->name);\n }\n if ($this->getIsNewRecord()) {\n if (!empty($authItem)) {\n $this->addError('name', \"This name has already been taken.\");\n }\n } else {\n if (!empty($authItem) && $authItem->name !== $this->item->name) {\n $this->addError('name', \"This name has already been taken.\");\n }\n }\n }", "public function hasSection($name): bool\n {\n return array_key_exists($name, $this->sections);\n }", "public function hasAdddate(){\n return $this->_has(29);\n }", "public function empty(): bool\n {\n if ([] !== $this->added) {\n return false;\n }\n \n return 0 === $this->count();\n }", "public function hasDataCollectionEvents() {\n return $this->_has(8);\n }", "function ondelete(){\n\t\tforeach($this->get_sections() as $one){\n\t\t\t$one->dbdelete();\n\t\t}\n\t\treturn true;\n\t}", "public function addSectionData()\n\t\t{\n\t\t\t_is_logged_in();\n\n\t\t\t$data = array();\n\n\t\t\tif ($_POST) {\n\n\t\t\t\tforeach ($this->input->post() as $key => $value) {\n\n\t\t\t\t\tif ($key == 'section_name') {\n\t\t\t\t\t\t$data['section_slug'] = url_title(convert_accented_characters($value));\n\t\t\t\t\t}\n\t\t\t\t\t$data[$key] = $value;\n\t\t\t\t}\n\n\t\t\t\t$data['language'] = $this->session->userdata('language');\n\t\t\t}\n\n\t\t\t// Send data\n\t\t\t$query = $this->co_pages_model->add_section($data);\n\n\t\t\tif ($query > 0) {\n\t\t\t\tredirect('admin/co_pages/add_section?action=success');\n\t\t\t} else {\n\t\t\t\tredirect('admin/co_pages/add_section?action=error');\n\t\t\t}\n\n\t\t}", "public function valid(): bool\n {\n return null !== \\key($this->responseData->_embedded->items);\n }", "public function valid(): bool {\n return null !== key($this->items);\n }", "public function valid() {\n\t\treturn (\n\t\t\t(isset($this->firstItems[$this->firstItemIdx])) ||\n\t\t\t(($this->endItemIdx !== null) && isset($this->lastItems[$this->endItemIdx])) ||\n\t\t\t$this->items->valid()\n\t\t);\n\t}", "public function hasContent(){\n return $this->_has(6);\n }", "public function exists(string $section): bool;", "protected function afterIndex(array &$items)\n {\n return true;\n }" ]
[ "0.6467023", "0.645058", "0.6362975", "0.62200546", "0.61986405", "0.6197742", "0.6118817", "0.60529804", "0.60240585", "0.5936071", "0.5839833", "0.58279955", "0.58043236", "0.57904124", "0.5747971", "0.5701757", "0.5679746", "0.56732225", "0.5617492", "0.56058437", "0.55880815", "0.558097", "0.55501604", "0.55473006", "0.5545452", "0.55451363", "0.5499056", "0.5499056", "0.5490639", "0.54817826", "0.54813004", "0.5479395", "0.5475578", "0.5466144", "0.5458495", "0.54398566", "0.5433068", "0.5428339", "0.5425142", "0.5406689", "0.5397042", "0.53921366", "0.5386672", "0.5386092", "0.53836405", "0.5377899", "0.537112", "0.536438", "0.5357976", "0.5334746", "0.5315341", "0.5306844", "0.53037655", "0.52960294", "0.5292883", "0.52868366", "0.52532935", "0.5241465", "0.5227122", "0.52270883", "0.5216801", "0.52143514", "0.5213397", "0.5207923", "0.51996726", "0.51978725", "0.5197361", "0.51888263", "0.51768976", "0.51663405", "0.51648575", "0.5161066", "0.5159065", "0.5158809", "0.5156745", "0.5153427", "0.5143805", "0.5141354", "0.5138041", "0.51364243", "0.51357955", "0.51354074", "0.5134762", "0.5133685", "0.51327336", "0.5128955", "0.51250273", "0.5122132", "0.51203585", "0.51164705", "0.5112874", "0.5099573", "0.50853705", "0.5084194", "0.50825053", "0.50638396", "0.50599104", "0.50567013", "0.5052953", "0.5052476" ]
0.6294859
3
Get section id of lesson, quiz id in curriculum.
public function get_item_section( $item_id ) { global $wpdb; $query = $wpdb->prepare( "SELECT section_id, item_order FROM {$wpdb->learnpress_section_items} WHERE item_id = %d", $item_id ); $section = $wpdb->get_row( $query, ARRAY_A ); return $section; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sectionID()\r\n {\r\n return $this->SectionID;\r\n }", "function getId() {\n\t\treturn $this->getData('sectionDecisionId');\r\n\t}", "protected function getSectionId():int\n {\n $secRes = SectionTable::getList([\n \"filter\" => [\n \"IBLOCK_ID\" => $this->iblockId,\n \"DEPTH_LEVEL\" => 2\n ],\n \"select\" => [\"ID\"]\n ]);\n while($sectionFields = $secRes->fetch())\n $sections[] = (int) $sectionFields[\"ID\"];\n $rndKey = array_rand($sections, 1);\n $sectionId = (int) $sections[$rndKey];\n return $sectionId;\n }", "public function getActiveSectionId()\n {\n return $this->_activeSectionId;\n }", "private function get_cm_sectionnum($cmid) {\n global $DB;\n $sql = \"SELECT cs.section\n FROM {course_sections} cs\n LEFT JOIN {course_modules} cm\n ON cm.section = cs.id\n WHERE cm.id = :cmid\";\n $section = $DB->get_record_sql($sql, array('cmid' => $cmid));\n return $section->section;\n }", "public function read_sections_ids() {\n\n\t\t// Get course's sections id data from cache\n\t\t$ids = LP_Object_Cache::get( 'course-' . $this->course_id, 'learn-press/course-sections-ids' );\n\n\t\tif ( ! $ids ) {\n\t\t\tglobal $wpdb;\n\t\t\t// get sections id\n\t\t\t$ids = $wpdb->get_col( $wpdb->prepare( \"SELECT section_id FROM {$wpdb->prefix}learnpress_sections WHERE section_course_id = %d\", $this->course_id ) );\n\t\t\t// Set cache\n\t\t\tLP_Object_Cache::set( 'course-' . $this->course_id, $ids, 'learn-press/course-sections-ids' );\n\t\t}\n\n\t\treturn $ids;\n\t}", "public function getSection(): string\n {\n return $this->section;\n }", "private function sectionIDbyName( $name )\n {\n $sectionID = false;\n $sectionList = eZSection::fetchFilteredList( array( 'name' => $name ), false, false, true );\n if( is_array( $sectionList ) && count( $sectionList ) > 0 )\n {\n $section = $sectionList[0];\n if( is_object( $section ) )\n {\n $sectionID = $section->attribute( 'id' );\n }\n }\n return $sectionID;\n }", "public function get_section_by_id( $id ) {\n\t\treturn $this->sections[$id];\n\t}", "public function section()\n {\n /*if ($this->section != '') {\n return $this->section;\n }\n else {*/\n // Kill trailing period\n $pattern = \"/\\.$/\"; // remove last \".\"\n $cleaned = $this->section_comment();\n $cleaned = trim($cleaned);\n $cleaned = preg_replace($pattern, '', $cleaned);\n\n $pattern = \"/Styleguide (.+)/\";\n preg_match_all($pattern, $cleaned, $sections);\n //$this->section = $sections[1][0];\n //return $this->section;\n return $sections[1][0];\n //}\n }", "function assignSectionIdSetLecture()\n {\n /* Query a list of sections for the current lecture. */\n $parents = $this->dbQuerySectionIdSetLecture();\n /* Remember it ... */\n $this->assign('section_parents', $parents);\n }", "public function get_section($id)\n {\n }", "function dbQuerySectionIdSetLecture($lectureId = 0)\n {\n if ($lectureId > 0)\n {\n /* Query the database for the lecture. */\n $lectureBean = new LectureBean($lectureId, $this->_smarty, NULL, NULL);\n $lectureBean->dbQuerySingle();\n /* And fetch the root section of the lecture. */\n $rootId = $lectureBean->getRootSection();\n }\n else\n {\n /* Default is the current lecture which can be fetched from\n session data. We need the root section id. */\n $rootId = SessionDataBean::getRootSection();\n }\n\n /* Query a hierarchical list of sections beginning at $rootId. */\n $parents = array();\n $this->dbQuerySectionIdSetH($rootId, \"\", $parents);\n /* The root section has no name, assign a default. */\n $parents[$rootId] = \"Root\";\n\n self::dumpVar('parents', $parents);\n return $parents;\n }", "function getLTICourseID() {\n \n if ( isset( $_SESSION['lti'] ) ) {\n \n $lti = unserialize( $_SESSION['lti'] );\n \n switch( getLTILMS() ) {\n \n case 'canvas':\n \n return $lti['custom_canvas_course_id'];\n break;\n \n default:\n \n return null;\n \n }\n \n }\n \n return null;\n \n }", "public function getSection() : string{\n return $this->section;\n }", "public function getSection() {\n return $this->section;\n }", "function wantedSection() {\n $urlParts = $this->_getPathUrl();\n return $urlParts[$this->sectionOffset];\n }", "function getId() {\n\t\treturn $this->getData('studyId');\n\t}", "function SECT_ID(){\n\t\tglobal $_CON;\n\t\tif(isset($_GET['this_sect'])){\n\t\t\t$_CLASSID = mysqli_real_escape_string($_CON, $_GET['this_sect']);\n\t\treturn $_CLASSID;\n\t\t}\n\t}", "public function getCourtId()\n\t{\t\treturn $this->courtId;\n\t}", "public function section()\n {\n return $this->belongsTo('App\\Models\\CourseSection');\n }", "public function getStepId();", "function get_accordion_id() {\n\t\t\treturn $this->current_accordion_slug;\n\t\t}", "function fetchSectionIDFromHandle($handle){\n\t\t\t$handle = Lang::createHandle($handle);\n\n\t\t\treturn $this->_db->fetchVar('id', 0, \"SELECT `id` FROM `tbl_sections` WHERE `handle` = '\".$handle.\"' LIMIT 1\");\n\t\t}", "function getSectionsIdOption() {\r\n\t\t$database = JFactory::getDBO();\r\n\r\n\t\t$sectoptions = array();\r\n\t\t$query = \"SELECT id, title\"\r\n\t\t\t\t. \"\\n FROM \" . $database->nameQuote($this->componentSectionTable)\r\n\t\t\t\t. \"\\n WHERE published = 1\"\r\n//\t\t\t\t. \"\\n AND access >= 0\"\r\n\t\t\t\t. \"\\n ORDER BY ordering\"\r\n\t\t;\r\n\t\t$database->setQuery($query);\r\n\t\t$sectoptions = $database->loadObjectList();\r\n\r\n\t\treturn $sectoptions;\r\n\t}", "function getSectionsIdOption() {\r\n\t\t$database =& JFactory::getDBO();\r\n\r\n\t\t$sectoptions = array();\r\n\r\n\t\treturn $sectoptions;\r\n }", "private function _getSection()\n\t{\n\t\tif (!isset($this->_section))\n\t\t{\n\t\t\t$this->_section = false;\n\n\t\t\t$sectionId = $this->getSettings()->section;\n\n\t\t\tif ($sectionId)\n\t\t\t{\n\t\t\t\t$this->_section = craft()->sections->getSectionById($sectionId);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_section;\n\t}", "private function getSection($sectionId)\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\t$section = $this->sectionFactory->create();\n $this->sectionResourceModel->load($section, $sectionId);\n return $section;\n\t\t}\n\t}", "private function get_current_sub_section() {\n\t\t\t// phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t\t\tif ( ( isset( $_GET[ self::$section_url_param ] ) ) && ( ! empty( $_GET[ self::$section_url_param ] ) ) ) {\n\t\t\t\t// phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t\t\t\t$this->current_sub_section = sanitize_text_field( wp_unslash( $_GET[ self::$section_url_param ] ) );\n\t\t\t\tif ( ! $this->is_valid_sub_section( $this->current_sub_section ) ) {\n\t\t\t\t\t$this->current_sub_section = '';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $this->current_sub_section;\n\t\t}", "private function section_comment()\n {\n $pattern = \"/Styleguide \\d/i\"; // /i for case insensitive\n $text_section = '';\n $values_comment_sections = array_values($this->comment_sections());\n foreach ( $values_comment_sections as $key => $text) {\n if (preg_match($pattern, $text)) {\n $text_section = $text;\n break;\n }\n }\n\n return $text_section;\n }", "public function getCourseId(): int\n {\n return $this->courseId;\n }", "public function getCourseId(): int\n {\n return $this->courseId;\n }", "public function getSectionName()\n {\n if(is_array($this->_loadedSection) && count($this->_loadedSection) === 1) {\n $this->_loadedSection = $this->_loadedSection[0];\n }\n return $this->_loadedSection;\n }", "public function getKey(){\n return $this->_section->key;\n }", "public function testAllOneSection() {\n $practices = Practice::getTrainings($this->section, $this->user);\n\n $this->assertEquals($practices[0]->section_id, $this->section->id);\n $this->assertEquals($practices[1]->section_id, $this->section->id);\n $this->assertEquals($practices[2]->section_id, $this->section->id);\n $this->assertEquals($practices[3]->section_id, $this->section->id);\n $this->assertEquals($practices[4]->section_id, $this->section->id);\n }", "private function getQuizId() {\n\t\t\t$quiz_data = $this->get_user_quiz_details();\n\n\t\t\t$current_stat_id = (int) $this->current()->getStatisticRefId();\n\t\t\tif ( isset( $quiz_data[ $current_stat_id ]['quiz'] ) ) {\n\t\t\t\treturn $quiz_data[ $current_stat_id ]['quiz'];\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t}", "function pnq_current_section( $index = 'section' ) {\n\tglobal $pagenow;\n\t$current_section = isset( $_GET[$index] ) ? $_GET[$index] : pnq_default_section( 'default', true );\n\t\n\tif( $pagenow == 'options.php' ) {\n\t\tif( !isset( $_POST['current_section'] ) ) {\n\t\t\t//die('$_POST[\\'current_section\\'] not set!');\n\t\t} else {\n\t\t\n\t\t\t$current_section = $_POST['current_section'];\n\t\t}\n\t}\n\t\t\t\n\treturn $current_section;\n}", "public function index($id_section)\n {\n $courseData = semester_courses::where('id_section','=',$id_section)->with('master_courses')->first();\n $quizes = quiz::where('id_section','=',$id_section)->get();\n $course = $courseData->master_courses->courseDepartment.\" \".$courseData->master_courses->courseNumber.\" \".$courseData->courseSection;\n return view('professor.quiz.index')->with('quizes',$quizes)->with('id_section',$id_section)->with('course',$course);\n }", "public function get_course_id(){\n\t\treturn $this->_courseid;\n\t}", "public function getSection($modId){\n if(AMI_Registry::exists('AMI/override/forceModSection')){\n return AMI_Registry::get('AMI/override/forceModSection');\n }\n if(isset($this->aSections[$modId])){\n return $this->aSections[$modId];\n }\n trigger_error(\"Module '{$modId}' is not declared\", E_USER_ERROR);\n }", "public function getSectionName(): string\n {\n return $this->sectionName;\n }", "static function get_section_info($modinfo, $sectionnum) {\n global $DB;\n\n if (method_exists($modinfo, 'get_section_info')) {\n // Moodle >= 2.3\n return $modinfo->get_section_info($sectionnum);\n }\n\n // Moodle <= 2.2\n $params = array('course' => $modinfo->get_course_id(),\n 'section' => $sectionnum);\n return $DB->get_record('course_sections', $params);\n }", "function getSurveyId()\n\t{\n\t\treturn $this->survey_id;\n\t}", "protected function getCurrentSectionAlias()\n {\n $url = parse_url(URL::current());\n\n $path = explode('/', $url['path']);\n\n if (isset($path[1]) && ! empty($path[1]))\n {\n return $path[1];\n }\n\n if (isset($path[0]) && ! empty($path[0]))\n {\n return $path[0];\n }\n\n return $path[0];\n }", "function questionID()\r\n {\r\n $ret = 0;\r\n\r\n if ( is_a( $this->Question, \"eZQuizQuestion\" ) )\r\n {\r\n $ret = $this->Question->id();\r\n }\r\n\r\n return $ret;\r\n }", "private function get_course_id($param = '')\r\n\t{\r\n\t\treturn $this->db->get_where('course', array('course_code' => $param))->row('course_id');\r\n\t}", "public function get_id_question()\n\t{\n\t\treturn $this->id_question;\n\t}", "public function section()\n\t{\n\t\treturn $this->belongsTo('App\\Model\\Section');\n\t}", "public function getQuestionId() {\n\t\treturn $this->questionId;\n\t}", "function getSectionsIdOption() {\r\n\t\t$database = & JFactory::getDBO();\r\n\r\n\t\t$sectoptions = array();\r\n\t\t$query = \"SELECT id, catname as title\"\r\n\t\t\t\t. \"\\n FROM #__eventlist_categories\"\r\n\t\t\t\t. \"\\n WHERE published = 1\"\r\n\t\t\t\t//\t\t\t\t. \"\\n AND section = 'com_eventlist' \"\r\n\t\t\t\t//\t\t\t\t. \"\\n AND access >= 0\"\r\n\t\t\t\t. \"\\n ORDER BY ordering\"\r\n\t\t;\r\n\t\t$database->setQuery($query);\r\n\t\t$sectoptions = $database->loadObjectList();\r\n\r\n\t\treturn $sectoptions;\r\n\t}", "public function course_section ()\n {\n return $this->belongsTo('App\\CourseSection', 'course_section_id');\n }", "protected function section()\n {\n /* @var SectionTool $section */\n $section = $this->tool('section');\n return $section;\n }", "function tep_get_parent_sections(&$sections, $sections_id) {\r\n\t$parent_section_query = tep_db_query(\"select parent_id from \" . TABLE_SECTIONS . \" where sections_id = '\" . (int)$sections_id . \"' limit 1\");\r\n\t$parent_section = tep_db_fetch_array($parent_section_query);\r\n\tif ($parent_section['parent_id'] == 0) return true;\r\n\t$sections[sizeof($sections)] = $parent_section['parent_id'];\r\n\tif ($parent_section['parent_id'] != $sections_id) {\r\n\t tep_get_parent_sections($sections, $parent_section['parent_id']);\r\n\t}\r\n }", "public function _getStepID()\n\t{\n\t\treturn $this->_step->cid;\n\t}", "function getExpertSectionIdOption($sections, $include) {\r\n\t\t$database = & JFactory::getDBO();\r\n\r\n\t\t$where = \"\";\r\n\t\tif ($sections) {\r\n\t\t\tif ($include)\r\n\t\t\t\t$where = \"\\n AND id IN ($sections) \";\r\n\t\t\telse\r\n\t\t\t\t$where = \"\\n AND id NOT IN ($sections) \";\r\n\t\t}\r\n\t\t$sectoptions = array();\r\n\t\t$query = \"SELECT id, catname as title\"\r\n\t\t\t\t. \"\\n FROM #__eventlist_categories\"\r\n\t\t\t\t. \"\\n WHERE publishedcat = 1\"\r\n\t\t\t\t. $where\r\n\t\t\t\t//\t\t\t\t. \"\\n AND access >= 0\"\r\n\t\t\t\t. \"\\n ORDER BY ordering\"\r\n\t\t;\r\n\t\t$database->setQuery($query);\r\n\t\t$sectoptions = $database->loadObjectList();\r\n\t\t// add \"All sections\"\r\n\t\tarray_unshift($sectoptions, JHTML::_('select.option', '0', '-- All --', 'id', 'title'));\r\n\r\n\t\treturn $sectoptions;\r\n\t}", "public function section()\n {\n return $this->belongsTo(Section::class);\n }", "public function section()\n {\n return $this->belongsTo(Section::class);\n }", "public function section()\n {\n return $this->belongsTo(Section::class);\n }", "public function section()\n {\n return $this->belongsTo(Section::class);\n }", "function dbQuerySectionIdSet()\n {\n $resultset = $this->dbQuery(\"SELECT id, mtitle FROM section ORDER BY mtitle\");\n\n $parents[0] = 'Root';\n\n if (isset ($resultset))\n {\n foreach ($resultset as $key => $val)\n {\n $parents[$val['id']] = stripslashes($val['mtitle']);\n }\n }\n\n return $parents;\n }", "public function get_course_id()\n {\n return $this->get_default_property(self::PROPERTY_COURSE_ID);\n }", "function give_get_current_setting_section() {\n\t// Get current tab.\n\t$current_tab = give_get_current_setting_tab();\n\n\t/**\n\t * Filter the default section for current setting page tab.\n\t *\n\t * @since 1.8\n\t *\n\t * @param string\n\t */\n\t$default_current_section = apply_filters( \"give_default_setting_tab_section_{$current_tab}\", '' );\n\n\t// Get current section.\n\t$current_section = empty( $_REQUEST['section'] ) ? $default_current_section : urldecode( $_REQUEST['section'] );\n\n\t// Output.\n\treturn $current_section;\n}", "function cps_sections($course, $where=null) {\n global $CFG;\n\n $sql = \"SELECT s.*, c.department, c.course_number\n FROM {$CFG->prefix}block_courseprefs_sections s,\n {$CFG->prefix}block_courseprefs_courses c\n WHERE s.coursesid = c.id\n AND s.idnumber = '{$course->idnumber}'\n \".(($where) ? \"AND {$where}\" : '').\"\n ORDER BY s.section_number\";\n return get_records_sql($sql);\n}", "function get_course($course)\n{\n $course_id = get_prefix($course).\" \".get_number($course).\" \".get_name($course);\n return $course_id;\n}", "public function checkSection($sectionName) {\n try {\n $client = new Zend_Soap_Client($this->SECTION_WSDL);\n $options = array('soap_version' => SOAP_1_1,\n 'encoding' => 'ISO-8859-1',\n );\n $client->setOptions($options);\n $client->action = 'findBySectioName';\n $result = $client->findBySectioName($sectionName);\n if ($result == null) {\n return $result;\n } else {\n foreach ($result as $onlyone) {\n $response = $onlyone->sectionId;\n }\n return $response;\n }\n } catch (Exception $e) {\n //return false;\n }\n }", "public function getSection0()\n {\n return $this->hasOne(Section::className(), ['id' => 'section']);\n }", "function get_id_periodo ($cuatrimestre, $anio_lectivo){\n $sql=\"SELECT t_p.id_periodo\n FROM periodo t_p \n JOIN cuatrimestre t_c ON (t_p.id_periodo=t_c.id_periodo)\n WHERE t_c.numero=$cuatrimestre AND t_p.anio_lectivo=$anio_lectivo \";\n \n $periodo=toba::db('gestion_aulas')->consultar($sql);\n \n return ($periodo[0]);\n }", "public function getSectionURL() {\n $sectionUrl = $this->url . '/' . $this->protoVersion . '/';\n $section = $this->getSection();\n if (!empty($section)) {\n $sectionUrl .= $section;\n }\n return $sectionUrl;\n }", "public function section(Session $session, int $section_id = 0): string\n {\n $title = __('Section list');\n $this->navChain->add($title, route('news.admin.section'));\n\n if (! empty($section_id)) {\n $current_section = (new NewsSection())->findOrFail($section_id);\n $title = $current_section->name;\n Helpers::buildAdminBreadcrumbs($current_section->parentSection);\n // Adding the current section to the navigation chain\n $this->navChain->add($current_section->name);\n }\n\n $data = [];\n $data['messages'] = $session->getFlash('success_message');\n $data['sections'] = (new NewsSection())\n ->when(! empty($section_id), function (Builder $builder) use ($section_id) {\n return $builder->where('parent', $section_id);\n })\n ->when(empty($section_id), function (Builder $builder) {\n return $builder->where('parent', 0)->orWhereNull('parent');\n })\n ->get();\n $data['articles'] = (new NewsArticle())\n ->when(! empty($section_id), function (Builder $builder) use ($section_id) {\n return $builder->where('section_id', $section_id);\n })\n ->when(empty($section_id), function (Builder $builder) {\n return $builder->where('section_id', 0)->orWhereNull('section_id');\n })\n ->orderByDesc('id')\n ->paginate();\n $data['current_section'] = $section_id;\n\n $this->metaTagManager->setAll($title);\n return $this->render->render('johncms/news::admin/sections', ['data' => $data]);\n }", "public function section()\n {\n return $this->belongsTo(Section::class, 'section_id')->select('id', 'name');\n }", "function theSection()\n\t{\n\t\treturn array_shift( $this->getSections() );\n\t}", "function getSection($section='') {\r\n if(!empty($section)) {\r\n return $this->parsed_ini_file[$section];\r\n } else {\r\n return '';\r\n }\r\n }", "public function getShortCourseId(){\n return 2;\n }", "function getThesisId() {\n\t\treturn $this->getData('thesisId');\n\t}", "public function get_category_id() {\n return (int)get_config('block_homework_diary', 'course_category');\n }", "public function getStudentId() {\n\t\tpreg_match ( '/\\d{9}/', $this->transcript, $ID ); // this will get the SID of the student\n\n\t\tif (count ( $ID ) > 0) {\n\t\t\t\t\n\t\t\t// $key= mt_rand ( MIN_KEY, MAX_KEY ); // will append a random key to the SI\n\t\t\treturn $ID [0]; // . strval($key);\n\t\t} else\n\t\t\treturn null;\n\t}", "function getExpertSectionTitle($sectionid) {\r\n\t\t$database = & JFactory::getDBO();\r\n\r\n\t\tif ($sectionid == 0)\r\n\t\t\treturn '(0) All ';\r\n\r\n\t\t$query = \"SELECT id, catname as title\"\r\n\t\t\t\t. \"\\n FROM #__eventlist_categories\"\r\n\t\t\t\t. \"\\n WHERE id=$sectionid\"\r\n\t\t;\r\n\t\t$database->setQuery($query);\r\n\t\t$row = $database->loadObjectList();\r\n\t\treturn \"($sectionid) \" . $row[0]->title;\r\n\t}", "function findPromotionalChallengeId(){\n\t\t$this->PromotionalChallenge->recursive = -1;\n\t\t$promotional_challenge = $this->PromotionalChallenge->find('first', \n\t\t\tarray(\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t'PromotionalChallenge.title' => strtolower($this->data['Challenge']['title'])\n\t\t\t\t), \n\t\t\t\t'fields' => array(\n\t\t\t\t\t'PromotionalChallenge.id'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t\n\t\t$untracked_challenge = !($this->data['Challenge']['promotional_challenge_id'] = $promotional_challenge['PromotionalChallenge']['id']);\n\t\t\n\t\tif($untracked_challenge){\n\t\t\treturn 15;\n\t\t} \n\t\t\n\t\treturn $promotional_challenge['PromotionalChallenge']['id'];\n\t}", "public function getActivityId();", "function deduce_question_id($question) {\n if(is_array($question))\n if(is_array($question['pytanie']))\n $question = isSet($question['pytanie']['id_pytania'])? \n $question['pytanie']['id_pytania'] : null;\n else\n $question = isSet($question['id_pytania']) ? $question['id_pytania'] : null;\n \n return $question;\n}", "protected function getSection() {\n\t\treturn 'poker';\n }", "public function get_quiz_lesson_id( $quiz_id ){\n\n\t\t// look for the quiz's lesson\n\t\t$query_args = array(\n\t\t\t'post_type' => 'lesson',\n\t\t\t'meta_key'=> '_lesson_quiz',\n\t\t\t'meta_value' => $quiz_id\n\t\t);\n\t\t$lessons = new WP_Query( $query_args );\n\n\t\tif( ! isset( $lessons->posts ) || empty( $lessons->posts ) ){\n\t\t\treturn false;\n\t\t}\n\n\t\t$quiz_lesson = $lessons->posts[0];\n\n\t\treturn $quiz_lesson->ID;\n\n\t}", "public function getCampusId()\n {\n return $this->campusId;\n }", "function getSection($sectionName,$sectionID='', $attr='VALUE') {\n if (isset($this->sectionList[$sectionName])) { \n return $this->sectionList[$sectionName]->getSection($sectionID, $attr);\n }\n else {\n $this->debugLog(\"getSection: sectionName [$sectionName] wasn't found, ignoring.\",6);\n return NULL;\n }\n }", "function getCourseByPass($conn_moodle,$key){\n\t\t\t$sql = \"select id from mdl_course where idnumber='$key'\";\n\t\t\t$data = $conn_moodle->GetRow($sql);\n\t\t\n\t\t\treturn $data['id'];\n\t\t\t\n\t\t}", "function ipal_show_current_question_id(){\r\n global $DB;\r\n global $ipal;\r\n if($DB->record_exists('ipal_active_questions', array('ipal_id'=>$ipal->id))){\r\n $question=$DB->get_record('ipal_active_questions', array('ipal_id'=>$ipal->id));\r\n\treturn($question->question_id);\r\n }\r\nelse{\r\nreturn(0);\r\n}\r\n}", "public function getStepId()\n {\n return $this->_stepId;\n }", "public function getCurrentSeasonId()\n {\n $currentSeason = $this->db->query(\"SELECT id, seizoen as season FROM intra_seizoen ORDER BY id DESC LIMIT 1;\")->fetch();\n return $currentSeason[\"id\"];\n }", "function display_courses_before( $section ) {\n\tif ( get_field( 'section_layout', $section ) !== 'courses' ) {\n\t\treturn '';\n\t}\n\n\treturn '<div id=\"coursesAccordion\" role=\"tablist\">';\n}", "public function get_section_name($section) {\n\n $section = $this->get_section($section);\n\n if ((string)$section->name !== '') {\n\n return format_string($section->name, true,\n\n array('context' => context_course::instance($this->courseid)));\n\n } else if ($section->section == 0) {\n\n return get_string('section0name', 'format_splash');\n\n } else {\n\n return get_string('topic').' '.$section->section;\n\n }\n\n }", "function theme_moove_get_course_category($id){\n\n global $DB;\n\n $sql_query = \"SELECT category\n FROM {course}\n WHERE id = $id\";\n\n $categoryid = $DB->get_record_sql($sql_query)->category;\n\n return $categoryid;\n }", "function getLTIAssignmentID() {\n \n if ( isset( $_SESSION['lti'] ) ) {\n \n $lti = unserialize( $_SESSION['lti'] );\n \n switch( getLTILMS() ) {\n \n case 'canvas':\n \n return $lti['custom_canvas_assignment_id'];\n break;\n \n default:\n \n return null;\n \n }\n \n }\n \n return null;\n \n }", "public function current()\n {\n // First we check whether we've fetched this before and return it if found, otherwise fetch and set.\n $existing = $this->getCurrentSection();\n\n if ( ! is_null($existing)) return $existing;\n\n $section = $this->sections->findByAlias($this->getCurrentSectionAlias());\n\n // Cache the current section so that whenever someone asks for it we return\n // it right away without requesting it again.\n $this->setCurrentSection($section);\n\n return $section;\n }", "public function delete( &$id ) {\n\n\t\tglobal $wpdb;\n\n\t\t// allow hook\n\t\tdo_action( 'learn-press/before-delete-section', $this->course_id, $id );\n\n\t\t// Remove section items.\n\t\t$wpdb->delete( $wpdb->learnpress_section_items, array( 'section_id' => $id ) );\n\t\tlearn_press_reset_auto_increment( 'learnpress_section_items' );\n\n\t\t// Remove section\n\t\t$result = $wpdb->delete( $wpdb->learnpress_sections, array( 'section_id' => $id ) );\n\t\tlearn_press_reset_auto_increment( 'learnpress_sections' );\n\n\t\treturn ! ! $result;\n\t}", "public function get_section_name($section) {\n $section = $this->get_section($section);\n if ((string)$section->name !== '') {\n return format_string($section->name, true,\n array('context' => context_course::instance($this->courseid)));\n } else {\n return $this->get_default_section_name($section);\n }\n }", "function VerifyCurriculum($course_id, $sy_id){\r\n\t\t\t$curriculum_id = -1;\r\n\r\n\t\t\tif($this->conn == null){\r\n\t\t\t\t$error = \"No defined connection.\";\r\n\t\t\t\treturn null;\r\n\t\t\t} else {\r\n\r\n\t\t\t\t$conn = $this->conn;\r\n\r\n\t\t\t\t$query = \"SELECT CurriculumID FROM `sch-curriculum` \";\r\n\t\t\t\t$query .= \"WHERE Course={$course_id} AND SchoolYear={$sy_id} \";\r\n\r\n\t\t\t\t$result = $conn->query($query);\r\n\r\n\t\t\t\t//check for errors first\r\n\t\t\t\tif($conn->error <> \"\"){\r\n\t\t\t\t\t$this->error[sizeof($this->error)] = $conn->error;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$curriculums = array();\r\n\t\t\t\t\t$ctr = 0;\r\n\t\t\t\t\tif($result->num_rows > 0){\r\n\t\t\t\t\t\t$row = $result->fetch_assoc();\r\n\t\t\t\t\t\t$curriculum_id = $row['CurriculumID'];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\treturn $curriculum_id;\r\n\t\t}", "function getLessonCourseById($lessonId){\n\n\t\tglobal $conn;\n\n\t\t$query = \"SELECT Course.name AS courseName, Course.id AS courseId\n\t\tFROM Course INNER JOIN CourseLesson ON CourseLesson.idCourse=Course.id \n\t\tWHERE CourseLesson.idLesson='\". $lessonId . \"'\";\n\n\t\t$result = $conn->query($query);\n\n\t\tif($result->num_rows != 1){\n\t\t\treturn \"NO_LESSON_BY_ID\";\n\t\t}else{\n\t\t\t$courseName = $result->fetch_assoc(); \n\t\t\treturn $courseName;\n\t\t}\n\n\t}", "public function show($uuid, $survey_id, $section_id)\n {\n $this_survey = Survey::where('hash_id',$survey_id)->firstOrFail();\n\n $assignment = SurveyAssignment::where([\n ['uuid', '=', $uuid],\n ['survey_id', '=', $this_survey->id],\n ])->firstOrFail();\n\n\n // $after_check_survey = Survey::findOrFail($assignment->survey_id);\n $section = $this_survey->sections->where('id',$section_id)->first();\n\n return view('clients/surveys/pages/client_survey_show')\n ->with(['survey' => $this_survey,'survey_id'=>$survey_id,'uuid'=>$uuid, 'section'=>$section]);\n\n }", "public function getSection($id, $section)\n {\n $incomingMessage = new IncomingMessage($this->imap, $id);\n return $incomingMessage->getSection($section);\n }", "public function lastSection() {\n\t\treturn $this->hasMany('SectionProgress')->whereRaw('status = 2')->first();\n\t}" ]
[ "0.68471014", "0.6746336", "0.66994053", "0.63214576", "0.6187719", "0.61064863", "0.6083496", "0.6075507", "0.60102105", "0.59768546", "0.59669816", "0.5866749", "0.5864128", "0.5857779", "0.5850432", "0.5797648", "0.5759276", "0.5749922", "0.57216275", "0.5686985", "0.56743515", "0.56329286", "0.5586925", "0.557007", "0.5557867", "0.55519277", "0.55424285", "0.5510599", "0.5506038", "0.5495573", "0.54874426", "0.54874426", "0.5452674", "0.5446014", "0.54362935", "0.54210806", "0.54195875", "0.54067653", "0.54017055", "0.5399304", "0.5394388", "0.5390211", "0.5385757", "0.53856975", "0.53688246", "0.5367715", "0.5357055", "0.53501457", "0.5345475", "0.53297055", "0.5299958", "0.5298699", "0.5284488", "0.52818793", "0.5264582", "0.52612907", "0.52612907", "0.52612907", "0.52612907", "0.52577585", "0.5250747", "0.5236897", "0.5233616", "0.5220987", "0.5204353", "0.517799", "0.5159243", "0.5159008", "0.51542383", "0.51506317", "0.5124999", "0.5123596", "0.5120994", "0.509815", "0.5093539", "0.50807405", "0.5076612", "0.5064556", "0.5064299", "0.506091", "0.5060729", "0.5058803", "0.50550497", "0.50499743", "0.5049081", "0.50415593", "0.50384986", "0.50343114", "0.5031318", "0.50303143", "0.5021546", "0.50136137", "0.50105834", "0.5002867", "0.49970844", "0.499454", "0.49873737", "0.49758783", "0.49683803", "0.4967819" ]
0.51770705
66
Update course final item.
public function update_final_item() { $sections = LP_Course_Utils::get_cached_db_sections( $this->course_id ); if ( ! $sections ) { return false; } $last_section = end( $sections ); $section_id = $last_section->section_id; // get last section items $section_items = LP_Object_Cache::get( 'course-' . $this->course_id . '-' . $section_id, 'learn-press/course-section-items' ); $types = apply_filters( 'learn-press/post-types-support-assessment-by-final-item', array( LP_QUIZ_CPT ) ); if ( $section_items ) { // last item in last section $final = end( $section_items ); if ( is_array( $types ) && in_array( $final['type'], $types ) ) { update_post_meta( $this->course_id, '_' . substr_replace( $final['type'], '_final_', 2, 1 ), $final['id'] ); $diff = array_diff( $types, array( $final['type'] ) ); foreach ( $diff as $type ) { // delete all other final meta delete_post_meta( $this->course_id, '_' . substr_replace( $type, '_final_', 2, 1 ) ); } } else { // for last item is not post type need check final item foreach ( $types as $type ) { delete_post_meta( $this->course_id, '_' . substr_replace( $type, '_final_', 2, 1 ) ); } } } else { // for last section does not has any item foreach ( $types as $type ) { delete_post_meta( $this->course_id, '_' . substr_replace( $type, '_final_', 2, 1 ) ); } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update() {\n\n // Does the course object have an ID?\n if ( is_null( $this->courseId ) ) trigger_error ( \"Course::update(): Attempt to update Course object that does not have its ID property set.\", E_USER_ERROR );\n\n // Update the course\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $sql = \"UPDATE course SET courseCode=:courseCode, courseName=:courseName, description=:description, headTeacher=:headTeacher WHERE courseId = :courseId\";\n $st = $conn->prepare ( $sql );\n $st->bindValue( \":courseCode\", $this->courseCode, PDO::PARAM_INT );\n $st->bindValue( \":courseName\", $this->courseName, PDO::PARAM_INT );\n $st->bindValue( \":description\", $this->description, PDO::PARAM_STR );\n $st->bindValue( \":headTeacher\", $this->headTeacher, PDO::PARAM_STR );\n\n//\n $st->bindValue( \":courseId\", $this->courseId, PDO::PARAM_INT );\n $st->execute();\n $conn = null;\n }", "function testUpdate_Courses($link, $course_id) {\n\t\t$course = Course::select($link, $course_id);\n\t\t\n\t\t// set attributes\n $designation \t= $course->designation;\n $name \t\t\t= $course->name;\n $credits \t\t= $course->credits;\n\t\t\n\t\t// perform update operation\n\t\tswitch($course_id % 3) {\n\n\t\t\tcase(0):\n\t\t\t\tCourse::update($link, $course_id, 'Update101', $name, $credits);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase(1):\n\t\t\t\tCourse::update($link, $course_id, $designation, 'Updated Class Name', $credits);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase(2):\n\t\t\t\tCourse::update($link, $course_id, $designation, $name, 99);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\techo \"course id does not exist.\";\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function update(CourseRequest $request)\n {\n return parent::updateBase($request,$this->id);\n }", "function updateCompletedCourses($courseID)\n\t{\n\t\t$current_courses = $this->DB->database_select('users', 'courses_completed', array('username' => session_get('username')), 1);\n\t\t\n\t\tif($current_courses == false || $current_courses['courses_completed'] == '') //First course completed, simply add field\n\t\t{\n\t\t\t$addition = $courseID;\n\t\t}\n\t\telse //Must add to already completed courses field\n\t\t{\n\t\t\t$current_courses = explode(',', $current_courses['courses_completed']);\n\t\t\t$current_courses[] = $courseID;\n\t\t\t$addition = implode(',', $current_courses);\n\t\t}\n\n\t\t$this->DB->database_update('users', array('courses_completed' => $addition),\n\t\t\t\t\t array('username' => session_get('username')));\n\t}", "public static function updateCourse()\n {\n global $cont;\n $title = $_POST['title'];\n $price = $_POST['price'];\n $body = $_POST['body'];\n $categoryId = $_POST['cat_id'];\n $courseId = $_POST['course_id'];\n \n if(!empty($_FILES['image']['name']))\n {\n $imageName = $_FILES['image']['name'];\n $imageType = $_FILES['image']['type'];\n $imageTmp = $_FILES['image']['tmp_name'];\n\n $imageExt = Courses::checkImageExt($imageType); \n\n if($imageExt == 0 )\n {\n session_start();\n $_SESSION['error'] = \"U Must Upload Correct File\";\n header(\"location:../admin/pages/forms/update-course.php?id=\".$courseId);\n die();\n }\n \n $avatarName = Courses::chekImageExist(time() . \"_\" . $imageName);\n\n $imageLink = dirname(__FILE__) . \"/../admin/pages/upload/courses/\";\n move_uploaded_file($imageTmp , $imageLink.$avatarName);\n }\n else\n {\n $avatarName = $_POST['old-image'];\n }\n\n\n $courses = $cont->prepare(\"UPDATE courses SET title = ? , price = ? , image = ? , body = ? , catagory_id = ? WHERE id = ?\");\n \n if ( $courses->execute([$title , $price , $avatarName , $body , $categoryId , $courseId]))\n {\n session_start();\n $_SESSION['message'] = \"Course Was Updated\";\n header(\"location:../admin/pages/tables/Courses.php\");\n }\n else\n {\n echo\"ddc\";\n }\n \n }", "function update_course($course_id)\n\t{\n\t\t$this->db->update('tbl_course',$this, array('course_id'=>$course_id));\n\t\t//echo $this->db->last_query();exit;\n\t}", "public function update()\n\t{\n\t\t$option = JRequest::getVar('option');\n\t\t$post = JRequest::get('post');\n\t\t$Itemid = JRequest::getVar('Itemid');\n\t\t$redhelper = new redhelper;\n\t\t$Itemid = $redhelper->getCartItemid();\n\t\t$model = $this->getModel('cart');\n\n\t\t// Call update method of model to update product info of cart\n\t\t$model->update($post);\n\t\t$this->_carthelper->cartFinalCalculation();\n\t\t$this->_carthelper->carttodb();\n\t\t$link = JRoute::_('index.php?option=' . $option . '&view=cart&Itemid=' . $Itemid, false);\n\t\t$this->setRedirect($link);\n\t}", "function cicleinscription_grade_item_update(stdClass $cicleinscription) {\n global $CFG;\n require_once($CFG->libdir.'/gradelib.php');\n\n /** @example */\n $item = array();\n $item['itemname'] = clean_param($cicleinscription->name, PARAM_NOTAGS);\n $item['gradetype'] = GRADE_TYPE_VALUE;\n $item['grademax'] = $cicleinscription->grade;\n $item['grademin'] = 0;\n\n grade_update('mod/cicleinscription', $cicleinscription->course, 'mod', 'cicleinscription', $cicleinscription->id, 0, null, $item);\n}", "public function actionUpdateCourses()\n\t{\n\t\t$courses = Course::model()->findAll('faculty_id=:X', array(':X' => (int) $_POST['faculty_id']));\n\n\t\techo CHtml::dropDownList('Note[course_id]', '',\n\t\t\tCHtml::listData($courses, 'id', 'name'),\n\t\t\t array('prompt' => 'Pilih mata kuliah'));\n\t}", "public function update(hodCourseRequest $request, Course $courseParticular)\n {\n $courseParticular->update($request->all());\n return redirect()->route('courseParticular.index')->with('message', 'item has been updated successfully.');\n }", "public function updatecourse($id)\n {\n \n }", "public function testUpdateItem()\n {\n $item = $this->addItem();\n\n $this->laracart->updateItem($item->getHash(), 'qty', 4);\n\n $this->assertEquals(4, $item->qty);\n }", "function update(Course $course, $data): ?bool;", "public function update(Request $request, Course $course)\n {\n if(Session::get('accountID') === null){\n return view('authHN.extends.login');\n }else if(Account::where('id',Session::get('accountID'))->first()->level !== 1){\n return Redirect::to(route('home'));\n }else{\n $request->img = ($request->img !== null) ? $request->img->store('uploads', 'public') : substr($request->img, 8);\n $course->name = $request->name;\n $course->category_id = $request->category_id;\n $course->price = $request->price;\n // if($request->img !== null){\n // $course->img = $request->img->store('uploads', 'public'); \n // }\n $course->description = $request->description;\n $course->content = $request->content;\n\n $course->save();\n Session::put('message','Cập nhật thành công');\n return Redirect::to(route('course.index'));\n }\n \n }", "public function updatecourses ($id_course , $description , lecture_id\n ){\n $sqlQuery = \" UPDATE courses SET id_course =’ $id_course ’, description =’\n$description ’, lecture_id='$lecture_id'\";\n $sqlQuery .= \" WHERE id_course= $id_course\";\n $result = $this -> getDbManager () -> executeQuery ( $sqlQuery );\n return $result ;\n }", "public function update(Request $request, course $course)\n {\n //\n }", "function action_update() {\n global $CURMAN;\n\n $stuid = $this->required_param('association_id', PARAM_INT);\n $clsid = $this->required_param('id', PARAM_INT);\n $users = $this->required_param('users');\n\n $uid = key($users);\n $user = current($users);\n\n $sturecord = array();\n $sturecord['id'] = $stuid;\n $sturecord['classid'] = $clsid;\n $sturecord['userid'] = $uid;\n\n $startyear = $user['startyear'];\n $startmonth = $user['startmonth'];\n $startday = $user['startday'];\n $sturecord['enrolmenttime'] = mktime(0, 0, 0, $startmonth, $startday, $startyear);\n\n $endyear = $user['endyear'];\n $endmonth = $user['endmonth'];\n $endday = $user['endday'];\n $sturecord['completetime'] = mktime(0, 0, 0, $endmonth, $endday, $endyear);\n\n $sturecord['completestatusid'] = $user['completestatusid'];\n $sturecord['grade'] = $user['grade'];\n $sturecord['credits'] = $user['credits'];\n $sturecord['locked'] = !empty($user['locked']) ? 1 : 0;\n $stu = new student($sturecord);\n\n if ($stu->completestatusid == STUSTATUS_PASSED &&\n $CURMAN->db->get_field(STUTABLE, 'completestatusid', 'id', $stuid) != STUSTATUS_PASSED) {\n\n $stu->complete();\n } else {\n if (($status = $stu->update()) !== true) {\n echo cm_error('Record not updated. Reason: ' . $status->message);\n }\n }\n\n /// Check for grade records...\n $element = cm_get_param('element', array());\n $newelement = cm_get_param('newelement', array());\n $timegraded = cm_get_param('timegraded', array());\n $newtimegraded = cm_get_param('newtimegraded', array());\n $completionid = cm_get_param('completionid', array());\n $newcompletionid = cm_get_param('newcompletionid', array());\n $grade = cm_get_param('grade', array());\n $newgrade = cm_get_param('newgrade', array());\n $locked = cm_get_param('locked', array());\n $newlocked = cm_get_param('newlocked', array());\n\n foreach ($element as $gradeid => $element) {\n $graderec = array();\n $graderec['id'] = $gradeid;\n $graderec['userid'] = $uid;\n $graderec['classid'] = $clsid;\n $graderec['completionid'] = $element;\n $graderec['timegraded'] = mktime(0, 0, 0, $timegraded[$gradeid]['startmonth'],\n $timegraded[$gradeid]['startday'], $timegraded[$gradeid]['startyear']);\n $graderec['grade'] = $grade[$gradeid];\n $graderec['locked'] = isset($locked[$gradeid]) ? $locked[$gradeid] : '0';\n\n $sgrade = new student_grade($graderec);\n $sgrade->update();\n }\n\n foreach ($newelement as $elementid => $element) {\n $graderec = array();\n $graderec['userid'] = $uid;\n $graderec['classid'] = $clsid;\n $graderec['completionid'] = $element;\n $graderec['timegraded'] = mktime(0, 0, 0, $newtimegraded[$elementid]['startmonth'],\n $newtimegraded[$elementid]['startday'], $newtimegraded[$elementid]['startyear']);\n $graderec['grade'] = $newgrade[$elementid];\n $graderec['locked'] = isset($newlocked[$elementid]) ? $newlocked[$elementid] : '0';\n\n $sgrade = new student_grade($graderec);\n $sgrade->add();\n }\n\n $this->action_default();\n }", "public function updateItem( $id, $preparedItem ) {\n\t}", "public function update($id, $period, $item)\n {\n $id = $this->is_digit($id);\n $course = Course::findOrFail($id); \n if ($course->evaluator == Auth::user()->id) {\n $period = $this->is_digit($period);\n $periods = Courseperiod::where('course', $id)->where('id', $period)->count();\n if($periods == 1) {\n $item = $this->is_digit($item);\n $items = Courseitem::where('period', $periods)->where('id', $item)->count();\n if($items == 1){\n return view('courseperioditem.update', ['item' => Courseitem::find($item), 'schemes' => Coursescheme::where('course',$id)->get()]);\n }\n else {\n abort(404);\n }\n }\n else {\n abort(404);\n }\n }\n else {\n return redirect()->route('course_managed')->with('warning', 'Whoops! You\\'re unauthorized to access that page!');\n }\n }", "abstract public function updateItem(&$object);", "function update_course(){\n\t\t\tprint_r($this->input->post());\n\t\t}", "public function update(Request $request, Course $course)\n {\n //\n }", "public function update()\n {\n $this->_checkItem();\n $service = $this->getService();\n $entry = $service->getGbaseItemEntry( $this->getItem()->getGbaseItemId() );\n $this->setEntry($entry);\n $this->_prepareEnrtyForSave();\n $entry = $service->updateGbaseItem($this->getEntry());\n\n }", "public function updated(Instructor $instructor)\n {\n //\n }", "public function storeUpdate(Course $course)\n {\n $values = request()->all();\n $values['short_name'] = strtoupper($values['short_name']);\n\n if (! $course->gradeLevels()->sync($values['grade_levels'])) {\n ViewHelpers::flashAlert(\n 'danger',\n 'Could not save grade levels. Please try again.',\n 'fa fa-info-circle mr-1');\n\n return redirect()->back();\n }\n unset($values['grade_levels']);\n\n $course = DatabaseHelpers::dbAddAudit($course);\n ViewHelpers::flash($course->update($values), 'course', 'updated');\n\n return redirect()->to('course/index');\n }", "function vitero_grade_item_update(stdClass $vitero) {\n}", "private function update($cat){\r\n\t\tif(!$this->acceptUpdates) return;//do not allow health coach to change answers\r\n\t\tif(!isset($this->categories[$cat])) throw new Exception(\"Invalid category\");\r\n\r\n\t\t$sql=\"UPDATE `u_mod_ifocus` SET \";\r\n\t\t$comma=false;\r\n\t\tforeach($this->data[$cat] as $key=>$value){\r\n\t\t\tif($comma) $sql.=\" , \";\r\n\t\t\t$sql.=\"`\".$key.\"`='\".$this->dbOb->escape_string($value).\"'\";\r\n\t\t\t$comma=true;\r\n\t\t}\r\n\t\tif(!$comma) return; //cant update a section we have no data for\r\n\t\tif(!$this->id) return; //can't update a record we haven't loaded\r\n\r\n\t\t$sql .= \", last_completed = '\" . $cat . \"'\";\r\n\r\n\t\tif($cat==\"biometric_data\"){\r\n\t\t\tif(!$this->isCompleted()) $sql.=\", date_completed=NOW() \";\r\n\t\t\t//upon completion reward points for Health Assessment Questions\r\n\t\t\t$im=new IncentivePointsModel();\r\n\t\t\tif($this->data[\"preventative_health\"][\"q12\"]==1){\r\n\t\t\t\t$im->addIncentivePointMA(\"IFocusModel\",\"FluShot\");\r\n\t\t\t}\r\n\t\t\t$im->addIncentivePointMA(\"IFocusModel\",\"Complete\");\r\n\t\t}\r\n\r\n\t\t$sql .= \" ,date_updated=NOW() WHERE id = '\" . $this->data['id'] . \"'\";\r\n\t\t$this->dbOb->update($sql);\r\n\t}", "public function testUpdateItemSubCategory()\n {\n }", "public function handleUpdate($id, $period, $item, Request $request)\n {\n $id = $this->is_digit($id);\n $course = Course::findOrFail($id); \n if ($course->evaluator == Auth::user()->id) {\n $period = $this->is_digit($period);\n $periods = Courseperiod::where('course', $id)->where('id', $period)->count();\n if ($periods == 1) {\n $item = $this->is_digit($item);\n $items = Courseitem::where('period', $period)->where('id', $item)->count();\n if($items == 1){\n $this->updateValidator($request->all())->validate();\n $items = $this->edit($item, $request->all());\n return redirect()->route('course_managed_period_item_show', ['course' => $id, 'period' => $period, 'item' => $item])->with('status', 'New item successfully created!');\n }\n else {\n abort(404);\n }\n }\n else {\n abort(404);\n }\n }\n else {\n return redirect()->route('course_managed')->with('warning', 'Whoops! You\\'re unauthorized to access that page!');\n }\n }", "public function update(Request $request, Course $course)\n {\n $user = Auth::user();\n //check if user have the priviledge to update course record.\n $isAuthorized = app('App\\Http\\Controllers\\UserPrivilegeController')->checkPrivileges($user->id, Config::get('settings.course_management'), 'update_priv');\n if($isAuthorized){\n //data validation\n $validator = Validator::make($request->all(),[\n 'course_code' => 'unique:courses,course_code',\n 'course_desc' => 'string',\n 'course_major' => 'nullable|string',\n 'year_duration' => 'string',\n 'active' => 'numeric',\n ]);\n\n // check if data if validator fails\n if ($validator->fails()) {\n return response()\n ->json([\n 'message' => 'Failed to update course record.',\n 'errors' => $validator->errors()\n ], 400); // 400: Bad request\n }\n else {\n $course_data = $request->all();\n $course_data['last_updated_by'] = Auth::user()->id;\n try {\n $check = $course->update($course_data);\n\n // check if record is successfully updated.\n if ($check) {\n //record in activity log\n $activityLog = ActivityLog::create([\n 'user_id' => $user->id,\n 'activity' => 'Updated the course ' . $course->course_desc . '.',\n 'time' => Carbon::now()\n ]);\n return response()->json(['message' => 'Course record successfully updated.'], 200);\n }else {\n return response()->json(['message' => 'Failed to update course record.'], 500); // server error\n }\n } catch (Exception $e) {\n report($e);\n return false;\n }\n }\n }else{\n //record in activity log\n $activityLog = ActivityLog::create([\n 'user_id' => $user->id,\n 'activity' => 'Attempted to update the details of ' . $course->course_desc . '.',\n 'time' => Carbon::now()\n ]);\n return response()->json([\n 'message' => 'You are not authorized to update course records.'\n ],401); //401: Unauthorized\n }\n }", "public function storeUpdateShow(Course $course)\n {\n $values = request()->all();\n $values['short_name'] = strtoupper($values['short_name']);\n if (! $course->gradeLevels()->sync($values['grade_levels'])) {\n ViewHelpers::flashAlert(\n 'danger',\n 'Could not save grade levels. Please try again.',\n 'fa fa-info-circle mr-1');\n\n return redirect()->back();\n }\n unset($values['grade_levels']);\n $course = DatabaseHelpers::dbAddAudit($course);\n ViewHelpers::flash($course->update($values), 'course', 'updated');\n\n return redirect()->back();\n }", "public function update(Request $request, Course $course)\n {\n // $module->update($request->all());\n\n // $this->authorize('update', Course::class);\n // $input=$request->all();\n // $course->update($input);\n // return redirect('course/'.$course->id);\n $course->update($request->all());\n return response()->json($course);\n }", "public function update(Request $request, Course $course)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required',\n 'slug' => 'required',\n /*'visible' => 'required',\n 'active' => 'required',*/\n ]);\n\n $course->name = $request->name;\n $course->description = $request->description;\n $course->slug = $request->slug;\n $course->user_id = Auth::id();\n $course->visible = !! $request->visible;\n $course->active = !! $request->active;\n\n $course->update();\n\n return redirect()->back()->with('success', 'Το μάθημα ενημερώθηκε με επιτυχία.')->withInput();\n }", "public function update_course($id,$cod,$titl,$crhr,$lab,$type) {\n $upd_query=\"UPDATE courses\n SET course_code='$cod',course_title='$titl',course_credit_hours='$crhr',course_lab='$lab',course_type='$type'\n WHERE course_id='$id'\";\n $dupd_exe=mysqli_query($GLOBALS['con'],$upd_query);\n if ($dupd_exe) {\n header('Location:..\\courses_page.php?msg=successfuly Updated record');//redirecting to main page of courses\n }else {\n header('Location:..\\courses_page.php?msg=Error Updating record');//redirecting to main page of courses\n }\n }", "public function update(CourseRequest $request, int $id)\n {\n return parent::updateBase($request, $id);\n }", "public function update(Request $request, Course $course)\n {\n $request->validate([\n \"title\" => \"required|string|max:255\",\n \"description\" => \"required|string\",\n \"course_fee\" => \"required|numeric\",\n \"image\" => \"nullable|file\",\n \"is_active\" => \"required\"\n ]);\n $data = [\n \"title\" => $request->title,\n \"description\" => $request->description,\n \"course_fee\" => $request->course_fee,\n \"is_acrive\" => $request->is_active == \"on\" ? true : false\n ];\n if ($request->hasFile('image')) {\n if (Storage::exists($course->image)) {\n Storage::delete($course->image);\n }\n $data['image'] = Storage::put(\"/images/courses\", $request->image);\n }\n if ($course->update($data)) {\n Toastr::success('Successfully Course Updated', \"Success\");\n } else {\n Toastr::error('Something Went Wrong!', \"Error\");\n }\n return back();\n }", "public function update(): void\n {\n $this->updateQuality();\n $this->updateSellIn();\n $this->expiresAfterSale();\n }", "function local_callbacks_coursemodule_edit_post_actions($data, $course) {\n // Pull apart $data and insert/update the database table.\n}", "public function updateCourseInfo($id)\n {\n /** @var Course $course */\n $course = Course::find($id);\n if(!$course){\n return back();\n }\n else{\n $course->updateCounter();\n $course->updateReview();\n return back();\n }\n }", "public function update(): void\n {\n // Update quality\n $this->item->quality--;\n\n // Update Sell in\n $this->updateSellIn();\n\n // Check if we need to decrease quality again\n if ($this->item->sell_in < 0) {\n $this->item->quality--;\n }\n\n $this->checkAndUpdateQualityByRange();\n }", "public function course() {\n $this->data['page_title'] = lang('courses');\n $data['returnedData'] = '';\n\n $packageId = (int) $this->uri->segment(4);\n if(!empty($packageId)) {\n $data['packageId'] = $packageId;\n $id = (int) $this->uri->segment(5);\n if (!empty($id)) {\n $returnedData = $this->package_course_model->get($id);\n $data['returnedData'] = $returnedData;\n }\n\n $validation_rules = array(\n array('field' => 'titleAR', 'label' => lang('arabic_title'), 'rules' => 'trim|required'),\n array('field' => 'titleGE', 'label' => lang('title').' ('.lang('german').')', 'rules' => 'trim|required')\n );\n $this->form_validation->set_rules($validation_rules);\n\n if ($this->form_validation->run() == false) {\n $this->form_validation->set_error_delimiters('<div class=\"alert alert-danger\" >', '</div>');\n //set the flash data error message if there is one\n $data['message'] = (validation_errors() ? validation_errors() : $this->session->flashdata('msg'));\n }else {\n if($_POST) {\n $postedArray = $this->input->post( NULL, TRUE );\n $postedArray['userId'] = $this->admin_ion_auth->user()->row()->id;\n $postedArray['packageId'] = $packageId;\n\n if (!empty($id)) { //update\n $postedArray['lastModifiedDate'] = date(\"Y-m-d H:i:s\");\n\n if ($this->package_course_model->update($postedArray, $id)) {\n $this->session->set_flashdata('msg', \"<div class='alert alert-success'>\".lang('update_success_message').\"</div>\");\n redirect('admin/packages/packageData/'.$packageId , 'location');\n } else {\n $this->session->set_flashdata('msg', \"<div class='alert alert-danger'>\".lang('update_error').\"</div>\");\n redirect('admin/packages/course/'.$packageId.'/'. $id, 'location');\n }\n }//end id\n else{//insert\n $postedArray['addingDate'] = date(\"Y-m-d H:i:s\");\n\n if ($this->package_course_model->insert($postedArray)) {\n $this->session->set_flashdata('msg', \"<div class='alert alert-success'>\".lang('insert_success_message').\"</div>\");\n } else {\n $this->session->set_flashdata('msg', \"<div class='alert alert-danger'>\".lang('insert_error').\"</div>\");\n }\n redirect('admin/packages/packageData/'.$packageId , 'location');\n }\n }//post\n }//else\n $this->load->vars($data);\n $this->render('admin/packages/course');\n } else {\n redirect('admin/packages', 'location');\n }\n }", "public function update() {\n global $DB;\n $record = array(\n 'sortorder' => $this->sortorder,\n 'criterion' => $this->criterion,\n 'addinfo' => json_encode($this->addinfo)\n );\n if ($this->id) {\n $record['id'] = $this->id;\n $DB->update_record($this->get_table_name(), $record);\n } else {\n $record['instantquizid'] = $this->instantquiz->id;\n $this->id = $DB->insert_record($this->get_table_name(), $record);\n }\n }", "public function update(Request $request, $course_id, $id)\n {\n \n }", "public function update(Request $request, CourseUser $courseUser)\n {\n //\n \n }", "public function testUpdateStudentTakesCourse()\n {\n $response = $this->loginAsRole(Role::ADMIN)\n ->put($this->url('student-courses/1'), [\n 'student_id' => 3\n ]);\n\n $response->assertStatus(200);\n\n $response->assertJsonStructure([\n 'student_id',\n 'staff_teach_course_id'\n ]);\n\n $response->assertJson([\n 'student_id' => 3\n ]);\n }", "public function update(Request $request, IntakeCourse $intakeCourse)\n {\n //\n }", "public function update(Request $request, Course $course)\n {\n $this->validator($request, $course);\n\n $updated = $course->update($request->only('code', 'description'));\n\n if ($updated) {\n alert()->success('Success', 'Course updated');\n return redirect()->route('courses.index');\n }\n\n alert()->error('Error', 'Failed to update course');\n return redirect()->back()->withInput();\n }", "public function update(Request $request, Course $course)\n {\n $this->validate($request, [\n 'description' => 'required',\n 'units' => 'required|numeric',\n 'hours' => 'numeric',\n 'academic' => 'required',\n ]);\n\n $course->update($request->all());\n\n return redirect(\"/courses/$course->id\")->with('Info','Course has been updated.');\n }", "private function course_updated($event) {\n global $DB;\n $courseid = $event->courseid;\n $course = $DB->get_record('course', array('id' => $courseid), 'visible');\n $coursecontext = context_course::instance($courseid);\n $coursemodinfo = get_fast_modinfo($courseid, -1);\n $cms = $coursemodinfo->get_cms();\n\n $users = $this->get_google_authenticated_users($courseid);\n $insertcalls = array();\n $deletecalls = array();\n\n foreach ($cms as $cm) {\n $cmid = $cm->id;\n $cmcontext = context_module::instance($cmid);\n $fileids = $this->get_fileids($cmid);\n if ($fileids) {\n foreach ($fileids as $fileid) {\n foreach ($users as $user) {\n if (has_capability('moodle/course:view', $coursecontext, $user->userid)) {\n // Manager; do nothing.\n } elseif (is_enrolled($coursecontext, $user->userid, null, true) && has_capability('moodle/course:manageactivities', $cmcontext, $user->userid)) {\n // Teacher (enrolled) (active); do nothing.\n } elseif (is_enrolled($coursecontext, $user->userid, null, true)) {\n // Student (enrolled); continue checks for reader permissions.\n if ($course->visible == 1) {\n // Course is visible, continue checks.\n rebuild_course_cache($courseid, true);\n $modinfo = get_fast_modinfo($courseid, $user->userid);\n $cminfo = $modinfo->get_cm($cmid);\n $sectionnumber = $this->get_cm_sectionnum($cmid);\n $secinfo = $modinfo->get_section_info($sectionnumber);\n if ($cminfo->uservisible && $secinfo->available) {\n // User can view and access course module and can access section; insert reader permission.\n $call = new stdClass();\n $call->fileid = $fileid;\n $call->gmail = $user->gmail;\n $call->role = 'reader';\n $insertcalls[] = $call;\n if (count($insertcalls) == 1000) {\n $this->batch_insert_permissions($insertcalls);\n $insertcalls = array();\n }\n }\n // User cannot access course module, do nothing (course module availability won't change here).\n } else {\n // Course not visible, delete permission.\n try {\n $permissionid = $this->service->permissions->getIdForEmail($user->gmail);\n $permission = $this->service->permissions->get($fileid, $permissionid->id);\n if ($permission->role != 'owner') {\n $call = new stdClass();\n $call->fileid = $fileid;\n $call->permissionid = $permissionid->id;\n $deletecalls[] = $call;\n if (count($deletecalls) == 1000) {\n $this->batch_delete_permissions($deletecalls);\n $deletecalls = array();\n }\n }\n } catch (Exception $e) {\n debugging($e);\n }\n }\n }\n // Unenrolled user; do nothing (user enrolment would not have changed during this event).\n }\n }\n }\n }\n\n // Call any remaining batch requests.\n if (count($insertcalls) > 0) {\n $this->batch_insert_permissions($insertcalls);\n }\n\n if (count($deletecalls) > 0) {\n $this->batch_delete_permissions($deletecalls);\n }\n }", "function updateRelation() {\n $bl = new BL();\n $m= new StudentCourseModel($param);\n $courses=$m->getCourseID();\n \n for($i=0; $i<count($courses); $i++) {\n $newCourses= \"id_course = '\".$courses[i].\"', course_name='\".$m->getName().\"',course_description = '\" .$m->getDescription(). \"',\n course_image = '\". $m->getImage().\"'\";\n $updatedCourse = $bl->updateData('school_relation', $m->getID(),$newCourses);\n if ($updatedCourse ==true){\n return true;\n }\n else{ return false;\n}\n} \n }", "public function update(): void\n {\n // Update quality\n if ($this->item->sell_in > 10) {\n $this->item->quality++;\n }\n\n if ($this->item->sell_in <= 10 && $this->item->sell_in > 5) {\n $this->item->quality += 2;\n }\n\n if ($this->item->sell_in <= 5 && $this->item->sell_in > 0) {\n $this->item->quality += 3;\n }\n\n // Update Sell in\n $this->updateSellIn();\n\n if ($this->item->sell_in < 0) {\n $this->item->quality = 0;\n }\n\n $this->checkAndUpdateQualityByRange();\n }", "public function update(UpdateCourseRequest $request, Course $course)\n {\n try {\n if (!$request->has('active')) {\n $request->request->add(['active'=>0]);\n }\n\n $course->name = $request->name;\n $course->category_id = $request->category;\n $course->description = $request->description;\n $course->hours = $request->hours;\n $course->levels = $request->levels;\n $course->active = $request->active;\n\n if ($course->update())\n {\n notify()->success('Course created successfully');\n return redirect()->route('courses.index');\n }\n else\n {\n notify()->warning('there is something wrong');\n return redirect()->back();\n }\n }\n catch (\\Exception $e)\n {\n notify()->error('there is something wrong. please, try again later');\n return redirect()->route('courses.index');\n }\n }", "public function update(Request $request, Course $course, $id)\n {\n //\n }", "public function editcourse()\n\t{\n\t\tJSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n \n\t\t$this->setRedirect(\n\t\t\tJRoute::_('index.php?option=com_aftms&task=course.edit&id=' . $this->parent_id, false)\n\t\t);\n\n\t\treturn true;\n\t}", "public function updateItem($_id) {\n\t}", "public function proceed() {\n global $CFG, $USER, $DB;\n\n if (!$this->prepared) {\n throw new coding_exception('The course has not been prepared.');\n } else if ($this->has_errors()) {\n throw new moodle_exception('Cannot proceed, errors were detected.');\n } else if ($this->processstarted) {\n throw new coding_exception('The process has already been started.');\n }\n $this->processstarted = true;\n\n $course = (object) $this->data;\n\n // Find the old and new enrol method instances for the course\n list($oldmethod, $newmethod) = tool_switchenrol_helper::get_enrol_methods($course);\n if (empty($oldmethod) || empty($newmethod)) {\n // One of the methods does not exist in this course... this warning should have been picked up in the preview.\n return;\n }\n\n $sql = \"UPDATE {user_enrolments}\n SET enrolid = ?\n WHERE enrolid = ?\n AND userid NOT IN (\n SELECT userid \n FROM {user_enrolments}\n WHERE enrolid = ?\n )\";\n $params = array($newmethod->id, $oldmethod->id, $newmethod->id);\n $DB->execute($sql, $params);\n\n\n $sql = \"UPDATE {role_assignments}\n SET itemid = ? \";\n\n // If changing from database, update the role_assignments table to remove \n // reference to the enrol_database component so these are not deleted by the database enrol sync.\n // If changing to database, update the role_assignments table to reference the enrol_database component\n // so these are not deleted by the database enrol sync. \n if ($oldmethod->enrol == 'database') {\n $sql .= \", component = '' \";\n } else if ($newmethod->enrol == 'database') {\n $sql .= \", component = 'enrol_database' \";\n }\n\n $sql .= \"WHERE itemid = ?\n AND userid NOT IN (\n SELECT userid \n FROM {user_enrolments}\n WHERE enrolid = ?\n )\";\n $params = array($newmethod->id, $oldmethod->id, $oldmethod->id);\n $DB->execute($sql, $params);\n\n\n $this->status('enrolupdated', new lang_string('enrolupdated', 'tool_switchenrol'));\n }", "public function update(Course $course)\n {\n $course_types = CourseType::getDropdown();\n $transcript_types = CourseTranscriptType::getDropdown();\n $grade_scales = GradeScale::getDropdown();\n $departments = Department::getDropdown();\n $year_dropdown = Year::getDropdown();\n $grade_level_dropdown = GradeLevel::getDropdown('current');\n\n return view('course.update', compact(\n 'course',\n 'course_types',\n 'transcript_types',\n 'grade_scales',\n 'departments',\n 'year_dropdown',\n 'grade_level_dropdown'\n ));\n }", "function update() {\n $model = & $this->getModel('update');\n $uid = $this->_jinput->get('cid', array(), 'ARRAY');\n\n JArrayHelper::toInteger($uid, array());\n if ($model->update($uid)) {\n $cache = JFactory::getCache('mod_menu');\n $cache->clean();\n\n // ??\n return '1';\n } else {\n return '0';\n }\n }", "public function update(): void\n {\n // Update quality\n $this->item->quality = self::QUALITY_MAX;\n }", "public function update(Request $request, OfferedCourse $offeredCourse)\n {\n //\n }", "public function lecturerUpdate()\n\t\t{\n\t\t\t$data2 = array(\n\t\t\t\t'lecturer_name' => $this->input->post('lecturername') \n\t\t\t);\n\n $this->db->where('course_code', $this->input->post('hidden'));\n\t\t\treturn $this->db->update('courses', $data2);\n\t\t}", "public function update($lesson_id, $chapter_id, $course_id)\n {\n\n\n }", "public function update(ItemFormRequest $request, Items $item): RedirectResponse\n {\n $this->authorize('edit', $item);\n\n DB::transaction(static function () use ($request, $item): void {\n $request->merge(['category_id' => $request->categorie]);\n $request->user()->logActivity($item, 'Inventaris', \"Heeft de informatie omtrent {$item->naam} aangepast in de applicatie.\");\n\n $item->update($request->except('categorie'));\n flash(\"Het item is met success in de aaplicatie gewijzigd.\");\n });\n\n return redirect()->route('inventory.item', $item);\n }", "public function update(Request $request, $id)\n\t{\n\t\t$course = Course::findOrFail($id);\n\n\t\t$course->update($request->all());\n\n\t\treturn redirect()->route('courses.index')->with('message', 'Item updated successfully.');\n\n\t}", "public function UpdateCourse($clusterID, $courseID, $user, $request){\n\t\t$clusterUpdates['editedUser'] = $user;\n\t\t$clusterUpdates['editedDate'] = date('Y-m-d H:i:s', time());\n\t\t$clusterResult = $this->Update('[STAGE CLUSTERS TABLE]', $clusterID, $clusterUpdates);\n\t\t$courseResult = $this->Update('[STAGE COURSES TABLE]', $courseID, $request);\n\n\t\treturn array(\"results\" => $clusterResult && $courseResult);\n\t}", "public function updateCart()\n {\n $this->total = CartFcd::subtotal();\n $this->content = CartFcd::content();\n }", "function updateCourse($cid,$title,$credits,$prerequisites,$lab,$restrictions,$crosslist)\n{\n $con = mysql_connect(\"localhost:3306\", \"root\", \"5656123ljx\");\n if (!$con) {\n die('Could not connect: ' . mysql_error());\n }\n mysql_select_db(\"capstone\", $con);\n $sql=\"update Course set title='\".$title.\"',credits='\".$credits.\"',prerequisites='\".$prerequisites.\"',lab='\".$lab.\"',restrictions='\".$restrictions.\"',crosslist='\".$crosslist.\"' where cid='\".$cid.\"'\";\n mysql_query($sql);\n}", "function updateItem($item) {\n\t\tglobal $dbh;\n\t\t$stmt = $dbh->prepare('UPDATE ITEM SET (NULL, ?, ?, ?, ?, ?) WHERE itemID = ?');\n\t\t$success = $stmt->execute(array($item['content'],\n\t\t\t\t\t\t\t\t\t\t$item['image'],\n\t\t\t\t\t\t\t\t\t\t$item['checked'],\n\t\t\t\t\t\t\t\t\t\t$item['listID'],\n\t\t\t\t\t\t\t\t\t\t$list['itemID']));\n\t\treturn $success;\n\t}", "public function commit() {\r\n \r\n $this->validate();\r\n \r\n $data = array(\r\n \"category_id\" => $this->Category instanceof Category ? $this->Category->id : 10,\r\n \"title\" => $this->name,\r\n \"url\" => $this->url_file,\r\n \"filename\" => $this->filename,\r\n \"mime\" => $this->mime,\r\n \"description\" => $this->desc,\r\n \"date\" => $this->Date->format(\"Y-m-d h:i:s\"),\r\n \"hits\" => $this->hits,\r\n \"user_id\" => $this->user_id,\r\n \"filepath\" => $this->filepath,\r\n \"object_id\" => filter_var($this->object_id, FILTER_VALIDATE_INT) ? $this->object_id : 0,\r\n \"approved\" => $this->approved,\r\n \"active\" => $this->active,\r\n \"extra_data\" => json_encode($this->extra_data),\r\n \"url\" => $this->approved ? str_replace(dirname(dirname(__FILE__)), RP_PROTOCOL.\"://\" . RP_HOST, $this->filepath) : \"\"\r\n );\r\n \r\n /**\r\n * Commit the changes\r\n */\r\n \r\n if (empty($this->id)) {\r\n $data['active'] = 1;\r\n $data['category_id'] = $this->cat_id;\r\n $data['filesize'] = empty($this->filesize) ? 0 : $this->filesize; \r\n \r\n $this->db->insert(\"download_items\", $data);\r\n $this->id = $this->db->lastInsertId();\r\n \r\n $this->url = Utility\\DownloadUtility::buildUrls($this); \r\n \r\n return $this->id;\r\n }\r\n \r\n $where = array(\r\n \"id = ?\" => $this->id\r\n );\r\n \r\n $this->db->update(\"download_items\", $data, $where);\r\n \r\n $this->url = Utility\\DownloadUtility::buildUrls($this); \r\n \r\n }", "protected function _update()\n {\n \n }", "protected function _update()\n {\n \n }", "public function update($id)\n\t{\n\t\t\n\t\tif (!User::isAdmin()) {\n\t\t\treturn Redirect::to('dashboard');\n\t\t}\n\n\t\t$course = Input::all();\n\t\t$data = Course::find($id);\n\t\tif(!is_null(Input::file('picture'))){\n\t\t\t$dest = 'uploads/';\n\t\t\t$file = date('dmY').str_random(8).Input::file('picture')->getClientOriginalName();\n\t\t\t$ups = Input::file('picture')->move($dest, $file);\n\t\t\t$data->picture = $file;\n\t\t}\n\t\t$data->name = Input::get('name');\n\t\t$data->description = Input::get('description');\n\t\t$data->info = Input::get('info');\n\t\t$data->start = Input::get('start');\n\t\t$data->end = Input::get('end');\n\t\t$data->author = Input::get('author');\n\t\t$data->save();\n\t\treturn Redirect::to('courses')->with('message', 'Courses Edited');\n\n\t}", "public function update(Request $request, Courses $course)\n {\n $rules=[\n 'cover'=>'image',\n ];\n $this->validate($request,$rules);\n if ($request->hasFile('cover')) {\n if($request->file('cover')->isValid()) {\n try {\n $file = $request->file('cover');\n $name = md5(uniqid(rand(), true)).'.'.$file->getClientOriginalExtension();\n $path='images/covers';\n if(! File::isDirectory($path)){\n Storage::makeDirectory($path);\n }\n $course->cover_path=$path.'/'.$name;\n $file->move( $path,$name);\n } catch (Illuminate\\Filesystem\\FileNotFoundException $e) {\n var_dump($e->getMessage()) ;\n }\n } \n }else{\n $course->cover_path=$request->cover_helper;\n }\n $course->name=$request->name;\n $course->description=$request->description;\n $course->price=$request->price;\n $course->level_id=$request->level_id;\n $course->material_id=$request->material_id;\n $course->time=1.5;\n $course->save();\n return redirect('/teacher/courses');\n }", "function questionnaire_grade_item_update($questionnaire, $grades = null) {\n global $CFG;\n if (!function_exists('grade_update')) { // Workaround for buggy PHP versions.\n require_once($CFG->libdir.'/gradelib.php');\n }\n\n if (!isset($questionnaire->courseid)) {\n $questionnaire->courseid = $questionnaire->course;\n }\n\n if ($questionnaire->cmidnumber != '') {\n $params = array('itemname' => $questionnaire->name, 'idnumber' => $questionnaire->cmidnumber);\n } else {\n $params = array('itemname' => $questionnaire->name);\n }\n\n if ($questionnaire->grade > 0) {\n $params['gradetype'] = GRADE_TYPE_VALUE;\n $params['grademax'] = $questionnaire->grade;\n $params['grademin'] = 0;\n\n } else if ($questionnaire->grade < 0) {\n $params['gradetype'] = GRADE_TYPE_SCALE;\n $params['scaleid'] = -$questionnaire->grade;\n\n } else if ($questionnaire->grade == 0) { // No Grade..be sure to delete the grade item if it exists.\n $grades = null;\n $params = array('deleted' => 1);\n\n } else {\n $params = null; // Allow text comments only.\n }\n\n if ($grades === 'reset') {\n $params['reset'] = true;\n $grades = null;\n }\n\n return grade_update('mod/questionnaire', $questionnaire->courseid, 'mod', 'questionnaire',\n $questionnaire->id, 0, $grades, $params);\n}", "public function edit(course $course)\n {\n //\n }", "public function edit(course $course)\n {\n //\n }", "protected function _update()\n\t{\n\t}", "public function checkoutCartUpdateItemComplete(Varien_Event_Observer $observer)\n {\n $this->_lastUpdatedItem = $observer->getItem();\n }", "function update($validator)\n\t\t\t{\n\t\t \t$record->idcurso=$validator->getVar(\"idcurso\");\n\t\t \t$record->nombre=$validator->getVar(\"nombre\");\n\t\t \t$record->idPersonal=$validator->getVar(\"instructor\");\n\t\t \t$record->inversion=$validator->getVar(\"inversion\");\n\t\t \t$record->contenido=$validator->getVar(\"contenido\");\n\t\t \t$record->requisitos=$validator->getVar(\"requisitos\");\n\t\t \t$record->cupos=$validator->getVar(\"cupos\");\n\t\t \t$record->idprogramacion=$validator->getVar(\"idprogramacion\");\n\t\t \t$record->status=$validator->getVar(\"status\");\n\t\t \t$record->save();\n\n\t\t\t\treturn \"controller.php?view=list-curso&idcurso=\".$validator->getVar(\"\");\n\t\t\t}", "public function massCourseDocRevAction()\n {\n $coursedocIds = $this->getRequest()->getParam('coursedoc');\n if (!is_array($coursedocIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_coursedoc')->__('Please select course docs.')\n );\n } else {\n try {\n foreach ($coursedocIds as $coursedocId) {\n $coursedoc = Mage::getSingleton('bs_coursedoc/coursedoc')->load($coursedocId)\n ->setCourseDocRev($this->getRequest()->getParam('flag_course_doc_rev'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d course docs were successfully updated.', count($coursedocIds))\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_coursedoc')->__('There was an error updating course docs.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "public function update($objetDepart, $objetFinal);", "public function edit(Course $course)\n {\n //\n }", "public function edit(Course $course)\n {\n //\n }", "private function course_category_updated($event) {\n global $DB;\n $categoryid = $event->objectid;\n $courses = $DB->get_records('course', array('category' => $categoryid), '', 'id, visible');\n\n $insertcalls = array();\n $deletecalls = array();\n\n foreach ($courses as $course) {\n $courseid = $course->id;\n $coursecontext = context_course::instance($courseid);\n\n $users = $this->get_google_authenticated_users($courseid);\n $coursemodinfo = get_fast_modinfo($courseid, -1);\n $cms = $coursemodinfo->get_cms();\n\n foreach ($cms as $cm) {\n $cmid = $cm->id;\n $cmcontext = context_module::instance($cmid);\n $fileids = $this->get_fileids($cmid);\n if ($fileids) {\n foreach ($fileids as $fileid) {\n foreach ($users as $user) {\n if (has_capability('moodle/course:view', $coursecontext, $user->userid)) {\n // Manager; do nothing.\n } elseif (is_enrolled($coursecontext, $user->userid, null, true) && has_capability('moodle/course:manageactivities', $cmcontext, $user->userid)) {\n // Teacher (enrolled) (active); do nothing.\n } elseif (is_enrolled($coursecontext, $user->userid, null, true)) {\n // Student (enrolled) (active); continue checks.\n if ($course->visible == 1) {\n // Course is visible, continue checks.\n rebuild_course_cache($courseid, true);\n $modinfo = get_fast_modinfo($courseid, $user->userid);\n $cminfo = $modinfo->get_cm($cmid);\n $sectionnumber = $this->get_cm_sectionnum($cmid);\n $secinfo = $modinfo->get_section_info($sectionnumber);\n if ($cminfo->uservisible && $secinfo->available) {\n // User can view and access course module and can access section; insert reader permission.\n $call = new stdClass();\n $call->fileid = $fileid;\n $call->gmail = $user->gmail;\n $call->role = 'reader';\n $insertcalls[] = $call;\n if (count($insertcalls) == 1000) {\n $this->batch_insert_permissions($insertcalls);\n $insertcalls = array();\n }\n }\n // User cannot access course module, do nothing (course module availability won't change here).\n } else {\n // Course not visible, delete permission.\n try {\n $permissionid = $this->service->permissions->getIdForEmail($user->gmail);\n $permission = $this->service->permissions->get($fileid, $permissionid->id);\n if ($permission->role != 'owner') {\n $call = new stdClass();\n $call->fileid = $fileid;\n $call->permissionid = $permissionid->id;\n $deletecalls[] = $call;\n if (count($deletecalls) == 1000) {\n $this->batch_delete_permissions($deletecalls);\n $deletecalls = array();\n }\n }\n } catch (Exception $e) {\n debugging($e);\n }\n }\n } else {\n // Unenrolled user; do nothing (user enrolment would not have changed during this event).\n }\n }\n }\n }\n }\n }\n\n // Call any remaining batch requests.\n if (count($insertcalls) > 0) {\n $this->batch_insert_permissions($insertcalls);\n }\n\n if (count($deletecalls) > 0) {\n $this->batch_delete_permissions($deletecalls);\n }\n }", "public function update(Request $request, Cour $cour)\n {\n //\n }", "public function updated(AssignmentFinishRecord $assignmentFinishRecord)\n {\n //\n }", "function handleEditProgramItem(EventContext $context)\n {\n $program_item_id = fmGetVar('program_item_id');\n $program_item_class = fmGetVar('program_item_class');\n $_SESSION['current_program_item'] = ProgramItem::getProgramItem($program_item_id);\n $_SESSION['current_program_item_class'] = $program_item_class;\n $context->setForward(dirname(__FILE__) . \"/program_item_editor.php\");\n }", "function update_data($data_update_item) {\n\t}", "public function update(Request $request, Course $course)\n {\n $rules = [\n 'title' => 'required|min:20|max:120',\n 'description' => 'required|min:20|max:1000',\n 'status' => 'required|integer|in:0,1',\n 'link' => 'required|url',\n 'track_id' => 'required|integer',\n 'pic' => 'image'\n ];\n $this->validate($request, $rules);\n $slug = strtolower(str_replace(' ','-',$request['title']));\n $request->request->add(['slug' => $slug]);\n\n if($file = $request->file('pic'))\n {\n $filename = $file->getClientOriginalName();\n $filenewname = time() . '_' . $filename;\n \n if($file->move(public_path('images') , $filenewname))\n { \n if($course->image){ \n //remove old photo\n unlink('images/' . $course->image);\n $request->request->add(['image' => $filenewname]);\n\n }else{\n $request->request->add(['image' => $filenewname]);\n }\n }\n\n }\n if($course->update($request->all()))\n { \n return redirect('/admin/courses')->withStatus('Course successfully updated');\n }else{\n return redirect('/admin/courses/' . $course->id , '/edit')->withStatus('Something went wrong');\n }\n }", "public function actionUpdate()\n\t{\n\t\t// Get the authorization item\n\t\t$model = $this->loadModel();\n\t\t$itemName = $model->getName();\n\t\t\n\t\t// Create the authorization item form\n\t\t$formModel = new AuthItemForm('update');\n\n\t\tif( isset($_POST['AuthItemForm'])===true )\n\t\t{\n\t\t\t$formModel->attributes = $_POST['AuthItemForm'];\n\t\t\tif( $formModel->validate()===true )\n\t\t\t{\n\t\t\t\t// Update the item and load it\n\t\t\t\t$this->_authorizer->updateAuthItem($itemName, $formModel->name, $formModel->description, $formModel->bizRule, $formModel->data);\n\t\t\t\t$item = $this->_authorizer->authManager->getAuthItem($formModel->name);\n\t\t\t\t$item = $this->_authorizer->attachAuthItemBehavior($item);\n\n\t\t\t\t// Set a flash message for updating the item\n\t\t\t\tYii::app()->user->setFlash($this->module->flashSuccessKey,\n\t\t\t\t\tRights::t('core', ':name updated.', array(':name'=>$item->getNameText()))\n\t\t\t\t);\n\n\t\t\t\t// Redirect to the correct destination\n\t\t\t\t$this->redirect(Yii::app()->user->getRightsReturnUrl(array('authItem/permissions')));\n\t\t\t}\n\t\t}\n\t\t\n\t\t$type = Rights::getValidChildTypes($model->type);\n\t\t$exclude = array($this->module->superuserName);\n\t\t$childSelectOptions = Rights::getParentAuthItemSelectOptions($model, $type, $exclude);\n\t\t\n\t\tif( $childSelectOptions!==array() )\n\t\t{\n\t\t\t$childFormModel = new AuthChildForm();\n\t\t\n\t\t\t// Child form is submitted and data is valid\n\t\t\tif( isset($_POST['AuthChildForm'])===true )\n\t\t\t{\n\t\t\t\t$childFormModel->attributes = $_POST['AuthChildForm'];\n\t\t\t\tif( $childFormModel->validate()===true )\n\t\t\t\t{\n\t\t\t\t\t// Add the child and load it\n\t\t\t\t\t$this->_authorizer->authManager->addItemChild($itemName, $childFormModel->itemname);\n\t\t\t\t\t$child = $this->_authorizer->authManager->getAuthItem($childFormModel->itemname);\n\t\t\t\t\t$child = $this->_authorizer->attachAuthItemBehavior($child);\n\n\t\t\t\t\t// Set a flash message for adding the child\n\t\t\t\t\tYii::app()->user->setFlash($this->module->flashSuccessKey,\n\t\t\t\t\t\tRights::t('core', 'Child :name added.', array(':name'=>$child->getNameText()))\n\t\t\t\t\t);\n\n\t\t\t\t\t// Reidrect to the same page\n\t\t\t\t\t$this->redirect(array('authItem/update', 'name'=>urlencode($itemName)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$childFormModel = null;\n\t\t}\n\n\t\t// Set the values for the form fields\n\t\t$formModel->name = $model->name;\n\t\t$formModel->description = $model->description;\n\t\t$formModel->type = $model->type;\n\t\t$formModel->bizRule = $model->bizRule!=='NULL' ? $model->bizRule : '';\n\t\t$formModel->data = $model->data!==null ? serialize($model->data) : '';\n\n\t\t$parentDataProvider = new RAuthItemParentDataProvider($model);\n\t\t$childDataProvider = new RAuthItemChildDataProvider($model);\n\n\t\t// Render the view\n\t\t$this->render('update', array(\n\t\t\t'model'=>$model,\n\t\t\t'formModel'=>$formModel,\n\t\t\t'childFormModel'=>$childFormModel,\n\t\t\t'childSelectOptions'=>$childSelectOptions,\n\t\t\t'parentDataProvider'=>$parentDataProvider,\n\t\t\t'childDataProvider'=>$childDataProvider,\n\t\t));\n\t}", "public function update(Request $request, CourseCategory $courseCategory)\n {\n //\n }", "public function update(UpdateCourse $request, Course $course)\n {\n $course->name = $request->get('name');\n $course->description = $request->get('description');\n \n if ($request->has('picture'))\n $this->storeImage($request, $course);\n\n if($course->save()) {\n flash('Se ha actualizado el curso')->success();\n return redirect()->route('admin.courses.index');\n } else {\n return view('admin.courses.edit', compact('course'));\n }\n }", "protected function update() {}", "public function updateAction() {\n $model = new Application_Model_Compromisso();\n //passo para a model os dados a serem upados\n $model->update($this->_getAllParams());\n //redireciono para a view\n $this->_redirect('compromisso/index');\n }", "public function update_item($opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t\n\t\treturn $this->authenticate('UpdateItem', $opt);\n\t}", "public function update(Request $request, $id)\n {\n // Course::where('cid', $id)->update($request);\n $data = new Course;\n $data->cname = request('cname');\n DB::update('update courses set cname = ? where cid = ?',[$data->cname,$id]);\n //$data = where('cid', $id)->save();\n return redirect('/admin/course');\n }", "public function update($id)\n\t{\n\t\t\n\t\t$validator = Validator::make(Input::all(), Course::$rules);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\tSession::flash('alert', 'There were errors submitting your form. Did you include all fields?');\n\t\t return Redirect::back()->withInput()->withErrors($validator);\n\t\t} else {\n\n\t\t$course = Course::findOrFail($id);\n\t\t$course->course_type_id = Input::get('type');\n\t\t$course->designation = Input::get('designation');\n\t\t$course->start_date = Input::get('start_date');\n\t\t$course->end_date = Input::get('end_date');\n\t\t$course->demo_date = Input::get('demo_date');\n\t\t$course->max_students = Input::get('max_students');\n\t\t$course->cost = Input::get('cost');\n\t\t$course->save();\n\n\t\treturn Redirect::action('DashboardsController@showCoursesDashboard');\n\t\t}\n\t}", "public function update(){\n\t\techo $sql = \"update \".self::$tablename.\" set title=\\\"$this->title\\\",description=\\\"$this->description\\\",skills=\\\"$this->skills\\\",area_id=$this->area_id,jobtype_id=$this->jobtype_id,jobperiod_id=$this->jobperiod_id,duration=$this->duration,is_public=$this->is_public,is_finished=$this->is_finished,created_at=$this->created_at where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function testUpdateChallengeActivity()\n {\n }", "public function cloture()\n {\n // On prépare la modification pour enregistrer la fermeture de la mission\n $sql = 'UPDATE `mission`\n SET `mission_statut` = 0\n WHERE `mission_id` = :mission';\n $query = $this->_link->prepare($sql);\n $query->bindParam(':mission', $this->_data['mission_id'], PDO::PARAM_INT);\n\n // On effectue la modification\n $query->execute();\n }" ]
[ "0.65942097", "0.633441", "0.60304403", "0.5981425", "0.59797126", "0.5925986", "0.5919792", "0.591921", "0.58530146", "0.5831924", "0.58284324", "0.5807357", "0.57999897", "0.57665515", "0.5750476", "0.5733329", "0.56901264", "0.56895787", "0.56552625", "0.5654612", "0.5652054", "0.5644486", "0.5634641", "0.5621574", "0.56142724", "0.55977815", "0.5582059", "0.5576381", "0.5575173", "0.55404973", "0.5534204", "0.5493011", "0.5477301", "0.54702634", "0.5467918", "0.5459156", "0.54572415", "0.54523534", "0.5449789", "0.5447057", "0.543983", "0.541261", "0.5401215", "0.5392008", "0.539125", "0.5389963", "0.5388654", "0.5369106", "0.5365478", "0.53651583", "0.53617984", "0.5356842", "0.5355197", "0.5354767", "0.53536534", "0.5334203", "0.53315216", "0.5324724", "0.5320937", "0.53172034", "0.529863", "0.528947", "0.5284672", "0.52835995", "0.5272668", "0.52672637", "0.5260098", "0.52512175", "0.5229837", "0.52291286", "0.52291286", "0.52170485", "0.52147263", "0.5212513", "0.5202819", "0.5202819", "0.5200675", "0.5192146", "0.51897115", "0.5189645", "0.5187378", "0.51833564", "0.51833564", "0.518084", "0.5175569", "0.5169099", "0.51580054", "0.5154398", "0.5149065", "0.51458776", "0.51421887", "0.51349324", "0.5133695", "0.5120705", "0.51187027", "0.51144123", "0.5113968", "0.51133657", "0.51017976", "0.51000094" ]
0.63948256
1
Update lesson, quiz title in admin course editor.
public function update_item( $item ) { $item = wp_parse_args( $item, array( 'id' => '', 'title' => '', ) ); wp_update_post( array( 'ID' => $item['id'], 'post_title' => $item['title'], ) ); if ( isset( $item['preview'] ) && $item['preview'] ) { update_post_meta( $item['id'], '_lp_preview', 'yes' ); } else { delete_post_meta( $item['id'], '_lp_preview' ); } return $item; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update($lesson_id, $chapter_id, $course_id)\n {\n\n\n }", "public function editQuiz() {\n global $tpl, $ilTabs;\n $ilTabs->activateTab(\"editQuiz\");\n iljQueryUtil::initjQuery();\n\n $tpl->setContent($this->initQuestionAndAnswersTable());\n }", "public function edit(Lesson $lesson)\n {\n //\n }", "public function edit(Lesson $lesson)\n {\n //\n }", "public function edit(Lesson $lesson)\n {\n //\n }", "public function update(){\n\t\techo $sql = \"update \".self::$tablename.\" set title=\\\"$this->title\\\",description=\\\"$this->description\\\",skills=\\\"$this->skills\\\",area_id=$this->area_id,jobtype_id=$this->jobtype_id,jobperiod_id=$this->jobperiod_id,duration=$this->duration,is_public=$this->is_public,is_finished=$this->is_finished,created_at=$this->created_at where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function changeQuestionAndAnswers () {\n global $ilUser, $tpl, $ilTabs, $ilCtrl;\n $ilTabs->activateTab(\"editQuiz\");\n\n // update database\n // create wizard object\n include_once('class.ilObjMobileQuizWizard.php');\n $wiz = new ilObjMobileQuizWizard();\n $wiz->changeQuestionAndAnswers($this->object);\n\n $_GET['question_id'] = $_POST['question_id'];\n $this->initQuestionAndAnswersEditForm();\n\n // load changed data and display them\n }", "public function update($lesson)\n\t{\n $lesson = Lesson::find(Input::get('pk'));\n return $lesson->update_field(Input::get('name'),Input::get('value'));\n\t}", "function edit($lessonID)\n { \n // check if the lesson exists before trying to edit it\n $data['lesson'] = $this->Lesson_model->get_lesson($lessonID);\n \n if(isset($data['lesson']['lessonID']))\n {\n $this->load->library('form_validation');\n\n\t\t\t$this->form_validation->set_rules('nameLesson','NameLesson','required|max_length[250]');\n\t\t\t$this->form_validation->set_rules('author','Author','required|max_length[100]');\n\t\t\t$this->form_validation->set_rules('image','Image','required');\n\t\t\t$this->form_validation->set_rules('content','Content','required');\n\t\t\n\t\t\tif($this->form_validation->run()) \n { \n if(isset($_POST) && count($_POST) > 0) {\n $params = array(\n 'nameLesson' => $this->input->post('nameLesson'),\n 'author' => $this->input->post('author'),\n 'content' => $this->input->post('content'),\n );\n \n $this->Lesson_model->update_lesson($lessonID,$params); \n redirect('lesson/index');\n }\n else\n {\n \n $data['author'] = $this->User_model->get_author_create_lesson(); \n $data['_view'] = 'lesson/edit';\n $this->load->view('layouts/main',$data);\n }\n \n }\n else\n {\n \n $data['author'] = $this->User_model->get_author_create_lesson(); \n $data['_view'] = 'lesson/edit';\n $this->load->view('layouts/main',$data);\n }\n }\n else\n show_error('The lesson you are trying to edit does not exist.');\n }", "public function edit() {\n\n\t\t$db = Manager::getDatabase();\n\n\t\t$title = $_POST['title'];\n\t\t$content = $_POST['content'];\n\t\t$commentId = (int) $_POST['commentId'];\n\t\t$chapterId = (int) $_POST['chapterId'];\n\n\t\tif (!empty($title) && !empty($content) && !empty($commentId)) {\n\t\t\t\n\t\t\t$title = Str::secured($_POST['title']);\n\t\t\t$content = Str::secured($_POST['content']);\n\t\t\t\n\t\t\t$commentManager = new CommentManager();\n\n\t\t\tif ($commentManager->idExist($db, $commentId)) {\n\t\t\t\t\n\t\t\t\t$commentManager->update($db, $commentId, $title, $content);\n\t\t\t}\n\t\t}\n\n\t\t$hiddenChapterId = Str::encrypt($chapterId);\n\t\theader('Location: ./index.php?controller=reading&id=' . $hiddenChapterId);\n\n\t}", "function adminUpdateComment() {\r\n\r\n\t\t$chapterManager = new \\Alaska2\\Model\\ChapterManager();\r\n\t\t$commentManager = new \\Alaska2\\Model\\CommentManager();\r\n\r\n\t\t$chapter = $chapterManager->getChapter($_GET['chapter_id']);\r\n\t\t$comment = $commentManager->getComment($_GET['id']);\r\n\r\n\t\trequire ('view/backend/updateCommentView.php');\r\n\t}", "public function ask_edit($id, $answer, $title = '')\n\t{\n\t\t$sql = \"UPDATE \".$this->table_ask.\" SET text = ?, title = ? WHERE id = ?\";\n\t\t$data = array($answer, $title, $id);\n\t\t$query = $this->db->query($sql, $data);\t\n\t}", "public function testUpdateSurveyQuestion0()\n {\n }", "public function testUpdateSurveyQuestion0()\n {\n }", "function edit_form_after_title()\n {\n }", "function edit_form_after_title()\n {\n }", "public function modifiertitre() {\n $idPage = $this->input->post('idPage');\n $titre = ($this->input->post('titre'));\n $this->admin_model->updatePage($titre, $idPage, \"titre\");\n }", "public function update()\n {\n $data = Input::all();\n foreach (array_combine($data['question_id'], $data['question_name']) as $question_id => $question_name) {\n $question = Question::find($question_id);\n $question->question_name = $question_name;\n $question->save();\n }\n\n Flash::success('The question has been successfully updated!');\n return Redirect::action('AnswerController@edit', $question->exam_id);\n }", "public function update() {\n $mysqli = Database::getMYSQLI();\n \n $stmt = $mysqli->prepare(\"\n UPDATE lessons\n SET title = ?, subject = ?, description = ?, resources = ?, persons_ID = ?, \n date_created = ?, search_field = ?\n WHERE id = ?\");\n \n $stmt->bind_param('ssssissi', $this->title, $this->subject, $this->description, \n $this->resources, $this->personsID, $this->dateCreated, $this->searchField, \n $this->id);\n\n $stmt->execute();\n $stmt->close();\n $mysqli->close();\n }", "public function update(Quiz $quiz): void\n {\n }", "function editTitle($data) {\n\t\t\t$conn = $this->connect();\n\t\t\t$title = $this->modify(mysqli_real_escape_string($conn, $data['title']));\n\t\t\t$uid = $_SESSION['userid'];\n\t\t\t$pid = $_SESSION['pid'];\n\t\t\tif(empty($title)) {\n\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&Empty\");\n\t\t\t} else {\n\t\t\t\tif(preg_match(\"/^[a-zA-Z]+(||_|-|,|:|0-9|\\.| |\\*)?[a-zA-Z0-9,\\.:-_* ]*$/\", $title)) {\n\t\t\t\t\tif($this->length($title, 50, 10)) {\n\t\t\t\t\t\t$result = $this->changepost('newpost', 'post_title', $title, $uid , $pid);\n\t\t\t\t\t\tif($result == true) {\n\t\t\t\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&Successfully_Changed\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&Failed!\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&length=tooBigOrSmall\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&invalid=type\");\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function question_and_option_update()\n\t{\t\n\t\t$CI =& get_instance();\n\t\t$CI->auth->check_operator_auth();\n\t\t$CI->load->model('operator/Questions');\t\t\n\t\t$CI->Questions->question_and_option_update();\n\t\t$this->session->set_userdata(array('message'=>display('successfully_update')));\n\t\tredirect(base_url('operator/Oquestion'));\n\t}", "public function actionUpdateCourses()\n\t{\n\t\t$courses = Course::model()->findAll('faculty_id=:X', array(':X' => (int) $_POST['faculty_id']));\n\n\t\techo CHtml::dropDownList('Note[course_id]', '',\n\t\t\tCHtml::listData($courses, 'id', 'name'),\n\t\t\t array('prompt' => 'Pilih mata kuliah'));\n\t}", "function updateThemengebietes() {\n\t\t$status = $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_topic_detail', 'uid='.t3lib_div::_POST('uid'), array('title'=>htmlentities(t3lib_div::_POST('title'),ENT_QUOTES, 'UTF-8')));\n\t\treturn $status;\n\t}", "public function testUpdateSurvey0()\n {\n }", "public function testUpdateSurvey0()\n {\n }", "public function edit(){\n try{\n $stmt = $this->conn->prepare(\"UPDATE tbltodo SET completed=:completed,\n title =:title WHERE id=:id \");\n $stmt->bindparam(\":id\",$this->id);\n $stmt->bindparam(\":title\",$this->title);\n $stmt->bindparam(\":completed\",$this->completed);\n $stmt->execute();\n return true;\n }catch(PDOException $e){\n echo $e->getMessage();\n return false;\n }\n }", "protected function getUpdateActionTitle()\n {\n return \"Actualización de \" . $this->getSingularEntityName();\n }", "function reeditSurvey() {\n $this->layout = 'survey'; // use the more basic survey layout\n $this->Session->write('Survey.progress', GDTA_ENTRY); // change the progress back to GDTA entry\n $this->redirect(array('action' => 'enterGdta'));\n }", "public function updateStep($stepId, $title, $description);", "public function updatequestionAction(){\n\n try{\n\n\t\t global $objSession;\n\n\t\t $this->view->languages = $this->ModelObj->systemlanguage();\n\n\t\t $this->view->operatortype = $this->ModelObj->operatortype(); \n\n\t\t $this->view->addedquestions = $this->ModelObj->addedquestiondata($this->Request);\n\n\t\t if($this->_request->isPost()){\n\n\t\t if(!empty($this->Request['operators']) && count($this->Request['question'])>0){\n\n\t\t\t $this->ModelObj->updatequestions($this->Request);\t\n\n\t\t\t $objSession->successMsg = \"Record Updated Successfully\";\n\n\t\t\t $this->_redirect($this->_request->getControllerName().'/helpdesksetting'); \n\n\t\t }\n\n\t\t else{\n\n\t\t\t $objSession->errorMsg = \"Please enter question and select Operator!\";\n\n\t\t }\n\n\t\t}\n\n\t }\n\n\t \n\n\t catch (Exception $e) {\n\n $this->ModelObj->_logger->info('Class-'.__CLASS__.',Function-'.__FUNCTION__.',Line-'.__LINE__.',Error-'.$e->getMessage());\n\n }\n\n\t \n\n }", "function change()\n\t{\n\t\tglobal $errors, $db;\n\t\t\n\t\t$menuid = ( isset( $_GET[ 'menuid' ] ) ) ? intval( $_GET[ 'menuid' ] ) : 0;\n\t\t$title = $_POST[ 'newmenutitle' ];\n\t\t\n\t\t$sql = \"UPDATE \" . MORECONTENT_MENU_TABLE . \" SET menu_title='$title' WHERE menu_id='$menuid' LIMIT 1\";\n\t\tif ( !$db->sql_query( $sql ) )\n\t\t{\n\t\t\t$errors->report_error( 'Couldn\\'t modify', CRITICAL_ERROR );\n\t\t}\n\t\t\n\t\t$errors->report_error( $this->lang[ 'Menu_changed' ], MESSAGE );\n\t}", "function update(){\n\t\t// $update_query .= ' SET ';\n\t\t// $update_query .= ' name = \"'.$this->name.'\"';\n\t\t// $update_query .= ' WHERE category_id = '.$this->id;\n\n\t\t// $this->db->query($update_query);\n\t\t$this->db->update(\n\t\t\t'tb_pages',\n\t\t\tarray(\t\t\t\t\t\n\t\t\t'title' => $this->title,\n\t\t\t'content' => $this->content),\n\t\t\tarray('page_id' => $this->page_id)\n\t\t);\n\t}", "public function update(Request $request, Lesson $lesson)\n {\n /// only short_description and lesson text can be updated\n// return $request->all();\n $lesson->title = $request->get('title'); \n $lesson->short_description = $request->short_description;\n $lesson->lesson_text = $request->lesson_text;\n if($request->get('video')){\n $lesson->video_file_id = $request->get('video');\n }\n if($request->get('uploads')){\n $uploaded_files = json_decode($lesson->json_file_ids);\n $lesson->json_file_ids = json_encode(array_merge($uploaded_files,$request->get('uploads')));\n }\n $lesson->save();\n\n return $lesson->course_id;\n }", "public function editTitle($id) {\n global $REQUEST_DATA;\n \n return SystemDatabaseManager::getInstance()->runAutoUpdate('employee_appraisal_title', \n array('appraisalTitle'), \n array(trim($REQUEST_DATA['titleName'])), \n \"appraisalTitleId=$id\" );\n }", "public function update(Request $request, Lesson $lesson)\n {\n //\n }", "public function update(Request $request, Lesson $lesson)\n {\n //\n }", "public function testUpdateSurveyQuestionChoice0()\n {\n }", "public function testUpdateSurveyQuestionChoice0()\n {\n }", "public function edit(Lesson $lesson)\n {\n $all_units= Unit::all();\n return view ('admin.edit_lessons', compact('lesson','all_units'));\n }", "function learn_press_course_lesson_data() {\n\t\t$course = LP()->course;\n\t\tif ( ! $course ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( ! ( $lesson = $course->current_lesson ) ) {\n\t\t\treturn;\n\t\t}\n\t\t?>\n <input type=\"hidden\" name=\"learn-press-lesson-viewing\" value=\"<?php echo $lesson->id; ?>\"/>\n\t\t<?php\n\t}", "public function edit(Quiz $quiz)\n {\n //\n }", "public function lecturerUpdate()\n\t\t{\n\t\t\t$data2 = array(\n\t\t\t\t'lecturer_name' => $this->input->post('lecturername') \n\t\t\t);\n\n $this->db->where('course_code', $this->input->post('hidden'));\n\t\t\treturn $this->db->update('courses', $data2);\n\t\t}", "public function edit($class,$name,Lesson $lesson)\n {\n return view('Admin.lesson.edit',compact('class','name','lesson'));\n }", "public function test_changing_question() {\n global $DB;\n\n // create a user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $time = mktime(9, 0, 0, 11, 7, 2013);\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, $user->id, $time, $time, 2, 'dummy text')\n )\n )));\n\n $question = array(\n 'text' => 'I have updated my question.',\n 'timemodified' => time()\n );\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n // login the user\n $this->setUser($user);\n\n $client = new Client($this->_app);\n $client->request('PUT', '/api/v1/' . $videoquanda->id . '/questions/1', array(), array(), array(), json_encode($question));\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertGreaterThan($time, $DB->get_field('videoquanda_questions', 'timemodified', array('id' => 1)));\n }", "public function update(Request $request, $idCourse, $idUnit, LessonsHelper $lesson)\n {\n $lesson->name = $request->name;\n $lesson->description = $request->description;\n $lesson->content = $request->content;\n $lesson->save();\n return redirect('/admin/courses_helpers/' . $idCourse . '/units/' . $idUnit . '/lessons/');\n }", "function edit_info()\n\t{\n\t\tif ($this->ipsclass->input['id'] == \"\")\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Невозможно определить ID языка\");\n\t\t}\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'languages', 'where' => \"lid='\".$this->ipsclass->input['id'].\"'\" ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\tif ( ! $row = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Невозможно найти язык по введенному ID\");\n\t\t}\n\n\t\t$final['lname'] = stripslashes($_POST['lname']);\n\n\t\tif (isset($_POST['lname']))\n\t\t{\n\t\t\t$final['lauthor'] = stripslashes($_POST['lauthor']);\n\t\t\t$final['lemail'] = stripslashes($_POST['lemail']);\n\t\t}\n\n\t\t$this->ipsclass->DB->do_update( 'languages', $final, \"lid='\".$this->ipsclass->input['id'].\"'\" );\n\n\t\t$this->rebuild_cache();\n\n\t\t$this->ipsclass->admin->done_screen(\"Языковой модуль обновлен\", \"Управление языками\", \"{$this->ipsclass->form_code}\" );\n\n\t}", "public function getEditTitle()\n {\n return sprintf($this->_('Edit %s'), $this->getTopic(1));\n }", "function edit( $_REQUEST ) {\r\n\t\tglobal $wpdb;\r\n\t\t$args= $_REQUEST;\r\n\t\t\t$table= $wpdb->prefix . 'wik_faves';\r\n\t\t\t$u= \"UPDATE \". $table . \r\n\t\t\t\t\t\t\" SET title = '\" . $args['title'] .\r\n\t\t\t\t\t\t\"', feed_url = '\" . $args['url'] .\r\n\t\t\t\t\t\t\"' WHERE id = \" . $args['id'];\r\n\t\t\t$query= $wpdb->query( $u );\r\n\t}", "public function editAction()\n {\n $coursedocId = $this->getRequest()->getParam('id');\n $coursedoc = $this->_initCoursedoc();\n if ($coursedocId && !$coursedoc->getId()) {\n $this->_getSession()->addError(\n Mage::helper('bs_coursedoc')->__('This course doc no longer exists.')\n );\n $this->_redirect('*/*/');\n return;\n }\n $data = Mage::getSingleton('adminhtml/session')->getCoursedocData(true);\n if (!empty($data)) {\n $coursedoc->setData($data);\n }\n Mage::register('coursedoc_data', $coursedoc);\n $this->loadLayout();\n $this->_title(Mage::helper('bs_coursedoc')->__('Course Document'))\n ->_title(Mage::helper('bs_coursedoc')->__('Course Documents'));\n if ($coursedoc->getId()) {\n $this->_title($coursedoc->getCourseDocName());\n } else {\n $this->_title(Mage::helper('bs_coursedoc')->__('Add course doc'));\n }\n if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {\n $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);\n }\n $this->renderLayout();\n }", "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Activity_Service_ShareQq::get(intval($id));\n\t\t$this->assign('info', $info);\n\t}", "public function update() {\n global $DB;\n $record = array(\n 'sortorder' => $this->sortorder,\n 'criterion' => $this->criterion,\n 'addinfo' => json_encode($this->addinfo)\n );\n if ($this->id) {\n $record['id'] = $this->id;\n $DB->update_record($this->get_table_name(), $record);\n } else {\n $record['instantquizid'] = $this->instantquiz->id;\n $this->id = $DB->insert_record($this->get_table_name(), $record);\n }\n }", "public function edit()\n\t{\n\t\tJRequest::setVar( 'view', 'player' );\n\t\tJRequest::setVar( 'layout', 'form' );\n\t\tJRequest::setVar('hidemainmenu', 1);\n\t \t \n\t\tparent::display();\n\t}", "public function updatecourses ($id_course , $description , lecture_id\n ){\n $sqlQuery = \" UPDATE courses SET id_course =’ $id_course ’, description =’\n$description ’, lecture_id='$lecture_id'\";\n $sqlQuery .= \" WHERE id_course= $id_course\";\n $result = $this -> getDbManager () -> executeQuery ( $sqlQuery );\n return $result ;\n }", "function tab_update_instance($tab) {\n global $CFG, $DB;\n\n require_once(\"$CFG->libdir/resourcelib.php\");\n\n $cmid = $tab->coursemodule;\n\n $tab->timemodified = time();\n $tab->id = $tab->instance;\n\n foreach ($tab->tabname as $key => $value) {\n\n // we need to use context now, so we need to make sure all needed info is already in db\n $DB->set_field('course_modules', 'instance', $tab->id, array('id' => $cmid));\n $context = context_module::instance($cmid);\n $editoroptions = array('subdirs' => 1, 'maxbytes' => $CFG->maxbytes, 'maxfiles' => -1, 'changeformat' => 1, 'context' => $context, 'noclean' => 1, 'trusttext' => true);\n\n\n $value = trim($value);\n $option = new stdClass();\n $option->tabname = $value;\n $option->tabcontentorder = $tab->tabcontentorder[$key];\n $option->externalurl = $tab->externalurl[$key];\n //tab content is now an array due to the new editor\n $draftitemid = $tab->content[$key]['itemid'];\n\n if ($draftitemid) {\n $option->tabcontent = file_save_draft_area_files($draftitemid, $context->id, 'mod_tab', 'content', $tab->optionid[$key], $editoroptions, $tab->content[$key]['text']);\n }\n $option->contentformat = $tab->content[$key]['format'];\n $option->tabid = $tab->id;\n $option->timemodified = time();\n\n if (isset($tab->optionid[$key]) && !empty($tab->optionid[$key])) {//existing tab record\n $option->id = $tab->optionid[$key];\n if (isset($value) && $value <> '') {\n $DB->update_record(\"tab_content\", $option);\n } else { //empty old option - needs to be deleted.\n $DB->delete_records(\"tab_content\", array(\"id\" => $option->id));\n }\n } else {\n if (isset($value) && $value <> '') {\n $newtab_content_id = $DB->insert_record(\"tab_content\", $option);\n //tab content is now an array due to the new editor\n //In order to enter file information from the editor\n //We must now update the record once it has been created\n\n if (isset($tab->content[$key]['text'])) {\n $draftitemid = $tab->content[$key]['itemid'];\n if ($draftitemid) {\n $tabcontentupdate = new stdClass();\n $tabcontentupdate->id = $newtab_content_id;\n $tabcontentupdate->tabcontent = file_save_draft_area_files($draftitemid, $context->id, 'mod_tab', 'content', $newtab_content_id, $editoroptions, $tab->content[$key]['text']);\n $DB->update_record('tab_content', $tabcontentupdate);\n }\n }\n }\n }\n }\n return $DB->update_record(\"tab\", $tab);\n}", "function tquiz_update_instance(stdClass $tquiz, mod_tquiz_mod_form $mform = null) {\n global $DB;\n\n $tquiz->timemodified = time();\n $tquiz->id = $tquiz->instance;\n\n # You may have to add extra stuff in here #\n $itemid=0;\n\t$cmid = $tquiz->coursemodule;\n\t$modulecontext = context_module::instance($cmid);\n\t$editoroptions = tquiz_fetch_editor_options($modulecontext);\n\t$tquiz = file_postupdate_standard_editor( $tquiz, 'feedback', $editoroptions, $modulecontext,\n 'mod_tquiz', 'feedback', $itemid);\n\n\n return $DB->update_record('tquiz', $tquiz);\n}", "public function edit()\n {\n return \"Ini Halaman Edit\";\n }", "public function editstepsAction(){\n\n\t echo $this->ModelObj->updatesteps($this->Request); exit;\n\n\t}", "public function edit($id)\n {\n $title_info = QuestionTitle::findOrFail($id);\n return view(\"admin.server.editTitle\",compact(\"title_info\"));\n }", "public function update(LessonRequest $request, Lesson $lesson)\n {\n $lesson->update([\n 'name'=>$request->name,\n 'short_name'=>$request->short_name\n ]);\n return redirect()->route('lessons.index')->with('success', 'Успешно изменено');\n }", "public function testUpdateChallengeActivity()\n {\n }", "public function admin_form($data) {\n\t\t\t$ret = 'To enter content into this WYSIWYG:<br/>\n\t\t\t\t\t1. Give this module a name <input onchange=\"cfct_module_wysiwyg_change();\" type=\"text\" name=\"'.$this->get_field_name('title').'\" id=\"'.$this->get_field_id('title').'\" value=\"'.(!empty($data[$this->get_field_name('title')]) ? esc_html($data[$this->get_field_name('title')]) : '').'\" style=\"width: 150px;\" /><br/>\n\t\t\t\t\t2. Click Save<br/>\n\t\t\t\t\t3. Update this page<br/>\n\t\t\t\t\t4. Edit module content via WYSIWYG tab named <span style=\"font-weight:bold;\" id=\"cfct-module-wysiwyg-name\">'.(!empty($data[$this->get_field_name('title')]) ? esc_html($data[$this->get_field_name('title')]) : '').'</span>';\n\t\t\treturn $ret;\n\t\t}", "function update() {\n\t\t$sql = \"UPDATE \".$this->hr_db.\".hr_amphur\n\t\t\t\tSET\tamph_name=?, amph_name_en=?, amph_pv_id=?\n\t\t\t\tWHERE amph_id=?\";\n\t\t$this->hr->query($sql, array($this->amph_name, $this->amph_name_en, $this->amph_pv_id, $this->amph_id));\n\t}", "public function update(Request $request, Lesson $lesson)\n {\n $lesson->lesson_name = $request->lesson_name;\n $lesson->save();\n return redirect()->route('lesson.index');\n }", "public function edit(question $question)\n {\n //\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 update_course($id,$cod,$titl,$crhr,$lab,$type) {\n $upd_query=\"UPDATE courses\n SET course_code='$cod',course_title='$titl',course_credit_hours='$crhr',course_lab='$lab',course_type='$type'\n WHERE course_id='$id'\";\n $dupd_exe=mysqli_query($GLOBALS['con'],$upd_query);\n if ($dupd_exe) {\n header('Location:..\\courses_page.php?msg=successfuly Updated record');//redirecting to main page of courses\n }else {\n header('Location:..\\courses_page.php?msg=Error Updating record');//redirecting to main page of courses\n }\n }", "public function editAction()\n {\n $curriculumdocId = $this->getRequest()->getParam('id');\n $curriculumdoc = $this->_initCurriculumdoc();\n if ($curriculumdocId && !$curriculumdoc->getId()) {\n $this->_getSession()->addError(\n Mage::helper('bs_curriculumdoc')->__('This curriculum doc no longer exists.')\n );\n $this->_redirect('*/*/');\n return;\n }\n $data = Mage::getSingleton('adminhtml/session')->getCurriculumdocData(true);\n if (!empty($data)) {\n $curriculumdoc->setData($data);\n }\n Mage::register('curriculumdoc_data', $curriculumdoc);\n $this->loadLayout();\n\n $this->_title(Mage::helper('bs_curriculumdoc')->__('Training List'))\n ->_title(Mage::helper('bs_curriculumdoc')->__('Curriculum Documents'));\n if ($curriculumdoc->getId()) {\n $this->_title($curriculumdoc->getCdocName());\n } else {\n $this->_title(Mage::helper('bs_curriculumdoc')->__('Add curriculum doc'));\n }\n if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {\n $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);\n }\n $this->renderLayout();\n }", "public function testUpdateChallenge()\n {\n }", "public function update()\n {\n $currentUser = $this->get_user_or_redirect();\n if (isset($_GET[\"param1\"])) {\n $id = $_GET[\"param1\"];\n $board = Board::get([\"id\" => $id]);\n\n } else {\n $id = null;\n }\n if (!$id) $this->redirect(\"board\");\n if(($currentUser->role != \"admin\") && $currentUser->id != $board->owner\n && $currentUser->id != $collaborate->Collaborator){\n $errors = \"vous n'avez pas les accès neccessaire pour effectuer cette action!\";\n (new View(\"errors\"))->show(array(\"errors\" => $errors));\n }\n else {\n if (!$board)\n $this->redirect(\"board\");\n $errors = [];\n if (count($_POST) > 0) {\n if (isset($_POST['title']) && $_POST['title'] != \"\") {\n $title = trim($_POST[\"title\"]);\n $errors = Board::validateTitle($title);\n if ($title != $board->title)\n $errors = array_merge($errors, Board::validateUnicity($title));\n $board->title = $title;\n if (empty($errors)) {\n $board->update();\n $this->redirect(\"board\", \"open\", $board->id);\n }\n }\n }\n\n (new View(\"boards/update\"))->show(array(\"board\" => $board, \"errors\" => $errors));\n }\n \n }", "function modificar_NombreCategoria(){\n $conexion = Conexion();\n $sql = \"UPDATE tbl_categoria SET nombre = '$this->nombre' WHERE id_categoria = '$this->id';\";\n $conexion->query($sql);\n echo\"<script type=\\\"text/javascript\\\">alert('Modificacion Exitosa'); window.location='../Vista/Categoria.php';</script>\";\n }", "public function update(Request $request, $id)\n {\n $lesson= Lesson::find($id);\n\n $data = $this->getSaveData($request);\n\n $lesson->update($data);\n return redirect('admin/topics');\n// $lesson->update([\n// 'title' => $request->get('title'),\n// 'avatar' => $request->get('avatar'),\n// 'content' => $request->get('content'),\n// 'content_zh_CN' => $request->get('content_zh_CN'),\n// 'free' => $request->get('free'),\n// 'likes' => $request->get('likes'),\n// 'views' => $request->get('views'),\n// 'topic_id' => $request->get('topic_id'),\n// 'duration' => $request->get('duration'),\n// 'audio_url' => $request->get('audio_url'),\n// 'audio_url_zh_CN' => $request->get('audio_url_zh_CN'),\n// 'download_url' => $request->get('download_url'),\n// ]);\n }", "public function update() {\n\n // Does the course object have an ID?\n if ( is_null( $this->courseId ) ) trigger_error ( \"Course::update(): Attempt to update Course object that does not have its ID property set.\", E_USER_ERROR );\n\n // Update the course\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $sql = \"UPDATE course SET courseCode=:courseCode, courseName=:courseName, description=:description, headTeacher=:headTeacher WHERE courseId = :courseId\";\n $st = $conn->prepare ( $sql );\n $st->bindValue( \":courseCode\", $this->courseCode, PDO::PARAM_INT );\n $st->bindValue( \":courseName\", $this->courseName, PDO::PARAM_INT );\n $st->bindValue( \":description\", $this->description, PDO::PARAM_STR );\n $st->bindValue( \":headTeacher\", $this->headTeacher, PDO::PARAM_STR );\n\n//\n $st->bindValue( \":courseId\", $this->courseId, PDO::PARAM_INT );\n $st->execute();\n $conn = null;\n }", "function modifyQuestionblock($questionblock_id, $title, $show_questiontext, $show_blocktitle)\n\t{\n\t\tglobal $ilDB;\n\t\t$affectedRows = $ilDB->manipulateF(\"UPDATE svy_qblk SET title = %s, show_questiontext = %s,\".\n\t\t\t\" show_blocktitle = %s WHERE questionblock_id = %s\",\n\t\t\tarray('text','text','text','integer'),\n\t\t\tarray($title, $show_questiontext, $show_blocktitle, $questionblock_id)\n\t\t);\n\t}", "public function update($title, $text, $options, $additionalData = array()) {\n $updateText = '';\n\n // save subject\n if ($title != $this->title) {\n $updatetitle = \"title = '\" . escapeString($title) . \"',\";\n }\n\n // save text\n if (CHAPTER_IN_FILE) {\n $file = CHAPTER_FILE_PATH . \"/\" . $this->authorID . \"/\" . $this->chapterID . \"_cache.txt\";\n file_put_contents($file, escapeString($text));\n } else {\n $updateText = \"text_cache = '\" . escapeString($text) . \"',\";\n }\n\n\n // update chapter cache\n //ToDo überprüfen, ob das gebraucht wird.\n /* require_once(WCF_DIR . 'lib/data/message/bbcode/MessageParser.class.php');\n $parser = MessageParser::getInstance();\n $parser->setOutputType('text/html');\n $sql = \"UPDATE\tsls\" . SLS_N . \"_chapter_cache\n SET\ttextCache = '\" . escapeString($parser->parse($text, $options['enableSmilies'], $options['enableHtml'], $options['enableBBCodes'], false)) . \"'\n WHERE\tchapterID = \" . $this->chapterID;\n WCF::getDB()->registerShutdownUpdate($sql);\n */\n $additionalSql = '';\n foreach ($additionalData as $key => $value) {\n $additionalSql .= ',' . $key . \"='\" . escapeString($value) . \"'\";\n }\n\n // save chapter in database\n $sql = \"UPDATE \tsls\" . SLS_N . \"_chapter\n\t\t\tSET\t$updateTitle\n\t\t\t\t$updateText\n updateTime = date(),\n\t\t\t\tenableSmilies = \" . $options['enableSmilies'] . \",\n\t\t\t\tenableHtml = \" . $options['enableHtml'] . \",\n\t\t\t\tenableBBCodes = \" . $options['enableBBCodes'] . \",\n\t\t\t\t\" . $additionalSql . \"\n\t\t\tWHERE \tchapterID = \" . $this->chapterID;\n WCF::getDB()->sendQuery($sql);\n }", "public function edit(Question $question)\n {\n //\n }", "public function edit(Question $question)\n {\n //\n }", "public function edit(Question $question)\n {\n //\n }", "public function edit(Chapter $chapter)\n {\n //\n }", "public function edit(Chapter $chapter)\n {\n //\n }", "function admin_form(&$qa_content){\n\t\t\t$ok = null;\n\t\t\tif (qa_clicked('quizx_save'))\n\t\t\t{\n\t\t\t\tqa_opt('quizx_enabled', (bool)qa_post_text('quizx_enabled')); // empty or 1\n\t\t\t\tqa_opt('quizx_timeformat', (String)qa_post_text('quizx_timeformat'));\n\t\t\t\tqa_opt('quizx_servertimezone', (String)qa_post_text('quizx_servertimezone'));\n\t\t\t\tqa_opt('quizx_localization', (String)qa_post_text('quizx_localization'));\n\t\t\t\tqa_opt('quizx_lastqutoshow', (int)qa_post_text('quizx_lastqutoshow'));\n\t\t\t\tqa_opt('quizx_permission', (int)qa_post_text('quizx_permission')); // level\n\t\t\t\t$ok = qa_lang('admin/options_saved');\n\t\t\t}\n\t\t\t\n\t\t\t// form fields to display frontend for admin\n\t\t\t$fields = array();\n\t\t\t\n\t\t\t$fields[] = array(\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => qa_lang('quizx_lang/enable_plugin'),\n\t\t\t\t'tags' => 'name=\"quizx_enabled\"',\n\t\t\t\t'value' => qa_opt('quizx_enabled'),\n\t\t\t);\n\t\t\t\n\t\t\t$fields[] = array(\n\t\t\t\t'type' => 'input',\n\t\t\t\t'label' => qa_lang('quizx_lang/admin_timeformat'),\n\t\t\t\t'tags' => 'name=\"quizx_timeformat\"',\n\t\t\t\t'value' => qa_opt('quizx_timeformat'),\n\t\t\t);\n\n\t\t\t$fields[] = array(\n\t\t\t\t'type' => 'input',\n\t\t\t\t'label' => strtr( qa_lang('quizx_lang/admin_servertimezone'), array( \n\t\t\t\t\t\t\t'^1' => '<a target=\"_blank\" href=\"http://php.net/manual/en/timezones.php\">',\n\t\t\t\t\t\t\t'^2' => '</a>'\n\t\t\t\t\t\t )),\n\t\t\t\t'tags' => 'name=\"quizx_servertimezone\"',\n\t\t\t\t'value' => qa_opt('quizx_servertimezone'),\n\t\t\t);\n\n\t\t\t$fields[] = array(\n\t\t\t\t'type' => 'input',\n\t\t\t\t'label' => strtr( qa_lang('quizx_lang/admin_localization'), array( \n\t\t\t\t\t\t\t'^1' => '<a target=\"_blank\" href=\"http://stackoverflow.com/q/3191664/1066234\">',\n\t\t\t\t\t\t\t'^2' => '</a>'\n\t\t\t\t\t\t )),\n\t\t\t\t'tags' => 'name=\"quizx_localization\"',\n\t\t\t\t'value' => qa_opt('quizx_localization'),\n\t\t\t);\n\t\t\t\n\t\t\t$fields[] = array(\n\t\t\t\t'type' => 'input',\n\t\t\t\t'label' => qa_lang('quizx_lang/admin_lastqutoshow'),\n\t\t\t\t'tags' => 'name=\"quizx_lastqutoshow\"',\n\t\t\t\t'value' => qa_opt('quizx_lastqutoshow'),\n\t\t\t);\n\n\t\t\t$view_permission = (int)qa_opt('quizx_permission');\n\t\t\t$permitoptions = qa_admin_permit_options(QA_PERMIT_ALL, QA_PERMIT_SUPERS, false, false);\n\t\t\t$pluginpageURL = qa_path('desk');\n\t\t\t$fields[] = array(\n\t\t\t\t'type' => 'select',\n\t\t\t\t'label' => qa_lang('quizx_lang/minimum_level'),\n\t\t\t\t'tags' => 'name=\"quizx_permission\"',\n\t\t\t\t'options' => $permitoptions,\n\t\t\t\t'value' => $permitoptions[$view_permission],\n\t\t\t);\n\t\t\t\n\t\t\t$avwidgstring = qa_lang('admin/widgets_explanation');\t\t\t\n\t\t\t// remove hyphen in end of default string\n\t\t\t$avwidgstring = substr($avwidgstring, 0, strlen($avwidgstring)-1);\n\t\t\t\n\t\t\t$fields[] = array(\n\t\t\t\t'type' => 'static',\n\t\t\t\t'note' => qa_lang('quizx_lang/plugin_page_url').' <a target=\"_blank\" href=\"'.$pluginpageURL.'\">'.$pluginpageURL.'</a>',\n\t\t\t);\n\t\t\t\n\t\t\t$fields[] = array(\n\t\t\t\t'type' => 'static',\n\t\t\t\t'note' => '<span style=\"color:#00F;\">'.qa_lang('quizx_lang/admin_checkwidgets').' <a target=\"_blank\" href=\"'.qa_path('admin/layout').'#home_description\" style=\"text-decoration:underline;\">'.$avwidgstring.'</a></span>',\n\t\t\t);\n\t\t\t\n\t\t\t// link to q2apro.com\n\t\t\t$fields[] = array(\n\t\t\t\t'type' => 'static',\n\t\t\t\t'note' => '<span style=\"color:#789;\">'.strtr( qa_lang('quizx_lang/q2apro_contact'), array( \n\t\t\t\t\t\t\t'^1' => '<a target=\"_blank\" href=\"http://www.q2apro.com/contact\">',\n\t\t\t\t\t\t\t'^2' => '</a>'\n\t\t\t\t\t\t )).'</span>',\n\t\t\t);\n\t\t\t\n\t\t\treturn array( \n\t\t\t\t'ok' => ($ok && !isset($error)) ? $ok : null,\n\t\t\t\t'fields' => $fields,\n\t\t\t\t'buttons' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'label' => qa_lang('main/save_button'),\n\t\t\t\t\t\t'tags' => 'name=\"quizx_save\"',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\t\t}", "public function update(Request $request, $id)\n {\n if($this->isAdmin()==false){\n return response([\n 'message' =>'Invalid user'\n ],403 );\n }\n $existingLesson = Lesson::find($id);\n if ($existingLesson) { \n $existingLesson->update([\n 'l_type'=>$request->input('l_type'),\n 'name'=>$request->input('name'),\n 'question_count'=>$request->input('question_count'),\n 'question_count_to_test'=>$request->input('question_count_to_test'),\n 'language'=>$request->input('language')\n ]);\n\n CrossLesson::where('lesson_id',$existingLesson->id)->delete();\n $cross_lessons = $request->input('cross_lessons');\n if(isset($cross_lessons)){\n foreach ($cross_lessons as $lesson_) {\n CrossLesson::create([\n 'lesson_id'=>$existingLesson->id,\n 'cross_lesson_id'=>$lesson_['id']\n ]); \n }\n }\n\n $questionOperation = $request->input('q_operation');\n if($questionOperation==='new'){\n \n $questions = Question::where('lesson_id', $existingLesson->lesson_id)->get();\n foreach ($questions as $question) {\n Option::where('question_id', $question->id)->delete();\n }\n Question::where('lesson_id', $existingLesson->lesson_id)->delete();\n Question::where('lesson_id', -1)\n ->update([\n 'lesson_id' => $existingLesson->id,\n 'tmp' => 0,\n ]);\n }\n else if($questionOperation==='merge'){\n Question::where('lesson_id', -1)\n ->update([\n 'lesson_id' => $existingLesson->id,\n 'tmp' => 0,\n ]);\n }\n else if($questionOperation==='no_touch'){\n \n }\n\n $existingLesson->update([\n 'question_count'=>Question::where('lesson_id', $existingLesson->id)->count()\n ]);\n\n return response([\n 'message' =>'successfully updated'\n ]); \n \n }else{\n return response([\n 'message' =>'Invalid credentials'\n ],Response::HTTP_NOT_FOUND );\n }\n }", "public function edit($course_id,$id)\n {\n $lesson=Lessons::where('id',$id)->first();\n return view(\"lesson.edit_lesson\",compact('lesson','course_id'));\n }", "public function update()\n {\n try {\n\n $score = $this->getApp()->request()->post(\"score\");\n $description = $this->getApp()->request()->post(\"description\");\n\n $response_data = ['wasaa'=>[$score\n ,$description]];\n\n $this->getApp()->render(\n 200,\n ['data' => $response_data]\n );\n } catch (\\Exception $e) {\n\n $this->getApp()->render(\n 200,\n ['error' => $e->getMessage()]\n );\n }\n }", "function edit_notes()\n {\n $query = $this->pdo->prepare('UPDATE note SET description=:description, updated_at=NOW() WHERE id=:id');\n $query->execute(array( ':description' => $_POST['edit-note-text'] ,':id' => $_POST['edit-note-id']));\n \n }", "public function edit()\n {\n $postInformation = $this->input->post();\n $dataArray = array();\n foreach ($postInformation as $key => $value) {\n if ($key != \"lessonId\" and $key != \"moduleId\" && $key != \"file\") {\n $dataArray[\"dataToUpdate\"][$key] = $value;\n }\n }\n $dataArray[\"lessonId\"] = $this->input->post(\"lessonId\");\n $resultEditLesson = $this->Lesson_Model->edit($dataArray);\n echo json_encode($resultEditLesson);\n }", "public function testUpdateChallengeActivityTemplate()\n {\n }", "public function updated(TrainingByTitleDetail $trainingByTitleDetail)\n {\n $title = Titles::find($trainingByTitleDetail->title_id)->name;\n $action = 'Cập nhật chuyên đề '.$trainingByTitleDetail->subject_name.' lộ trình đào tạo';\n parent::saveHistory($trainingByTitleDetail,'Update',$action,$title,$trainingByTitleDetail->training_title_id,app(TrainingByTitle::class)->getTable());\n }", "public function edit(Lesson $lesson)\n {\n $categories = Category::all();\n return view('admin.lessons.edit', compact('lesson', 'categories'));\n }", "public function edit()\n {\n //\n\t\treturn 'ini halaman edit';\n }", "public function edit_postAction() {\n\t\t$info = $this->getPost(array('id', 'status'));\n\t\t$ret = Activity_Service_ShareQq::update($info, intval($info['id']));\n\t\tif (!$ret) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功.');\n\t}", "public function edit(exam $exam)\n {\n //\n }", "public function update(Request $request, $id)\n {\n $title = $request->input('title');\n $details = $request->input('details');\n\n $lesson = lesson::findOrfail($id); \n $lesson->title = $title;\n $lesson->details = $details;\n $lesson->save();\n\n return back();\n }", "public function updatecourse($id)\n {\n \n }", "public function update(LessonRequest $request, Lessons $lesson)\n {\n $this->updateData($request, $lesson);\n\n return back()->with('success' , 'Lesson Updated Successfully') ;\n\n }", "function edit_post($mysqli, $post_id, $title, $category) {\n if( ($title != \" \"))\n {\n $query_update_post = \"UPDATE post SET post_title='$title', post_category='$category' WHERE id=$post_id\";\n $result_update_post = mysqli_query($mysqli, $query_update_post);\n header(\"Location: \" . PANEL_URL .\"post-view.php?p_id=\".$post_id.\"&edit=success\");\n }\n }", "public function setModifyMode() {\n $this->getElement('submit')->setLabel('Edit Test');\n }", "function update_exam(){\n\n\t\trequire_once(\"dbconnection.php\");\n\t\t$obj=new dbconnection();\n\t\t$con=$obj->getcon();\n\t\t\n\t\t\n\t\t$dbh=$obj->get_pod();\n\t\t\n\t\t$err=0;\n\n\t\t$act_mode \t= mysqli_real_escape_string($con,$_POST['act_mode']);\n\t\t$txteid \t\t = mysqli_real_escape_string($con,$_POST['txteid']);\n\t\t$cmbcourse \t= mysqli_real_escape_string($con,$_POST['cmbcourse']);\n\t\t$cmbetype = mysqli_real_escape_string($con,$_POST['cmbetype']);\n\t\t$paper = mysqli_real_escape_string($con,$_POST['paper']);\n\t\t$txtmarks = mysqli_real_escape_string($con,$_POST['txtmarks']);\n\t\t$cmbduration = mysqli_real_escape_string($con,$_POST['cmbduration']);\n\t\t\n\t\t$sql = \"UPDATE exam SET examtype=?, paper=?, examduration=?, exammarks=?, couID=? WHERE examID=?\";\n\t\t$sth = $dbh->prepare($sql);\n\t\t$sth->execute(Array($cmbetype, $paper, $cmbduration, $txtmarks, $cmbcourse, $txteid));\n\t\t\t\t\n\t\t\tif(count($sth)<0){\n\t\t\t\t \n\t\t\t\t$status =\"false\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\n\t\t\t\t$status =\"updated\";\n\t\t\t}\n\t\t\techo json_encode($status);\n\t\t\t\n\t}", "public function setTitle($newTitle) { $this->Title = $newTitle; }", "private static function desc()\n {\n\n $id = $_POST[\"id\"];\n $desc = $_POST[\"desc\"];\n //iniciamos la conexion\n $con = mysqli_connect('localhost', 'root', '', 'bd_documentacion');\n if (! $con) {\n die('Error no se pudo conectar : '.mysqli_error($con));\n }\n mysqli_select_db($con, \"ajax_demo\");\n\n $sql = 'UPDATE salas SET descripcion = \"'.$desc.' \"WHERE `salas`.`idSalas` = '.$id;\n $con->set_charset(\"utf8\");\n mysqli_query($con, $sql);\n echo \"hola\";\n }", "public function edit(Exam $exam)\n {\n //\n }" ]
[ "0.6517717", "0.6437367", "0.6374597", "0.6374597", "0.6374597", "0.6206146", "0.60336053", "0.60052645", "0.59138924", "0.58348805", "0.581416", "0.57803893", "0.5777231", "0.5777231", "0.5763792", "0.5763792", "0.5763019", "0.57467586", "0.5729217", "0.5702625", "0.5666488", "0.566295", "0.5646333", "0.56254715", "0.5620906", "0.5620906", "0.56152725", "0.55919677", "0.55824935", "0.55792403", "0.5556934", "0.5552488", "0.55519515", "0.5551728", "0.55390793", "0.5516145", "0.5516145", "0.5511175", "0.5511175", "0.5509616", "0.55095893", "0.55078495", "0.54821646", "0.54773015", "0.54714507", "0.5465992", "0.54608154", "0.54596", "0.54406136", "0.54374754", "0.54353654", "0.5431883", "0.54317594", "0.54281616", "0.5422851", "0.5422741", "0.54103655", "0.5402475", "0.53988194", "0.53987914", "0.5384531", "0.5382736", "0.53774023", "0.537553", "0.5370736", "0.5369865", "0.5349714", "0.53401434", "0.5334564", "0.53342134", "0.5321581", "0.53172004", "0.5314343", "0.5313999", "0.53131074", "0.5308712", "0.5308712", "0.5308712", "0.53046566", "0.53046566", "0.53028", "0.5299775", "0.52991056", "0.5296223", "0.52952826", "0.52874935", "0.5281214", "0.52781963", "0.5274175", "0.5272451", "0.52721035", "0.52581596", "0.5252333", "0.52521634", "0.5248536", "0.5245834", "0.5240647", "0.5229688", "0.522921", "0.522748", "0.5223603" ]
0.0
-1
Get accounts ordered by position
public function findByGameId($gameId) { // if (!$this->user) { // throw new \Exception('You did not set the user'); // } $user = $this->user; $qb = $this->createQueryBuilder('d') ->where("d.gameId = :gameId") ->setParameter('gameId', $gameId); if ($user) { $qb->andWhere("d.user = :user") ->setParameter('user', $user); } return $qb->getQuery()->getResult(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAccounts();", "public function findAccounts() {\n\t\t\n\t}", "public function getAccounts(){\n $accounts = [];\n foreach ($this->data['Items'] as $account) {\n $newAccount = [];\n $newAccount['accounting_id'] = IndexSanityCheckHelper::indexSanityCheck('UID', $account);\n $newAccount['code'] = IndexSanityCheckHelper::indexSanityCheck('DisplayID', $account);\n $newAccount['name'] = IndexSanityCheckHelper::indexSanityCheck('Name', $account);\n $newAccount['description'] = IndexSanityCheckHelper::indexSanityCheck('Description', $account);\n $newAccount['type'] = IndexSanityCheckHelper::indexSanityCheck('Type', $account);\n\n if (array_key_exists('Type', $account)) {\n if ($account['Type']) {\n $newAccount['is_bank_account'] = ($account['Type'] === 'Bank');\n }\n }\n\n if (array_key_exists('BankingDetails', $account)) {\n if ($account['BankingDetails']) {\n $newAccount['bank_account_number'] = IndexSanityCheckHelper::indexSanityCheck('BankAccountNumber', $account['BankingDetails']);\n }\n }\n\n if (array_key_exists('TaxCode', $account)) {\n if ($account['TaxCode']) {\n $newAccount['tax_type'] = IndexSanityCheckHelper::indexSanityCheck('Code', $account['TaxCode']);\n }\n }\n array_push($accounts, $newAccount);\n }\n\n return $accounts;\n }", "public function getAccounts()\n {\n return $this->accounts;\n }", "public function getAccounts()\n\t{\n\t\treturn $this->accounts; \n\n\t}", "public function showAccounts($orderby = 'name', $order = 'ASC')\n {\n $this->db->execute(\"SELECT id, name, email, gravatar, role FROM users ORDER BY $orderby $order\");\n $res = $this->db->fetchAll();\n // executeFetchAll\n return $res;\n }", "function getAccounts() {\n $stmt = $this->pdo->query('SELECT * FROM get_accounts()');\n $accounts = [];\n while ($row = $stmt->fetch()) {\n $accounts[] = [\n 'id' => $row['id'],\n 'first_name' => $row['first_name'],\n 'last_name' => $row['last_name'],\n 'plan' => $row['plan'],\n 'effective_date' => $row['effective_date']\n ];\n }\n return $accounts;\n }", "function getAccounts() {\n $stmt = $this->pdo->query('SELECT * FROM get_accounts()');\n $accounts = [];\n while ($row = $stmt->fetch()) {\n $accounts[] = [\n 'id' => $row['id'],\n 'first_name' => $row['first_name'],\n 'last_name' => $row['last_name'],\n 'plan' => $row['plan'],\n 'effective_date' => $row['effective_date']\n ];\n }\n return $accounts;\n }", "public function listAccounts()\n {\n return $this->execute('listaccts', []);\n }", "public function getAccounts()\n {\n }", "public function getAccounts()\n {\n foreach ($this->accountIds as $id) {\n // Use a generator to save on memory/resources\n // load accounts from DB one at a time only when required\n yield (new AccountModel())->load($id);\n }\n }", "public function getAccounts()\n {\n $accounts = [];\n\n foreach (session('nxs_gp.accounts', []) as $account) {\n $accounts[] = [\n 'username' => $account['nxs_gp.username']\n ];\n }\n\n return $accounts;\n }", "public static function getAllAccounts(){\n\t\t$stmt = Dbh::connect()->query(\"SELECT * FROM accounts\");\n\t\t$accounts = array();\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){\n $accounts[] = new Account($row['account_id'], $row['email'], $row['first_name'], $row['last_name'], $row['account_type'], $row['password']);\n }\n return $accounts;\n\t}", "public function get_accounts(){\n $items = array();\n if( ! $this->is_connect() ){\n return array();\n }\n //$this->new_request( \"GET\", \"/accounts\" );//$this->is_connect() hace la petición de las cuentas\n $response = json_decode( $this->ironman->get_response_body(), true );\n $accounts = isset( $response['accounts'] ) ? $response['accounts'] : array();\n foreach( $accounts as $account ){\n $items[$account['id']] = $account['name'];\n }\n return $items;\n }", "public static function accounts() {\n\t\t\treturn self::get('accounts');\n\t\t}", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function &getOrderBy();", "public function order();", "public function getLoginAccounts()\n\t{\n\t\t$conditions = '';\n\t\t$params = [];\n\n\t\t$records = Social_LoginAccountRecord::model()->findAll($conditions, $params);\n\n\t\tif ($records)\n\t\t{\n\t\t\treturn Social_LoginAccountModel::populateModels($records);\n\t\t}\n\t}", "public function index()\n {\n $accounts = Account::take(5)\n ->orderBy('created_at', 'desc')\n ->get();\n return $accounts;\n }", "public function accounts()\n {\n $accounts = $this->morphToMany(\n Config::get('laraccount.models.account'),\n 'user',\n Config::get('laraccount.tables.account_user'),\n Config::get('laraccount.foreign_keys.user'),\n Config::get('laraccount.foreign_keys.account')\n );\n return $accounts;\n }", "function SearchAccountsByUserId($userId)\n{\n $GLOBALS['proxy'] = $GLOBALS['customerProxy']; \n \n // Specify the page index and number of customer results per page.\n\n $pageInfo = new Paging();\n $pageInfo->Index = 0; // The first page\n $pageInfo->Size = 100; // The first 100 accounts for this page of results\n\n $ordering = new OrderBy();\n $ordering->Field = OrderByField::Number;\n $ordering->Order = SortOrder::Ascending; \n\n $predicate = new Predicate();\n $predicate->Field = \"UserId\";\n $predicate->Operator = PredicateOperator::Equals;\n $predicate->Value = $userId; \n\n $request = new SearchAccountsRequest();\n $request->Ordering = $ordering;\n $request->PageInfo = $pageInfo;\n $request->Predicates = array($predicate);\n\n return $GLOBALS['proxy']->GetService()->SearchAccounts($request)->Accounts;\n}", "function get_accounts($user_id) {\n\t if ($this->ensure_portal() != -1) {\n\t\t $this->login();\n\t\t\t$ger_params = array(\n\t\t\t 'session' => $this->session,\n\t\t\t 'module_name' => 'Contacts',\n\t\t\t 'module_id' => $user_id,\n\t\t\t 'link_field_name' => 'accounts',\n\t\t\t 'related_module_query' => '',\n\t\t\t 'related_fields' => array(\n\t\t\t 'id',\n\t\t\t 'name',\n\t\t\t ),\n\t\t\t 'related_module_link_name_to_fields_array' => array(\n\t\t\t ),\n\t\t\t 'deleted'=> '0',\n\t\t\t 'order_by' => '',\n\t\t\t 'offset' => 0,\n\t\t\t 'limit' => 5,\n\t\t );\n\n\t\t $ger_result = $this->call(\"get_relationships\", $ger_params);\n\t\t $accounts = [];\n\n\t\t foreach($ger_result->entry_list as $entry) {\n\t\t \t$id = $entry->name_value_list->id->value;\n\t \t\t$name = $entry->name_value_list->name->value;\n\t \t\t$accounts[]= array(\"id\" => $id, \"name\" => $name);\n\t \t}\n\t \treturn $accounts;\n\t } else {\n\t $this->kick();\n\t }\n\t}", "public function getCoordinatorAccounts() {\n $this->select->reset();\n $select = $this->select\n ->setIntegrityCheck(false)\n ->from(array('s' => 'staff'), array('id', 'first_name', 'last_name'))\n ->join(array('u' => 'user'), 's.id = u.staff_id', array('permission_level'))\n ->where('permission_level = ' . Application_Model_User::USER_COORDINATOR);\n return $this->fetchAll($select);\n }", "function displayAccounts($position, $status, $page)\n\t\t{\n\t\t\tif($status == \"DISABLED\")\n\t\t\t{\n // query the total number of ammount of disabled contributors and members\n $accountsCountQuery = mysql_query(\"SELECT account_id FROM argus_accounts WHERE status = '\".$status.\"'\") or die(mysql_error());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n // query the total number of ammount of disabled contributors and members\n $accountsCountQuery = mysql_query(\"SELECT account_id FROM argus_accounts WHERE status = '\".$status.\"' AND position = '\".$position.\"'\") or die(mysql_error());\n\t\t\t}\n \n // get the count\n $accountsCount = mysql_num_rows($accountsCountQuery);\n \n // set the number of accounts to be showed per page\n $limit = 15;\n \n // compute the number of page for the accounts\n $numberOfPages = ceil($accountsCount/$limit);\n \n // check the status of the page\n if(empty($page) && !ctype_digit($page))\n {\n // set the default page which is 1\n $page = 1;\n }\n\t\t\t\n // compute the limit value\n $limitValue = $page * $limit - ($limit);\n \n if($status == \"DISABLED\")\n {\n // query all DISABLED CONTRIBUTORS and MEMBERS and display the appropriate form title\n $accountsQuery = mysql_query(\"SELECT account_id, id_number, username, name, position, email, last_login_date FROM argus_accounts WHERE status = '\".$status.\"' ORDER BY last_login_date DESC LIMIT \".$limitValue.\",\".$limit.\"\") or die(mysql_error());\n \n // title for disabled accounts\n echo \"<h3>Disabled</h3>\";\n }\n else\n {\n // query all ENABLED accounts depending on the position being asked and display the appropriate form title\n $accountsQuery = mysql_query(\"SELECT account_id, id_number, username, name, email, last_login_date FROM argus_accounts WHERE status = '\".$status.\"' AND position = '\".$position.\"' ORDER BY last_login_date DESC LIMIT \".$limitValue.\",\".$limit.\"\") or die(mysql_error());\n \n // title for MEMBERS and CONTRIBUTORS that are enabled\n echo \"<h3>\".ucfirst(strtolower($position)).\"s</h3>\";\n }\n \n\t\t\techo \"<div class='bg1' id='tablePanel'>\";\n\t\t\t\n\t\t\t// check if there is a result from the database\n\t\t\tif(mysql_num_rows($accountsQuery) == 0)\n\t\t\t{\n\t\t\t\techo \"<p><h3 align='center'>\";\n\t\t\t\t\n\t\t\t\t// message for DISABLED accounts\n\t\t\t\tif($status == \"DISABLED\")\n\t\t\t\t{\n\t\t\t\t\t// print a message that there are no results on the request of the user\n\t\t\t\t\techo \"There are no \".$status.\" accounts\";\n\t\t\t\t}\n\t\t\t\t// message for ENABLED accounts\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo \"There are no \".$position.\" accounts\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo \"</h3></p>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n // include the TOOL TIP ajax and create a tool tip\n include(\"ajax_libraries/ToolTip.php\");\n $toolTip = new ToolTip();\n $toolTip -> setupForm();\n \n // include the checkbox funtions where check box are allowed to be selected/unselected all\n echo \"<script src='../miscs/js/checkbox_toggle/checkboxtoggler.js' type='text/javascript'></script>\";\n \n\t\t\t\tif($status == \"ENABLED\")\n\t\t\t\t{\n\t\t\t\t\t// set the form for ENABLED accounts\n\t\t\t\t\techo \"<form id='form_id' method='post' action='\".$_SERVER['PHP_SELF'].\"?event=\".strtolower($position).\"'>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// set the form for DISABLED accounts\n\t\t\t\t\techo \"<form id='form_id' method='post' action='\".$_SERVER['PHP_SELF'].\"?event=\".strtolower($status).\"'>\";\n\t\t\t\t}\n\t\t\t\t\n // if there is a result, create a table where to display all queried accounts\n\t\t\t\techo \"\n <table width='100%'>\n\t\t\t\t<tr>\n\t\t\t\t<th class='fix'><input type='checkbox' onClick='toggleCheckBoxes(\\\"accountIds\\\")'></th>\n\t\t\t\t<th>ID Number</th>\n\t\t\t\t<th>Username</th>\n\t\t\t\t<th>Name</th>\n\t\t\t\t<th>Email</th>\";\n\t\t\t\t\n\t\t\t\t// display only the POSITION attribute if being accessed are DISABLED accounts\n\t\t\t\tif($status == \"DISABLED\")\n\t\t\t\t{\n\t\t\t\t\techo \"<th>Position</th>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo \"\n <th>Last Login Date</th>\n\t\t\t\t<th class='action'>Action</th>\n\t\t\t\t</tr>\";\n\t\t\t\t\n\t\t\t\t// display all accounts\n\t\t\t\t$color = true;\n\t\t\t\t\n\t\t\t\tfor($i=0; $i<mysql_num_rows($accountsQuery); $i++)\n\t\t\t\t{\n\t\t\t\t\t// display the row in an alternate color manner\n\t\t\t\t\tif($color == true)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"<tr class='bg1'>\";\n\t\t\t\t\t\t$color = false;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"<tr>\";\n\t\t\t\t\t\t$color = true;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// set the queried values for ENABLED status\n\t\t\t\t\t$accountId = mysql_result($accountsQuery,$i,\"account_id\");\n\t\t\t\t\t$idNumber = mysql_result($accountsQuery,$i,\"id_number\");\n\t\t\t\t\t$username = mysql_result($accountsQuery,$i,\"username\");\n\t\t\t\t\t$name = mysql_result($accountsQuery,$i,\"name\");\n\t\t\t\t\t$email = mysql_result($accountsQuery,$i,\"email\");\n\t\t\t\t\t$lastLoginDate = date(\"m/d/y\", mysql_result($accountsQuery,$i,\"last_login_date\"));\n\t\t\t\t\t\n\t\t\t\t\techo \"\n <td><input type='checkbox' name='accountIds[]' value='\".$accountId.\"'></td>\n\t\t\t\t\t<td>\".$idNumber.\"</td>\n\t\t\t\t\t<td><a href='accounts.php?event=statistics&account=\".$accountId.\"'>\".$username.\"</a></td>\n\t\t\t\t\t<td>\".$name.\"</td>\n\t\t\t\t\t<td><a href='mailto:\".$email.\"'>\".$email.\"</a></td>\";\n\t\t\t\t\t\n\t\t\t\t\t// display the POSITION attribute if status being accessed are DISABLED accounts\n\t\t\t\t\tif($status == \"DISABLED\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$position = mysql_result($accountsQuery,$i,\"position\");\n\t\t\t\t\t\techo \"<td>\".$position.\"</td>\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\techo \"\n <td>\".$lastLoginDate.\"</td>\n\t\t\t\t\t<td>\n <a href='accountscompose.php?event=edit&account=\".$accountId.\"' title='Edit'><img src='../miscs/images/Default/user_edit.png' alt='edit'></a> \";\n\t\t\t\t\t\n\t\t\t\t\t// display the ACTIONS for ENABLED accounts\n\t\t\t\t\tif($status == \"ENABLED\")\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"\n\t\t\t\t\t\t<a href='accounts.php?event=&action=disable&account=\".$accountId.\"' title='Disable'><img src='../miscs/images/Default/user_lock.png' alt='disable'></a>\";\n\t\t\t\t\t}\n\t\t\t\t\t// display the ACTIONS for DISABLED accounts\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"\n\t\t\t\t\t\t<a href='accounts.php?event=\".strtolower($status).\"&action=enable&account=\".$accountId.\"' title='Enable'><img src='../miscs/images/Default/user_restore.png' alt='enable'></a> \n\t\t\t\t\t\t<a href='accounts.php?event=\".strtolower($status).\"&action=delete&account=\".$accountId.\"' title='Delete'><img src='../miscs/images/Default/user_delete.png' alt='delete'></a>\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\techo \"\n </td>\n\t\t\t\t\t</tr>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo \"</table>\";\n\t\t\t\t\n\t\t\t\t// display the batch processing buttons\n\t\t\t\techo \"\n <table width='100%'>\n\t\t\t\t<tr><td>\";\n\t\t\t\t\n\t\t\t\t// display BUTTONS for ENABLED accounts\n\t\t\t\tif($status == \"ENABLED\")\n\t\t\t\t{\n\t\t\t\t\techo \"<input type='submit' id='submit1' value='Disable' name='disable'> \";\n\t\t\t\t}\n\t\t\t\t// display BUTTONS for DISABLED accounts\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo \"\n <input type='submit' id='submit1' value='Enable' name='enable'> \n\t\t\t\t\t<input type='submit' id='submit1' value='Delete' name='delete'>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo \"\n </td>\n <td align='right'>\";\n \n // display the previous page link\n if($page > 1)\n {\n echo \"<a href='accounts.php?event=\".$_GET[\"event\"].\"&page=\".($page - 1).\"'><img src='../miscs/images/Default/previous.png'></a> \";\n }\n \n // display the next page link\n if($page < $numberOfPages)\n {\n echo \"<a href='accounts.php?event=\".$_GET[\"event\"].\"&page=\".($page + 1).\"'><img src='../miscs/images/Default/next.png'></a>\";\n }\n \n echo \"\n </td>\n </tr>\n\t\t\t\t</table>\";\n\t\t\t}\n\t\t\t\n\t\t\techo \"</div>\";\n\t\t\t\n\t\t\treturn;\n\t\t}", "public function allUsersOrderedByPseudo()\n {\n // $query = $this->getEntityManager()->createQuery($dql);\n\n // dd($query->getSQL()); \n\n // return $query->execute();\n\n $qb = $this->createQueryBuilder('user');\n $qb->addOrderBy('user.pseudo', 'DESC');\n\n $query = $qb->getQuery(); \n\n \n\n }", "function media_theplatform_mpx_get_accounts_select() {\n // Check for the signIn token.\n $mpx_token = media_theplatform_mpx_variable_get('token', NULL);\n if (!$mpx_token) {\n return t('There was an error with your request.');\n }\n // Get the list of accounts from thePlatform.\n $url = 'http://access.auth.theplatform.com/data/Account?schema=1.3.0&form=json&byDisabled=false&token=' . $mpx_token;\n $result = drupal_http_request($url);\n $result_data = drupal_json_decode($result->data);\n\n global $user;\n\n if (empty($result_data['entryCount']) || $result_data['entryCount'] == 0) {\n $log = array(\n 'uid' => $user->uid,\n 'type' => 'request',\n 'type_id' => NULL,\n 'action' => 'account',\n 'details' => '0 accounts returned.',\n );\n media_theplatform_mpx_insert_log($log);\n //return FALSE;\n drupal_set_message(t('The logged in user does not have the privilege to set the account.'), 'warning');\n return array();\n }\n $accounts = array();\n $accounts_data = array();\n\n foreach ($result_data['entries'] as $entry) {\n $title = $entry['title'];\n $key = rawurlencode($title);\n $accounts[$key] = $title;\n }\n $log = array(\n 'uid' => $user->uid,\n 'type' => 'request',\n 'type_id' => NULL,\n 'action' => 'account',\n 'details' => count($accounts) . ' accounts returned.',\n );\n media_theplatform_mpx_insert_log($log);\n // Sort accounts alphabetically.\n natcasesort($accounts);\n return $accounts;\n}", "public function getAccountsList($hint, $uacc_uid=''){\r\n\t\t//format datetime into \"time ago\"\r\n\t\t$list = array();\r\n\r\n\t\tif($uacc_uid != '')\r\n\t\t\t$query = $this->db->select(\"company_id,company_name\")->like(\"company_name\", $hint)->where(array(\"created_by\"=>$uacc_uid,\"deleted\"=>0))->order_by(\"company_name\", \"asc\")->get(\"sc_companies\");\r\n\t\telse\r\n\t\t\t$query = $this->db->select(\"company_id,company_name\")->like(\"company_name\", $hint)->where(\"deleted\",0)->order_by(\"company_name\", \"asc\")->get(\"sc_companies\");\r\n\r\n\t if ($query->num_rows() > 0){\r\n\t\t\tforeach($query->result() as $row){\r\n\r\n\t\t\t\t$list[] = array(\"name\"=>$row->company_name, \"label\"=>$row->company_name, \"id\"=>$row->company_id);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $list;\r\n\t}", "public function getPlayers(array $accounts): Collection;", "function getAccounts(){\n\t\t// Get staff members from urlms\n\t\t$accounts = $this->urlms->getLab_index(0)->getFundingAccounts();\n\t\t$count = 0;\n\t\t// for each account, display its name and its balance\n\t\tforeach ($accounts as $a){\n\t\t\techo $a->getType() . \" \" . number_format($a->getBalance(), 2, \".\" , \",\" ) . \"<br>\";\n\t\t\t$count ++;\n\t\t}?>\n\t\t<html>\n\t\t\t<div class=\"container\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-sm-2\">\n\t\t\t\t\t\t<a href=\"../view/FundingView.php\" style=\"color: white; text-decoration: none;\">\n\t\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-danger\" data-toggle=\"tooltip\"\n\t\t\t\t\t\t\tdata-placement=\"bottom\" title=\"Go back to homepage\">Back</button>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</html><?php \n\t\treturn $count;\n\t}", "static function customerList( $offset, $limit )\n {\n $db = eZDB::instance();\n\n $db_params = array();\n $db_params[\"offset\"] =(int) $offset;\n $db_params[\"limit\"] =(int) $limit;\n\n $customEmailResult = $db->arrayQuery( \"SELECT DISTINCT email FROM ezorder WHERE is_temporary='0' ORDER BY email\", $db_params );\n $customEmailArray = array();\n\n foreach( $customEmailResult as $customEmailRow )\n {\n $customEmail = $customEmailRow['email'];\n $customEmailArray[] = \"'\" . $customEmail . \"'\";\n }\n\n $emailString = implode( \", \", $customEmailArray );\n if ( !strlen( $emailString ) )\n {\n $emailString = \"''\";\n }\n\n $productItemArray = $db->arrayQuery( \"SELECT ezorder.id as order_id, user_id, email, ignore_vat, currency_code, ezproductcollection_item.*\n FROM ezorder, ezproductcollection_item, ezproductcollection\n WHERE ezproductcollection_item.productcollection_id=ezorder.productcollection_id\n AND is_temporary='0'\n AND ezproductcollection_item.productcollection_id=ezproductcollection.id\n AND email in ( $emailString )\n ORDER BY user_id, email, order_id\" );\n\n\n $siteIni = eZINI::instance();\n $anonymousUserID = $siteIni->variable( 'UserSettings', 'AnonymousUserID' );\n\n $currentUserID = 0;\n $currentOrderID = 0;\n $currentUserEmail = \"\";\n $customArray = array();\n $accountName = null;\n $account_information = null;\n $itemCount = 0;\n $hash = 0;\n $currencyCode = '';\n $ordersInfo = array();\n\n foreach( $productItemArray as $productItem )\n {\n $itemCount++;\n $currencyCode = $productItem['currency_code'];\n if ( $currencyCode == '' )\n {\n $currencyCode = eZOrder::fetchLocaleCurrencyCode();\n }\n\n $userID = $productItem['user_id'];\n $orderID = $productItem['order_id'];\n $order = eZOrder::fetch( $orderID );\n\n if ( $currentUserID != $userID && $itemCount != 1 )\n {\n $customArray[] = array( 'account_name' => $accountName,\n 'orders_info' => $ordersInfo,\n 'user_id' => $currentUserID,\n 'email' => urlencode( $currentUserEmail ),\n 'account_information' => $account_information);\n\n $ordersInfo = array();\n $accountName = $order->attribute( 'account_name' );\n $accountEmail = $order->attribute( 'account_email' );\n $account_information = $order->accountInformation();\n }\n\n $currentUserID = $userID;\n\n // If the custom is anoymous user\n if ( $currentUserID == $anonymousUserID )\n {\n $accountEmail = $order->attribute( 'email' );\n if ( $currentUserEmail == \"\" )\n {\n $accountName = $order->attribute( 'account_name' );\n $currentUserEmail = $accountEmail;\n }\n\n if ( $currentUserEmail != $accountEmail )\n {\n $customArray[] = array( 'account_name' => $accountName,\n 'orders_info' => $ordersInfo,\n 'user_id' => $currentUserID,\n 'email' => urlencode( $currentUserEmail ),\n 'account_information' => $account_information);\n\n $ordersInfo = array();\n $accountName = $order->attribute( 'account_name' );\n $accountEmail = $order->attribute( 'account_email' );\n $currentUserEmail = $accountEmail;\n $account_information = $order->accountInformation();\n }\n $currentUserEmail = $accountEmail;\n }\n else\n {\n $currentUserEmail = 0;\n }\n\n $accountName = $order->attribute( 'account_name' );\n $account_information = $order->accountInformation();\n\n if ( !isset( $ordersInfo[$currencyCode] ) )\n {\n $ordersInfo[$currencyCode] = array( 'order_count' => 0,\n 'sum_ex_vat' => 0,\n 'sum_inc_vat' => 0 );\n }\n\n if ( $currentOrderID != $orderID )\n {\n $ordersInfo[$currencyCode]['order_count']++;\n }\n $currentOrderID = $orderID;\n\n if ( $productItem['ignore_vat'] == true )\n {\n $vatValue = 0;\n }\n else\n {\n $vatValue = $productItem['vat_value'];\n }\n\n $price = $productItem['price'];\n\n if ( $productItem['is_vat_inc'] )\n {\n $priceExVAT = $price / ( 100 + $vatValue ) * 100;\n $priceIncVAT = $price;\n }\n else\n {\n $priceExVAT = $price;\n $priceIncVAT = $price * ( 100 + $vatValue ) / 100;\n }\n\n $count = $productItem['item_count'];\n $realPricePercent = ( 100 - $productItem['discount'] ) / 100;\n $ordersInfo[$currencyCode]['sum_ex_vat'] += round( $count * $priceExVAT * $realPricePercent, 2 );\n $ordersInfo[$currencyCode]['sum_inc_vat'] += round( $count * $priceIncVAT * $realPricePercent, 2 );\n }\n\n if ( count( $productItemArray ) != 0 )\n $customArray[] = array( 'account_name' => $accountName,\n 'orders_info' => $ordersInfo,\n 'user_id' => $currentUserID,\n 'email' => urlencode( $currentUserEmail ),\n 'account_information' => $account_information);\n return $customArray;\n }", "function getOrderings() ;", "function listInOrder()\n {\n global $BD3;\n global $BD1;\n global $ANO_REF;\n $res_sql=\"select $BD3.final.id,\n $BD3.final.matr,\n $BD1.empregados.nome,\n $BD3.final.cargo,\n $BD3.final.agrup\n from $BD3.final,$BD1.empregados\n where $BD1.empregados.matr=$BD3.final.matr\n AND $BD3.final.ano='$ANO_REF'\n order by $BD1.empregados.nome;\";\n return sql(\"$BD3\",$res_sql);\n }", "private function walletAccounts()\n {\n return Auth::user()->walletAccounts();\n }", "private function walletAccounts()\n {\n return Auth::user()->walletAccounts();\n }", "public static function getOrder(): int;", "public function getAccounts()\n\t{\n\t\treturn $this->send($this->getHttp()->get($this->url.'accounts'));\n\t}", "public function getOrderUsers() {\n // Load the list items.\n $db = $this->getDbo();\n $query = $db->getQuery(true);\n\n // Select the required fields from the table.\n $query->select('o.user_id as id, users.name as name');\n $query->from('#__sdi_order AS o');\n $query->innerJoin('#__sdi_user AS sdi_user ON sdi_user.id = o.user_id');\n $query->innerJoin('#__users AS users ON users.id = sdi_user.user_id');\n $query->order('users.name');\n $query->group('users.name');\n $query->group('o.user_id');\n\n\n try {\n $items = $this->_getList($query);\n } catch (RuntimeException $e) {\n $this->setError($e->getMessage());\n return false;\n }\n return $items;\n }", "function getOrder();", "public function getAccounts($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collAccountsPartial && !$this->isNew();\n if (null === $this->collAccounts || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collAccounts) {\n // return empty collection\n $this->initAccounts();\n } else {\n $collAccounts = AccountQuery::create(null, $criteria)\n ->filterByYear($this)\n ->find($con);\n if (null !== $criteria) {\n if (false !== $this->collAccountsPartial && count($collAccounts)) {\n $this->initAccounts(false);\n\n foreach ($collAccounts as $obj) {\n if (false == $this->collAccounts->contains($obj)) {\n $this->collAccounts->append($obj);\n }\n }\n\n $this->collAccountsPartial = true;\n }\n\n $collAccounts->getInternalIterator()->rewind();\n\n return $collAccounts;\n }\n\n if ($partial && $this->collAccounts) {\n foreach ($this->collAccounts as $obj) {\n if ($obj->isNew()) {\n $collAccounts[] = $obj;\n }\n }\n }\n\n $this->collAccounts = $collAccounts;\n $this->collAccountsPartial = false;\n }\n }\n\n return $this->collAccounts;\n }", "function allPartnersAscending() {\n\n\t\t\t\t\t/* Returns all partner companies in database in alphabetical order. */\n\n\t\t\t\t\treturn Partner::find('all', array('order'=>'name Asc'));\n\t\t\t\t}", "public function listaccounts($confs = 1){\n return $this->bitcoin->listaccounts($confs);\n }", "public function getBookmarkedUsers()\n {\n return Auth::user()->bookmarkedUsers()->simplePaginate(10);\n }", "function get_all_accounts() {\n\t\t$status = status();\n\t\t$command = \"\";\n\t\t\n\t\tif($status) {\n\t\t\tif($status === 2) {\n\t\t\t\t$command = \"SELECT username, first_name, last_name, admin FROM accounts;\";\n\t\t\t} else {\n\t\t\t\t$command = \"SELECT username, first_name, last_name FROM accounts;\";\n\t\t\t}\n\t\t} else {\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t$connection = new mysqli(IP, USER, PASSWORD, DATABASE);\n\t\tif ($connection->connect_errno)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t\t\n\t\t$results = $connection->query($command);\n\t\t$connection->close();\n\t\t\t\n\t\t$users = array();\n\t\t\t\n\t\tfor($i = 0; $i < $results->num_rows; $i++)\n\t\t{\n\t\t\t$results->data_seek($i);\n\t\t\t$users[$i] = $results->fetch_assoc();\n\t\t}\n\t\treturn $users;\n\t}", "public function getAccount();", "public static function list () {\n // Retrieve account resources.\n $accounts = Json::get('account', null);\n\n // If account resource is not avaiable, internal server error.\n if ($accounts == 1)\n return 1;\n\n // Return accounts.\n return $accounts;\n }", "public function getOrderings();", "public function getInstagramAccounts() {\n $current_uid = isset($_GET['team']) ? $_GET['muid'] : \\Drupal::currentUser()->id();\n $facebookHelper = new FacebookHelperFunction();\n $properties = ['token_access', 'id', 'status'];\n $network_properties = $this->getKabbodeNetworkStatusProperty(168, $current_uid, $properties);\n $access_token = $network_properties['token_access'];\n $insta_accounts = $facebookHelper->getAllInstagramAccounts($access_token);\n return $insta_accounts;\n }", "public function getAccounts()\n\t{\n\t\treturn $this->send($this->getHttp()->get(static::URL.'accounts'));\n\t}", "public function listAccountIds() //*\n\t{\n\t$this->errorLogging->logInfo(__CLASS__, __METHOD__, \"Called.\");\n\t\n\t$userGroup = $_SESSION[\"usergroup\"];\n\n\t$select_array = array(\n\t\"table\" => 'accounts', \n\t\"where\" => 'WHERE', \n\t\"columns\" => array(\n\t\"account_pk\",\n\t\"account_name\",),\n\t\"returns\" => array(\n\t\"accountPK\",\n\t\"accountName\"),\n\t\"conditions\" => array(\n\t\tarray(\n\t\t\"column\" => \"user_group\",\n\t\t\"operator\" => \"=\",\n\t\t\"value\" => \"$userGroup\",\n\t\t\"concat\" => \"\")\n\t),\n\t\"endingQuery\" => \"\"\n\t);\n\t\n\t$returnedArray = $this->dbConnection->ConstructSelect($select_array); //errors handled by dbase class\n\t$this->responseClass->apiResponse($returnedArray);\n\treturn true;\n\t}", "function getAllPlayersOrderBy($field){\n\t$query = \"SELECT * FROM aquigaza_fsutt_local.players ORDER by \".$field;\n $resource = runQuery($query);\n\treturn ozRunQuery($resource);\n}", "public function getAccountnumbers()\n {\n return $this->hasMany(AccountNumber::className(), ['company_id' => 'id']);\n }", "private static function parseAccounts($arr)\n\t{\n\t\t$results = array();\n\t\tif (count($arr) > 0) {\n\t\t\tif (array_key_exists('account', $arr)) {\n\t\t\t\t$accounts = $arr['account'];\n\t\t\t\tforeach ($accounts as $account) {\n\t\t\t\t\t$attr = $account->attributes();\n\t\t\t\t\tif (array_key_exists('account', $account)) {\n\t\t\t\t\t\t$results = array_merge(\n\t\t\t\t\t\t\t$results, self::parseAccounts((array)$account)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t$code = (string)$attr['code'];\n\t\t\t\t\t$name = (string)$attr['name'];\n//\t\t\t\t\tif ($code >= '4000') {\n\t\t\t\t\t\t$results[] = $code;\n//\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$results = array_unique($results);\n\t\t\t\tsort($results);\n\t\t\t}\n\t\t}\n\t\treturn $results;\n\t}", "function getAllUsersOrders(){\n\n}", "public function getTabOrder() {}", "public static function GetUserAccounts(){\n\t\t$userAccounts = array();\n\t\tif(file_exists(ConfigSettings::userAccounts)){\n\t\t\t$userAccounts = require ConfigSettings::userAccounts;\n\t\t} else {\n\t\t\t$account = new UserAccount('admin','password');\n\t\t\t$account->AddUserToArray($userAccounts);\n\t\t\t$content = '<?php' . PHP_EOL . 'return ' . var_export($userAccounts, true) . ';';\n\t\t\tfile_put_contents(ConfigSettings::userAccounts, $content );\n\t\t\tarray_push($userAccounts, $account);\n\t\t}\n\t\treturn $userAccounts;\n\t}", "Public Function getAllAccounts()\n\t{\n\t\t$Output = array();\n\t\tforeach($this->GetAllAccountsAdwords() as $Adwords)\n\t\t\t$Output[] = $Adwords;\n\t\tforeach($this->GetAllAccountsYahoo() as $Yahoo)\n\t\t\t$Output[] = $Yahoo;\n\t\tforeach($this->GetAllAccountsMSN() as $MSN)\n\t\t\t$Output[] = $MSN;\n\t\t\t\n\t\treturn $Output;\n\t}", "public function generateOrder();", "public function getSortOrder();", "public function getSortOrder();", "public function getSortOrder();", "function getUsersByRank()\n\t{\n\t $resource = $this->DB->database_select('users', '*', array(), 0, array('value' => 'points', 'option' => 'desc'));\n\t return $resource;\n\t}", "public function getOriginatingAccount(): iterable\n {\n return $this->originatingAccount;\n }", "public function getPositions() {\n\t\tif (class_exists(\"PositionTenure\") && class_exists(\"Position\"))\n\t\t\treturn PositionQuery::create()\n\t\t\t\t\t\t\t\t\t\t\t->joinPositionTenure()\n\t\t\t\t\t\t\t\t\t\t\t->where('PositionTenure', 'PositionTenure.PositionCode = ?', 'Position.Code')\n\t\t\t\t\t\t\t\t\t\t\t->filterByObjecttype('User', Criteria::EQUAL)\n\t\t\t\t\t\t\t\t\t\t\t->filterByObjectid($this->getId(), Criteria::EQUAL)\n\t\t\t\t\t\t\t\t\t\t\t->find();\n\t\telse\n\t\t\treturn;\n\t}", "public function getOrder(): array;", "public function order(): int;", "public function accounts()\n {\n return $this->get('ach/relationships');\n }", "function allApprenticesAscending() {\n\n\t\t\t\t\treturn Apprentice::find('all', array('order'=>'name Asc'));\n\t\t\t\t}", "public function getOrderings() {}", "function fetchEntrantsForCompletionInfo($condition = \"\",$order = \"user_id\")\n\t{\n\t\t$arrlist = array();\n\t\t$i = 0;\n\t\t\n\t\t$sQuery = \"SELECT u.user_id,u.client_id,u.user_username,u.user_firstname,u.user_lastname,u.user_email FROM \".DB_PREFIX.\"user u,\".DB_PREFIX.\"entry e WHERE 1 = 1 AND u.user_id=e.user_id \" . $condition . \" ORDER BY \".$order;\n\t\t$rs = $this->runquery($sQuery);\n\n\t\treturn $rs;\n\t}", "function getOrder()\n {\n return 3;\n }", "function getOrder()\n {\n return 20;\n }", "function getOrder()\n {\n return 20;\n }", "public function get_accounts() {\n\t\t$url = $this->api_end_point . 'accounts';\n\t\t$res = $this->make_request( $url );\n\n\t\treturn empty( $res ) ? false : $res;\n\t}", "public function findAccount()\r\n {\r\n // get current user id\r\n $loginUser = $_SESSION[\"loginUser\"];\r\n $userId = $loginUser->getId();\r\n \r\n // search accounts from database\r\n $accountList = $this->accountHandler->findAccount($userId);\r\n \r\n require_once ('view/UserHome.php');\r\n }", "public function getSortOrder(): int;", "public function getSortableUsers($sort = 'name', $direction = 'asc');", "public function run()\n {\n Account::insert([\n // root => 1\n [\n 'id_position' => 1,\n 'username' => 'root',\n 'password' => bcrypt(''),\n 'parent_id' => 0,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n \n // admin => 2\n [\n 'id_position' => 2,\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'parent_id' => 1,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n\n // article staff\n [\n 'id_position' => 3,\n 'username' => 'article_staff_01',\n 'password' => bcrypt('123'),\n 'parent_id' => 2,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'id_position' => 3,\n 'username' => 'article_staff_01',\n 'password' => bcrypt('123'),\n 'parent_id' => 2,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n\n // sale staff\n [\n 'id_position' => 4,\n 'username' => 'sale_staff_01',\n 'password' => bcrypt('123'),\n 'parent_id' => 2,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'id_position' => 4,\n 'username' => 'sale_staff_02',\n 'password' => bcrypt('123'),\n 'parent_id' => 2,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]\n ]);\n }", "function get_entradas_contabilidad_list($offset, $per_page,$auth)\n\t{\n\t\tif($auth==0){\n\t\t\t$validacion=\"and prf.usuario_validador_id=0 and prf.validacion_contable=0 \";\n\t\t} else {\n\t\t\t$validacion=\" and prf.usuario_validador_id>0 and prf.validacion_contable=1 \";\n\t\t}\n\t\t// Create a temporary user object\n\t\t$u = new Entrada();\n\t\t$sql=\"select distinct(e.pr_facturas_id) as pr_facturas_id, prf.fecha, date(prf.fecha) as fecha, prf.fecha_pago, ( prf.monto_total) as importe_factura, pr.razon_social as proveedor,prf.folio_factura, prf.pr_pedido_id, ef.tag as espacio_fisico, eg.tag as estatus, m1.tag as marca, prf.validacion_contable, cel.tag as estatus_traspaso\n\t\tfrom entradas as e \".\n\t\t\"left join cproveedores as pr on pr.id=e.cproveedores_id left join pr_facturas as prf on prf.id=e.pr_facturas_id left join cmarcas_productos as m1 on m1.id=prf.cmarca_id left join espacios_fisicos as ef on ef.id=prf.espacios_fisicos_id left join estatus_general as eg on eg.id=e.estatus_general_id \".\n\t\t\"left join lotes_pr_facturas as lf on lf.pr_factura_id=prf.id \".\n\t\t\"left join cestatus_lotes as cel on cel.id=lf.cestatus_lote_id \".\n\t\t\"where prf.estatus_general_id=1 and ctipo_entrada=1 $validacion\n\t\tgroup by e.pr_facturas_id, prf.fecha, pr.razon_social, prf.folio_factura, prf.pr_pedido_id, ef.tag, eg.tag, e.pr_facturas_id, e.cproveedores_id, m1.tag, prf.fecha_pago, prf.monto_total, prf.validacion_contable,prf.descuento, cel.tag \".\n\t\t\"order by prf.fecha desc limit $per_page offset $offset\";\n\n\t\t//Buscar en la base de datos\n\t\t$u->query($sql);\n\t\tif($u->c_rows > 0){\n\t\t\treturn $u;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t}", "function issuu_api_folder_result_orders() {\n $result_orders = &drupal_static(__FUNCTION__);\n // Check if the array is not already initialized.\n if (!isset($result_orders)) {\n $result_orders = array(\n 'asc' => t('Ascending'),\n 'desc' => t('Descending'),\n );\n }\n return $result_orders;\n}", "public function findAll(GoogleAccount $account);", "function d4os_io_db_070_os_users_online_users_list_paged($page = 0, $limit = 5, $headers) {\n if (!isset($_GET['page'])) {\n $_GET['page'] = $page;\n }\n if (!isset($_GET['order'])) {\n $_GET['order'] = 'loginTime';\n }\n if (!isset($_GET['sort'])) {\n $_GET['sort'] = 'DESC';\n }\n /*\n * uuid\n * agentIP\n * agentPort\n * loginTime\n * logoutTime\n * currentRegion\n * currentRegionName\n * currentHandle\n * currentPos\n * currentLookAt\n */\n d4os_io_db_070_set_active('os_robust');\n $result = pager_query(\"SELECT * FROM {Presence} AS p\"\n . \" LEFT JOIN {UserAccounts} AS ua ON ua.PrincipalID=p.UserID\"\n . \" LEFT JOIN {Regions} AS r ON r.uuid=p.RegionID\"\n . \" LEFT JOIN {GridUser} AS gu ON gu.UserID=p.UserID\"\n . \" WHERE gu.Online = 'true'\"\n . \" AND gu.Login < (UNIX_TIMESTAMP(FROM_UNIXTIME(UNIX_TIMESTAMP(now()))))\"\n . \" AND gu.Logout < (UNIX_TIMESTAMP(FROM_UNIXTIME(UNIX_TIMESTAMP(now()))))\"\n . \" %s\", $limit, 0, NULL, array(tablesort_sql($headers)));\n while ($user = db_fetch_object($result)) {\n $items[] = $user;\n }\n d4os_io_db_070_set_active('default');\n return $items;\n}", "public function getInventoryItems(){\n $accounts = [];\n return $accounts;\n }", "public function getOrder() {\n return MaderaFixtures::ACCOUNTING_TVA;\n }", "protected function getAccountData()\n\t{\n\t\t$db = $this->getDatabase();\n\n\t\t$query = $db->getQuery(true);\n\n\t\t$query->select('*')\n\t\t\t\t->from('#__accountdata')\n\t\t\t\t->where('(w20_facebook <> \"\" OR w20_twitter <> \"\")')\n\t\t\t\t->where('typ = 0')\n\t\t\t\t// ->where('bid IN (2657)')\n\t\t\t\t->where('status = 0');\n\n\n\t\t$db->setQuery($query);\n\t\t$this->adata = $db->loadObjectList();\n\n\t\treturn $this->adata;\n\t}", "public function getSessionsOrdonnees() {\n return $this->sessions()->orderBy('num_ordre', 'asc')->get();\n }", "protected function fetchRecords(): array\n {\n // Ascending update date is the ONLY way we can be sure to get all payments.\n\n $order = 'UpdatedDateUTC';\n\n return $this->accountingApi->getAccounts(\n $this->ifModifiedSince,\n $this->where,\n $order\n )->accounts;\n }", "function fetchEntrantsForAdvanceInfo($condition = \"\",$order = \"user_id\")\n\t{\n\t\t$arrlist = array();\n\t\t$i = 0;\n\t\t\n\t\t$condition = explode(\"||##||\",$condition);\n\t\t\n\t\t$sQuery = \"SELECT u.user_id,u.client_id,u.user_username,u.user_firstname,u.user_lastname,u.user_email FROM \".DB_PREFIX.\"user u WHERE 1 = 1 AND u.user_id not in(select user_id from \".DB_PREFIX.\"entry e WHERE 1 \" . $condition[1] . \" ) \" . $condition[0] . \" ORDER BY \".$order;\n\t\t$rs = $this->runquery($sQuery);\n\t\t\n\t\treturn $rs;\n\t}", "public function user_index_account()\n {\n $detailkpr = Detailkpr::paginate(20);\n return view('admin.account.user.index', [\n 'accounts' => $detailkpr\n // 'pangkats' => Pangkat::get()\n ]);\n }", "public function accounts()\n {\n return $this->hasMany(Account::class, 'account_id');\n }", "function getOrderByUser($userID)\n {\n return $this->data->getOrdersByUser($userID);\n }", "public function findAllActiveOrderedByName() {\r\n\t\t$query = $this->createQueryBuilder('a')\r\n\t\t\t->where('a.isActive = :active')\r\n\t\t\t->orderBy('a.firstname', 'ASC')\r\n\t\t\t->orderBy('a.lastname', 'ASC')\r\n\t\t\t->setParameter('active', true)\r\n\t\t\t->getQuery();\r\n\t\t\r\n\t\treturn $query->getResult();\r\n\t}", "function getAccountManagerList()\n {\n $stmt = \"SELECT\n cam_id,\n cam_prj_id,\n cam_customer_id,\n cam_type,\n usr_full_name\n FROM\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"customer_account_manager,\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"user\n WHERE\n cam_usr_id=usr_id\";\n $res = DB_Helper::getInstance()->getAll($stmt, DB_FETCHMODE_ASSOC);\n if (PEAR::isError($res)) {\n\t /** @var $res PEAR_Error */\n Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);\n return \"\";\n } else {\n for ($i = 0; $i < count($res); $i++) {\n $res[$i]['customer_title'] = self::getTitle($res[$i]['cam_prj_id'], $res[$i]['cam_customer_id']);\n }\n return $res;\n }\n }", "final public function getListActiveUser(): object\n {\n return $this->repo->getActiveUsersOrderByDesc();\n }", "public function accounts()\n {\n return $this->belongsToMany(Account::class);\n }", "public function getFinanceAccountRequests($aConds = array(),$sSort = 'last_check_out ASC', $iPage = '', $sLimit = '', $bCount = true)\n {\n $p_table = Engine_Api::_()->getDbTable('paymentAccounts', 'mp3music');\n $p_name = $p_table->info('name');\n $iCnt = ($bCount ? 0 : 1);\n $items = array();\n //$con = array();\n if ($bCount ){\n $select = $p_table->select()\n ->from(\"$p_name as ni\")\n ->joinLeft(\"engine4_users\",\"engine4_users.user_id = ni.user_id\",'')\n ->joinLeft('engine4_mp3music_payment_requests','engine4_mp3music_payment_requests.request_payment_acount_id = ni.paymentaccount_id','') \n ->where($aConds); \n $iCnt = count($p_table->fetchAll($select)->toArray());\n\n }\n if ($iCnt){\n $select = $p_table->select()->setIntegrityCheck(false)\n ->from(\"$p_name as ni\",'ni.*')\n ->joinLeft(\"engine4_users\",\"engine4_users.user_id = ni.user_id\",'engine4_users.username')\n ->joinLeft('engine4_mp3music_payment_requests', 'engine4_mp3music_payment_requests.request_payment_acount_id = ni.paymentaccount_id','engine4_mp3music_payment_requests.*')\n ->where($aConds)\n ->order($sSort) ; \n $items = $p_table->fetchAll($select)->toArray();\n }\n if (!$bCount)\n {\n return $items;\n }\n return array($iCnt, $items);\n }" ]
[ "0.61701393", "0.5898968", "0.5844862", "0.57869124", "0.5745591", "0.5713065", "0.56691056", "0.5657736", "0.5657662", "0.5632259", "0.561801", "0.55344164", "0.54164755", "0.5407869", "0.53913414", "0.536682", "0.536682", "0.536682", "0.536682", "0.536682", "0.536682", "0.5357178", "0.53571427", "0.532823", "0.530261", "0.5291401", "0.52831495", "0.52775013", "0.527416", "0.5270458", "0.52565336", "0.5236842", "0.5223443", "0.52153945", "0.51928353", "0.51897955", "0.51654685", "0.5161771", "0.5153196", "0.5153196", "0.5145711", "0.51381767", "0.5123232", "0.5122681", "0.51220894", "0.5117113", "0.5093875", "0.50920355", "0.5064301", "0.50535595", "0.5016193", "0.5010883", "0.49942803", "0.49911803", "0.49789172", "0.49733973", "0.49687168", "0.49669522", "0.4962928", "0.49566785", "0.49520627", "0.4951132", "0.49472678", "0.49447238", "0.49447238", "0.49447238", "0.4939498", "0.49333605", "0.49302378", "0.49257982", "0.49253362", "0.4913076", "0.4911478", "0.49080503", "0.49076873", "0.49075672", "0.4903625", "0.4903625", "0.4894139", "0.48884776", "0.48841685", "0.48742202", "0.48698908", "0.4869832", "0.48553798", "0.48515216", "0.48514456", "0.48477986", "0.4839453", "0.4827341", "0.48216295", "0.48205614", "0.481021", "0.47949123", "0.47900558", "0.47830576", "0.47796062", "0.4777206", "0.4772071", "0.47668156", "0.47667935" ]
0.0
-1
........................ topics ..!!.. topics ..!!.. topics ..!!.. topics ..!!..
public function saveTopic($data, $id = null){ if (!isset($data['name']) || !isset($data['alias'])){ return false; } $id = (int)$id; $name = $this->db->escape($data['name']); $alias = $this->db->escape($data['alias']); $is_published = isset($data['is_published']) ? 1 : 0; if (!$id){ $sql = "insert into topics set name = '{$name}', alias = '{$alias}'"; } else { $sql = "update topics set name = '{$name}', alias = '{$alias}' where id = {$id}"; } return $this->db->query($sql); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTopic() {}", "public function getTopics()\n {\n return [\n 'topicName' => 1\n ];\n }", "public function getTopic();", "public function getTopic();", "function ftopics()\n{\n global $db;\n\n $qry = db(\"SELECT s1.*,s2.kattopic,s2.id AS subid FROM \" . $db['f_threads'] . \" s1, \" . $db['f_skats'] . \" s2, \" . $db['f_kats'] . \" s3\n WHERE s1.kid = s2.id AND s2.sid = s3.id ORDER BY s1.lp DESC LIMIT 100\");\n\n $f = 0;\n $ftopics = '';\n if (_rows($qry)) {\n while ($get = _fetch($qry)) {\n if ($f == config('m_ftopics')) break;\n if (fintern($get['kid'])) {\n $lp = cnt($db['f_posts'], \" WHERE `sid` = '\" . $get['id'] . \"'\");\n $pagenr = ceil($lp / config('m_fposts'));\n\n if ($pagenr == 0) $page = 1;\n else $page = $pagenr;\n\n $info = config('allowhover') == 1 ? 'onmouseover=\"DZCP.showInfo(\\'' . jsconvert(re($get['topic'])) . '\\', \\'' . _forum_kat . ';' . _forum_posts . ';' . _forum_lpost . '\\', \\'' .\n re($get['kattopic']) . ';' . ++$lp . ';' . date(\"d.m.Y H:i\", $get['lp']) . _uhr . '\\')\" onmouseout=\"DZCP.hideInfo()\"' : '';\n $ftopics .= show(\"menu/forum_topics\", array(\"id\" => $get['id'],\n \"pagenr\" => $page,\n \"p\" => $lp,\n \"titel\" => cut(re($get['topic']), config('l_ftopics'), true, false),\n \"info\" => $info,\n \"kid\" => $get['kid']));\n $f++;\n }\n }\n }\n\n return empty($ftopics) ? '' : '<table class=\"navContent\" cellspacing=\"0\">' . $ftopics . '</table>';\n}", "function asForumTopics($data) {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n<tr class='__topic __tid{$data['tid']} <if test=\"!$data['_icon']['is_read']\">unread</if> expandable <if test=\"$data['approved'] != 1\"> moderated</if>' id='trow_{$data['tid']}' data-tid=\"{$data['tid']}\">\n\t<td class='col_f_icon short altrow'>\n\t\t{parse template=\"generateTopicIcon\" group=\"global_other\" params=\"$data['_icon'], $data['_unreadUrl']\"}\n\t</td>\n\t<td>\n\t\t<if test=\"archivedBadge:|:$this->registry->class_forums->fetchArchiveTopicType( $data ) == 'archived'\">\n\t\t\t<span class='ipsBadge ipsBadge_lightgrey'>{$this->lang->words['topic_is_archived']}</span>\n\t\t</if>\n\t\t<if test=\"hasPrefix:|:!empty($data['tags']['formatted']['prefix'])\">\n\t\t\t{$data['tags']['formatted']['prefix']}\n\t\t</if>\n\t\t<h4><a href='{parse url=\"showtopic={$data['tid']}<if test=\"isNewPostTR:|:$this->request['do']=='new_posts' OR $this->request['do']=='active'\">&amp;view=getnewpost<else /><if test=\"resultIsPostTR:|:$data['pid'] AND $data['pid'] != $data['topic_firstpost']\">&amp;view=findpost&amp;p={$data['pid']}</if></if>&amp;hl={$data['cleanSearchTerm']}\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}' title='{$this->lang->words['view_result']}'>{$data['_shortTitle']}</a></h4>\n\t\t<span class='desc blend_links'>\n\t\t\t<foreach loop=\"topicsForumTrail:$data['_forum_trail'] as $i => $f\">\n\t\t\t<if test=\"notLastFtAsForum:|:$i+1 == count( $data['_forum_trail'] )\"><span class='desc lighter'>{$this->lang->words['search_aft_in']}</span> <a href='{parse url=\"{$f[1]}\" template=\"showforum\" seotitle=\"{$f[2]}\" base=\"public\"}'>{$f[0]}</a></if>\n\t\t\t</foreach>\n\t\t</span>\n\t\t<span class='desc lighter blend_links toggle_notify_off'>\n\t\t\t<br />{$this->lang->words['aft_started_by']} {$data['starter']}, {parse date=\"$data['start_date']\" format=\"DATE\"}\n\t\t\t<if test=\"hasTags:|:count($data['tags']['formatted'])\">\n\t\t\t\t&nbsp;<img src='{$this->settings['img_url']}/icon_tag.png' /> {$data['tags']['formatted']['truncatedWithLinks']}\n\t\t\t</if>\n\t\t</span>\n\t\t<if test=\"multipages:|:isset( $data['pages'] ) AND is_array( $data['pages'] ) AND count( $data['pages'] )\">\n\t\t\t<ul class='mini_pagination toggle_notify_off'>\n\t\t\t<foreach loop=\"pages:$data['pages'] as $page\">\n\t\t\t\t\t<if test=\"haslastpage:|:$page['last']\">\n\t\t\t\t\t\t<li><a href=\"{parse url=\"showtopic={$data['tid']}&amp;st={$page['st']}\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}\" title='{$this->lang->words['topic_goto_page']} {$page['page']}'>{$page['page']} {$this->lang->words['_rarr']}</a></li>\n\t\t\t\t\t<else />\n\t\t\t\t\t\t<li><a href=\"{parse url=\"showtopic={$data['tid']}&amp;st={$page['st']}\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}\" title='{$this->lang->words['topic_goto_page']} {$page['page']}'>{$page['page']}</a></li>\n\t\t\t\t\t</if>\n\t\t\t</foreach>\n\t\t\t</ul>\n\t\t</if>\n\t\t<if test=\"bothSearchUnderTitle:|:IPSSearchRegistry::get('set.searchResultType') == 'both'\">\n\t\t\t<span class='desc lighter blend_links toggle_notify_off'>\n\t\t\t\t<br />{$this->lang->words['n_last_post_by']} {$data['last_poster']},\n\t\t\t\t<a href='{parse url=\"showtopic={$data['tid']}&amp;view=getlastpost\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}' title='{$this->lang->words['goto_last_post']}'>{parse date=\"$data['_last_post']\" format=\"DATE\"}</a>\n\t\t\t</span>\n\t\t</if>\n\t\t<if test=\"isFollowedStuff:|:count($data['_followData'])\">\n\t\t\t{parse template=\"followData\" group=\"search\" params=\"$data['_followData']\"}\n\t\t</if>\n\t</td>\n\t<td class='col_f_preview __topic_preview'>\n\t\t<a href='#' class='expander closed' title='{$this->lang->words['view_topic_preview']}'>&nbsp;</a>\n\t</td>\n\t<td class='col_f_views'>\n\t\t<ul>\n\t\t\t<li>{parse format_number=\"$data['posts']\"} <if test=\"replylang:|:intval($data['posts']) == 1\">{$this->lang->words['reply']}<else />{$this->lang->words['replies']}</if></li>\n\t\t\t<li class='views desc'>{parse format_number=\"$data['views']\"} {$this->lang->words['views']}</li>\n\t\t</ul>\n\t</td>\n\t<td class='col_f_post'>\n\t\t{parse template=\"userSmallPhoto\" group=\"global\" params=\"$data\"}\n\t\t<ul class='last_post ipsType_small'>\n\t\t\t<if test=\"bothSearch:|:IPSSearchRegistry::get('set.searchResultType') == 'both'\">\n\t\t\t\t<li>{parse template=\"userHoverCard\" group=\"global\" params=\"$data\"}</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href='{parse url=\"showtopic={$data['tid']}&amp;view=getlastpost\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}' title='{$this->lang->words['goto_last_post']}'>{$this->lang->words['n_posted']} {parse date=\"$data['_post_date']\" format=\"DATE\"}</a>\n\t\t\t\t</li>\n\t\t\t<else />\n\t\t\t\t<li>{$data['last_poster']}</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href='{parse url=\"showtopic={$data['tid']}&amp;view=getlastpost\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}' title='{$this->lang->words['goto_last_post']}'>{parse date=\"$data['_last_post']\" format=\"DATE\"}</a>\n\t\t\t\t</li>\n\t\t\t</if>\n\t\t</ul>\n\t</td>\n\t<if test=\"isFollowedStuff:|:count($data['_followData'])\">\n\t\t<td class='col_f_mod'>\n\t\t\t<input class='input_check checkall toggle_notify_on' type=\"checkbox\" name=\"likes[]\" value=\"{$data['_followData']['like_app']}-{$data['_followData']['like_area']}-{$data['_followData']['like_rel_id']}\" />\n\t\t</td>\n\t<else />\n\t\t<if test=\"isAdmin:|:$this->memberData['g_is_supmod']\">\n\t\t\t<td class='col_f_mod'>\n\t\t\t\t<if test=\"isArchivedCb:|:$this->request['search_app_filters']['forums']['liveOrArchive'] == 'archive'\">\n\t\t\t\t\t&nbsp;\n\t\t\t\t<else />\n\t\t\t\t\t<input type='checkbox' class='input_check topic_mod' id='tmod_{$data['tid']}' />\n\t\t\t\t</if>\n\t\t\t</td>\n\t\t</if>\n\t</if>\n</tr>\n<if test=\"$data['pid']\">\n<script type='text/javascript'>\nipb.global.searchResults[ {$data['tid']} ] = { pid: {parse expression=\"intval($data['pid'])\"}, searchterm:\"{$data['cleanSearchTerm']}\" };\n</script>\n</if>\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}", "public function topics(){\n// $online_frends = $this->getFrendsOnline();\n $topics = DB::table('topics')->where('deleted', false)->orderBy('updated_at', 'desc')->get();\n return view('topics', ['topics' => $topics]);\n }", "function ftopics() {\n global $sql;\n \n $qry = $sql->select(\"SELECT s1.*,s2.`kattopic`,s2.`id` as `subid` \"\n . \"FROM `{prefix_forumthreads}` as `s1`, `{prefix_forumsubkats}` as `s2`, {prefix_forumkats} as `s3` \"\n . \"WHERE s1.`kid` = s2.`id` AND s2.`sid` = s3.`id` ORDER BY s1.`lp` DESC LIMIT 100;\");\n\n $f = 0; $ftopics = '';\n if($sql->rowCount()) {\n foreach($qry as $get) {\n if($f == settings::get('m_ftopics')) { break; }\n if(fintern($get['kid'])) {\n $lp = cnt(\"{prefix_forumposts}\", \" WHERE `sid` = ?\",\"id\",array($get['id']));\n $pagenr = ceil($lp/settings::get('m_fposts'));\n $page = !$pagenr ? 1 : $pagenr;\n $info = !settings::get('allowhover') == 1 ? '' : 'onmouseover=\"DZCP.showInfo(\\''.jsconvert(stringParser::decode($get['topic'])).'\\', \\''.\n _forum_kat.';'._forum_posts.';'._forum_lpost.'\\', \\''.stringParser::decode($get['kattopic']).';'.++$lp.';'.\n date(\"d.m.Y H:i\", $get['lp'])._uhr.'\\')\" onmouseout=\"DZCP.hideInfo()\"';\n \n $ftopics .= show(\"menu/forum_topics\", array(\"id\" => $get['id'],\n \"pagenr\" => $page,\n \"p\" => $lp,\n \"titel\" => cut(stringParser::decode($get['topic']),settings::get('l_ftopics')),\n \"info\" => $info,\n \"kid\" => $get['kid']));\n $f++;\n }\n }\n }\n\n return empty($ftopics) ? '<center style=\"margin:2px 0\">'._no_entrys.'</center>' : '<table class=\"navContent\" cellspacing=\"0\">'.$ftopics.'</table>';\n}", "function _fix_links_callback_topic($m)\n\t{\n\t\treturn 'index.php?page=topicview&id='.strval(import_id_remap_get('topic',strval($m[2]),true));\n\t}", "public function allTopics(){\r\n\r\n $manTopic = new SujetManager();\r\n $topics = $manTopic->findAll();\r\n //Session::addValueTo('ok', 'ok');\r\n \r\n return [\r\n \"view\" => \"forum/listTopics.php\", \r\n \"data\" => [\r\n \"topics\" => $topics\r\n ],\r\n \"titrePage\" => \"FORUM | Sujets\"\r\n ];\r\n }", "public function rss_topic()\n\t{\n\t\tif (!$this->id)\n\t\t{\n\t\t\tDisplay::message('not_allowed');\n\t\t}\n\n\t\t// Liste des messages\n\t\t$sql = 'SELECT p.p_id, p.p_text, p.p_time, p.u_id, p.p_nickname, p.p_map, t.t_title, t.t_description, t.f_id, t.t_id, u.u_activate_email, u.u_email, u.u_auth\n\t\t\t\tFROM ' . SQL_PREFIX . 'posts p\n\t\t\t\tINNER JOIN ' . SQL_PREFIX . 'topics t\n\t\t\t\t\tON p.t_id = t.t_id\n\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'users u\n\t\t\t\t\tON u.u_id = p.u_id\n\t\t\t\tWHERE t.t_id = ' . $this->id . '\n\t\t\t\t\tAND p.p_approve = 0\n\t\t\t\tORDER BY p.p_time DESC';\n\t\t$result = Fsb::$db->query($sql);\n\t\tif ($row = Fsb::$db->row($result))\n\t\t{\n\t\t\tif (!Fsb::$session->is_authorized($row['f_id'], 'ga_read') || !Fsb::$session->is_authorized($row['f_id'], 'ga_view') || !Fsb::$session->is_authorized($row['f_id'], 'ga_view_topics'))\n\t\t\t{\n\t\t\t\tDisplay::message('not_allowed');\n\t\t\t}\n\n\t\t\t$parser = new Parser();\n\t\t\t$parser->parse_html = (Fsb::$cfg->get('activate_html') && $row['u_auth'] >= MODOSUP) ? true : false;\n\n\t\t\t$this->rss->open(\n\t\t\t\tParser::title($row['t_title']),\n\t\t\t\thtmlspecialchars(($row['t_description']) ? $row['t_description'] : $parser->mapped_message($row['p_text'], $row['p_map'])),\n\t\t\t\tFsb::$session->data['u_language'],\n\t\t\t\tsid(Fsb::$cfg->get('fsb_path') . '/index.' . PHPEXT . '?p=rss&amp;mode=topic&amp;id=' . $this->id),\n\t\t\t\t$row['p_time']\n\t\t\t);\n\n\t\t\tdo\n\t\t\t{\n\t\t\t\t// Informations passees au parseur de message\n\t\t\t\t$parser_info = array(\n\t\t\t\t\t'u_id' =>\t\t\t$row['u_id'],\n\t\t\t\t\t'p_nickname' =>\t\t$row['p_nickname'],\n\t\t\t\t\t'u_auth' =>\t\t\t$row['u_auth'],\n\t\t\t\t\t'f_id' =>\t\t\t$row['f_id'],\n\t\t\t\t\t't_id' =>\t\t\t$row['t_id'],\n\t\t\t\t);\n\t\t\t\t$parser->parse_html = (Fsb::$cfg->get('activate_html') && $row['u_auth'] >= MODOSUP) ? true : false;\n\n\t\t\t\t$this->rss->add_entry(\n\t\t\t\t\tParser::title($row['t_title']),\n\t\t\t\t\thtmlspecialchars($parser->mapped_message($row['p_text'], $row['p_map'], $parser_info)),\n\t\t\t\t\t(($row['u_activate_email'] & 2) ? 'mailto:' . $row['u_email'] : Fsb::$cfg->get('forum_mail')) . ' ' . htmlspecialchars($row['p_nickname']),\n\t\t\t\t\tsid(Fsb::$cfg->get('fsb_path') . '/index.' . PHPEXT . '?p=topic&p_id=' . $row['p_id'] . '#p' . $row['p_id']),\n\t\t\t\t\t$row['p_time']\n\t\t\t\t);\n\t\t\t}\n\t\t\twhile ($row = Fsb::$db->row($result));\n\t\t}\n\t\t// Aucun message, on pioche donc directement les informations dans le sujet\n\t\telse \n\t\t{\n\t\t\t$sql = 'SELECT t_id, t_title, t_description, t_time\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'topics\n\t\t\t\t\tWHERE t_id = ' . $this->id;\n\t\t\t$row = Fsb::$db->request($sql);\n\t\t\t$this->rss->open(\n\t\t\t\tParser::title($row['t_title']),\n\t\t\t\thtmlspecialchars($row['t_description']),\n\t\t\t\tFsb::$session->data['u_language'],\n\t\t\t\tsid(Fsb::$cfg->get('fsb_path') . '/index.' . PHPEXT . '?p=rss&amp;mode=topic&amp;id=' . $this->id),\n\t\t\t\t$row['t_time']\n\t\t\t);\n\t\t}\n\t}", "function cns_get_private_topics($start = 0, $true_start = 0, $max = null, $sql_sup = '', $sql_sup_order_by = '', $member_id = null)\n{\n if (is_null($max)) {\n $max = intval(get_option('forum_topics_per_page'));\n }\n\n if (is_null($member_id)) {\n $member_id = get_member();\n } else {\n if ((!has_privilege(get_member(), 'view_other_pt')) && ($member_id != get_member())) {\n access_denied('PRIVILEGE', 'view_other_pt');\n }\n }\n\n // Find topics\n $where = '(t_pt_from=' . strval($member_id) . ' OR t_pt_to=' . strval($member_id) . ') AND t_forum_id IS NULL';\n $filter = get_param_string('category', '');\n $where .= ' AND (' . db_string_equal_to('t_pt_from_category', $filter) . ' AND t_pt_from=' . strval($member_id) . ' OR ' . db_string_equal_to('t_pt_to_category', $filter) . ' AND t_pt_to=' . strval($member_id) . ')';\n $query = 'FROM ' . $GLOBALS['FORUM_DB']->get_table_prefix() . 'f_topics t';\n if (!multi_lang_content()) {\n $query .= ' LEFT JOIN ' . $GLOBALS['FORUM_DB']->get_table_prefix() . 'f_posts p ON p.id=t.t_cache_first_post_id';\n }\n $query .= ' WHERE ' . $where;\n $max_rows = 0;\n $union = '';\n $select = 'SELECT t.*';\n if (multi_lang_content()) {\n $select .= ',t_cache_first_post AS p_post';\n } else {\n $select .= ',p_post,p_post__text_parsed,p_post__source_user';\n }\n if ($filter == do_lang('INVITED_TO_PTS')) {\n $or_list = '';\n $s_rows = $GLOBALS['FORUM_DB']->query_select('f_special_pt_access', array('s_topic_id'), array('s_member_id' => get_member()));\n foreach ($s_rows as $s_row) {\n if ($or_list != '') {\n $or_list .= ' OR ';\n }\n $or_list .= 't.id=' . strval($s_row['s_topic_id']);\n }\n if ($or_list != '') {\n $query2 = 'FROM ' . $GLOBALS['FORUM_DB']->get_table_prefix() . 'f_topics t';\n if (!multi_lang_content()) {\n $query2 .= ' LEFT JOIN ' . $GLOBALS['FORUM_DB']->get_table_prefix() . 'f_posts p ON p.id=t.t_cache_first_post_id';\n }\n $query2 .= ' WHERE ' . $or_list;\n $union = ' UNION ' . $select . ' ' . $query2;\n $max_rows += $GLOBALS['FORUM_DB']->query_value_if_there('SELECT COUNT(*) ' . $query2, false, true);\n }\n }\n $query_full = $select;\n $query_full .= ' ' . $query . $union . $sql_sup . $sql_sup_order_by;\n $topic_rows = $GLOBALS['FORUM_DB']->query($query_full, $max, $start, false, true);\n $max_rows += $GLOBALS['FORUM_DB']->query_value_if_there('SELECT COUNT(*) ' . $query);\n $topics = array();\n $hot_topic_definition = intval(get_option('hot_topic_definition'));\n foreach ($topic_rows as $topic_row) {\n $topic = array();\n $topic['id'] = $topic_row['id'];\n $topic['num_views'] = $topic_row['t_num_views'];\n $topic['num_posts'] = $topic_row['t_cache_num_posts'];\n $topic['first_time'] = $topic_row['t_cache_first_time'];\n $topic['first_title'] = $topic_row['t_cache_first_title'];\n if (is_null($topic_row['p_post'])) {\n $topic['first_post'] = new Tempcode();\n } else {\n $post_row = db_map_restrict($topic_row, array('id', 'p_post'), array('id' => 't_cache_first_post_id'));\n $topic['first_post'] = get_translated_tempcode('f_posts', $post_row, 'p_post', $GLOBALS['FORUM_DB']);\n }\n $topic['first_post']->singular_bind('ATTACHMENT_DOWNLOADS', make_string_tempcode('?'));\n $topic['first_username'] = $topic_row['t_cache_first_username'];\n $topic['first_member_id'] = $topic_row['t_cache_first_member_id'];\n $topic['last_post_id'] = $topic_row['t_cache_last_post_id'];\n $topic['last_time'] = $topic_row['t_cache_last_time'];\n $topic['last_time_string'] = is_null($topic_row['t_cache_last_time']) ? '' : get_timezoned_date($topic_row['t_cache_last_time']);\n $topic['last_title'] = $topic_row['t_cache_last_title'];\n $topic['last_username'] = $topic_row['t_cache_last_username'];\n $topic['last_member_id'] = $topic_row['t_cache_last_member_id'];\n $topic['emoticon'] = $topic_row['t_emoticon'];\n $topic['description'] = $topic_row['t_description'];\n $topic['pt_from'] = $topic_row['t_pt_from'];\n $topic['pt_to'] = $topic_row['t_pt_to'];\n\n // Modifiers\n $topic['modifiers'] = array();\n $has_read = cns_has_read_topic($topic['id'], $topic_row['t_cache_last_time'], $member_id);\n if (!$has_read) {\n $topic['modifiers'][] = 'unread';\n }\n if ($topic_row['t_pinned'] == 1) {\n $topic['modifiers'][] = 'pinned';\n }\n if ($topic_row['t_sunk'] == 1) {\n $topic['modifiers'][] = 'sunk';\n }\n if ($topic_row['t_is_open'] == 0) {\n $topic['modifiers'][] = 'closed';\n }\n if (!is_null($topic_row['t_poll_id'])) {\n $topic['modifiers'][] = 'poll';\n }\n $num_posts = $topic_row['t_cache_num_posts'];\n $start_time = $topic_row['t_cache_first_time'];\n $end_time = $topic_row['t_cache_last_time'];\n $days = floatval($end_time - $start_time) / 60.0 / 60.0 / 24.0;\n if ($days == 0.0) {\n $days = 1.0;\n }\n if (intval(round($num_posts / $days)) >= $hot_topic_definition) {\n $topic['modifiers'][] = 'hot';\n }\n\n $topics[] = $topic;\n }\n\n $out = array('topics' => $topics, 'max_rows' => $max_rows);\n\n if ((has_privilege($member_id, 'moderate_private_topic')) && (($member_id == get_member()) || (has_privilege($member_id, 'multi_delete_topics')))) {\n $out['may_move_topics'] = 1;\n $out['may_delete_topics'] = 1;\n $out['may_change_max'] = 1;\n }\n if (cns_may_make_private_topic()) {\n $out['may_post_topic'] = 1;\n }\n\n return $out;\n}", "function tep_show_topic($counter) {\r\n global $tree, $topics_string, $tPath_array;\r\n\r\n if(!$counter)\r\n return 0;\r\n\r\n for ($i=0; $i<$tree[$counter]['level']; $i++) {\r\n $topics_string .= \"&nbsp;&nbsp;\";\r\n }\r\n\r\n if(empty($topics_string)){\r\n $topics_string .='<div class=\"margin\">';\r\n }\r\n\t$tab = '<div class=\"margin\">';\r\n if (!empty($topics_string) && $topics_string != $tab)\r\n\t{\r\n\t $topics_string .='';\r\n\t}\r\n\r\n\r\n\r\n if ($tree[$counter]['parent'] == 0) {\r\n $tPath_new = 'tPath=' . $counter;\r\n } else {\r\n $tPath_new = 'tPath=' . $tree[$counter]['path'];\r\n }\r\n\r\n $topics_string .= '<div style=\"width:75\" class=\"lef_4\" style=\"text-decoration:none\"><strong>';\r\n\r\n if (isset($tPath_array) && in_array($counter, $tPath_array)) {\r\n $topics_string .= '';\r\n }\r\n\r\n// display topic name\r\n\r\n\r\n $topics_string .= $tree[$counter]['name'].'</div>';\r\n\r\n if (isset($tPath_array) && in_array($counter, $tPath_array)) {\r\n// $topics_string .= '</b>';\r\n }\r\n\r\n if (tep_has_topic_subtopics($counter)) {\r\n $topics_string .= ' -&gt;';\r\n }\r\n\r\n $topics_string .= '</strong><br><a href=\"'.tep_href_link(FILENAME_ARTICLES, $tPath_new).'\">'.preg_replace('/\\s\\S*$/i', '', substr($tree[$counter]['description'], 0, 60)).'</a>';\r\n\r\n if (SHOW_ARTICLE_COUNTS == 'true') {\r\n $articles_in_topic = tep_count_articles_in_topic($counter);\r\n if ($articles_in_topic > 0) {\r\n //$topics_string .= '&nbsp;(' . $articles_in_topic . ')';\r\n }\r\n }\r\n if ($tree[$counter]['next_id'] != false) {\r\n //tep_show_topic($tree[$counter]['next_id']);\r\n }\r\n }", "public function testChannelsSetTopic()\n {\n }", "function UnreadTopics()\n{\n\tglobal $board, $txt, $scripturl, $db_prefix, $sourcedir;\n\tglobal $ID_MEMBER, $user_info, $context, $modSettings;\n\n\t// Guests can't have unread things, we don't know anything about them.\n\tis_not_guest();\n\n\t$context['sub_template'] = $_REQUEST['action'] == 'unread' ? 'unread' : 'replies';\n\t$context['showing_all_topics'] = isset($_GET['all']);\n\tif ($_REQUEST['action'] == 'unread')\n\t\t$context['page_title'] = $context['showing_all_topics'] ? $txt['unread_topics_all'] : $txt['unread_topics_visit'];\n\telse\n\t\t$context['page_title'] = $txt['unread_replies'];\n\n\t$context['linktree'][] = array(\n\t\t'url' => $scripturl . '?action=' . $_REQUEST['action'] . ($context['showing_all_topics'] ? ';all' : ''),\n\t\t'name' => $context['page_title']\n\t);\n\n\tloadTemplate('Recent');\n\n\t$is_topics = $_REQUEST['action'] == 'unread';\n\n\t// Are we specifying any specific board?\n\tif (!empty($board))\n\t\t$query_this_board = 'b.ID_BOARD = ' . $board;\n\telse\n\t{\n\t\t$query_this_board = $user_info['query_see_board'];\n\n\t\t// Don't bother to show deleted posts!\n\t\tif (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0)\n\t\t\t$query_this_board .= '\n\t\t\t\tAND b.ID_BOARD != ' . $modSettings['recycle_board'];\n\t}\n\n\t// This part is the same for each query.\n\t$select_clause = '\n\t\t\t\tms.subject AS firstSubject, ms.posterTime AS firstPosterTime, ms.ID_TOPIC, t.ID_BOARD, b.name AS bname,\n\t\t\t\tt.numReplies, t.numViews, ms.ID_MEMBER AS ID_FIRST_MEMBER, ml.ID_MEMBER AS ID_LAST_MEMBER,\n\t\t\t\tml.posterTime AS lastPosterTime, IFNULL(mems.realName, ms.posterName) AS firstPosterName,\n\t\t\t\tIFNULL(meml.realName, ml.posterName) AS lastPosterName, ml.subject AS lastSubject,\n\t\t\t\tml.icon AS lastIcon, ms.icon AS firstIcon, t.ID_POLL, t.isSticky, t.locked, ml.modifiedTime AS lastModifiedTime,\n\t\t\t\tIFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) AS isRead, LEFT(ml.body, 384) AS lastBody, LEFT(ms.body, 384) AS firstBody,\n\t\t\t\tml.smileysEnabled AS lastSmileys, ms.smileysEnabled AS firstSmileys, t.ID_FIRST_MSG, t.ID_LAST_MSG';\n\n\tif ($context['showing_all_topics'] || !$is_topics)\n\t{\n\t\tif (!empty($board))\n\t\t{\n\t\t\t$request = db_query(\"\n\t\t\t\tSELECT MIN(logTime)\n\t\t\t\tFROM {$db_prefix}log_mark_read\n\t\t\t\tWHERE ID_MEMBER = $ID_MEMBER\n\t\t\t\t\tAND ID_BOARD = $board\", __FILE__, __LINE__);\n\t\t\tlist ($earliest_time) = mysql_fetch_row($request);\n\t\t\tmysql_free_result($request);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$request = db_query(\"\n\t\t\t\tSELECT MIN(lmr.logTime)\n\t\t\t\tFROM {$db_prefix}boards AS b\n\t\t\t\t\tLEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_MEMBER = $ID_MEMBER AND lmr.ID_BOARD = b.ID_BOARD)\n\t\t\t\tWHERE $user_info[query_see_board]\", __FILE__, __LINE__);\n\t\t\tlist ($earliest_time) = mysql_fetch_row($request);\n\t\t\tmysql_free_result($request);\n\t\t}\n\n\t\t$request = db_query(\"\n\t\t\tSELECT MIN(logTime)\n\t\t\tFROM {$db_prefix}log_topics\n\t\t\tWHERE ID_MEMBER = $ID_MEMBER\", __FILE__, __LINE__);\n\t\tlist ($earliest_time2) = mysql_fetch_row($request);\n\t\tmysql_free_result($request);\n\n\t\tif ($earliest_time2 < $earliest_time)\n\t\t\t$earliest_time = (int) $earliest_time2;\n\t\telse\n\t\t\t$earliest_time = (int) $earliest_time;\n\t}\n\n\tif ($is_topics)\n\t{\n\t\t$request = db_query(\"\n\t\t\tSELECT COUNT(DISTINCT t.ID_TOPIC), MIN(t.ID_LAST_MSG)\n\t\t\tFROM {$db_prefix}messages AS ml, {$db_prefix}topics AS t, {$db_prefix}boards AS b\n\t\t\t\tLEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER)\n\t\t\t\tLEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = t.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)\n\t\t\tWHERE b.ID_BOARD = t.ID_BOARD\n\t\t\t\tAND $query_this_board\" . ($context['showing_all_topics'] ? \"\n\t\t\t\tAND ml.posterTime >= $earliest_time\" : \"\n\t\t\t\tAND t.ID_LAST_MSG > $_SESSION[ID_MSG_LAST_VISIT]\") . \"\n\t\t\t\tAND ml.ID_MSG = t.ID_LAST_MSG\n\t\t\t\tAND IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) < ml.posterTime\", __FILE__, __LINE__);\n\t\tlist ($num_topics, $min_message) = mysql_fetch_row($request);\n\t\tmysql_free_result($request);\n\n\t\t// Make sure the starting place makes sense and construct the page index.\n\t\t$context['page_index'] = constructPageIndex($scripturl . '?action=' . $_REQUEST['action'] . ($context['showing_all_topics'] ? ';all' : ''), $_REQUEST['start'], $num_topics, $modSettings['defaultMaxTopics']);\n\t\t$context['current_page'] = (int) $_REQUEST['start'] / $modSettings['defaultMaxTopics'];\n\n\t\tif ($num_topics == 0)\n\t\t{\n\t\t\t$context['topics'] = array();\n\t\t\treturn;\n\t\t}\n\t\telse\n\t\t\t$min_message = (int) $min_message;\n\n\t\t$request = db_query(\"\n\t\t\tSELECT $select_clause\n\t\t\tFROM {$db_prefix}messages AS ms, {$db_prefix}messages AS ml, {$db_prefix}topics AS t, {$db_prefix}boards AS b\n\t\t\t\tLEFT JOIN {$db_prefix}members AS mems ON (mems.ID_MEMBER = ms.ID_MEMBER)\n\t\t\t\tLEFT JOIN {$db_prefix}members AS meml ON (meml.ID_MEMBER = ml.ID_MEMBER)\n\t\t\t\tLEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER)\n\t\t\t\tLEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = t.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)\n\t\t\tWHERE t.ID_TOPIC = ms.ID_TOPIC\n\t\t\t\tAND b.ID_BOARD = t.ID_BOARD\n\t\t\t\tAND $query_this_board\n\t\t\t\tAND ms.ID_MSG = t.ID_FIRST_MSG\n\t\t\t\tAND ml.ID_MSG = t.ID_LAST_MSG\n\t\t\t\tAND t.ID_LAST_MSG >= $min_message\n\t\t\t\tAND IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) < ml.posterTime\n\t\t\tORDER BY ml.ID_MSG DESC\n\t\t\tLIMIT $_REQUEST[start], $modSettings[defaultMaxTopics]\", __FILE__, __LINE__);\n\t}\n\telse\n\t{\n\t\t$request = db_query(\"\n\t\t\tSELECT COUNT(DISTINCT t.ID_TOPIC), MIN(t.ID_LAST_MSG)\n\t\t\tFROM {$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}messages AS ml, {$db_prefix}messages AS m\n\t\t\t\tLEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER)\n\t\t\t\tLEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = t.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)\n\t\t\tWHERE t.ID_MEMBER_UPDATED != $ID_MEMBER\n\t\t\t\tAND m.ID_TOPIC = t.ID_TOPIC\n\t\t\t\tAND m.ID_MEMBER = $ID_MEMBER\n\t\t\t\tAND ml.ID_MSG = t.ID_LAST_MSG\n\t\t\t\tAND b.ID_BOARD = t.ID_BOARD\n\t\t\t\tAND $query_this_board\n\t\t\t\tAND ml.posterTime >= $earliest_time\n\t\t\t\tAND IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) < ml.posterTime\", __FILE__, __LINE__);\n\t\tlist ($num_topics, $min_message) = mysql_fetch_row($request);\n\t\tmysql_free_result($request);\n\n\t\t// Make sure the starting place makes sense and construct the page index.\n\t\t$context['page_index'] = constructPageIndex($scripturl . '?action=' . $_REQUEST['action'], $_REQUEST['start'], $num_topics, $modSettings['defaultMaxTopics']);\n\t\t$context['current_page'] = (int) $_REQUEST['start'] / $modSettings['defaultMaxTopics'];\n\n\t\tif ($num_topics == 0)\n\t\t{\n\t\t\t$context['topics'] = array();\n\t\t\treturn;\n\t\t}\n\t\telse\n\t\t\t$min_message = (int) $min_message;\n\n\t\t$request = db_query(\"\n\t\t\tSELECT DISTINCT t.ID_TOPIC\n\t\t\tFROM {$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}messages AS ml, {$db_prefix}messages AS m\n\t\t\t\tLEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER)\n\t\t\t\tLEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = b.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)\n\t\t\tWHERE ml.ID_MEMBER != $ID_MEMBER\n\t\t\t\tAND m.ID_TOPIC = t.ID_TOPIC\n\t\t\t\tAND m.ID_MEMBER = $ID_MEMBER\n\t\t\t\tAND ml.ID_MSG = t.ID_LAST_MSG\n\t\t\t\tAND b.ID_BOARD = t.ID_BOARD\n\t\t\t\tAND $query_this_board\n\t\t\t\tAND t.ID_LAST_MSG >= $min_message\n\t\t\t\tAND IFNULL(lt.logTime, IFNULL(lmr.logTime, 0)) < ml.posterTime\n\t\t\tORDER BY ml.ID_MSG DESC\n\t\t\tLIMIT $_REQUEST[start], $modSettings[defaultMaxTopics]\", __FILE__, __LINE__);\n\t\t$topics = array();\n\t\twhile ($row = mysql_fetch_assoc($request))\n\t\t\t$topics[] = $row['ID_TOPIC'];\n\t\tmysql_free_result($request);\n\n\t\t// Sanity... where have you gone?\n\t\tif (empty($topics))\n\t\t{\n\t\t\t$context['topics'] = array();\n\t\t\treturn;\n\t\t}\n\n\t\t$request = db_query(\"\n\t\t\tSELECT $select_clause\n\t\t\tFROM {$db_prefix}messages AS ms, {$db_prefix}messages AS ml, {$db_prefix}topics AS t, {$db_prefix}boards AS b\n\t\t\t\tLEFT JOIN {$db_prefix}members AS mems ON (mems.ID_MEMBER = ms.ID_MEMBER)\n\t\t\t\tLEFT JOIN {$db_prefix}members AS meml ON (meml.ID_MEMBER = ml.ID_MEMBER)\n\t\t\t\tLEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER)\n\t\t\t\tLEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = t.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)\n\t\t\tWHERE t.ID_TOPIC IN (\" . implode(', ', $topics) . \")\n\t\t\t\tAND t.ID_TOPIC = ms.ID_TOPIC\n\t\t\t\tAND b.ID_BOARD = t.ID_BOARD\n\t\t\t\tAND ms.ID_MSG = t.ID_FIRST_MSG\n\t\t\t\tAND ml.ID_MSG = t.ID_LAST_MSG\n\t\t\tORDER BY ml.ID_MSG DESC\n\t\t\tLIMIT \" . count($topics), __FILE__, __LINE__);\n\t}\n\n\t$context['topics'] = array();\n\t$topic_ids = array();\n\twhile ($row = mysql_fetch_assoc($request))\n\t{\n\t\tif ($row['ID_POLL'] > 0 && $modSettings['pollMode'] == '0')\n\t\t\tcontinue;\n\n\t\t$topic_ids[] = $row['ID_TOPIC'];\n\n\t\t// Clip the strings first because censoring is slow :/. (for some reason?)\n\t\t$row['firstBody'] = strip_tags(strtr(doUBBC($row['firstBody'], $row['firstSmileys']), array('<br />' => '&#10;')));\n\t\tif (strlen($row['firstBody']) > 128)\n\t\t\t$row['firstBody'] = substr($row['firstBody'], 0, 128) . '...';\n\t\t$row['lastBody'] = strip_tags(strtr(doUBBC($row['lastBody'], $row['lastSmileys']), array('<br />' => '&#10;')));\n\t\tif (strlen($row['lastBody']) > 128)\n\t\t\t$row['lastBody'] = substr($row['lastBody'], 0, 128) . '...';\n\n\t\t// Do a bit of censoring...\n\t\tcensorText($row['firstSubject']);\n\t\tcensorText($row['firstBody']);\n\n\t\t// But don't do it twice, it can be a slow ordeal!\n\t\tif ($row['ID_FIRST_MSG'] == $row['ID_LAST_MSG'])\n\t\t{\n\t\t\t$row['lastSubject'] = $row['firstSubject'];\n\t\t\t$row['lastBody'] = $row['firstBody'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcensorText($row['lastSubject']);\n\t\t\tcensorText($row['lastBody']);\n\t\t}\n\n\t\t// Decide how many pages the topic should have.\n\t\t$topic_length = $row['numReplies'] + 1;\n\t\tif ($topic_length > $modSettings['defaultMaxMessages'])\n\t\t{\n\t\t\t$tmppages = array();\n\t\t\t$tmpa = 1;\n\t\t\tfor ($tmpb = 0; $tmpb < $topic_length; $tmpb += $modSettings['defaultMaxMessages'])\n\t\t\t{\n\t\t\t\t$tmppages[] = '<a href=\"' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.' . $tmpb . ';topicseen\">' . $tmpa . '</a>';\n\t\t\t\t$tmpa++;\n\t\t\t}\n\t\t\t// Show links to all the pages?\n\t\t\tif (count($tmppages) <= 5)\n\t\t\t\t$pages = '&#171; ' . implode(' ', $tmppages);\n\t\t\t// Or skip a few?\n\t\t\telse\n\t\t\t\t$pages = '&#171; ' . $tmppages[0] . ' ' . $tmppages[1] . ' ... ' . $tmppages[count($tmppages) - 2] . ' ' . $tmppages[count($tmppages) - 1];\n\n\t\t\tif (!empty($modSettings['enableAllMessages']) && $topic_length < $modSettings['enableAllMessages'])\n\t\t\t\t$pages .= ' &nbsp;<a href=\"' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0;all\">' . $txt[190] . '</a>';\n\t\t\t$pages .= ' &#187;';\n\t\t}\n\t\telse\n\t\t\t$pages = '';\n\n\t\t// And build the array.\n\t\t$context['topics'][$row['ID_TOPIC']] = array(\n\t\t\t'id' => $row['ID_TOPIC'],\n\t\t\t'first_post' => array(\n\t\t\t\t'member' => array(\n\t\t\t\t\t'name' => $row['firstPosterName'],\n\t\t\t\t\t'id' => $row['ID_FIRST_MEMBER'],\n\t\t\t\t\t'href' => $scripturl . '?action=profile;u=' . $row['ID_FIRST_MEMBER'],\n\t\t\t\t\t'link' => !empty($row['ID_FIRST_MEMBER']) ? '<a href=\"' . $scripturl . '?action=profile;u=' . $row['ID_FIRST_MEMBER'] . '\" title=\"' . $txt[92] . ' ' . $row['firstPosterName'] . '\">' . $row['firstPosterName'] . '</a>' : $row['firstPosterName']\n\t\t\t\t),\n\t\t\t\t'time' => timeformat($row['firstPosterTime']),\n\t\t\t\t'timestamp' => $row['firstPosterTime'],\n\t\t\t\t'subject' => $row['firstSubject'],\n\t\t\t\t'preview' => $row['firstBody'],\n\t\t\t\t'icon' => $row['firstIcon'],\n\t\t\t\t'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0;topicseen',\n\t\t\t\t'link' => '<a href=\"' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0;topicseen\">' . $row['firstSubject'] . '</a>'\n\t\t\t),\n\t\t\t'last_post' => array(\n\t\t\t\t'member' => array(\n\t\t\t\t\t'name' => $row['lastPosterName'],\n\t\t\t\t\t'id' => $row['ID_LAST_MEMBER'],\n\t\t\t\t\t'href' => $scripturl . '?action=profile;u=' . $row['ID_LAST_MEMBER'],\n\t\t\t\t\t'link' => !empty($row['ID_LAST_MEMBER']) ? '<a href=\"' . $scripturl . '?action=profile;u=' . $row['ID_LAST_MEMBER'] . '\">' . $row['lastPosterName'] . '</a>' : $row['lastPosterName']\n\t\t\t\t),\n\t\t\t\t'time' => timeformat($row['lastPosterTime']),\n\t\t\t\t'timestamp' => $row['lastPosterTime'],\n\t\t\t\t'subject' => $row['lastSubject'],\n\t\t\t\t'preview' => $row['lastBody'],\n\t\t\t\t'icon' => $row['lastIcon'],\n\t\t\t\t'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . ($row['numReplies'] == 0 ? '.0' : '.msg' . $row['ID_LAST_MSG']) . ';topicseen#msg' . $row['ID_LAST_MSG'],\n\t\t\t\t'link' => '<a href=\"' . $scripturl . '?topic=' . $row['ID_TOPIC'] . ($row['numReplies'] == 0 ? '.0' : '.msg' . $row['ID_LAST_MSG']) . ';topicseen#msg' . $row['ID_LAST_MSG'] . '\">' . $row['lastSubject'] . '</a>'\n\t\t\t),\n\t\t\t'newtime' => $row['isRead'],\n\t\t\t'new_href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.from' . $row['isRead'] . ';topicseen#new',\n\t\t\t'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . ($row['numReplies'] == 0 ? '.0' : '.from' . $row['isRead']) . ';topicseen#new',\n\t\t\t'link' => '<a href=\"' . $scripturl . '?topic=' . $row['ID_TOPIC'] . ($row['numReplies'] == 0 ? '.0' : '.from' . $row['isRead']) . ';topicseen#new\">' . $row['firstSubject'] . '</a>',\n\t\t\t'is_sticky' => !empty($modSettings['enableStickyTopics']) && !empty($row['isSticky']),\n\t\t\t'is_locked' => !empty($row['locked']),\n\t\t\t'is_poll' => $modSettings['pollMode'] == '1' && $row['ID_POLL'] > 0,\n\t\t\t'is_hot' => $row['numReplies'] >= $modSettings['hotTopicPosts'],\n\t\t\t'is_very_hot' => $row['numReplies'] >= $modSettings['hotTopicVeryPosts'],\n\t\t\t'is_posted_in' => false,\n\t\t\t'icon' => $row['firstIcon'],\n\t\t\t'subject' => $row['firstSubject'],\n\t\t\t'pages' => $pages,\n\t\t\t'replies' => $row['numReplies'],\n\t\t\t'views' => $row['numViews'],\n\t\t\t'board' => array(\n\t\t\t\t'id' => $row['ID_BOARD'],\n\t\t\t\t'name' => $row['bname'],\n\t\t\t\t'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0',\n\t\t\t\t'link' => '<a href=\"' . $scripturl . '?board=' . $row['ID_BOARD'] . '.0\">' . $row['bname'] . '</a>'\n\t\t\t)\n\t\t);\n\n\t\tdetermineTopicClass($context['topics'][$row['ID_TOPIC']]);\n\t}\n\tmysql_free_result($request);\n\n\tif ($is_topics && !empty($modSettings['enableParticipation']) && !empty($topic_ids))\n\t{\n\t\t$result = db_query(\"\n\t\t\tSELECT ID_TOPIC\n\t\t\tFROM {$db_prefix}messages\n\t\t\tWHERE ID_TOPIC IN (\" . implode(', ', $topic_ids) . \")\n\t\t\t\tAND ID_MEMBER = $ID_MEMBER\", __FILE__, __LINE__);\n\t\twhile ($row = mysql_fetch_assoc($result))\n\t\t{\n\t\t\tif (empty($context['topics'][$row['ID_TOPIC']]['is_posted_in']))\n\t\t\t{\n\t\t\t\t$context['topics'][$row['ID_TOPIC']]['is_posted_in'] = true;\n\t\t\t\t$context['topics'][$row['ID_TOPIC']]['class'] = 'my_' . $context['topics'][$row['ID_TOPIC']]['class'];\n\t\t\t}\n\t\t}\n\t\tmysql_free_result($result);\n\t}\n\n\t$context['topics_to_mark'] = implode('-', $topic_ids);\n}", "public function topics() {\n\t\treturn $this->hasMany(Forum::getTopicClass(), \"section_id\")->orderBy(\"id\", \"desc\");\n\t}", "function theme_profile_topics($profile_pid) {\n\t// note: Favourites are viewable by everyone!\n\t\n\techo \"\n\t<div class=\\\"total-posts\\\">\n\t\t<span>0</span> Topics\n\t</div>\n\t\";\t\n}", "public function getAllTopic()\n {\n return $this->dal->getTopic(null,false);\n }", "function loadTopics() {\r\n $dbh = DBHandlerClass::getInstance();\r\n $table = \"topics\";\r\n $colums = array(\"tID\", \"tName\", \"tDT\", \"users.uName\");\r\n $additionalTerm = \"INNER JOIN users on topics.uID = users.uID\";\r\n\r\n $topics = $dbh->readFromDB($table, $colums, $additionalTerm, NULL);\r\n printTopics($topics);\r\n}", "function AddTopic()\n{\n global $context, $txt, $mbname, $db_prefix;\n\n // Check permission\n $a_add = allowedTo('smftags_add');\n\n if ($a_add == false)\n fatal_error($txt['cannot_smftags_add'],false);\n\n // get query results to build array of all tags\n $query = db_query(\"\n SELECT t.tag AS tag, t.ID_TAG AS ID_TAG, COUNT(l.ID_TAG) AS quantity, t.approved AS approved\n FROM {$db_prefix}tags AS t\n LEFT JOIN {$db_prefix}tags_log AS l ON t.ID_TAG = l.ID_TAG\n GROUP BY t.ID_TAG\n ORDER BY t.tag ASC\",\n __FILE__, __LINE__);\n\n $context['tags'] = array();\n while ($row = mysql_fetch_assoc($query))\n {\n $context['tags'][] = array(\n 'ID_TAG' => $row['ID_TAG'],\n 'tag' => $row['tag'],\n 'quantity' => $row['quantity'],\n 'approved' => $row['approved'],\n 'tagged' => 0,\n );\n }\n // don't load the subtemplate\n}", "function webnotik_register_topics_settings() {\n\tregister_setting( 'webnotik-topics-group', 'webnotik_main_topics' );\n}", "function apoc_get_group_topic_info() {\n\n\tglobal $bp;\n\t$slug = $bp->action_variables[1];\n\t\n\t\n\tglobal $wpdb;\n\t$topic = $wpdb->get_row( \n\t\t$wpdb->prepare( \n\t\t\t\"SELECT post_title AS title, post_name AS url\n\t\t\tFROM $wpdb->posts \n\t\t\tWHERE post_name = %s\",\n\t\t\t$slug )\n\t\t);\n\t\t\n\treturn $topic;\n}", "public function load_topics() {\n\n\t\t// Get our current master list of topics.\n\t\t$master_list = $this->get_cahnrs_topics();\n\n\t\t// Get our current list of top level parents.\n\t\t$level1_exist = get_terms( $this->cahnrs_topics, array( 'hide_empty' => false, 'parent' => '0' ) );\n\t\t$level1_assign = array();\n\t\tforeach( $level1_exist as $level1 ) {\n\t\t\t$level1_assign[ $level1->name ] = array( 'term_id' => $level1->term_id );\n\t\t}\n\n\t\t$level1_names = array_keys( $master_list );\n\t\t/**\n\t\t * Look for mismatches between the master list and the existing parent terms list.\n\t\t *\n\t\t * In this loop:\n\t\t *\n\t\t * * $level1_names array of top level parent names.\n\t\t * * $level1_name string containing a top level category.\n\t\t * * $level1_children array containing all of the current parent's child arrays.\n\t\t * * $level1_assign array of top level parents that exist in the database with term ids.\n\t\t */\n\t\tforeach( $level1_names as $level1_name ) {\n\t\t\tif ( ! array_key_exists( $level1_name, $level1_assign ) ) {\n\t\t\t\t$new_term = wp_insert_term( $level1_name, $this->cahnrs_topics, array( 'parent' => '0' ) );\n\t\t\t\tif ( ! is_wp_error( $new_term ) ) {\n\t\t\t\t\t$level1_assign[ $level1_name ] = array( 'term_id' => $new_term['term_id'] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Process the children of each top level parent.\n\t\t *\n\t\t * In this loop:\n\t\t *\n\t\t * * $level1_names array of top level parent names.\n\t\t * * $level1_name string containing a top level category.\n\t\t * * $level1_children array containing all of the current parent's child arrays.\n\t\t * * $level2_assign array of this parent's second level categories that exist in the database with term ids.\n\t\t */\n\t\tforeach( $level1_names as $level1_name ) {\n\n\t\t\t$level2_exists = get_terms( $this->cahnrs_topics, array( 'hide_empty' => false, 'parent' => $level1_assign[ $level1_name ]['term_id'] ) );\n\t\t\t$level2_assign = array();\n\n\t\t\tforeach( $level2_exists as $level2 ) {\n\t\t\t\t$level2_assign[ $level2->name ] = array( 'term_id' => $level2->term_id );\n\t\t\t}\n\n\t\t\t$level2_names = array_keys( $master_list[ $level1_name ] );\n\t\t\t/**\n\t\t\t * Look for mismatches between the expected and real children of the current parent.\n\t\t\t *\n\t\t\t * In this loop:\n\t\t\t *\n\t\t\t * * $level2_names array of the current parent's child level names.\n\t\t\t * * $level2_name string containing a second level category.\n\t\t\t * * $level2_children array containing the current second level category's children. Unused in this context.\n\t\t\t * * $level2_assign array of this parent's second level categories that exist in the database with term ids.\n\t\t\t */\n\t\t\tforeach( $level2_names as $level2_name ) {\n\t\t\t\tif ( ! array_key_exists( $level2_name, $level2_assign ) ) {\n\t\t\t\t\t$new_term = wp_insert_term( $level2_name, $this->cahnrs_topics, array( 'parent' => $level1_assign[ $level1_name ]['term_id'] ) );\n\t\t\t\t\tif ( ! is_wp_error( $new_term ) ) {\n\t\t\t\t\t\t$level2_assign[ $level2_name ] = array( 'term_id' => $new_term['term_id'] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Look for mismatches between second and third level category relationships.\n\t\t\t */\n\t\t\tforeach( $level2_names as $level2_name ) {\n\t\t\t\t$level3_exists = get_terms( $this->cahnrs_topics, array( 'hide_empty' => false, 'parent' => $level2_assign[ $level2_name ]['term_id'] ) );\n\t\t\t\t$level3_exists = wp_list_pluck( $level3_exists, 'name' );\n\n\t\t\t\t$level3_names = $master_list[ $level1_name ][ $level2_name ];\n\t\t\t\tforeach( $level3_names as $level3_name ) {\n\t\t\t\t\tif ( ! in_array( $level3_name, $level3_exists ) ) {\n\t\t\t\t\t\twp_insert_term( $level3_name, $this->cahnrs_topics, array( 'parent' => $level2_assign[ $level2_name ]['term_id'] ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}", "public function index()\n {\n //\n $topics = Forum::paginate(5);\n \n \n // foreach ($topics as $topic) {\n // # code...\n // $topicCreatedByUser = $topic->user;\n // }\n // exit;\n return view('forum.forum_topics', compact('topics'));\n }", "function &getTopics() {\n\t\treturn $this->topics;\n\t}", "public function topics()\n {\n return $this->hasMany('ForumTopic', 'forum_id', 'id');\n }", "function drush_ti_amg_fw_topics_urls() {\n $batch = array();\n $batch_nodes = array();\n $query = new EntityFieldQuery();\n $query->entityCondition('entity_type', 'node')->entityCondition('bundle', array('topic_page_child'), 'IN');\n $result = $query->execute();\n\n if ($result['node']) {\n $batch_nodes = array_keys($result['node']);\n }\n\n foreach ($batch_nodes as $nid) {\n $batch['operations'][] = array(\n '_ti_amg_fw_topics_do_drush_fix_urls',\n array(\n $nid,\n ),\n );\n }\n\n $batch['finished'] = '_ti_amg_fw_topics_do_drush_fix_urls_finished';\n batch_set($batch);\n drush_backend_batch_process();\n}", "public function tackledTopics(){\n return $this->hasMany(Topic::class,'class');\n }", "public function topics(Topics $topics = null);", "public function index()\n {\n return Topic::all();\n }", "public function index()\n {\n return Topic::all();\n }", "public function index()\n {\n return Topic::all();\n }", "function caldol_hook_bbp_theme_before_forum_sub_forums(){\n\n\n\t\t\n\n\t\t//echo \"count: \" . bbp_get_forum_subforum_count() . \" --\";\n\n\t\t\n\n\t\t\n\n\t\t$subForumList = bbp_forum_get_subforums();\n\n\t\t\n\n\t\tif(sizeof($subForumList) > 1){\n\n\t\t\techo \"<ul style='margin-left: 20px;'>\";\n\n\t\tforeach($subForumList as $currForum){\n\n\t\t\t//print_r($currForum);\n\n\t\t\t// No link\n\n\t\t\t$retval = false;\n\n\t\t\t\t\n\n\t\t\t// Parse the arguments\n\n\t\t\t$r = bbp_parse_args( $args, array(\n\n\t\t\t\t\t'forum_id' => $currForum->ID,\n\n\t\t\t\t\t'user_id' => 0,\n\n\t\t\t\t\t'before' => '',\n\n\t\t\t\t\t'after' => '',\n\n\t\t\t\t\t'subscribe' => __( 'Subscribe', 'bbpress' ),\n\n\t\t\t\t\t'unsubscribe' => __( 'x', 'bbpress' )\n\n\t\t\t), 'get_forum_subscribe_link' );\n\n\t\t\t\t\n\n\t\t\t\n\n\t\t\t$isSubscribed = bbp_get_forum_subscription_link( $r);\n\n\t\t\t\n\n\t\t\t\t\n\n\t\t\tif(strpos($isSubscribed, 'is-subscribed') != 0){\n\n\t\t\t\n\n\t\t\techo \"<li class='bbp-topic-title'><a href='\" . bbp_get_forum_permalink($currForum->ID) . \"'>\" . $currForum->post_title . \"</a><span class='bbp-topic-action'>&nbsp;&nbsp; \" . $isSubscribed . \" </span></li>\";\n\n\t\t\t}\n\n\t\t\t//print_r($currForum);\n\n\t\t}\n\n\t\t\techo \"</ul>\";\n\n\t\t} // end > 1\n\n\t\t\n\n\t\t\n\n}", "function getTopics()\n {\n\n $topics = \"SELECT * from topics\";\n $topicsresult = $this->ds->select($topics); \n //print_r($topicsresult);\n return $topicsresult;\n }", "public function run()\n {\n $topicComments = [\n [\n 'cmnt' => 'I was never mad at him.',\n 'sub' => []\n ],\n [\n 'cmnt' => 'ABSOLUTELY HE SHOULD WORK AGAIN! Hes an alcoholic bi-polar. Anything else? I mean the man has been one of the most charming and unpretentious big stars of my generation. Bad husband? Ok, but thats not our business. The thing is he never beat her, and he still is in good relations with his first wife where he went to when his world crashed down, so hes not a monster. He got screwed.',\n 'sub' => []\n ],\n [\n 'cmnt' => 'I liked a lot of his movies before his \"breakdown\" or whatever it was. The guy obviously has some issues - and once they go beyond personal or relationship stuff (i.e. getting into public displays of racism or antisemitism) it can cause irreparable damage.',\n 'sub' => ['He said some things about gays that got him in trouble, and he certainly isnt the first person to comment or bitch about jews in hollywood. Now I dont mean to sound like Archie Bunker but Mel Gibson is from Australia. Now Hit Girl can pummel me publicly for saying this if Im wrong, but most australian men are veeeery chauvanistic and act tough i.e. talk bad about gays. Thats just the way they are, it doesnt mean theyre evil. You know what I mean?',\n ]\n ],\n [\n 'cmnt' => '10 years latter? wow you hold a grudge a long time :)',\n 'sub' => [\n 'Hahaha I phrased that wrong I\\'ve never really cared that much because I can separate art from personality, but I respect people who can\\'t. :)',\n 'Ya, I was just funnin\\' ya. I like Mel! Good director, great actor. So he said a few stupid things when he was drunk an angry. Most everybody in Hollywood has done that. He should have made the 4th Mad Max picture. But I bet he\\'s got some projects going. ',\n 'Mm. I loved Tom Hardys portrayal, but I have to agree. It would have revitalized his career. Hardy would be a star regardless.',\n 'You\\'re telling me you\\'d buy a 59 year old Max doing the things that Hardy did in Fury Road? \\'Cause I sure as hell wouldn\\'t. It\\'d be pathetic. Just like the last Indy movie and the last Terminator movie. '\n ]\n ],\n [\n 'cmnt' => 'As long as he promises not to make a \"Passion of the Christ II\" and maybe finds a way to make a second \"Payback\", sure.',\n 'sub' => []\n ],\n [\n 'cmnt' => 'As long as he does not commit anything prison worthy, why not? ',\n 'sub' => []\n ],\n [\n 'cmnt' => 'I think Mel Gibson should have played Max in Fury Road and Tom Hardy could have been his second-in-command. I would not have been opposed to Tom Hardy having more screen time than Mel Gibson, either. Tom Hardy just doesn\\'t feel like Max to me. ',\n 'sub' => []\n ],\n [\n 'cmnt' => 'No, it would have to be a totally different film. Or have Gibson be his dad or grandfather in supporting role. Sort of like they did with the last Star War films. ',\n 'sub' => []\n ],\n [\n 'cmnt' => 'I swear we typed that at the same time, SC must be reading my mind. ',\n 'sub' => []\n ],\n [\n 'cmnt' => 'I don\\'t know if Tom Hardy should have necessarily been Max\\'s son, but maybe fans could speculate to themselves that he is. ',\n 'sub' => []\n ],\n [\n 'cmnt' => 'I kind of like the idea that there are many different interpretations of Max in the universe. I think Miller once said this awhile back, that their all the same Max\\'s, but it\\'s just how the people view him. I don\\'t know I maybe spouting a bunch of stupid bs, but I could have sworn I read it somewhere. ',\n 'sub' => []\n ],\n [\n 'cmnt' => \"Certainly. I have a friend with very different political opinions of my own who once said that he \\\"hated it when people had to go away for saying the wrong thing.\\\" I've always liked the way he put that.\\n\\n\n\nMel Gibson said a lot of things I don't like, and so have a lot of other people whose art I don't admire and whose presence I don't miss. But overall, I like the cultural trade of a world where we hear offensive things a bit more often and don't need to banish the people who say them from the public eye. I'd like to see a sharper distinction between speech and speaker, and just a generally higher cultural tolerance for even the things we don't like.\",\n 'sub' => ['Well said. Your friend was a smart man.']\n ],\n [\n 'cmnt' => 'Yes! He\\'s one of my favorite actors and I think many people respect him enough to forgive him for something that happened ten years ago. ',\n 'sub' => []\n ],\n\n ];\n\n $voteComments = [\n [\n 'cmnt' => 'I propose to present the keyboard or SSD. I think it will be a good gift for him.',\n 'sub' => []\n ],\n [\n 'cmnt' => 'Let\\'s think. Maybe it is worth presenting something else?',\n 'sub' => []\n ],\n [\n 'cmnt' => 'He likes to play shooters.',\n 'sub' => []\n ],\n [\n 'cmnt' => 'Gaming mouse?!',\n 'sub' => []\n ],\n [\n 'cmnt' => 'Oh, no! I think the HD webcam will be more useful for him.',\n 'sub' => []\n ],\n [\n 'cmnt' => 'If you don\\'t accept any variant, please, offer another.',\n 'sub' => []\n ],\n ];\n\n $users = User::all();\n\n $topic = Topic::where('id', 1)->first();\n $addMin = 2;\n $addSec = 0;\n $time = $topic->created_at;\n\n foreach ($topicComments as $topicComment) {\n $comment = factory(Comment::class)->make();\n $comment->content_origin = $topicComment['cmnt'];\n $comment->content_generated = MarkdownService::baseConvert($topicComment['cmnt']);\n $randomUser = $users->random();\n $comment->user()->associate($randomUser);\n $comment->created_at = $time->addMinutes($addMin)->addSeconds($addSec);\n $addMin = rand(1, 15);\n $addSec = rand(5, 25);\n $comment->save();\n $topic->comments()->save($comment);\n $topic->updated_at = $comment->updated_at;\n $topic->save();\n $subCommentStartTime = $comment->created_at;\n foreach ($topicComment['sub'] as $subComment) {\n $childComment = factory(Comment::class)->make();\n $childComment->content_origin = $subComment;\n $childComment->content_generated = MarkdownService::baseConvert($subComment);\n $randomUser = $users->random();\n $childComment->user()->associate($randomUser);\n $addMin = rand(2, 40);\n $addSec = rand(5, 25);\n $childComment->created_at = $subCommentStartTime->addMinutes($addMin)->addSeconds($addSec);\n $childComment->save();\n $topic->comments()->save($childComment);\n $topic->updated_at = $childComment->updated_at;\n $topic->save();\n $comment->comments()->save($childComment);\n }\n }\n\n $vote = Vote::where('id', 1)->first();\n $addMin = 2;\n $addSec = 0;\n $time = $vote->created_at;\n $vote->created_at = $time-> subHours(3);\n\n\n $usersIds = $vote->votePermissions->pluck('user_id')->all();\n $users = User::whereIn('id', $usersIds)->get();\n\n foreach ($voteComments as $voteComment) {\n $comment = factory(Comment::class)->make();\n $comment->content_origin = $voteComment['cmnt'];\n $comment->content_generated = MarkdownService::baseConvert($voteComment['cmnt']);\n $randomUser = $users->random();\n $comment->user()->associate($randomUser);\n $comment->created_at = $time->addMinutes($addMin)->addSeconds($addSec);\n $addMin = rand(1, 15);\n $addSec = rand(5, 25);\n $comment->save();\n $vote->comments()->save($comment);\n $vote->updated_at = $comment->updated_at;\n $vote->save();\n }\n\n\n// foreach ($topics as $topic) {\n// $commentCount = rand(1, 5);\n// $comments = factory(Comment::class, $commentCount)->make();\n// if (!$comments instanceof Collection) {\n// $comments = new Collection([$comments]);\n// }\n// $comments->each(function ($comment) use ($users) {\n// $randomUser = $users->random();\n// $comment->user()->associate($randomUser);\n// $comment->save();\n// });\n//\n// $topic->comments()->saveMany($comments);\n// }\n\n// foreach ($votes as $vote) {\n// $commentCount = rand(1, 5);\n// $comments = factory(Comment::class, $commentCount)\n// ->make();\n// if (!$comments instanceof Collection) {\n// $comments = new Collection([$comments]);\n// }\n// $comments->each(function ($comment) use ($users) {\n// $randomUser = $users->random();\n// $comment->user()->associate($randomUser);\n// $comment->save();\n// });\n//\n// $vote->comments()->saveMany($comments);\n// }\n\n// foreach ($voteItems as $voteItem) {\n// $commentCount = rand(1, 5);\n// $comments = factory(Comment::class, $commentCount)\n// ->make();\n// if (!$comments instanceof Collection) {\n// $comments = new Collection([$comments]);\n// }\n// $comments->each(function ($comment) use ($users) {\n// $randomUser = $users->random();\n// $comment->user()->associate($randomUser);\n// $comment->save();\n// });\n//\n// $voteItem->comments()->saveMany($comments);\n// }\n\n }", "function caldol_no_replies_bbpress_topics_shortcode() {\n\n\t?>\n\n<!-- html custom-functions -->\n\n<h4 style=\"margin-top: 15px;\">Discussions with No Replies. Be the first to jump in!</h4>\n\n<?php\n\n\n\nif ( bbp_has_topics( array( 'author' => 0, 'show_stickies' => false, 'order' => 'DESC', 'meta_key' => '_bbp_reply_count', 'orderby' => 'post_date', 'meta_value' => '0', 'meta_compare' => '=', 'post_parent' => 'any', 'posts_per_page' => 10 ) ) )\n\nbbp_get_template_part( 'bbpress/loop', 'topics' );\n\n?>\n\n<!-- end -->\n\n<?php }", "private function getOneTopic() {\n $this->topic->findOne();\n }", "public function topics()\n {\n return $this->hasMany(Topic::class)->whereNull('topic_id');\n }", "public function show_forum_topics($name, $limit, $start, &$max_rows, $filter_topic_title = '', $show_first_posts = false, $date_key = 'lasttime', $hot = false, $filter_topic_description = '')\n {\n if (is_integer($name)) {\n $id_list = 'fid=' . strval($name);\n } elseif (!is_array($name)) {\n $id = $this->forum_id_from_name($name);\n if (is_null($id)) {\n return null;\n }\n $id_list = 'fid=' . strval($id);\n } else {\n $id_list = '';\n foreach (array_keys($name) as $id) {\n if ($id_list != '') {\n $id_list .= ' OR ';\n }\n $id_list .= 'fid=' . strval($id);\n }\n if ($id_list == '') {\n return null;\n }\n }\n\n $topic_filter = ($filter_topic_title != '') ? 'AND subject LIKE \\'' . db_encode_like($filter_topic_title) . '\\'' : '';\n $topic_filter .= ' ORDER BY ' . (($date_key == 'lasttime') ? 'lastpost' : 'lastpost') . ' DESC';\n\n $rows = $this->connection->query('SELECT * FROM ' . $this->connection->get_table_prefix() . 'threads WHERE (' . $id_list . ') ' . $topic_filter, $limit, $start);\n $max_rows = $this->connection->query_value_if_there('SELECT COUNT(*) FROM ' . $this->connection->get_table_prefix() . 'threads WHERE (' . $id_list . ') ' . $topic_filter);\n $i = 0;\n $firsttime = array();\n $username = array();\n $memberid = array();\n $datetimes = array();\n $rs = array();\n while (array_key_exists($i, $rows)) {\n $r = $rows[$i];\n\n $id = $r['tid'];\n\n $r['topic_time'] = $r['dateline'];\n $r['topic_poster'] = $r['uid'];\n $r['last_poster'] = $r['lastposteruid'];\n $r['last_time'] = $r['lastpost'];\n\n $firsttime[$id] = $r['dateline'];\n\n $post_rows = $this->connection->query('SELECT * FROM ' . $this->connection->get_table_prefix() . 'posts p WHERE tid=' . strval($id) . ' AND message NOT LIKE \\'' . db_encode_like(substr(do_lang('SPACER_POST', '', '', '', get_site_default_lang()), 0, 20) . '%') . '\\' ORDER BY dateline DESC', 1);\n\n if (!array_key_exists(0, $post_rows)) {\n $i++;\n continue;\n }\n $r2 = $post_rows[0];\n\n $username[$id] = $r2['username'];\n $username[$id] = $r2['uid'];\n $datetimes[$id] = $r2['dateline'];\n $rs[$id] = $r;\n\n $i++;\n }\n if ($i > 0) {\n arsort($datetimes);\n $i = 0;\n $out = array();\n if (count($datetimes) > 0) {\n foreach ($datetimes as $id => $datetime) {\n $r = $rs[$id];\n\n $out[$i] = array();\n $out[$i]['id'] = $id;\n $out[$i]['num'] = $r['replies'] + 1;\n $out[$i]['title'] = $r['subject'];\n $out[$i]['description'] = $r['subject'];\n $out[$i]['firsttime'] = $r['dateline'];\n $out[$i]['firstusername'] = $r['username'];\n $out[$i]['lastusername'] = $r['lastposter'];\n $out[$i]['firstmemberid'] = $r['uid'];\n $out[$i]['lastmemberid'] = $r['lastposteruid'];\n $out[$i]['lasttime'] = $r['lastpost'];\n $out[$i]['closed'] = ($r['visible'] == 1);\n\n $fp_rows = $this->connection->query('SELECT subject,message,uid FROM ' . $this->connection->get_table_prefix() . 'posts p WHERE message NOT LIKE \\'' . db_encode_like(substr(do_lang('SPACER_POST', '', '', '', get_site_default_lang()), 0, 20) . '%') . '\\' AND dateline=' . strval($firsttime[$id]) . ' AND tid=' . strval($id), 1);\n\n if (!array_key_exists(0, $fp_rows)) {\n unset($out[$i]);\n continue;\n }\n $out[$i]['firsttitle'] = $fp_rows[0]['subject'];\n if ($show_first_posts) {\n global $LAX_COMCODE;\n $temp = $LAX_COMCODE;\n $LAX_COMCODE = true;\n $out[$i]['firstpost'] = $fp_rows[0]['message'];\n $LAX_COMCODE = $temp;\n }\n\n $i++;\n if ($i == $limit) {\n break;\n }\n }\n }\n\n return $out;\n }\n return null;\n }", "function soft_delete_topics()\r\n\t{\r\n\t\tglobal $auth, $config, $db, $phpbb_root_path, $phpEx, $user;\r\n\r\n\t\tif (sizeof($this->soft_delete['t']))\r\n\t\t{\r\n\t\t\t$sql_data = array(\r\n\t\t\t\t'topic_deleted'\t\t\t=> $user->data['user_id'],\r\n\t\t\t\t'topic_deleted_time'\t=> time(),\r\n\t\t\t);\r\n\r\n\t\t\t$to_update = array();\r\n\t\t\tforeach ($this->soft_delete['t'] as $id)\r\n\t\t\t{\r\n\t\t\t\tif (array_key_exists($id, $this->shadow_topic_ids))\r\n\t\t\t\t{\r\n\t\t\t\t\t$to_update[] = $this->shadow_topic_ids[$id];\r\n\t\t\t\t\t$this->topic_data[$this->shadow_topic_ids[$id]] = array_merge($this->topic_data[$this->shadow_topic_ids[$id]], $sql_data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$to_update[] = $id;\r\n\t\t\t\t$this->topic_data[$id] = array_merge($this->topic_data[$id], $sql_data);\r\n\t\t\t}\r\n\r\n\t\t\t$sql = 'UPDATE ' . TOPICS_TABLE . '\r\n\t\t\t\tSET ' . $db->sql_build_array('UPDATE', $sql_data) . '\r\n\t\t\t\t\tWHERE ' . $db->sql_in_set('topic_id', $to_update);\r\n\t\t\t$db->sql_query($sql);\r\n\r\n\t\t\tforeach ($to_update as $id)\r\n\t\t\t{\r\n\t\t\t\t// If the topic is a global announcement, do not attempt to do any updates to forums\r\n\t\t\t\tif ($this->topic_data[$id]['topic_type'] != POST_GLOBAL)\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql = 'UPDATE ' . FORUMS_TABLE . '\r\n\t\t\t\t\t\tSET forum_deleted_topic_count = forum_deleted_topic_count + 1\r\n\t\t\t\t\t\t\tWHERE forum_id = ' . intval($this->topic_data[$id]['forum_id']);\r\n\t\t\t\t\t$db->sql_query($sql);\r\n\t\t\t\t\t$this->forum_data[$this->topic_data[$id]['forum_id']]['forum_deleted_topic_count']++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->update_board_stats();\r\n\t\t$this->update_user_stats();\r\n\t}", "function MaintainTopics()\n{\n\tglobal $context, $txt;\n\n\t// Let's load up the boards in case they are useful.\n\t$result = wesql::query('\n\t\tSELECT b.id_board, b.name, b.child_level, c.name AS cat_name, c.id_cat\n\t\tFROM {db_prefix}boards AS b\n\t\t\tLEFT JOIN {db_prefix}categories AS c ON (c.id_cat = b.id_cat)\n\t\tWHERE {query_see_board}\n\t\t\tAND redirect = {string:empty}\n\t\tORDER BY b.board_order',\n\t\tarray(\n\t\t\t'empty' => '',\n\t\t)\n\t);\n\t$context['categories'] = array();\n\twhile ($row = wesql::fetch_assoc($result))\n\t{\n\t\tif (!isset($context['categories'][$row['id_cat']]))\n\t\t\t$context['categories'][$row['id_cat']] = array(\n\t\t\t\t'name' => $row['cat_name'],\n\t\t\t\t'boards' => array()\n\t\t\t);\n\n\t\t$context['categories'][$row['id_cat']]['boards'][] = array(\n\t\t\t'id' => $row['id_board'],\n\t\t\t'name' => $row['name'],\n\t\t\t'child_level' => $row['child_level']\n\t\t);\n\t}\n\twesql::free_result($result);\n\n\tif (isset($_GET['done']) && $_GET['done'] == 'purgeold')\n\t\t$context['maintenance_finished'] = $txt['maintain_old'];\n\telseif (isset($_GET['done']) && $_GET['done'] == 'massmove')\n\t\t$context['maintenance_finished'] = $txt['move_topics_maintenance'];\n}", "function getTopicInfos($topics, $type)\n{\n\t$db = database();\n\n\t$topicData = [];\n\t$boards_index = [];\n\n\t$db->fetchQuery('\n\t\tSELECT \n\t\t\tmf.subject, ml.body, ml.id_member, t.id_last_msg, t.id_topic, t.id_board, t.id_member_started,\n\t\t\tmem.signature, COALESCE(mem.real_name, ml.poster_name) AS poster_name, COUNT(a.id_attach) as num_attach\n\t\tFROM {db_prefix}topics AS t\n\t\t\tINNER JOIN {db_prefix}messages AS mf ON (mf.id_msg = t.id_first_msg)\n\t\t\tINNER JOIN {db_prefix}messages AS ml ON (ml.id_msg = t.id_last_msg)\n\t\t\tLEFT JOIN {db_prefix}members AS mem ON (mem.id_member = ml.id_member)\n\t\t\tLEFT JOIN {db_prefix}attachments AS a ON(a.attachment_type = {int:attachment_type} AND a.id_msg = t.id_last_msg)\n\t\tWHERE t.id_topic IN ({array_int:topic_list})\n\t\tGROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9',\n\t\t[\n\t\t\t'topic_list' => $topics,\n\t\t\t'attachment_type' => 0,\n\t\t]\n\t)->fetch_callback(\n\t\tfunction ($row) use (&$topicData, &$boards_index, $type) {\n\t\t\t// all the boards for these topics, used to find all the members to be notified\n\t\t\t$boards_index[] = $row['id_board'];\n\n\t\t\t// And the information we are going to tell them about\n\t\t\t$topicData[$row['id_topic']] = [\n\t\t\t\t'subject' => $row['subject'],\n\t\t\t\t'body' => $row['body'],\n\t\t\t\t'last_id' => (int) $row['id_last_msg'],\n\t\t\t\t'topic' => (int) $row['id_topic'],\n\t\t\t\t'board' => (int) $row['id_board'],\n\t\t\t\t'id_member_started' => (int) $row['id_member_started'],\n\t\t\t\t'name' => $type === 'reply' ? $row['poster_name'] : User::$info->name,\n\t\t\t\t'exclude' => '',\n\t\t\t\t'signature' => $row['signature'],\n\t\t\t\t'attachments' => (int) $row['num_attach'],\n\t\t\t];\n\t\t}\n\t);\n\n\treturn [$boards_index, $topicData];\n}", "public function getTopicCallable()\n {\n return array($this, 'getTopic');\n }", "public function ambassade_single_topic(&$event) {\n global $user;\n // IF IS AMBASSADE\n if($event[\"row\"][\"forum_id\"] == 29 && !$this->topic_ambassade_set_up) {\n $guild = new \\scfr\\main\\ambassade\\Guild($this->db);\n $first_reply = $event[\"topic_data\"][\"topic_first_post_id\"];\n $guild->__topic_init($event[\"row\"][\"topic_id\"]);\n\n //var_dump();\n\n $templates[\"GUILD_JSON\"] = json_encode(false);\n if($guild->is_registerd) {\n $templates[\"TOPIC_IS_REGISTERED_GUILD\"] = true;\n foreach($guild->RSI as $name => $val)\n $templates[\"GUILD_\".strtoupper($name)] = $val;\n\n $templates[\"GUILD_JSON\"] = json_encode($guild->RSI);\n }\n\n\n if($templates['GUILD_BACKGROUND']) $templates['CUSTOM_BACKGROUND'] = $templates['GUILD_BACKGROUND'];\n\n\n $templates[\"TOPIC_IS_GUILD\"] = true;\n $templates[\"GUILD_TOPIC_ID\"] = $event[\"topic_data\"][\"topic_id\"];\n\n $templates[\"S_REQUIRE_ANGULAR\"] = true;\n $this->template->assign_vars($templates);\n $this->topic_set_up = true;\n }\n }", "function delTopic()\n{\n global $xoopsDB, $xoopsModule;\n if (!isset($_POST['ok'])) {\n xoops_cp_header();\n echo \"<h4>\" . _AM_CONFIG . \"</h4>\";\n $xt = new XoopsTopic( $xoopsDB->prefix(\"topics\"), intval($_GET['topic_id']));\n xoops_confirm(array( 'op' => 'delTopic', 'topic_id' => intval($_GET['topic_id']), 'ok' => 1), 'index.php', _AM_WAYSYWTDTTAL . '<br />' . $xt->topic_title('S'));\n } else {\n $xt = new XoopsTopic($xoopsDB->prefix(\"topics\"), intval($_POST['topic_id']));\n // get all subtopics under the specified topic\n $topic_arr = $xt->getAllChildTopics();\n array_push( $topic_arr, $xt );\n foreach( $topic_arr as $eachtopic ) {\n // get all stories in each topic\n $story_arr = NewsStory :: getByTopic( $eachtopic -> topic_id() );\n foreach( $story_arr as $eachstory ) {\n if (false != $eachstory->delete()) {\n xoops_comment_delete( $xoopsModule -> getVar( 'mid' ), $eachstory -> storyid() );\n xoops_notification_deletebyitem($xoopsModule->getVar('mid'), 'story', $eachstory->storyid());\n }\n }\n // all stories for each topic is deleted, now delete the topic data\n $eachtopic -> delete();\n // Delete also the notifications and permissions\n xoops_notification_deletebyitem( $xoopsModule -> getVar( 'mid' ), 'category', $eachtopic -> topic_id );\n\t\t\txoops_groupperm_deletebymoditem($xoopsModule->getVar('mid'), 'news_approve', $eachtopic -> topic_id);\n\t\t\txoops_groupperm_deletebymoditem($xoopsModule->getVar('mid'), 'news_submit', $eachtopic -> topic_id);\n\t\t\txoops_groupperm_deletebymoditem($xoopsModule->getVar('mid'), 'news_view', $eachtopic -> topic_id);\n }\n updateCache();\n redirect_header( 'index.php?op=topicsmanager', 1, _AM_DBUPDATED );\n exit();\n }\n}", "function caldol_most_replies_bbpress_topics_shortcode() {\n\n ?>\n\n<!-- html custom-functions -->\n\n<h4 style=\"margin-top: 15px;\">Discussions with the Most Replies</h4>\n\n<?php\n\nif ( bbp_has_topics( array( 'author' => 0, 'show_stickies' => false, 'order' => 'DESC', 'meta_key' => '_bbp_reply_count', 'orderby' => 'meta_value', 'post_parent' => 'any', 'posts_per_page' => 10 ) ) )\n\nbbp_get_template_part( 'bbpress/loop', 'topics' );\n\n?>\n\n<!-- end -->\n\n<?php }", "function getSubTopics($topicId, $language) {\n\t $subtopics = $this->db->getAll(\"SELECT sotf_topics.topic_id AS id, sotf_topics.topic_name AS name, number, total FROM sotf_topic_tree_defs LEFT JOIN sotf_topics ON sotf_topics.topic_id = sotf_topic_tree_defs.id LEFT JOIN sotf_topics_counter ON sotf_topics_counter.topic_id = sotf_topic_tree_defs.id WHERE sotf_topics.language='$language' AND sotf_topic_tree_defs.supertopic='$topicId' ORDER BY sotf_topics.topic_name\");\n\t return $subtopics;\n }", "function get_group_topics($params) {\n global $db;\n\n $gid = $params['group'] ? $params['group'] : $params;\n $limit = $params['limit'];\n $order = $params['order'] ? $params['order'] : \" last_post_time DESC \";\n\n if ($params['approved'])\n $approved_query = \" AND \" . tbl('group_topics') . \".approved='yes' \";\n if ($params['user'])\n $user_query = \" AND \" . tbl('group_topics') . \".userid='\" . $params['user'] . \"'\";\n\n\n //user fields\n $fields = array(\n 'email', 'username'\n );\n\n $fields = apply_filters($fields, 'group_topic_user_fields');\n\n foreach ($fields as $field)\n $uquery .= ',' . tbl('users.' . $field);\n\n if ($limit)\n $limit_query = \" LIMIT \" . $limit;\n else\n $limit_query = '';\n\n $order = ' ORDER BY ' . $order;\n $results = db_select(\"SELECT \" . tbl('group_topics') . \".*$uquery FROM \"\n . tbl('group_topics') . \" LEFT JOIN \" . tbl('users') . \" ON \" . tbl('users.userid')\n . \"=\" . tbl('group_topics.userid') . \" WHERE \" . tbl('group_topics')\n . \".group_id='$gid' $user_query $order $limit_query \");\n\n\n if ($db->num_rows > 0)\n return $results;\n else\n return false;\n }", "function target_add_topic_subscription($sub)\n{\n\tif ($sub['user_id'] == 1 && isset($GLOBALS['hack_id'])) {\n\t\t$sub['user_id'] = $GLOBALS['hack_id'];\n\t}\n\tq('INSERT INTO '. $GLOBALS['DBHOST_TBL_PREFIX'] .'thread_notify (user_id, thread_id) VALUES('. (int)$sub['user_id'] .', '. (int)$sub['topic_id'] .')');\n}", "public function topic($flag = NULL) {\n $incomingFormData = $this->readHttpRequest();\n $formData = json_decode($incomingFormData);\n $TopicList = $this->Coursematerial_model->getTopicList($formData);\n\n if ($flag == 1) {\n return $TopicList;\n }\n echo json_encode($TopicList);\n }", "public function topics()\n\t{\n\t\treturn $this->hasMany('App\\MeetingTopic');\n\t}", "public function index()\n {\n return PostsTopics::get();\n }", "public function viewtopicAction($thread_id){\n\t\t$per_page = 20;\n\n\t\t# Chargement du manager\n\t\t$this->load_manager('forum', 'base_app');\n\n\t\t# On commpte le nombre de message\n\t\t$NbMessage = $this->app->db->count(PREFIX . 'forum_message', array('thread_id =' => $thread_id));\n\n\t\t# On recupere les messages\n\t\t$Messages = $this->manager->forum->getMessagesByThreadId($thread_id, $per_page, getOffset($per_page));\n\n\t\t# Recuperation infos topic\n\t\t$Thread = new Basethread($this->app->db->get_one(PREFIX . 'forum_thread', array('id =' => $thread_id)));\n\n\t\t# On traite la pagination\n\t\t$Pagination = new Zebra_Pagination();\n\t\t$Pagination->records($NbMessage);\n\t\t$Pagination->records_per_page($per_page);\n\n\t\tif( $this->isModerateur() == true ):\n\t\t\t$this->app->smarty->assign('Forums', $this->manager->forum->getAllForums());\n\t\tendif;\n\t\t\n\t\t# Envoie a smarty\n\t\t$this->app->smarty->assign(array(\n\t\t\t'ctitre'\t\t=>\t'Forum :: ' . $Thread->titre,\n\t\t\t'Messages'\t\t=>\t$Messages,\n\t\t\t'Thread'\t\t=>\t$Thread,\n\t\t\t'Pagination'\t=>\t$Pagination,\n\t\t\t'Forum'\t\t\t=>\tnew myObject( $this->app->db->get_one(PREFIX . 'forum', array('id =' => $Thread->forum_id)) )\n\t\t));\n\n\t\tif( $_SESSION['utilisateur']['id'] != 'Visiteur' ):\n\t\t\t$this->getFormValidatorJs();\n\n\t\t\t$this->app->load_web_lib('markitup/skins/simple/style.css','css');\n\t\t\t$this->app->load_web_lib('markitup/bbcode/style.css','css');\n\t\t\t$this->app->load_web_lib('markitup/jquery.markitup.js','js');\n\t\t\t$this->app->load_web_lib('markitup/bbcode/set.js','js');\n\t\tendif;\n\t\t\n\t\t# Generation de la page\n\t\treturn $this->app->smarty->fetch(BASE_APP_PATH . 'view' . DS . 'forum' . DS . 'viewtopic.tpl');\n\n\t}", "public function getTopic($message){\n $email_id = $message->getId();\n $title = $this->getTitle($message);\n $body = $message->getBodyText();\n //$bodyArray = $this->getBodyArray($body);\n $categories = $this->getCategories($body);\n $tags = $this->findTags($body);\n $date = $message->getDate();\n $topic = [\n 'email_id' => $email_id,\n 'title' => $title,\n 'body' => $body,\n 'categories' => $categories,\n 'tags' => $tags,\n 'date' => $date\n ];\n return $topic;\n }", "public function action_messageindex()\n\t{\n\t\tglobal $txt, $board, $modSettings, $context, $options, $settings, $board_info;\n\n\t\t// Fairly often, we'll work with boards. Current board, sub-boards.\n\t\trequire_once(SUBSDIR . '/Boards.subs.php');\n\n\t\t// If this is a redirection board head off.\n\t\tif ($board_info['redirect'])\n\t\t{\n\t\t\tincrementBoard($board, 'num_posts');\n\t\t\tredirectexit($board_info['redirect']);\n\t\t}\n\n\t\ttheme()->getTemplates()->load('MessageIndex');\n\t\tloadJavascriptFile('topic.js');\n\n\t\t$bbc = ParserWrapper::instance();\n\n\t\t$context['name'] = $board_info['name'];\n\t\t$context['sub_template'] = 'topic_listing';\n\t\t$context['description'] = $bbc->parseBoard($board_info['description']);\n\t\t$template_layers = theme()->getLayers();\n\n\t\t// How many topics do we have in total?\n\t\t$board_info['total_topics'] = allowedTo('approve_posts') ? $board_info['num_topics'] + $board_info['unapproved_topics'] : $board_info['num_topics'] + $board_info['unapproved_user_topics'];\n\n\t\t// View all the topics, or just a few?\n\t\t$context['topics_per_page'] = empty($modSettings['disableCustomPerPage']) && !empty($options['topics_per_page']) ? $options['topics_per_page'] : $modSettings['defaultMaxTopics'];\n\t\t$context['messages_per_page'] = empty($modSettings['disableCustomPerPage']) && !empty($options['messages_per_page']) ? $options['messages_per_page'] : $modSettings['defaultMaxMessages'];\n\t\t$maxindex = isset($this->_req->query->all) && !empty($modSettings['enableAllMessages']) ? $board_info['total_topics'] : $context['topics_per_page'];\n\n\t\t// Right, let's only index normal stuff!\n\t\t$session_name = session_name();\n\t\tforeach ($this->_req->query as $k => $v)\n\t\t{\n\t\t\t// Don't index a sort result etc.\n\t\t\tif (!in_array($k, array('board', 'start', $session_name)))\n\t\t\t{\n\t\t\t\t$context['robot_no_index'] = true;\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($this->_req->query->start) && (!is_numeric($this->_req->query->start) || $this->_req->query->start % $context['messages_per_page'] !== 0))\n\t\t{\n\t\t\t$context['robot_no_index'] = true;\n\t\t}\n\n\t\t// If we can view unapproved messages and there are some build up a list.\n\t\tif (allowedTo('approve_posts') && ($board_info['unapproved_topics'] || $board_info['unapproved_posts']))\n\t\t{\n\t\t\t$untopics = $board_info['unapproved_topics'] ? '<a href=\"' . getUrl('action', ['action' => 'moderate', 'area' => 'postmod', 'sa' => 'topics', 'brd' => $board]) . '\">' . $board_info['unapproved_topics'] . '</a>' : 0;\n\t\t\t$unposts = $board_info['unapproved_posts'] ? '<a href=\"' . getUrl('action', ['action' => 'moderate', 'area' => 'postmod', 'sa' => 'posts', 'brd' => $board]) . '\">' . ($board_info['unapproved_posts'] - $board_info['unapproved_topics']) . '</a>' : 0;\n\t\t\t$context['unapproved_posts_message'] = sprintf($txt['there_are_unapproved_topics'], $untopics, $unposts, getUrl('action', ['action' => 'moderate', 'area' => 'postmod', 'sa' => ($board_info['unapproved_topics'] ? 'topics' : 'posts'), 'brd' => $board]));\n\t\t}\n\n\t\t// And now, what we're here for: topics!\n\t\trequire_once(SUBSDIR . '/MessageIndex.subs.php');\n\n\t\t// Known sort methods.\n\t\t$sort_methods = messageIndexSort();\n\t\t$default_sort_method = 'last_post';\n\n\t\t// We only know these.\n\t\tif (isset($this->_req->query->sort) && !isset($sort_methods[$this->_req->query->sort]))\n\t\t{\n\t\t\t$this->_req->query->sort = $default_sort_method;\n\t\t}\n\n\t\t// Make sure the starting place makes sense and construct the page index.\n\t\t$sort_string = '';\n\t\tif (isset($this->_req->query->sort))\n\t\t{\n\t\t\t$sort_string = ';sort=' . $this->_req->query->sort . (isset($this->_req->query->desc) ? ';desc' : '');\n\t\t}\n\n\t\t$context['page_index'] = constructPageIndex('{scripturl}?board=' . $board . '.%1$d' . $sort_string, $this->_req->query->start, $board_info['total_topics'], $maxindex, true);\n\t\t$context['start'] = &$this->_req->query->start;\n\n\t\t// Set a canonical URL for this page.\n\t\t$context['canonical_url'] = getUrl('board', ['board' => $board, 'start' => $context['start'], 'name' => $board_info['name']]);\n\n\t\t$context['links'] += array(\n\t\t\t'prev' => $this->_req->query->start >= $context['topics_per_page'] ? getUrl('board', ['board' => $board, 'start' => $this->_req->query->start - $context['topics_per_page'], 'name' => $board_info['name']]) : '',\n\t\t\t'next' => $this->_req->query->start + $context['topics_per_page'] < $board_info['total_topics'] ? getUrl('board', ['board' => $board, 'start' => $this->_req->query->start + $context['topics_per_page'], 'name' => $board_info['name']]) : '',\n\t\t);\n\n\t\tif (isset($this->_req->query->all) && !empty($modSettings['enableAllMessages']) && $maxindex > $modSettings['enableAllMessages'])\n\t\t{\n\t\t\t$maxindex = $modSettings['enableAllMessages'];\n\t\t\t$this->_req->query->start = 0;\n\t\t}\n\n\t\t// Build a list of the board's moderators.\n\t\t$context['moderators'] = &$board_info['moderators'];\n\t\t$context['link_moderators'] = array();\n\t\tif (!empty($board_info['moderators']))\n\t\t{\n\t\t\tforeach ($board_info['moderators'] as $mod)\n\t\t\t{\n\t\t\t\t$context['link_moderators'][] = '<a href=\"' . getUrl('profile', ['action' => 'profile', 'u' => $mod['id'], 'name' => $mod['name']]) . '\" title=\"' . $txt['board_moderator'] . '\">' . $mod['name'] . '</a>';\n\t\t\t}\n\t\t}\n\n\t\t// Mark current and parent boards as seen.\n\t\tif ($this->user->is_guest === false)\n\t\t{\n\t\t\t// We can't know they read it if we allow prefetches.\n\t\t\tstop_prefetching();\n\n\t\t\t// Mark the board as read, and its parents.\n\t\t\tif (!empty($board_info['parent_boards']))\n\t\t\t{\n\t\t\t\t$board_list = array_keys($board_info['parent_boards']);\n\t\t\t\t$board_list[] = $board;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$board_list = array($board);\n\t\t\t}\n\n\t\t\t// Mark boards as read. Boards alone, no need for topics.\n\t\t\tmarkBoardsRead($board_list, false, false);\n\n\t\t\t// Clear topicseen cache\n\t\t\tif (!empty($board_info['parent_boards']))\n\t\t\t{\n\t\t\t\t// We've seen all these boards now!\n\t\t\t\tforeach ($board_info['parent_boards'] as $k => $dummy)\n\t\t\t\t{\n\t\t\t\t\tif (isset($_SESSION['topicseen_cache'][$k]))\n\t\t\t\t\t{\n\t\t\t\t\t\tunset($_SESSION['topicseen_cache'][$k]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($_SESSION['topicseen_cache'][$board]))\n\t\t\t{\n\t\t\t\tunset($_SESSION['topicseen_cache'][$board]);\n\t\t\t}\n\n\t\t\t// From now on, they've seen it. So we reset notifications.\n\t\t\t$context['is_marked_notify'] = resetSentBoardNotification($this->user->id, $board);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$context['is_marked_notify'] = false;\n\t\t}\n\n\t\t// 'Print' the header and board info.\n\t\t$context['page_title'] = strip_tags($board_info['name']);\n\n\t\t// Set the variables up for the template.\n\t\t$context['can_mark_notify'] = allowedTo('mark_notify') && $this->user->is_guest === false;\n\t\t$context['can_post_new'] = allowedTo('post_new') || ($modSettings['postmod_active'] && allowedTo('post_unapproved_topics'));\n\t\t$context['can_post_poll'] = !empty($modSettings['pollMode']) && allowedTo('poll_post') && $context['can_post_new'];\n\t\t$context['can_moderate_forum'] = allowedTo('moderate_forum');\n\t\t$context['can_approve_posts'] = allowedTo('approve_posts');\n\n\t\t// Prepare sub-boards for display.\n\t\t$boardIndexOptions = array(\n\t\t\t'include_categories' => false,\n\t\t\t'base_level' => $board_info['child_level'] + 1,\n\t\t\t'parent_id' => $board_info['id'],\n\t\t\t'set_latest_post' => false,\n\t\t\t'countChildPosts' => !empty($modSettings['countChildPosts']),\n\t\t);\n\t\t$boardlist = new BoardsList($boardIndexOptions);\n\t\t$context['boards'] = $boardlist->getBoards();\n\n\t\t// Nosey, nosey - who's viewing this board?\n\t\tif (!empty($settings['display_who_viewing']))\n\t\t{\n\t\t\trequire_once(SUBSDIR . '/Who.subs.php');\n\t\t\tformatViewers($board, 'board');\n\t\t}\n\n\t\t// They didn't pick one, default to by last post descending.\n\t\tif (!isset($this->_req->query->sort) || !isset($sort_methods[$this->_req->query->sort]))\n\t\t{\n\t\t\t$context['sort_by'] = $default_sort_method;\n\t\t\t$ascending = isset($this->_req->query->asc);\n\t\t}\n\t\t// Otherwise sort by user selection and default to ascending.\n\t\telse\n\t\t{\n\t\t\t$context['sort_by'] = $this->_req->query->sort;\n\t\t\t$ascending = !isset($this->_req->query->desc);\n\t\t}\n\n\t\t$sort_column = $sort_methods[$context['sort_by']];\n\n\t\t$context['sort_direction'] = $ascending ? 'up' : 'down';\n\t\t$context['sort_title'] = $ascending ? $txt['sort_desc'] : $txt['sort_asc'];\n\n\t\t// Trick\n\t\t$txt['starter'] = $txt['started_by'];\n\n\t\t// todo: Need to move this to theme.\n\t\tforeach ($sort_methods as $key => $val)\n\t\t{\n\t\t\tswitch ($key)\n\t\t\t{\n\t\t\t\tcase 'subject':\n\t\t\t\tcase 'starter':\n\t\t\t\tcase 'last_poster':\n\t\t\t\t\t$sorticon = 'alpha';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sorticon = 'numeric';\n\t\t\t}\n\n\t\t\t$context['topics_headers'][$key] = array(\n\t\t\t\t'url' => getUrl('board', ['board' => $context['current_board'], 'start' => $context['start'], 'sort' => $key, 'name' => $board_info['name'], $context['sort_by'] == $key && $context['sort_direction'] === 'up' ? 'desc' : '']),\n\t\t\t\t'sort_dir_img' => $context['sort_by'] == $key ? '<i class=\"icon icon-small i-sort-' . $sorticon . '-' . $context['sort_direction'] . '\" title=\"' . $context['sort_title'] . '\"><s>' . $context['sort_title'] . '</s></i>' : '',\n\t\t\t);\n\t\t}\n\n\t\t// Calculate the fastest way to get the topics.\n\t\t$start = (int) $this->_req->query->start;\n\t\tif ($start > ($board_info['total_topics'] - 1) / 2)\n\t\t{\n\t\t\t$ascending = !$ascending;\n\t\t\t$fake_ascending = true;\n\t\t\t$maxindex = $board_info['total_topics'] < $start + $maxindex + 1 ? $board_info['total_topics'] - $start : $maxindex;\n\t\t\t$start = $board_info['total_topics'] < $start + $maxindex + 1 ? 0 : $board_info['total_topics'] - $start - $maxindex;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$fake_ascending = false;\n\t\t}\n\n\t\t$context['topics'] = array();\n\n\t\t// Set up the query options\n\t\t$indexOptions = array(\n\t\t\t'only_approved' => $modSettings['postmod_active'] && !allowedTo('approve_posts'),\n\t\t\t'previews' => !empty($modSettings['message_index_preview']) ? (empty($modSettings['preview_characters']) ? -1 : $modSettings['preview_characters']) : 0,\n\t\t\t'include_avatars' => $settings['avatars_on_indexes'],\n\t\t\t'ascending' => $ascending,\n\t\t\t'fake_ascending' => $fake_ascending\n\t\t);\n\n\t\t// Allow integration to modify / add to the $indexOptions\n\t\tcall_integration_hook('integrate_messageindex_topics', array(&$sort_column, &$indexOptions));\n\n\t\t$topics_info = messageIndexTopics($board, $this->user->id, $start, $maxindex, $context['sort_by'], $sort_column, $indexOptions);\n\n\t\t$context['topics'] = TopicUtil::prepareContext($topics_info, false, !empty($modSettings['preview_characters']) ? $modSettings['preview_characters'] : 128);\n\n\t\t// Allow addons to add to the $context['topics']\n\t\tcall_integration_hook('integrate_messageindex_listing', array($topics_info));\n\n\t\t// Fix the sequence of topics if they were retrieved in the wrong order. (for speed reasons...)\n\t\tif ($fake_ascending)\n\t\t{\n\t\t\t$context['topics'] = array_reverse($context['topics'], true);\n\t\t}\n\n\t\t$topic_ids = array_keys($context['topics']);\n\n\t\tif (!empty($modSettings['enableParticipation']) && $this->user->is_guest === false && !empty($topic_ids))\n\t\t{\n\t\t\t$topics_participated_in = topicsParticipation($this->user->id, $topic_ids);\n\t\t\tforeach ($topics_participated_in as $participated)\n\t\t\t{\n\t\t\t\t$context['topics'][$participated['id_topic']]['is_posted_in'] = true;\n\t\t\t\t$context['topics'][$participated['id_topic']]['class'] = 'my_' . $context['topics'][$participated['id_topic']]['class'];\n\t\t\t}\n\t\t}\n\n\t\t$context['jump_to'] = array(\n\t\t\t'label' => addslashes(un_htmlspecialchars($txt['jump_to'])),\n\t\t\t'board_name' => htmlspecialchars(strtr(strip_tags($board_info['name']), array('&amp;' => '&')), ENT_COMPAT, 'UTF-8'),\n\t\t\t'child_level' => $board_info['child_level'],\n\t\t);\n\n\t\t// Is Quick Moderation active/needed?\n\t\tif (!empty($options['display_quick_mod']) && !empty($context['topics']))\n\t\t{\n\t\t\t$context['can_markread'] = $context['user']['is_logged'];\n\t\t\t$context['can_lock'] = allowedTo('lock_any');\n\t\t\t$context['can_sticky'] = allowedTo('make_sticky');\n\t\t\t$context['can_move'] = allowedTo('move_any');\n\t\t\t$context['can_remove'] = allowedTo('remove_any');\n\t\t\t$context['can_merge'] = allowedTo('merge_any');\n\n\t\t\t// Ignore approving own topics as it's unlikely to come up...\n\t\t\t$context['can_approve'] = $modSettings['postmod_active'] && allowedTo('approve_posts') && !empty($board_info['unapproved_topics']);\n\n\t\t\t// Can we restore topics?\n\t\t\t$context['can_restore'] = allowedTo('move_any') && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] == $board;\n\n\t\t\t// Set permissions for all the topics.\n\t\t\tforeach ($context['topics'] as $t => $topic)\n\t\t\t{\n\t\t\t\t$started = $topic['first_post']['member']['id'] == $this->user->id;\n\t\t\t\t$context['topics'][$t]['quick_mod'] = array(\n\t\t\t\t\t'lock' => allowedTo('lock_any') || ($started && allowedTo('lock_own')),\n\t\t\t\t\t'sticky' => allowedTo('make_sticky'),\n\t\t\t\t\t'move' => allowedTo('move_any') || ($started && allowedTo('move_own')),\n\t\t\t\t\t'modify' => allowedTo('modify_any') || ($started && allowedTo('modify_own')),\n\t\t\t\t\t'remove' => allowedTo('remove_any') || ($started && allowedTo('remove_own')),\n\t\t\t\t\t'approve' => $context['can_approve'] && $topic['unapproved_posts']\n\t\t\t\t);\n\t\t\t\t$context['can_lock'] |= ($started && allowedTo('lock_own'));\n\t\t\t\t$context['can_move'] |= ($started && allowedTo('move_own'));\n\t\t\t\t$context['can_remove'] |= ($started && allowedTo('remove_own'));\n\t\t\t}\n\n\t\t\t// Can we use quick moderation checkboxes?\n\t\t\tif ($options['display_quick_mod'] == 1)\n\t\t\t{\n\t\t\t\t$context['can_quick_mod'] = $context['user']['is_logged'] || $context['can_approve'] || $context['can_remove'] || $context['can_lock'] || $context['can_sticky'] || $context['can_move'] || $context['can_merge'] || $context['can_restore'];\n\t\t\t}\n\t\t\t// Or the icons?\n\t\t\telse\n\t\t\t{\n\t\t\t\t$context['can_quick_mod'] = $context['can_remove'] || $context['can_lock'] || $context['can_sticky'] || $context['can_move'];\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($context['can_quick_mod']) && $options['display_quick_mod'] == 1)\n\t\t{\n\t\t\t$context['qmod_actions'] = array('approve', 'remove', 'lock', 'sticky', 'move', 'merge', 'restore', 'markread');\n\t\t\tcall_integration_hook('integrate_quick_mod_actions');\n\t\t}\n\n\t\tif (!empty($context['boards']) && $context['start'] == 0)\n\t\t{\n\t\t\t$template_layers->add('display_child_boards');\n\t\t}\n\n\t\t// If there are children, but no topics and no ability to post topics...\n\t\t$context['no_topic_listing'] = !empty($context['boards']) && empty($context['topics']) && !$context['can_post_new'];\n\t\t$template_layers->add('topic_listing');\n\n\t\ttheme()->addJavascriptVar(array('notification_board_notice' => $context['is_marked_notify'] ? $txt['notification_disable_board'] : $txt['notification_enable_board']), true);\n\n\t\t// Build the message index button array.\n\t\t$context['normal_buttons'] = array(\n\t\t\t'new_topic' => array('test' => 'can_post_new',\n\t\t\t\t\t\t\t\t 'text' => 'new_topic',\n\t\t\t\t\t\t\t\t 'lang' => true,\n\t\t\t\t\t\t\t\t 'url' => getUrl('action', ['action' => 'post', 'board' => $context['current_board'] . '.0']),\n\t\t\t\t\t\t\t\t 'active' => true),\n\t\t\t'notify' => array('test' => 'can_mark_notify',\n\t\t\t\t\t\t\t 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify',\n\t\t\t\t\t\t\t 'lang' => true, 'custom' => 'onclick=\"return notifyboardButton(this);\"',\n\t\t\t\t\t\t\t 'url' => getUrl('action', ['action' => 'notifyboard', 'sa' => ($context['is_marked_notify'] ? 'off' : 'on'), 'board' => $context['current_board'] . '.' . $context['start'], '{session_data}'])),\n\t\t);\n\n\t\ttheme()->addJavascriptVar(array(\n\t\t\t'txt_mark_as_read_confirm' => $txt['mark_these_as_read_confirm']\n\t\t), true);\n\n\t\t// They can only mark read if they are logged in and it's enabled!\n\t\tif ($this->user->is_guest === false && $settings['show_mark_read'])\n\t\t{\n\t\t\t$context['normal_buttons']['markread'] = array(\n\t\t\t\t'text' => 'mark_read_short',\n\t\t\t\t'lang' => true,\n\t\t\t\t'url' => getUrl('action', ['action' => 'markasread', 'sa' => 'board', 'board' => $context['current_board'] . '.0', '{session_data}']),\n\t\t\t\t'custom' => 'onclick=\"return markboardreadButton(this);\"'\n\t\t\t);\n\t\t}\n\n\t\t// Allow adding new buttons easily.\n\t\tcall_integration_hook('integrate_messageindex_buttons');\n\t}", "function _show_topic() {\n\n\t\t$_posts_per_page = !empty(module('forum')->USER_SETTINGS['POSTS_PER_PAGE']) ? module('forum')->USER_SETTINGS['POSTS_PER_PAGE'] : module('forum')->SETTINGS['NUM_POSTS_ON_PAGE'];\n\n\t\tif (!module('forum')->SETTINGS['ALLOW_PRINT_TOPIC']) {\n\t\t\treturn module('forum')->_show_error('Print topic is disabled');\n\t\t}\n\n\t\tmain()->NO_GRAPHICS = true;\n\n\t\t$topic_id = intval($_GET['id']);\n\n\t\t// Get topic info\n\t\t$topic_info = db()->query_fetch('SELECT * FROM '.db('forum_topics').' WHERE id='.intval($topic_id).' LIMIT 1');\n\t\tif (empty($topic_info)) {\n\t\t\treturn '';\n\t\t}\n\t\t?>\n<html>\n<head>\n<title><?php echo $topic_info['name']?></title>\n<style type=\"text/css\">\n<!--\ntd, p, div\n{\n\tfont: 10pt verdana;\n}\n.smallfont\n{\n\tfont-size: 11px;\n}\n.tborder\n{\n\tborder: 1px solid #808080;\n}\n.thead\n{\n\tbackground-color: #EEEEEE;\n}\n.page\n{\n\tbackground-color: #FFFFFF;\n\tcolor: #000000;\n}\n-->\n</style>\n</head>\n<body class=\"page\">\n\t\t<?php\n\n\t\techo \"<a href='\".process_url(\"./?object=forum&action=view_topic&id=\".$topic_id).\"'><b>\".$topic_info[\"name\"].\"</b></a><br/>\".PHP_EOL;\n\t\t// Prepare SQL query\n\t\t$sql = 'SELECT * FROM '.db('forum_posts').' WHERE topic='.$topic_id;\n\t\t$order_by = ' ORDER BY created ASC ';\n\t\tlist($add_sql, $pages, $topic_num_posts) = common()->divide_pages($sql, null, null, $_posts_per_page);\n\n\t\tif (!empty($pages))\n\t\t {\n\t\t\techo '<br /><small>Pages: '.$pages.'</small>'.PHP_EOL;\n\t\t }\n\n\t\techo '<BR>';\n\t\t// Init bb codes module\n\t\t$BB_OBJ = _class('bb_codes');\n\t\t// Process posts\n\t\t$Q = db()->query($sql. $order_by. $add_sql);\n\t\twhile ($post_info = db()->fetch_assoc($Q))\n\t\t {\n\t\t ?>\n<table class=\"tborder\" cellpadding=\"6\" cellspacing=\"1\" border=\"0\" width=\"100%\">\n <tr>\n\t<td class=\"page\">\n\t\t<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n\t\t <tr valign=\"bottom\">\n\t\t\t<td style=\"font-size:14pt\"><?php echo _prepare_html($post_info['user_name'])?></td>\n\t\t\t<td class=\"smallfont\" align=\"right\"><?php echo _format_date($post_info['created'], 'long')?></td>\n\t\t </tr>\n\t\t</table>\n\t\t<hr/>\n\t\t<div><?php echo $BB_OBJ->_process_text($post_info['text'])?></div>\n\t</td>\n </tr>\n</table>\n<br/>\n\t\t <?php\n\t\t }\n\t\techo '</body></html>';\n\t}", "function addTopic(&$topic) {\n\t\t$this->topics[] = $topic;\n\t}", "protected function getFeed_TopicsService()\n {\n return new \\phpbb\\feed\\topics(${($_ = isset($this->services['feed.helper']) ? $this->services['feed.helper'] : $this->getFeed_HelperService()) && false ?: '_'}, ${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, ${($_ = isset($this->services['auth']) ? $this->services['auth'] : ($this->services['auth'] = new \\phpbb\\auth\\auth())) && false ?: '_'}, ${($_ = isset($this->services['content.visibility']) ? $this->services['content.visibility'] : $this->getContent_VisibilityService()) && false ?: '_'}, ${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, 'php');\n }", "public function index()\n {\n $topics = Topic::whereHas('questions', function ($query) {\n $query->where('status', 'public');\n })\n ->with(['questions' => function ($query) {\n $query->where('status', 'public');\n }])\n ->get();\n }", "function add_topic($array, $redirect_to_topic = false) {\n global $db;\n if ($array == NULL)\n $array = $_POST;\n\n if (is_array($_FILES))\n $array = array_merge($array, $_FILES);\n\n $fields = $this->load_add_topic_form_fields($array);\n validate_cb_form($fields, $array);\n\n $user = userid();\n\n $gp_details = $this->get_group_details($array['group_id']);\n\n\n //Checking for weather user is allowed to post topics or not\n if (!$this->validate_posting_previlige($gp_details))\n return false;\n\n if (!error()) {\n foreach ($fields as $field) {\n $name = formObj::rmBrackets($field['name']);\n $val = $array[$name];\n\n if ($field['use_func_val'])\n $val = $field['validate_function']($val);\n\n\n if (!empty($field['db_field']))\n $query_field[] = $field['db_field'];\n\n if (is_array($val)) {\n $new_val = '';\n foreach ($val as $v) {\n $new_val .= \"#\" . $v . \"# \";\n }\n $val = $new_val;\n }\n\n if (!$field['clean_func'] || (!apply_func($field['clean_func'], $val) && !is_array($field['clean_func'])))\n $val = $val;\n else\n $val = apply_func($field['clean_func'], sql_free($val));\n\n if (empty($val) && !empty($field['default_value']))\n $val = $field['default_value'];\n\n if (!empty($field['db_field']))\n $query_val[] = $val;\n }\n }\n\n\n\n if (!error()) {\n //Adding Topic icon\n $query_field[] = \"topic_icon\";\n $query_val[] = $array['topic_icon'];\n //UID\n $query_field[] = \"userid\";\n $query_val[] = $user;\n //DATE ADDED\n $query_field[] = \"date_added\";\n $query_val[] = now();\n\n $query_field[] = \"last_post_time\";\n $query_val[] = now();\n\n //GID\n $query_field[] = \"group_id\";\n $query_val[] = $array['group_id'];\n\n //Checking If posting requires approval or not\n $query_field[] = \"approved\";\n if ($gp_details['post_type'] == 1)\n $query_val[] = \"no\";\n else\n $query_val[] = \"yes\";\n\n //Inserting IN Database now\n $db->insert(tbl($this->gp_topic_tbl), $query_field, $query_val);\n $insert_id = $db->insert_id();\n\n //Increasing Group Topic Counts\n $count_topics = $this->count_group_topics($array['group_id']);\n $db->update(tbl($this->gp_tbl), array(\"total_topics\"), array($count_topics), \" group_id='\" . $array['group_id'] . \"'\");\n\n //leaving msg\n e(lang(\"grp_tpc_msg\"), \"m\");\n\n //Redirecting to topic\n if ($redirect_to_topic) {\n $grp_details = $this->get_details($insert_id);\n redirect_to(group_link($grp_details));\n }\n\n return $insert_id;\n }\n }", "function addTopic()\n{\n\tglobal $xoopsDB, $xoopsModule, $xoopsModuleConfig;\n $topicpid = isset($_POST['topic_pid']) ? intval($_POST['topic_pid']) : 0;\n $xt = new NewsTopic();\n if (!$xt->topicExists($topicpid, $_POST['topic_title'])) {\n $xt->setTopicPid($topicpid);\n if (empty($_POST['topic_title']) || xoops_trim($_POST['topic_title'])=='') {\n redirect_header( \"index.php?op=topicsmanager\", 2, _AM_ERRORTOPICNAME );\n }\n $xt->setTopicTitle($_POST['topic_title']);\n //$xt->Settopic_rssurl($_POST['topic_rssfeed']);\n $xt->setTopic_color($_POST['topic_color']);\n if (isset($_POST['topic_imgurl'] ) && $_POST['topic_imgurl'] != \"\") {\n $xt->setTopicImgurl($_POST['topic_imgurl'] );\n }\n\t\t$xt->setMenu(intval($_POST['submenu']));\n\t\t$xt->setTopicFrontpage(intval($_POST['topic_frontpage']));\n\t\tif(isset($_POST['xoops_upload_file'])) {\n\t\t\t$fldname = $_FILES[$_POST['xoops_upload_file'][0]];\n\t\t\t$fldname = (get_magic_quotes_gpc()) ? stripslashes($fldname['name']) : $fldname['name'];\n\t\t\tif(xoops_trim($fldname!='')) {\n\t\t\t\t$sfiles = new sFiles();\n\t\t\t\t$dstpath = XOOPS_ROOT_PATH . \"/modules/\" . $xoopsModule -> dirname() . '/images/topics';\n\t\t\t\t$destname=$sfiles->createUploadName($dstpath ,$fldname, true);\n\t\t\t\t$permittedtypes=array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png');\n\t\t\t\t$uploader = new XoopsMediaUploader($dstpath, $permittedtypes, $xoopsModuleConfig['maxuploadsize']);\n\t\t\t\t$uploader->setTargetFileName($destname);\n\t\t\t\tif ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {\n\t\t\t\t\tif ($uploader->upload()) {\n\t\t\t\t\t\t$xt->setTopicImgurl(basename($destname));\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo _AM_UPLOAD_ERROR . ' ' . $uploader->getErrors();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\techo $uploader->getErrors();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$xt->setTopicDescription($_POST['topic_description']);\n\t\t$xt->store();\n\t\tupdateCache();\n\n $notification_handler = & xoops_gethandler('notification');\n $tags = array();\n $tags['TOPIC_NAME'] = $_POST['topic_title'];\n $notification_handler->triggerEvent( 'global', 0, 'new_category', $tags);\n redirect_header('index.php?op=topicsmanager', 1, _AM_DBUPDATED);\n } else {\n redirect_header('index.php?op=topicsmanager', 2, _AM_ADD_TOPIC_ERROR);\n }\n exit();\n}", "public function getTopic()\n {\n return $this->_topic;\n }", "public function latest_topics_main()\n \t{\n \t\t//-----------------------------------------\n \t\t// INIT\n \t\t//-----------------------------------------\n\n \t\t$attach_pids\t= array();\n \t\t$attach_posts\t= array();\n \t\t$forums\t\t\t= array();\n \t\t$rows\t\t\t= array();\n \t\t$output\t\t\t= array();\n\t\t$where_clause\t= array();\n \t\t$limit\t\t\t= $this->settings['latest_topics_main'] ? $this->settings['latest_topics_main'] : 3;\n \t\t$posts\t\t\t= intval($this->memberData['posts']);\n\n \t\t//-----------------------------------------\n \t// Grab articles new/recent in 1 bad ass query\n \t//-----------------------------------------\n\n \t\tforeach( explode( ',', $this->settings['portal_latest_topics_forums'] ) as $forum_id )\n \t\t{\n \t\t\tif( !$forum_id )\n \t\t\t{\n \t\t\t\tcontinue;\n \t\t\t}\n\n \t\t\t$forums[] = intval($forum_id);\n \t\t}\n \t\t\n \t\tif( !count($forums) )\n \t\t{\n \t\t\treturn;\n \t\t}\n\t\t\n\t\t/* Loop through the forums and build a list of forums we're allowed access to */\n\t\t$forumIdsOk = array();\n\t\n\t\tforeach( $this->registry->class_forums->forum_by_id as $id => $data )\n\t\t{\n\t\t\t/* Allowing this forum? */\n\t\t\tif ( ! in_array( $id, $forums ) )\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t/* Can we read? */\n\t\t\tif ( ! $this->registry->permissions->check( 'read', $data ) )\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/* Can read, but is it password protected, etc? */\n\t\t\tif ( ! $this->registry->class_forums->forumsCheckAccess( $id, 0, 'forum', array(), true ) )\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( ! $data['can_view_others'] )\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif ( $data['min_posts_view'] > $posts )\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$forumIdsOk[] = $id;\n\t\t}\n\n\t\tif( !count($forumIdsOk) )\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t/* Add allowed forums */\n\t\t$where_clause[] = \"t.forum_id IN (\" . implode( \",\", $forumIdsOk ) . \")\";\n\n\t\t//-----------------------------------------\n\t\t// Will we need to parse attachments?\n\t\t//-----------------------------------------\n\t\t\n\t\t$parseAttachments\t= false;\n\t\t\n\t\t//-----------------------------------------\n\t\t// Run query\n\t\t//-----------------------------------------\n\t\t\n\t\t$pinned = array();\n\t\t$unpinned = array();\n\t\t$all\t = array();\n\t\t$data = array();\n\t\t$count = 0;\n\t\t\n\t\tif( !$this->settings['portal_exclude_pinned'] )\n\t\t{\n\t\t\t/* Fetch all pinned topics to avoid filesort */\n\t\t\t$this->DB->build( array( 'select' => 't.tid, t.start_date',\n\t\t\t\t\t\t\t\t\t 'from' => 'topics t',\n\t\t\t\t\t\t\t\t\t 'where' => \"t.pinned=1 AND t.approved=1 AND t.state != 'link' AND \" . implode( ' AND ', $where_clause ),\n\t\t\t\t\t\t\t\t\t //'order' => 't.tid DESC',\n\t\t\t\t\t\t\t\t\t 'limit' => array ( $limit ) ) );\n\t\t\t\t\t\t\t\t\t\n\t\t\t$this->DB->execute();\n\t\t\t\n\t\t\twhile( $row = $this->DB->fetch() )\n\t\t\t{\n\t\t\t\t$pinned[ $row['start_date'] ] = $row['tid'];\n\t\t\t\t$all[ $row['start_date'] ] = $row['tid'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* Still need more? */\n\t\t\n\t\tif ( count( $pinned ) < $limit )\n\t\t{\n\t\t\t$pinnedWhere\t= $this->settings['portal_exclude_pinned'] ? \"\" : \"t.pinned=0 AND \";\n\t\t\t\n\t\t\t$this->DB->build( array( 'select' => 't.tid, t.start_date, t.last_post',\n\t\t\t\t\t\t\t\t\t 'from' => 'topics t',\n\t\t\t\t\t\t\t\t\t 'where' => $pinnedWhere . \"t.approved=1 AND t.state != 'link' AND \" . implode( ' AND ', $where_clause ),\n\t\t\t\t\t\t\t\t\t 'order' => 'tid DESC',\n\t\t\t\t\t\t\t\t\t 'limit' => array ( $limit - count( $pinned ) ) ) );\n\t\t\t\t\t\t\t\t\t\n\t\t\t$this->DB->execute();\n\t\t\t\n\t\t\twhile( $row = $this->DB->fetch() )\n\t\t\t{\n\t\t\t\t$unpinned[ $row['last_post'] ] = $row['tid'];\n\t\t\t\t$all[ $row['last_post'] ] = $row['tid'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* got anything? */\n\t\tif ( ! count( $all ) )\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$this->DB->build( array( \n\t\t\t\t\t\t\t\t'select'\t=> 't.*',\n\t\t\t\t\t\t\t\t'from'\t\t=> array( 'topics' => 't' ),\n\t\t\t\t\t\t\t\t'where'\t\t=> \"t.tid IN (\" . implode( \",\", array_values( $all ) ) . \")\",\n\t\t\t\t\t\t\t\t'add_join'\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray( \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'select'\t=> 'p.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'from'\t=> array( 'posts' => 'p' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'where'\t=> 'p.pid=t.topic_firstpost',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type'\t=> 'left'\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\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'select'\t=> 'f.id, f.name, f.name_seo, f.use_html',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'from'\t\t=> array( 'forums' => 'f' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'where'\t\t=> \"f.id=t.forum_id\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type'\t\t=> 'left',\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\tarray( \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'select'\t=> 'm.member_id, m.members_display_name, m.member_group_id, m.members_seo_name, m.mgroup_others, m.login_anonymous, m.last_visit, m.last_activity',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'from'\t\t=> array( 'members' => 'm' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'where'\t\t=> 'm.member_id=p.author_id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type'\t\t=> 'left'\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\tarray( \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'select'\t=> 'pp.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'from'\t\t=> array( 'profile_portal' => 'pp' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'where'\t\t=> 'pp.pp_member_id=m.member_id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type'\t\t=> 'left'\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\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t)\t\t);\n\t\t\n\t\t$outer = $this->DB->execute();\n\t\t\n \t\t//-----------------------------------------\n \t\t// Loop through..\n \t\t//-----------------------------------------\n \t\t\n \t\twhile( $row = $this->DB->fetch($outer) )\n \t\t{\n\t\t\t$data[ $row['tid'] ] = $row;\n\t\t}\n\t\t\n\t\tkrsort( $unpinned );\n\t\tkrsort( $pinned );\n\t\t\n\t\tforeach( $unpinned as $date => $tid )\n\t\t{\n\t\t\tif ( count( $pinned ) < $limit )\n\t\t\t{\n\t\t\t\t$pinned[ $date ] = $tid;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$count++;\n\t\t}\n\t\t\n\t\t/* Now put it altogether */\n\t\tforeach( $pinned as $date => $tid )\n\t\t{\n \t\t\t//-----------------------------------------\n \t\t\t// INIT\n \t\t\t//-----------------------------------------\n \t\t\t\n\t\t\t$entry = $data[ $tid ];\n \t\t\t$bottom_string\t\t= \"\";\n \t\t\t$read_more\t\t\t= \"\";\n \t\t\t$top_string\t\t\t= \"\";\n \t\t\t$got_these_attach\t= 0;\n \t\t\t\n\t\t\tif( $entry['topic_hasattach'] )\n\t\t\t{\n\t\t\t\t$parseAttachments\t= true;\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\t\t\t// Parse the post\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tIPSText::getTextClass( 'bbcode' )->parse_smilies\t\t\t= $entry['use_emo'];\n\t\t\tIPSText::getTextClass( 'bbcode' )->parse_html\t\t\t\t= ( $entry['use_html'] and $entry['post_htmlstate'] ) ? 1 : 0;\n\t\t\tIPSText::getTextClass( 'bbcode' )->parse_nl2br\t\t\t\t= $entry['post_htmlstate'] == 2 ? 1 : 0;\n\t\t\tIPSText::getTextClass( 'bbcode' )->parse_bbcode\t\t\t\t= 1;\n\t\t\tIPSText::getTextClass( 'bbcode' )->parsing_section\t\t\t= 'topics';\n\t\t\tIPSText::getTextClass( 'bbcode' )->parsing_mgroup\t\t\t= $entry['member_group_id'];\n\t\t\tIPSText::getTextClass( 'bbcode' )->parsing_mgroup_others\t= $entry['mgroup_others'];\n\t\t\t$entry['post']\t= IPSText::getTextClass( 'bbcode' )->preDisplayParse( $entry['post'] );\n \t\t\t\n \t\t\t//-----------------------------------------\n \t\t\t// BASIC INFO\n \t\t\t//-----------------------------------------\n \t\t\t\n \t\t\t$real_posts\t\t\t= $entry['posts'];\n \t\t\t$entry['posts']\t\t= ipsRegistry::getClass('class_localization')->formatNumber(intval($entry['posts']));\n\n $entry\t= IPSMember::buildDisplayData( $entry );\n \n \t\t\t//-----------------------------------------\n\t\t\t// Attachments?\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tif( $entry['pid'] )\n\t\t\t{\n\t\t\t\t$attach_pids[ $entry['pid'] ] = $entry['pid'];\n\t\t\t} \t\t\t\n\n\t\t\tif ( IPSMember::checkPermissions('download', $entry['forum_id'] ) === FALSE )\n\t\t\t{\n\t\t\t\t$this->settings[ 'show_img_upload'] = 0 ;\n\t\t\t} \n \n $entry['share_links'] = IPSLib::shareLinks( $entry['title'], array( 'url' => $this->registry->output->buildSEOUrl( 'showtopic=' . $entry['tid'], 'publicNoSession', $entry['title_seo'], 'showtopic' ) ) );\n \t\t\t\n\t\t\t$rows[] = $entry;\n \t\t}\n \t\t\n \t\t$output = $this->registry->getClass('output')->getTemplate('portal')->articles( $rows );\n \t\t\n \t\t//-----------------------------------------\n \t\t// Process Attachments\n \t\t//-----------------------------------------\n \t\t\n \t\tif ( $parseAttachments AND count( $attach_pids ) )\n \t\t{\n\t\t\tif ( ! is_object( $this->class_attach ) )\n\t\t\t{\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Grab render attach class\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' );\n\t\t\t\t$this->class_attach = new $classToLoad( $this->registry );\n\t\t\t\t\n\t\t\t\t$this->class_attach->attach_post_key = '';\n\n\t\t\t\tipsRegistry::getClass( 'class_localization' )->loadLanguageFile( array( 'public_topic' ), 'forums' );\n\t\t\t}\n\t\t\t\n\t\t\t$this->class_attach->attach_post_key\t= '';\n\t\t\t$this->class_attach->type\t\t\t\t= 'post';\n\t\t\t$this->class_attach->init();\n\t\t\n\t\t\t$output = $this->class_attach->renderAttachments( $output, $attach_pids );\n\t\t\t$output\t= $output[0]['html'];\n \t\t}\n \t\t\n \t\treturn $output;\n \t}", "public function getName(): string\n {\n return 'info.topic';\n }", "public function __construct() {\n $this->topics = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n }", "public function subtopics() {\n return $this->belongsToMany('App\\Topic', 'topic_subtopic', 'parent_topic_id', 'subtopic_id')->withTimestamps();\n }", "protected function _fix_links_callback_topic($m)\n {\n return 'index.php?topic=' . strval(import_id_remap_get('topic', strval($m[2]), true));\n }", "public function __construct(){\n $accounts = $this->getTopicAccounts();\n foreach($accounts as $account){\n $connection = $this->getAuthenticatedConnection(\n $account['domain'],\n $account['username'],\n $account['password']\n );\n $mailboxes = $connection->getMailboxes();\n foreach($mailboxes as $mailbox){\n // Get all topic emails from the Topix server and store into\n // an array.\n // Check to see if it is from a Topix account, and check to\n // see if it a unique topic.\n $this->findTopics($mailbox, $account);\n }\n }\n }", "public function topicLists()\n {\n $this->adapter = $this->serviceLocator->get('Zend\\Db\\Adapter\\Adapter');\n $sql = \"select * from topics\";\n $statement = $this->adapter->query($sql);\n $result = $statement->execute();\n\n return $result;\n }", "function return_topic_list_data( $view_as_guest=0 )\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\t\t\n\t\t$topics = array();\n\t\t\n\t\t$this->ipsclass->init_load_cache( array( 'attachtypes' ) );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Set up\n\t\t//-----------------------------------------\n\n\t\t$this->topic_list_config['order_field'] = ( $this->topic_list_config['order_field'] == 'started' ) ? 'start_date' : $this->topic_list_config['order_field'];\n\t\t$this->topic_list_config['order_field'] = ( $this->topic_list_config['order_field'] == 'lastpost' ) ? 'last_post' : $this->topic_list_config['order_field'];\n\t\t$this->topic_list_config['forums'] = ( is_array( $this->topic_list_config['forums'] ) ) ? implode( \",\", $this->topic_list_config['forums'] ) : $this->topic_list_config['forums'];\n\t\t\n\t\t//-----------------------------------------\n\t\t// Fix up allowed forums\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $this->topic_list_config['forums'] )\n\t\t{\n\t\t\t# Init forums...\n\t\t\tif ( $view_as_guest )\n\t\t\t{\n\t\t\t\t$this->ipsclass->perm_id_array = explode( ',', $this->ipsclass->create_perms_from_group( $this->ipsclass->vars['guest_group'] ) );\n\t\t\t\t$this->ipsclass->forums->strip_invisible = 1;\n\t\t\t}\n\t\t\t\n\t\t\t$this->ipsclass->forums->forums_init();\n\t\t\t\n\t\t\t# Reset topics...\n\t\t\tif ( $this->topic_list_config['forums'] == '*' )\n\t\t\t{\n\t\t\t\t$_tmp_array \t\t\t\t\t = array();\n\t\t\t\t$this->topic_list_config['forums'] = '';\n\t\t\t\t\n\t\t\t\tforeach( $this->ipsclass->forums->forum_by_id as $id => $data )\n\t\t\t\t{\n\t\t\t\t\t$_tmp_forums[] = $id;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$_tmp_forums = explode( ',', $this->topic_list_config['forums'] );\n\t\t\t\t$_tmp_array \t\t\t\t\t = array();\n\t\t\t\t$this->topic_list_config['forums'] = '';\n\t\t\t}\n\t\t\t\n\t\t\tforeach( $_tmp_forums as $_id )\n\t\t\t{\n\t\t\t\tif ( $view_as_guest )\n\t\t\t\t{\n\t\t\t\t\tif ( ! $this->ipsclass->forums->forums_quick_check_access( $_id ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$_tmp_array[] = $_id;\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$_tmp_array[] = $_id;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->topic_list_config['forums'] = implode( ',', $_tmp_array );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get from the DB\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->DB->build_query( array( 'select' => 't.*',\n\t\t\t\t\t\t\t\t\t\t\t\t 'from' => array( 'topics' => 't' ),\n\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 't.approved=1 AND t.forum_id IN (0,'.$this->topic_list_config['forums'].')',\n\t\t\t\t\t\t\t\t\t\t\t 'order' => $this->topic_list_config['order_field'].' '.$this->topic_list_config['order_by'],\n\t\t\t\t\t\t\t\t\t\t\t\t 'limit' => array( $this->topic_list_config['offset'], $this->topic_list_config['limit'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t 'add_join' => array( \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 0 => array( 'select' => 'p.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => array( 'posts' => 'p' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 't.topic_firstpost=p.pid',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'type' => 'left' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 1 => array( 'select' => 'm.id as member_id, m.members_display_name as member_name, m.mgroup, m.email',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t 'from' => array( 'members' => 'm' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => \"m.id=p.author_id\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'type' => 'left' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 2 => array( 'select' => 'f.id as forum_id, f.name as forum_name, f.use_html',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t 'from' => array( 'forums' => 'f' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => \"t.forum_id=f.id\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'type' => 'left' ) )\n\t\t\t\t\t\t\t\t\t\t) );\n\t\t\n\t\t$this->ipsclass->DB->exec_query();\n\t\t\n\t\twhile( $row = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\tif( $row['topic_hasattach'] )\n\t\t\t{\n\t\t\t\t$this->attach_pids[] = $row['pid'];\n\t\t\t}\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Guest name?\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$row['member_name'] = $row['member_name'] ? $row['member_name'] : $row['author_name'];\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Topic link\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$row['link-topic'] = $this->ipsclass->base_url.'showtopic='.$row['tid'];\n\t\t\t$row['link-forum'] = $this->ipsclass->base_url.'showforum='.$row['forum_id'];\n\t\t\t\n\t\t\t$topics[] = $row;\n\t\t}\n\t\t\n\t\tif( count( $this->attach_pids ) )\n\t\t{\n\t\t\t$final_attachments = array();\n\t\t\t\n\t\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'attachments',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => \"attach_rel_module='post' AND attach_rel_id IN (\".implode(\",\", $this->attach_pids).\")\"\n\t\t\t\t\t\t\t\t\t\t\t\t ) );\n\n\t\t\t$this->ipsclass->DB->simple_exec();\n\t\t\t\n\t\t\twhile ( $a = $this->ipsclass->DB->fetch_row() )\n\t\t\t{\n\t\t\t\t$final_attachments[ $a[ 'attach_pid' ] ][ $a['attach_id'] ] = $a;\n\t\t\t}\n\t\t\t\n\t\t\t$final_topics = array();\n\t\t\t\n\t\t\tforeach( $topics as $mytopic )\n\t\t\t{\n\t\t\t\t$this_topic_attachments = array();\n\t\t\t\t\n\t\t\t\tforeach ( $final_attachments as $pid => $data )\n\t\t\t\t{\n\t\t\t\t\tif( $pid <> $mytopic['pid'] )\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$temp_out = \"\";\n\t\t\t\t\t$temp_hold = array();\n\t\t\t\t\t\n\t\t\t\t\tforeach( $final_attachments[$pid] as $aid => $row )\n\t\t\t\t\t{\n\t\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\t// Is it an image, and are we viewing the image in the post?\n\t\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $this->ipsclass->vars['show_img_upload'] and $row['attach_is_image'] )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ( $this->ipsclass->vars['siu_thumb'] AND $row['attach_thumb_location'] AND $row['attach_thumb_width'] )\n\t\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t\t$this_topic_attachments[] = array( 'size' \t\t=> $this->ipsclass->size_format( $row['attach_filesize'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'method' \t=> 'post',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'id'\t\t=> $row['attach_id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'file'\t\t=> $row['attach_file'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'hits'\t\t=> $row['attach_hits'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'thumb_location'\t=> $row['attach_thumb_location'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type'\t\t=> 'thumb',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'thumb_x'\t=> $row['attach_thumb_width'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'thumb_y'\t=> $row['attach_thumb_height'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'ext'\t\t=> $row['attach_ext'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this_topic_attachments[] = array( 'size' \t\t=> $this->ipsclass->size_format( $row['attach_filesize'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'method' \t=> 'post',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'id'\t\t=> $row['attach_id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'file'\t\t=> $row['attach_file'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'hits'\t\t=> $row['attach_hits'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'thumb_location'\t=> $row['attach_thumb_location'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type'\t\t=> 'image',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'thumb_x'\t=> $row['attach_thumb_width'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'thumb_y'\t=> $row['attach_thumb_height'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'ext'\t\t=> $row['attach_ext'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this_topic_attachments[] = array( 'size' \t\t=> $this->ipsclass->size_format( $row['attach_filesize'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'method' \t=> 'post',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'id'\t\t=> $row['attach_id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'file'\t\t=> $row['attach_file'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'hits'\t\t=> $row['attach_hits'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'thumb_location'\t=> $row['attach_thumb_location'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type'\t\t=> 'reg',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'thumb_x'\t=> $row['attach_thumb_width'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'thumb_y'\t=> $row['attach_thumb_height'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'ext'\t\t=> $row['attach_ext'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif( count( $this_topic_attachments ) )\n\t\t\t\t{\n\t\t\t\t\t$mytopic['attachment_data'] = $this_topic_attachments;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$final_topics[] = $mytopic;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Return...\n\t\t//-----------------------------------------\n\t\t\t\t\n\t\tif( count( $final_topics ) )\n\t\t{\n\t\t\treturn $final_topics;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $topics;\n\t\t}\t\t\t\n\t}", "function target_add_topic($topic)\n{\n\t// if ($GLOBALS['VERBOSE']) pf('...'. $topic['id']);\n\n\tif (!isset($topic['orderexpiry'])) {\n\t\t$topic['orderexpiry'] = 0;\n\t}\n\n\t// Set orderexpiry for announcement and sticky topics.\n\tif (($topic['thread_opt'] & 2) || ($topic['thread_opt'] & 4)) {\n\t\t$topic['orderexpiry'] = 1000000000;\n\t}\n\n\t// Skip topics that doesn't belong to a forum.\n\tif (!isset($GLOBALS['forum_map'][ (int)$topic['forum_id'] ])) {\n\t\tpf('WARNING: Skip topic #'. $topic['id'] .'. Probably an announcement or orphaned message!');\n\t\treturn;\n\t}\n\n\tq('INSERT INTO '. $GLOBALS['DBHOST_TBL_PREFIX'] .'thread (\n\t\tid, forum_id, root_msg_id, views, replies, thread_opt, orderexpiry\n\t\t) VALUES(\n\t\t\t'. (int)$topic['id'] .',\n\t\t\t'. $GLOBALS['forum_map'][ (int)$topic['forum_id'] ] .',\n\t\t\t'. (int)$topic['root_msg_id'] .',\n\t\t\t'. (int)$topic['views'] .',\n\t\t\t'. (int)$topic['replies'] .',\n\t\t\t'. (int)$topic['thread_opt'] .',\n\t\t\t'. (int)$topic['orderexpiry'] .')\n\t');\n}", "function buildTopicsMenu($topic)\n{\n\n $dbconn =& pnDBGetConn(true);\n $pntable =& pnDBGetTables();\n\n $column = &$pntable['topics_column'];\n $toplist =& $dbconn->Execute(\"SELECT $column[topicid], $column[topictext], $column[topicname]\n FROM $pntable[topics] ORDER BY $column[topictext]\");\n echo '<strong>'._TOPIC.'</strong>&nbsp;'\n .'<select name=\"topic\">';\n echo \"<option value=\\\"\\\">\"._SELECTTOPIC.\"</option>\\n\";\n\n while(list($topicid, $topics, $topicname) = $toplist->fields) {\n if (pnSecAuthAction(0, 'Topics::Topic', \"$topicname::$topicid\", ACCESS_COMMENT)) {\n $sel='';\n if ($topicid == $topic) {\n $sel='selected=\"selected\"';\n }\n echo '<option value=\"'.pnVarPrepForDisplay($topicid).'\" '.$sel.'>'.pnVarPrepForDisplay($topics).'</option>'.\"\\n\";\n }\n $toplist->MoveNext();\n }\n echo '</select><br />';\n}", "public function run()\n {\n $topics = [];\n\n $topics[0] = new Topic([\n 'name' => 'Informácie okolo nás',\n 'description' => 'Informácie okolo nás',\n 'parent_id' => null\n ]);\n $topics[1] = new Topic([\n 'name' => 'Komunikácia prostredníctvom DT',\n 'description' => 'Komunikácia prostredníctvom digitálnych technológií',\n 'parent_id' => null\n ]);\n $topics[2] = new Topic([\n 'name' => 'Riešenie problémov',\n 'description' => 'Postupy, riešenie problémov, algoritmické myslenie',\n 'parent_id' => null\n ]);\n $topics[3] = new Topic([\n 'name' => 'Princípy fungovania DT',\n 'description' => 'Princípy fungovania digitálnych technológií',\n 'parent_id' => null\n ]);\n $topics[4] = new Topic([\n 'name' => 'Informačná spoločnosť',\n 'description' => 'Informačná spoločnosť',\n 'parent_id' => null\n ]);\n\n foreach ($topics as $topic){\n $topic->save();\n }\n\n $subTopics = [\n ['kódovanie, šifrovanie', 'kódovanie, šifrovanie, komprimácia informácie'],\n ['číselné sústavy','číselné sústavy, prevody'],\n ['reprezentácia údajov v počítači', 'reprezentácia údajov v počítači - diagramy, čísla, znaky a vzťahy medzi nimi'],\n ['vyhľadávanie opakujúcich sa vzorov', 'vyhľadávanie opakujúcich sa vzorov'],\n ['údajové štruktúry', 'informácie zobrazené pomocou údajových štruktúr - strom, graf, zásobník'],\n ['výroková logika, kombinatorika', 'výroková logika a jej využívanie pri práci s informáciami, kombinatorika'],\n ['textová informácia', 'textová informácia - kompetencie potrebné na prácu v textovom editore'],\n ['grafická informácia', 'grafická informácia - kompetencie potrebné na prácu v grafickom editore'],\n ['číselná informácia', 'číselná informácia - kompetencie potrebné na prácu v tabuľkovom editore'],\n ['zvuková informácia', 'zvuková informácia - kompetencie potrebné na prácu v zvukovom editore'],\n ['prezentácia informácií', 'prezentácia informácií - kompetencie potrebné na tvorbu prezentácií'],\n ['prezentácia informácií na webe', 'prezentácia informácií na webe - kompetencie potrebné na tvorbu webových stránok']\n ];\n\n foreach ($subTopics as $item) {\n $topic = new Topic([\n 'name' => $item[0],\n 'description' => $item[1],\n 'parent_id' => $topics[0]->id\n ]);\n\n $topic->save();\n }\n }", "function apoc_get_group_reply_info() {\n\n\tglobal $bp;\n\t$slug = $bp->action_variables[1];\n\t\n\tglobal $wpdb;\n\t$topic = $wpdb->get_row( \n\t\t$wpdb->prepare( \n\t\t\t\"SELECT post_title AS title, post_name AS url\n\t\t\tFROM $wpdb->posts \n\t\t\tWHERE ID = ( \n\t\t\t\tSELECT post_parent\n\t\t\t\tFROM $wpdb->posts\n\t\t\t\tWHERE post_name = %s )\",\n\t\t\t$slug )\n\t\t);\n\t\t\n\treturn( $topic );\n}", "public function topic(){\n return $this->belongsTo('App\\Topic','topics_id');\n }", "public function editUserKnownTopics(){\n\t\ttry{\n\t\t\tif(!$this->isSessionAvailable()) redirect(base_url().'login'); //Not logged in ,returning to login page\n\t\t\tif(isset($_POST['updateKnownTopics'])){\n\t\t\t\t$topics = '';\n\t\t\t\tforeach($_POST['knownTopics'] as $row){\n\t\t\t\t\t$topics = $topics . $row . ',';\n\t\t\t\t}\n\t\t\t\t$status = $this->accessAccount_model->updateUserKnownTopics($_SESSION['AuthId'],$topics);\n\t\t\t\tif($status) redirect(base_url().$_SESSION['username']);\n\t\t\t\telse show_404();\n\t\t\t}else throw new Exception(\"<b style='font-weight:bold;color:red;'>ERROR</b>: Direct Access not allowed.\");\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t show_error($e->getMessage());\n\t\t}\n\t}", "public function getTopic(): string\n {\n return $this->topic;\n }", "function check_alltopicsattempted($uid){\n\t/**\n * This function check weather whole topics attempted or not and return yes or no\n * \n * @author Imran M Bajwa <[email protected]>\n * @return yes or no\n */ \n\tglobal $dbc;\n\n\n\t$sql = $dbc->query(\"select * FROM tests, test_log, user WHERE user.id='$uid' AND \n\t\tuser.test_id = tests.test_id AND user.id = test_log.uid ORDER BY test_log.t_time DESC LIMIT 1\");\n\tif ( $sql->num_rows == 0) return \"no\";\n\t$r = $sql->fetch_assoc();\t\n\t $atopics = explode(\",\", $r['topics']);\n\t$ltad = $r['tid'];\n\t$pos = sizeof($atopics)-1;\n\tif($pos == array_search($r['tid'],$atopics)){\n\t\treturn \"yes\";\n\t}\n\t// if( $ltad == $atopics[sizeof($atopics)-1] )\n\t\t\n\telse{\n\t\treturn \"no\";\n\t}\n\t\t\n}", "public function clearTopics()\n {\n $this->collTopics = null; // important to set this to NULL since that means it is uninitialized\n }", "function sf_clean_topic_subs()\n{\n\tglobal $wpdb;\n\n\t# build list of topics with subscriptions\n\t$topics = $wpdb->get_results(\"SELECT topic_id, topic_subs FROM \".SFTOPICS.\" WHERE topic_subs IS NOT NULL;\");\n\tif(!$topics) return;\n\n\tforeach($topics as $topic)\n\t{\n\t\t$nvalues = array();\n\t\t$cvalues = explode('@', $topic->topic_subs);\n\t\t$nvalues[0] = $cvalues[0];\n\t\tforeach($cvalues as $cvalue)\n\t\t{\n\t\t\t$notfound = true;\n\t\t\tforeach($nvalues as $nvalue)\n\t\t\t{\n\t\t\t\tif($nvalue == $cvalue) $notfound = false;\n\t\t\t}\n\t\t\tif($notfound) $nvalues[]=$cvalue;\n\t\t}\n\t\t$nvaluelist = implode('@', $nvalues);\n\t\t$wpdb->query(\"UPDATE \".SFTOPICS.\" SET topic_subs='\".$nvaluelist.\"' WHERE topic_id=\".$topic->topic_id);\n\t}\n\treturn;\n}", "public function getTopicsList()\n {\n\n $topics = $this->forumRepo->getTopicsList();\n\n return View::make('forum.list', ['topics'=>$topics]);\n }", "public function getTopics($type = null, $param = null, $page = 1, $limit = RESULTS_LIMIT) {\n $cond = array('Topic.group_id' => 0);\n $order = null;\n $limit = Configure::read('Topic.topic_item_per_pages');\n \n if ($type == 'group')\n $this->unbindModel(array('belongsTo' => array('Category')));\n else\n $this->unbindModel(array('belongsTo' => array('Group')));\n\n switch ($type) {\n case 'category':\n if (!empty($param)) {\n $cond = array('Topic.category_id' => $param, 'Category.type' => 'Topic');\n $order = 'Topic.pinned desc, Topic.last_post desc';\n }\n\n break;\n\n case 'friends':\n if ($param) {\n App::import('Model', 'Friend');\n $friend = new Friend();\n $friends = $friend->getFriends($param);\n $cond = array('Topic.user_id' => $friends, 'Topic.group_id' => 0);\n }\n break;\n\n case 'home':\n case 'my':\n if (!empty($param))\n $cond = array('Topic.user_id' => $param, 'Topic.group_id' => 0);\n\n break;\n\n case 'user':\n if ($param)\n $cond = array('Topic.user_id' => $param, 'Topic.group_id' => 0);\n\n break;\n\n case 'search':\n if ($param)\n $cond = array('Topic.group_id' => 0, 'MATCH(Topic.title, Topic.body) AGAINST(? IN BOOLEAN MODE)' => urldecode($param));\n\n break;\n\n case 'group':\n if (!empty($param)) {\n $cond = array('Topic.group_id' => $param);\n $order = 'Topic.pinned desc, Topic.last_post desc';\n }\n\n break;\n default:\n $order = 'Topic.pinned desc, Topic.last_post desc';\n }\n\n //only get topics of active user\n $cond['User.active'] = 1;\n $cond = $this->addBlockCondition($cond);\n $topics = $this->find('all', array('conditions' => $cond, 'order' => $order, 'limit' => $limit, 'page' => $page));\n $uid = CakeSession::read('uid');\n App::import('Model', 'NotificationStop');\n $notificationStop = new NotificationStop();\n foreach ($topics as $key => $topic){\n $notification_stop = $notificationStop->find('count', array('conditions' => array('item_type' => APP_TOPIC,\n 'item_id' => $topic['Topic']['id'],\n 'user_id' => $uid)\n ));\n $topics[$key]['Topic']['notification_stop'] = $notification_stop;\n }\n \n return $topics;\n }", "function topic_link($tdetails) {\n if (SEO == yes)\n return BASEURL . '/view_topic/' . SEO($tdetails['topic_title']) . '_tid_' . $tdetails['topic_id'];\n else\n return BASEURL . '/view_topic.php?tid=' . $tdetails['topic_id'];\n }", "public function getAllTopics($id,$number=20)\n {\n return Topic::where('user_id',$id)\n ->whereHas('category',function($q){\n $q->where('is_blocked','no');\n })->paginate($number);\n }", "function EditTopic2()\n{\n global $db_prefix, $txt, $modSettings, $ID_MEMBER;\n $topic = (int) $_REQUEST['topic'];\n $type = (int) $_REQUEST['type']; // 1 = manual; 2 = list\n\n if (empty($topic))\n fatal_error($txt['smftags_err_notopic'],false);\n\n // Check Permission\n $a_edit = allowedTo('smftags_edit_any');\n $a_suggest = allowedTo('smftags_suggest_any');\n\n if ((!$a_edit && allowedTo('smftags_edit_own')) || (!$a_suggest && allowedTo('smftags_suggest_own'))) {\n $dbresult = db_query(\"\n SELECT m.ID_MEMBER\n FROM {$db_prefix}topics as t, {$db_prefix}messages as m\n WHERE t.ID_FIRST_MSG = m.ID_MSG AND t.ID_TOPIC = $topic\n LIMIT 1\n \", __FILE__, __LINE__);\n\n $row = mysql_fetch_assoc($dbresult);\n mysql_free_result($dbresult);\n\n if ($ID_MEMBER == $row['ID_MEMBER']) {\n if (!$a_edit)\n $a_edit = allowedTo('smftags_edit_own');\n if (!$a_suggest)\n $a_suggest = allowedTo('smftags_suggest_own');\n }\n }\n if ((!$a_edit && !$a_suggest) || ($type == 1 && !$modSettings['smftags_set_manualtags']) || ($type == 2 && !$modSettings['smftags_set_listtags']))\n fatal_error($txt['cannot_smftags_edit'],false);\n\n $dbresult= db_query(\"\n SELECT t.tag,l.ID,t.ID_TAG,l.approved\n FROM {$db_prefix}tags_log as l, {$db_prefix}tags as t\n WHERE t.approved && t.ID_TAG = l.ID_TAG && l.ID_TOPIC = $topic\n ORDER BY l.approved DESC, t.tag ASC\", __FILE__, __LINE__);\n\n $tags[0] = $tags[1] = array();\n $tagcount[0] = $tagcount[1] = 0;\n $tagnames = array();\n\n // topic tags that are already applied \n $oldtags[0] = $oldtags[1] = array(); // keyed by ID_TAG\n // topic tags that must now be applied\n $addtags[0] = $addtags[1] = array(); // keyed by ID_TAG\n // tags which exist, but require a new topic tag entry\n $reusetags[0] = $reusetags[1] = array(); // keyed by ID_TAG\n // tags which must first be created\n $createtags[0] = $createtags[1] = array(); // keyed by lowercase tag name\n\n while($row = mysql_fetch_assoc($dbresult))\n {\n $tagcount[$row['approved']]++;\n $oldtags[$row['approved']][$row['ID_TAG']] = $row['tag'];\n if ($type == 1) { $tagnames[strtolower($row['tag'])] = $row['ID_TAG']; }\n }\n mysql_free_result($dbresult);\n\n if ($type == 1) {\n // determine how new tags are created\n $createtype = (allowedTo('smftags_suggesttag') ? 0 : (allowedTo('smftags_createtag') ? 1 : -1));\n // do manual tagging only\n $rawtags[0] = $rawtags[1] = array();\n if ($a_edit || $a_suggest) { $rawtags[0] = array_unique(array_map('trim', explode(chr($modSettings['smftags_set_delimiter']), $_REQUEST['suggesttags']))); }\n if ($a_edit) { $rawtags[1] = array_unique(array_map('trim', explode(chr($modSettings['smftags_set_delimiter']), $_REQUEST['tags']))); }\n\n // attempt to identify tags by name\n foreach ($rawtags as $i => $array) {\n if (!empty($rawtags[$i])) {\n foreach ($array as $j => $tag) {\n if (empty($tag)) {\n // ignore null tags\n unset($rawtags[$i][$j]);\n }\n else if (isset($tagnames[strtolower($tag)])) {\n // tag is already known\n $j = $tagnames[strtolower($tag)];\n $addtags[$i][$j] = $tag;\n // just check we're not trying to approve and suggest the same tag\n if (isset($addtags[1-$i][$j])) { unset($addtags[0][$j]); }\n }\n else if ($createtype > -1) {\n // tag probably needs creating\n $j = strtolower($tag);\n $createtags[$i][$j] = $tag;\n if (isset($createtags[1-$i][$j])) { unset($createtags[0][$j]); }\n }\n }\n }\n }\n if (!empty($createtags[0]) || !empty($createtags[1])) {\n // see if these tags have already been added or not, we do not care if they are approved or not\n $dbresult = db_query(\"\n SELECT DISTINCT tag AS tag, ID_TAG\n FROM {$db_prefix}tags\n WHERE tag IN (\\\"\" . implode('\", \"', array_merge($createtags[0], $createtags[1])) . '\")\n ORDER BY `ID_TAG` DESC', __FILE__, __LINE__);\n\n while($row = mysql_fetch_assoc($dbresult))\n {\n $j = 0;\n $ltag = strtolower($row['tag']);\n // remove any occurances from the create lists\n if (isset($createtags[0][$ltag])) {\n unset($createtags[0][$ltag]);\n }\n if (isset($createtags[1][$ltag])) {\n unset($createtags[1][$ltag]);\n $j = 1;\n }\n // move tag to the new list\n $reusetags[$j][$row['ID_TAG']] = 1;\n }\n mysql_free_result($dbresult);\n }\n }\n else if ($type == 2) {\n // do list tagging only\n // submissions will always be the highest permission available to the user ($a_edit)\n foreach ($_REQUEST as $key => $value) {\n if (substr($key,0,3) == \"tag\" && is_numeric(substr($key,3))) {\n $addtags[$a_edit][substr($key,3)] = 1;\n }\n }\n }\n\n // discard any tags that do not meet our size constraints - silently\n\t// this is intentionally done after checking for existing tags to allow for grandfathered tags outside the current constraints\n foreach ($createtags as $i => $array) {\n foreach ($array as $j => $tag) {\n if (strlen($tag) < $modSettings['smftags_set_mintaglength'] || strlen($tag) > $modSettings['smftags_set_maxtaglength']) {\n unset($createtags[$i][$j]);\n }\n }\n }\n\n // check if need to prune some tags - for now will be discarded silently\n foreach (array(0,1) as $i) {\n while ($modSettings['smftags_set_maxtags'] < (count($addtags[$i]) + count($createtags[$i]) + count($reusetags[$i]) - count($oldtags[$i]))) {\n if (!empty($addtags)) { array_pop($addtags[$i]); }\n else if (!empty($createtags)) { array_pop($reusetags[$i]); }\n else if (!empty($reuseetags)) { array_pop($createtags[$i]); }\n }\n }\n\n // action arrays\n $add = $create = $delete = array();\n\n // if topic tags were applied to new but existing tags\n if (!empty($reusetags[0]) || !empty($reusetags[1])) {\n foreach ($reusetags as $i => $array) {\n foreach ($array as $key => $j) {\n $add[] = \"($key,$topic,$ID_MEMBER,$i)\";\n }\n }\n }\n unset ($reusetags);\n\n // firstly delete tags that have been unticked or removed\n // suggested tags are not deletable with list tags, by design\n // (recall that disabled form elements will not be submitted)\n foreach (($type == 2 ? array(1) : array(0,1)) as $i) {\n foreach (array_diff_key($oldtags[$i],$addtags[$i]) as $j => $tag) {\n $delete[] = (int) $j;\n }\n }\n if (!empty($delete)) {\n $q = db_query(\"DELETE FROM {$db_prefix}tags_log WHERE `ID_TOPIC` = $topic AND `ID_TAG` IN (\".implode(',',$delete).\")\", __FILE__, __LINE__);\n }\n unset($delete);\n\n // secondly we create any new tags\n foreach ($createtags as $i => $j) {\n foreach ($j as $tag) {\n // this first query has to be done individually for last_insert_id() support\n $q = db_query(\"INSERT INTO {$db_prefix}tags (`TAG`, `approved`) VALUES (\\\"\".mysql_real_escape_string($tag).\"\\\", $createtype)\", __FILE__, __LINE__);\n // but the rest we store for later\n $add[] = \"(\".db_insert_id().\", $topic, $ID_MEMBER, $i)\";\n }\n }\n unset($createtags);\n\n // thirdly, replace the topic tag entries\n foreach (array(0,1) as $i) {\n foreach (array_diff_key($addtags[$i],$oldtags[$i]) as $j => $tag) {\n $add[] = \"($j, $topic, $ID_MEMBER, $i)\";\n }\n }\n if (!empty($add)) {\n $q = db_query(\"REPLACE INTO {$db_prefix}tags_log (`ID_TAG`,`ID_TOPIC`,`ID_MEMBER`,`approved`) VALUES \".implode(',', $add), __FILE__, __LINE__);\n }\n unset($add);\n\n // finally, if the 'remove suggestions' option has been ticked, clear out any remaining suggestions\n if (isset($_REQUEST['tags_rmsuggest']) && allowedTo('smftags_manage')) {\n $q = db_query(\"DELETE FROM {$db_prefix}tags_log WHERE `approved` = 0 AND `ID_TOPIC` = $topic\", __FILE__, __LINE__);\n }\n\n //Redirect back to the topic\n redirectexit('topic=' . $topic);\n}", "function get_topic_data($topic_ids)\r\n\t{\r\n\t\tglobal $auth, $config, $db, $phpbb_root_path, $phpEx, $user;\r\n\r\n\t\t$to_query = array();\r\n\r\n\t\t// Grab data for the shadow topic ID's as well\r\n\t\tif (sizeof($this->shadow_topic_ids))\r\n\t\t{\r\n\t\t\tforeach ($this->shadow_topic_ids as $id)\r\n\t\t\t{\r\n\t\t\t\tif (!array_key_exists($id, $this->topic_data))\r\n\t\t\t\t{\r\n\t\t\t\t\t$to_query[] = $id;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tforeach ($topic_ids as $id)\r\n\t\t{\r\n\t\t\tif (!array_key_exists($id, $this->topic_data))\r\n\t\t\t{\r\n\t\t\t\t$to_query[] = $id;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (sizeof($to_query))\r\n\t\t{\r\n\t\t\t$forum_ids = array();\r\n\r\n\t\t\t$sql = 'SELECT * FROM ' . TOPICS_TABLE . '\r\n\t\t\t\tWHERE ' . $db->sql_in_set('topic_id', $to_query);\r\n\t\t\t$result = $db->sql_query($sql);\r\n\t\t\twhile ($row = $db->sql_fetchrow($result))\r\n\t\t\t{\r\n\t\t\t\t$this->topic_data[$row['topic_id']] = $row;\r\n\t\t\t\t$forum_ids[] = $row['forum_id'];\r\n\t\t\t}\r\n\t\t\t$db->sql_freeresult($result);\r\n\r\n\t\t\t$this->get_forum_data($forum_ids);\r\n\t\t}\r\n\t}", "public function getForumTopicList($debug_to_pass = '') {\n\n $this->db->select('ft.topic_id,ft.topic_title,ft.category_id,ft.topic_short_description,ft.topic_content,ft.posted_by,ft.posted_on,ft.status as ft_status,fc.category_id,fc.category_name,fc.page_description,u.user_name,u.user_id');\n $this->db->from('mst_forum_topics as ft');\n $this->db->join('mst_forum_categories as fc', 'ft.category_id = fc.category_id', 'inner');\n $this->db->join('mst_users as u', 'ft.posted_by=u.user_id', 'inner');\n// $this->db->join('trans_forum_comments as tfc', 'tfc.topic_id=ft.topic_id', 'inner');\n $this->db->where('ft.status', '1');\n// $this->db->where('tfc.status','1');\n $this->db->order_by('ft.topic_id desc');\n $query = $this->db->get();\n if ($debug_to_pass)\n echo $this->db->last_query();\n return $query->result_array();\n }", "function suggesttopic($topicid, $title, $email = \"\", $description = \"\"){\r\n\tglobal $db, $dbprefix, $phrase;\r\n\t\r\n\t$topicid = intval($topicid);\r\n\tif ($title == \"\"){ return $phrase[\"submit_notitle\"]; }\r\n\t\r\n\t// check the topic exists\r\n\t$sql = \"SELECT * FROM \" . $dbprefix . \"topics WHERE topicid = \" . dbSecure($topicid);\r\n\t$top = $db->execute($sql);\r\n\tif ($top->rows < 1){ return $phrase[\"submit_missingtopic\"]; }\r\n\t\r\n\t// check for an existing sub-topic\r\n\t$sql = \"SELECT * FROM \" . $dbprefix . \"topics WHERE parent = \" . dbSecure($topicid) . \" AND title = '\" . dbSecure($title) . \"'\";\r\n\t$chk = $db->execute($sql);\r\n\tif ($chk->rows > 0){ return $phrase[\"submit_topicexists\"]; }\r\n\t\r\n\t// and insert the topic\r\n\t$sql = \"INSERT INTO \" . $dbprefix . \"newtopics (topicid, postdate, title, email, description, ip) VALUES (\";\r\n\t$sql .= \"\" . dbSecure($topicid) . \", \";\r\n\t$sql .= \"\" . time() . \", \";\r\n\t$sql .= \"'\" . dbSecure($title) . \"', \";\r\n\t$sql .= \"'\" . dbSecure($email) . \"', \";\r\n\t$sql .= \"'\" . dbSecure($description) . \"', \";\r\n\t$sql .= \"'\" . dbSecure($_SERVER[\"REMOTE_ADDR\"]) . \"')\";\r\n\t$db->execute($sql);\r\n\t\r\n\t// and return\r\n\treturn $phrase[\"submit_topic_success\"];\r\n}", "public function getAgendaTopicTypeListAction(){\n /** @var Object_Agenda $agenda */\n $this->getDeviceSession()->getUserId();\n $agenda = new Object_Agenda();\n $this->_helper->json($agenda->getClass()->getFieldDefinition('Topic'));\n }", "public function testTopic() {\n\n $this->installEntitySchema('ebms_board');\n $this->installEntitySchema('taxonomy_term');\n $this->installEntitySchema('ebms_topic');\n $this->installEntitySchema('user');\n $this->installSchema('system', ['sequences']);\n $entity_type_manager = $this->container->get('entity_type.manager');\n $topics = $entity_type_manager->getStorage('ebms_topic')->loadMultiple();\n $this->assertEmpty($topics);\n $name = 'Toenail Cancer';\n $board = Board::create(['name' => 'Test Board']);\n $board->save();\n $group_id = 135;\n $group_name = 'Lower Extremities';\n $topic_group = Term::create([\n 'tid' => $group_id,\n 'vid' => 'topic_groups',\n 'name' => $group_name,\n ]);\n $topic_group->save();\n $nci_reviewer = $this->createUser();\n $topic = Topic::create([\n 'name' => $name,\n 'board' => $board->id(),\n 'nci_reviewer' => $nci_reviewer,\n 'topic_group' => $topic_group->id(),\n 'active' => TRUE,\n ]);\n $topic->save();\n $topics = $entity_type_manager->getStorage('ebms_topic')->loadMultiple();\n $this->assertNotEmpty($topics);\n $this->assertCount(1, $topics);\n foreach ($topics as $topic) {\n $this->assertEquals($topic->getName(), $name);\n $this->assertEquals(TRUE, $topic->get('active')->value);\n $this->assertEquals($board->id(), $topic->get('board')->target_id);\n $this->assertEquals($nci_reviewer->id(), $topic->get('nci_reviewer')->target_id);\n $this->assertEquals($group_id, $topic->get('topic_group')->target_id);\n }\n }", "function list_topics($atts) {\n\t$src = 'empty';\n\t\n\tif (isset($_GET['src']))\n\t\t$src = $_GET['src'];\n\t\n\t$a = shortcode_atts( array(\n 'target' => 'empty',\n\t\t'src' => $src,\n\t\t'collapse' => false,\n\t\t'taxonomy' => 'asn_topic_index'\n ), $atts );\n\twp_localize_script( 'sr-functions', 'target_div', $a );\n\t\n\t$taxonomy = 'asn_topic_index';\n\t$orderby = 'slug';\n\t$show_count = 1;\n\t$pad_counts = 1;\n\t$hierarchical = 1;\n\t$title = '';\n\t$empty = 0;\n\t\n\t$args = array(\n\t 'taxonomy' => $taxonomy,\n\t 'orderby' => $orderby,\n\t 'show_count' => $show_count,\n\t 'pad_counts' => $pad_counts,\n\t 'hierarchical' => $hierarchical,\n\t 'title_li' => $title,\n\t 'hide_empty' => $empty,\n\t 'echo' => 0\n\t);\n\t\n\treturn '<div id=\"topic-list\">'.wp_list_categories( $args ).'</div>';\n}", "public function InsertTopic($fromArticle=false,$useArticleDescr=false,\n $useArticleText=false,$link2article=false)\n {\n global $DB, $categoryid, $sdlanguage, $sdurl, $userinfo, $usersystem;\n\n //SD351: create topic from article\n $fromArticle = (defined('IN_ADMIN') && !empty($fromArticle));\n if($fromArticle && empty($useArticleDescr) && empty($useArticleText))\n {\n return false;\n }\n\n // SD313: security check against spam/bot submissions\n if(empty($fromArticle))\n {\n if(!CheckFormToken(FORUM_TOKEN, false))\n {\n $this->conf->RedirectPageDefault('<strong>'.$sdlanguage['error_invalid_token'].'</strong><br />',true);\n return false;\n }\n if(empty($this->conf->forum_arr['forum_id']) || ($this->conf->forum_arr['forum_id']<1))\n {\n $this->conf->RedirectPageDefault('<strong>'.$this->conf->plugin_phrases_arr['err_invalid_forum_id'] . '</strong>',true);\n return false;\n }\n }\n\n $errors_arr = array();\n\n if(empty($fromArticle))\n {\n $topic_title = trim(GetVar('forum_topic_title', '', 'string', true, false));\n $post_text = trim(GetVar('forum_post', '', 'string', true, false));\n\n if(!($this->conf->IsSiteAdmin || $this->conf->IsAdmin || $this->conf->IsModerator) ||\n !empty($userinfo['require_vvc'])) //SD340: require_vvc\n {\n if(!CaptchaIsValid('amihuman'))\n {\n $errors_arr[] = $sdlanguage['captcha_not_valid'];\n }\n }\n\n //SD343: combined blacklist check\n if($this->conf->IsUserBlacklisted())\n {\n WatchDog('Forum','<b>Forum spam topic: '.$userinfo['username'].\n '</b>, IP: </b><span class=\"ipaddress\">'.USERIP.'</span></b><br />'.\n 'in TopicID: '.$this->conf->topic_arr['topic_id'].', PostID: '.$post_id,\n WATCHDOG_ERROR);\n $this->DisplayTopic(true,$sdlanguage['ip_listed_on_blacklist'].' '.USERIP);\n return false;\n }\n\n //SD342: censor non-admin text if enabled\n if($this->conf->censor_posts)\n {\n $topic_title = sd_censor($topic_title);\n $post_text = sd_censor($post_text);\n }\n }\n else\n {\n // #################################################################\n // SD351: post article as forum topic\n // #################################################################\n $topic_title = trim(GetVar('title', '', 'html', true, false));\n $topic_title = htmlspecialchars(strip_alltags($topic_title));\n\n $post_text = '';\n if(!empty($useArticleDescr))\n {\n $article_descr = trim(GetVar('description', '', 'html', true, false));\n if(sd_strlen($article_descr))\n {\n $post_text = trim(sd_ConvertHtmlToBBCode($article_descr));\n if(sd_strlen($post_text))\n {\n $post_text .= \"\\r\\n\\r\\n\";\n }\n }\n }\n if(!empty($useArticleText))\n {\n $article_text = trim(GetVar('article', '', 'html', true, false));\n $article_text = sd_ConvertHtmlToBBCode($article_text);\n if(sd_strlen($article_text))\n {\n $post_text2 = trim($article_text);\n if(sd_strlen($post_text2))\n {\n $post_text .= \"\\r\\n\\r\\n\".$post_text2;\n }\n }\n }\n if(!empty($link2article) && ($link2article!==false))\n {\n $post_text .= $link2article;\n }\n unset($article_descr,$article_text,$post_text2,$useArticleDescr);\n }\n\n $sticky = 0;\n $open = 1;\n $moderated = GetVar('moderate_topic', false, 'bool', true, false)?1:0;\n if($this->conf->IsSiteAdmin || $this->conf->IsAdmin || $this->conf->IsModerator)\n {\n $open = GetVar('lock_topic', 0, 'bool', true, false)?0:1; //SD351\n $sticky = GetVar('stick_topic', false, 'bool', true, false)?1:0;\n }\n else\n {\n if(!empty($this->conf->forum_arr['moderated']))\n {\n $moderated = SDForumConfig::UsergroupsModerated($userinfo['usergroupids'],\n $this->conf->forum_arr['moderated'])?1:0;\n }\n }\n\n //SD343: content filter for moderated posts\n if(empty($errors_arr) && $moderated &&\n !$this->conf->IsSiteAdmin && !$this->conf->IsAdmin && !$this->conf->IsModerator)\n {\n //SD343: up to x posts within y minutes if moderated\n if($this->conf->mod_post_limit && $this->conf->mod_time_limit)\n {\n $trigger = $DB->query_first('SELECT COUNT(post_id) postcount FROM {p_forum_posts}'.\n \" WHERE ((user_id = %d) OR (ip_address = '%s')) AND (`date` > %d) AND (moderated = 1)\",\n $userinfo['userid'], USERIP, (TIME_NOW - ($this->conf->mod_time_limit*60)));\n if(!empty($trigger['postcount']) && ($trigger['postcount'] >= $this->conf->mod_post_limit))\n {\n $errors_arr[] = $this->conf->plugin_phrases_arr['message_too_many_moderated'];\n }\n }\n\n if(empty($errors_arr))\n {\n $topic_title = htmlspecialchars(strip_alltags(sd_htmlawed(unhtmlspecialchars($topic_title))));\n $post_text = htmlspecialchars(sd_htmlawed(unhtmlspecialchars($post_text)));\n }\n }\n\n //SD343: min. topic/post length checks\n $topic_title = trim($topic_title);\n $post_text = trim($post_text);\n $plen = strlen($topic_title);\n\n if(empty($fromArticle))\n {\n if(($plen < 3) || ($plen < $this->conf->plugin_settings_arr['minimum_topic_title_length']))\n {\n $errors_arr[] = $this->conf->plugin_phrases_arr['err_topic_no_title'];\n }\n\n $plen = strlen($post_text);\n if(($plen < 2) || ($plen < $this->conf->plugin_settings_arr['minimum_post_text_length']))\n {\n $errors_arr[] = $this->conf->plugin_phrases_arr['post_too_short'];\n }\n }\n\n if(empty($errors_arr))\n {\n $DB->result_type = MYSQL_ASSOC;\n if($topic_exists_arr = $DB->query_first('SELECT ft.topic_id FROM {p_forum_topics} ft'.\n ' INNER JOIN {p_forum_forums} ff ON ft.forum_id = ff.forum_id'.\n ' WHERE ff.forum_id = %d'.\n ($this->conf->IsSiteAdmin ? '' : ' AND ff.online = 1').\n \" AND trim(ft.title) = '%s' AND ft.post_user_id = %d\",\n $this->conf->forum_arr['forum_id'],\n $DB->escape_string($topic_title),\n $userinfo['userid']))\n {\n $errors_arr[] = $this->conf->plugin_phrases_arr['err_topic_no_repeat'];\n }\n }\n\n if(count($errors_arr))\n {\n DisplayMessage('<strong>'.implode('<br />', $errors_arr). '</strong>', true);\n if(empty($fromArticle))\n {\n $this->DisplayTopicForm();\n }\n return false;\n }\n\n // all is good, insert new topic\n $DB->query('INSERT INTO {p_forum_topics}'.\n ' (forum_id, date, post_count, views, open, post_user_id,'.\n ' post_username, title, last_post_date, last_post_username, sticky, moderated)'.\n ' VALUES (%d, %d, 1, 0, %d, ' . $userinfo['userid'] .\n \", '%s', '%s', %d, '%s', $sticky, $moderated)\",\n $this->conf->forum_id, TIME_NOW, $open,\n $DB->escape_string($userinfo['username']),\n $DB->escape_string($topic_title),\n TIME_NOW,\n $DB->escape_string($userinfo['username']));\n\n if($topic_id = $DB->insert_id())\n {\n $DB->query('INSERT INTO {p_forum_posts}'.\n ' (topic_id, username, user_id, date, post, ip_address, moderated) VALUES'.\n \" (%d, '%s', %d, %d, '%s', '%s', %d)\",\n $topic_id, $DB->escape_string($userinfo['username']),\n $userinfo['userid'], TIME_NOW,\n $DB->escape_string($post_text), IPADDRESS, $moderated);\n\n if($post_id = $DB->insert_id())\n {\n //SD351: set config's settings\n $this->conf->topic_id = $topic_id;\n $this->conf->topic_arr = array();\n $this->conf->topic_arr['topic_id'] = (int)$topic_id;\n $this->conf->topic_arr['forum_id'] = (int)$this->conf->forum_arr['forum_id'];\n $this->conf->topic_arr['title'] = $topic_title;\n $this->conf->topic_arr['sticky'] = $sticky;\n $this->conf->topic_arr['moderated'] = $moderated;\n $this->conf->topic_arr['open'] = $open;\n $this->conf->topic_arr['post_user_id'] = (int)$userinfo['userid'];\n $this->conf->topic_arr['post_username'] = $userinfo['username'];\n $this->conf->topic_arr['first_post_id'] = (int)$post_id;\n $this->conf->topic_arr['last_post_id'] = (int)$post_id;\n $this->conf->topic_arr['last_post_date'] = TIME_NOW;\n $this->conf->topic_arr['last_post_username'] = $userinfo['username'];\n\n $DB->query(\"UPDATE {p_forum_topics} SET first_post_id = $post_id, last_post_id = $post_id\n WHERE topic_id = $topic_id LIMIT 1\");\n\n if(!$moderated)\n {\n $DB->query(\"UPDATE {p_forum_forums} SET last_topic_title = '\".$DB->escape_string(trim($topic_title)).\"',\n topic_count = (IFNULL(topic_count,0) + 1),\n post_count = (IFNULL(post_count,0) + 1),\n last_post_date = \" . TIME_NOW . \",\n last_post_username = '\" . $DB->escape_string($userinfo['username']) . \"',\n last_topic_id = $topic_id,\n last_post_id = $post_id\n WHERE forum_id = \" . $this->conf->forum_arr['forum_id'] . '\n LIMIT 1');\n\n //SD322: update user's thread count\n //SD332: update to \"user_post_count\" was missing till now\n if($this->conf->is_sd_users) //SD342\n $DB->query('UPDATE {users} SET user_thread_count = (IFNULL(user_thread_count,0) + 1),'.\n ' user_post_count = (IFNULL(user_post_count,0) + 1) WHERE userid = %d', $userinfo['userid']);\n\n //SD351: update user title\n SDUserCache::UpdateUserTitle($userinfo['userid']);\n }\n\n if(empty($fromArticle))\n {\n //SD343: check selected prefix (if present) against tags table, based on sub-forum/usergroup\n if($prefix_id = Is_Valid_Number(GetVar('prefix_id', 0, 'whole_number', true, false),0,1,999999999))\n {\n $tconf = array(\n 'chk_ugroups' => !$this->conf->IsSiteAdmin,\n 'pluginid' => $this->conf->plugin_id,\n 'objectid' => 0,\n 'tagtype' => 2,\n 'ref_id' => 0,\n 'allowed_id' => $this->conf->forum_arr['forum_id'],\n );\n require_once(SD_INCLUDE_PATH.'class_sd_tags.php');\n $prefixes = SD_Tags::GetPluginTagsAsArray($tconf);\n if(($prefixes !== false) && isset($prefixes[$prefix_id]))\n {\n SD_Tags::StorePluginTags($this->conf->plugin_id, $topic_id, $prefixes[$prefix_id], 2, $prefix_id, true);\n }\n }\n\n //SD343: add topic tags if allowed for usergroup\n $tag_ug = sd_ConvertStrToArray($this->conf->plugin_settings_arr['tag_submit_permissions'],'|');\n if($this->conf->IsSiteAdmin || $this->conf->IsAdmin || $this->conf->IsModerator ||\n (!empty($tag_ug) && @array_intersect($userinfo['usergroupids'], $tag_ug)))\n {\n require_once(SD_INCLUDE_PATH.'class_sd_tags.php');\n $tags = GetVar('tags', '', 'string', true, false);\n SD_Tags::StorePluginTags($this->conf->plugin_id, $topic_id, $tags, 0, 0, true);\n }\n\n // insert attachment\n if($this->conf->attach_path_ok && isset($_FILES['attachment']) && !empty($_FILES['attachment']['name']) &&\n ($this->conf->IsSiteAdmin || $this->conf->IsAdmin || $this->conf->IsModerator ||\n (!empty($userinfo['plugindownloadids']) &&\n @in_array($this->conf->plugin_id,$userinfo['plugindownloadids']) &&\n !empty($this->conf->plugin_settings_arr['valid_attachment_types']))))\n {\n $attachment_arr = $_FILES['attachment'];\n // if an attachment was uploaded, then it will be inserted after the ticket is created\n $attachment_uploaded = false;\n // check if attachment was uploaded\n if($attachment_arr['error'] != 4)\n {\n list($attachment_uploaded, $attachment_stored_filename, $error) = $this->UploadAttachment($attachment_arr);\n if(!$attachment_uploaded)\n {\n if($error !== false)\n $errors_arr[] = $error;\n }\n else\n {\n $DB->query(\"INSERT INTO {p_forum_attachments}\n (attachment_id, post_id, attachment_name, filename, filesize, filetype, user_id, username, uploaded_date)\n VALUES (NULL, %d, '%s', '%s', %d, '%s', %d, '%s', \" . TIME_NOW . \")\",\n $post_id,\n $DB->escape_string($attachment_arr['name']),\n $DB->escape_string($attachment_stored_filename),\n $attachment_arr['size'],\n $DB->escape_string($attachment_arr['type']),\n $userinfo['userid'],\n $DB->escape_string($userinfo['username']));\n $DB->query('UPDATE {p_forum_posts}'.\n ' SET attachment_count = (IFNULL(attachment_count,0)+1)'.\n ' WHERE post_id = %d', $post_id);\n }\n }\n }\n } //$fromArticle\n\n }\n }\n\n //SD351: if from article then return topic_id\n if(!empty($fromArticle))\n {\n return empty($topic_id)?false:(int)$topic_id;\n }\n\n //SD342: send email notifications for subscriptions\n if(empty($errors_arr))\n {\n if($sub = new SDSubscription($userinfo['userid'],$this->conf->plugin_id,\n $this->conf->forum_arr['forum_id'],'forum',$categoryid))\n {\n $sub->SendNotifications();\n }\n unset($sub);\n\n global $SDCache;\n if(!empty($SDCache) && $SDCache->IsActive()) $SDCache->delete_cacheid(FORUM_CACHE_FORUMS);\n\n $link = $this->conf->RewritePostLink($topic_id,$topic_title,$post_id);\n RedirectFrontPage($link, $this->conf->plugin_phrases_arr[$moderated ?\n 'message_topic_awaits_approval' : 'message_topic_created']);\n\n return true;\n }\n $this->conf->RedirectPageDefault('Error!');\n return false;\n }", "public function subtopics()\n {\n return $this->hasMany('\\App\\Subtopic', 'topic_id', 'topic_id');\n }", "function undelete_topics()\r\n\t{\r\n\t\tglobal $auth, $config, $db, $phpbb_root_path, $phpEx, $user;\r\n\r\n\t\tif (sizeof($this->undelete['t']))\r\n\t\t{\r\n\t\t\t$sql_data = array(\r\n\t\t\t\t'topic_deleted'\t\t\t=> 0,\r\n\t\t\t\t'topic_deleted_time'\t=> 0,\r\n\t\t\t);\r\n\r\n\t\t\t$to_update = array();\r\n\t\t\tforeach ($this->undelete['t'] as $id)\r\n\t\t\t{\r\n\t\t\t\tif (array_key_exists($id, $this->shadow_topic_ids))\r\n\t\t\t\t{\r\n\t\t\t\t\t$to_update[] = $this->shadow_topic_ids[$id];\r\n\t\t\t\t\t$this->topic_data[$this->shadow_topic_ids[$id]] = array_merge($this->topic_data[$this->shadow_topic_ids[$id]], $sql_data);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$to_update[] = $id;\r\n\t\t\t\t$this->topic_data[$id] = array_merge($this->topic_data[$id], $sql_data);\r\n\t\t\t}\r\n\r\n\t\t\t$sql = 'UPDATE ' . TOPICS_TABLE . '\r\n\t\t\t\tSET ' . $db->sql_build_array('UPDATE', $sql_data) . '\r\n\t\t\t\t\tWHERE ' . $db->sql_in_set('topic_id', $to_update);\r\n\t\t\t$db->sql_query($sql);\r\n\r\n\t\t\tforeach ($to_update as $id)\r\n\t\t\t{\r\n\t\t\t\t$this->update_first_post_topic($id);\r\n\t\t\t\t$this->update_last_post_topic($id);\r\n\r\n\t\t\t\t// If the topic is a global announcement, do not attempt to do any updates to forums\r\n\t\t\t\tif ($this->topic_data[$id]['topic_type'] != POST_GLOBAL)\r\n\t\t\t\t{\r\n\t\t\t\t\tif ($this->forum_data[$this->topic_data[$id]['forum_id']]['forum_deleted_topic_count'] > 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$sql = 'UPDATE ' . FORUMS_TABLE . '\r\n\t\t\t\t\t\t\tSET forum_deleted_topic_count = forum_deleted_topic_count - 1\r\n\t\t\t\t\t\t\t\tWHERE forum_id = ' . intval($this->topic_data[$id]['forum_id']);\r\n\t\t\t\t\t\t$db->sql_query($sql);\r\n\t\t\t\t\t\t$this->forum_data[$this->topic_data[$id]['forum_id']]['forum_deleted_topic_count']--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->update_board_stats();\r\n\t\t$this->update_user_stats();\r\n\t}", "public function relatedTopics()\n {\n return $this->hasMany('App\\RelatedTopic', 'topic_id')->orderby('row_no', 'asc');\n }", "public function index()\n {\n return view('admin.topics.index', [\n 'topics' => Topic::latest()->get()\n ]);\n }", "public function index()\n\t{\n\t\t$topics = Topic::all();\n\t\t$breadcrumbs = ['Home', 'Manage Forum', 'Topics'];\n\t\treturn View::make('admin.forum.topic.index')\n\t\t\t\t\t->withTopics($topics)\n\t\t\t\t\t->withBreadcrumbs($breadcrumbs);\n\t}", "function gettopics()\r\n\t\t\t\t\t{ \r\n\t\t\t\t\t\tglobal $con;\r\n\t\t\t\t\t$get_topics=\"select * from topics\";\r\n\t\t\t\t\t$run_topics=mysqli_query($con,$get_topics);\r\n\t\t\t\t\t\r\n\t\t\t\t\twhile($row=mysqli_fetch_array($run_topics)){\t\t\t\r\n\t\t\t\t\t\t\t$topic_id=$row['topic_id'];\t\r\n\t\t\t\t\t\t\t$topic_name=$row['topic_name'];\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\techo \"<option value='$topic_id'>$topic_name</option>\";\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}", "public function get_topics()\n {\n return $this->connection->query_select_value('threads', 'COUNT(*)');\n }", "public function index()\n {\n $topics = auth()->user()->topics()->latest()->get();\n\n return view('account.topics.index', ['topics' => $topics]);\n }", "public function get_cahnrs_topics() {\n\n\t\t$topics = array();\n\n\t\t$response = wp_remote_get( 'http://api.wpdev.cahnrs.wsu.edu/?service=topics' );\n\t\tif ( ! is_wp_error( $response ) ) {\n\t\t\t$body = wp_remote_retrieve_body( $response );\n\t\t\tif ( ! is_wp_error( $body ) ) {\n\t\t\t\t$topics = json_decode( $body, true );\n\t\t\t}\n\t\t}\n\n\t\treturn $topics;\n\n\t}" ]
[ "0.69561565", "0.6738864", "0.6687202", "0.6687202", "0.6578154", "0.65399116", "0.65029234", "0.6488846", "0.6430863", "0.6428687", "0.6420914", "0.6385512", "0.6360359", "0.6331386", "0.63292307", "0.6300964", "0.6296997", "0.628375", "0.62771624", "0.62447846", "0.61966157", "0.6195244", "0.61945635", "0.61757886", "0.61483943", "0.61238325", "0.60826975", "0.60771966", "0.60675776", "0.60658747", "0.60658747", "0.60658747", "0.60624486", "0.60587966", "0.60542685", "0.604059", "0.6021536", "0.6004455", "0.59952086", "0.5994975", "0.5992116", "0.5991247", "0.59766364", "0.5975803", "0.5952833", "0.59495056", "0.59428436", "0.5928973", "0.59273875", "0.59197056", "0.5914087", "0.5909872", "0.5906856", "0.590484", "0.5897964", "0.58959335", "0.5893913", "0.5892369", "0.58901227", "0.5874356", "0.5869124", "0.58660835", "0.58598995", "0.5859395", "0.5853837", "0.58414835", "0.58315516", "0.58236855", "0.58230484", "0.58022225", "0.5794998", "0.57928646", "0.57850015", "0.57841474", "0.5782289", "0.5773852", "0.5769064", "0.57681876", "0.5761684", "0.5761092", "0.5757601", "0.57549495", "0.5743416", "0.5743343", "0.57352144", "0.57341254", "0.5729075", "0.5724526", "0.5724201", "0.5721978", "0.5720197", "0.57123566", "0.5708393", "0.57073236", "0.56877846", "0.5687543", "0.5679633", "0.56788254", "0.5674884", "0.567208", "0.5666785" ]
0.0
-1
........................ discussions ..!!.. discussions ..!!.. discussions ..!!.. discussions ..!!..
public static function getLastDiscussions(){ $sql = "select * from discussions ORDER BY `id` DESC LIMIT 5"; return App::$db->query($sql); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function thediscussion() {\n\tglobal $discussions_index, $discussion, $discussions, $discussion_title;\n\t$discussion = $discussions[$discussions_index - 1];\n\treturn $discussion;\n}", "public function getDiscussions($id_user=null){\n // $id_user correspon à l'id de l'utilisateur\n // retourne un tableau de liste de messages recus\n $discussions = array();\n $inst_user = new Model_DbTable_User();\n $inst_list = new Model_DbTable_List();\n \n if($id_user > 0){\n $current_user = $this->find($id_user)->current();\n $id_user = $current_user->idUser;\n }else{\n $current_user = $inst_user->getUser();\n $id_user = $current_user->idUser;\n } \n \n $select = $inst_list->select()->where('categorie_idcategories = ?',$this->Category_id);\n $lists = $current_user->findModel_DbTable_ListViaModel_DbTable_UserHasListByUserAndList($select);\n foreach($lists as $list){\n $discussions[$list->idList] = array(\"user\"=>$current_user->idUser,\"count\"=>count($inst_list->getCountItem($list->idList)));\n }\n \n foreach($this->fetchAll($this->select()->where(\"recipients_id LIKE '%\".$id_user.\",%'\")) as $message){\n $inst_item = new Model_DbTable_Item();\n $inst_list = new Model_DbTable_List();\n $current_item = $inst_item->find($message[\"item_idItem\"])->current();\n $current_list = $inst_list->find($current_item->list_idList)->current();\n $list_user = $current_list->findModel_DbTable_UserViaModel_DbTable_UserHasListByListAndUser()->current(); \n $other_user = $inst_user->find($list_user->idUser)->current(); \n $discussions[$current_item->list_idList] = array(\"user\"=>$other_user->idUser,\"count\"=>count($inst_list->getCountItem($current_item->list_idList)));\n }\n krsort($discussions);\n return $discussions; \n }", "public function run()\n {\n $t1 = 'Question title 1';\n\n $discussion1 = [\n 'title' => $t1,\n 'user_id' => 1,\n 'channel_id' => 1,\n 'content' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi aliquam ultrices arcu, at placerat velit viverra ut. Sed cursus sit amet elit at tristique. Mauris non sollicitudin sem. Maecenas efficitur sem non magna pulvinar, non ultrices lorem congue. Nulla fermentum arcu nulla, vitae luctus lorem tristique ac. In dictum fermentum volutpat. Aliquam maximus, augue ut tempus accumsan, tortor libero fringilla lacus, a lacinia justo est tempor augue. Cras eget est sapien. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec id efficitur justo. Nullam nec ex sapien. Integer leo odio, varius et vulputate sit amet, pulvinar a justo. Aenean non nisi eu justo congue sollicitudin.',\n 'slug' => str_slug($t1)\n\n ];\n\n $t2 = 'Question title 2';\n\n $discussion2 = [\n 'title' => $t2,\n 'user_id' => 2,\n 'channel_id' => 2,\n 'content' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi aliquam ultrices arcu, at placerat velit viverra ut. Sed cursus sit amet elit at tristique. Mauris non sollicitudin sem. Maecenas efficitur sem non magna pulvinar, non ultrices lorem congue. Nulla fermentum arcu nulla, vitae luctus lorem tristique ac. In dictum fermentum volutpat. Aliquam maximus, augue ut tempus accumsan, tortor libero fringilla lacus, a lacinia justo est tempor augue. Cras eget est sapien. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec id efficitur justo. Nullam nec ex sapien. Integer leo odio, varius et vulputate sit amet, pulvinar a justo. Aenean non nisi eu justo congue sollicitudin.',\n 'slug' => str_slug($t2)\n\n ];\n\n $t3 = 'Question title';\n\n $discussion3 = [\n 'title' => $t3,\n 'user_id' => 1,\n 'channel_id' => 3,\n 'content' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi aliquam ultrices arcu, at placerat velit viverra ut. Sed cursus sit amet elit at tristique. Mauris non sollicitudin sem. Maecenas efficitur sem non magna pulvinar, non ultrices lorem congue. Nulla fermentum arcu nulla, vitae luctus lorem tristique ac. In dictum fermentum volutpat. Aliquam maximus, augue ut tempus accumsan, tortor libero fringilla lacus, a lacinia justo est tempor augue. Cras eget est sapien. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec id efficitur justo. Nullam nec ex sapien. Integer leo odio, varius et vulputate sit amet, pulvinar a justo. Aenean non nisi eu justo congue sollicitudin.',\n 'slug' => str_slug($t3)\n\n ];\n\n $t4 = 'Question 4';\n\n $discussion4 = [\n 'title' => $t4,\n 'user_id' => 2,\n 'channel_id' => 5,\n 'content' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi aliquam ultrices arcu, at placerat velit viverra ut. Sed cursus sit amet elit at tristique. Mauris non sollicitudin sem. Maecenas efficitur sem non magna pulvinar, non ultrices lorem congue. Nulla fermentum arcu nulla, vitae luctus lorem tristique ac. In dictum fermentum volutpat. Aliquam maximus, augue ut tempus accumsan, tortor libero fringilla lacus, a lacinia justo est tempor augue. Cras eget est sapien. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec id efficitur justo. Nullam nec ex sapien. Integer leo odio, varius et vulputate sit amet, pulvinar a justo. Aenean non nisi eu justo congue sollicitudin.',\n 'slug' => str_slug($t4)\n\n ];\n\n discussion::create($discussion1);\n discussion::create($discussion2);\n discussion::create($discussion3);\n discussion::create($discussion4); \n}", "protected static function discussionAction($ajax) {\n\t\tglobal $db, $user;\n\t\tif(isset($_GET['discussion']) && $discid = +$_GET['discussion'])\n\t\t\tif($replies = $db->query('select r.id, r.posted, r.user as canchange, u.username, u.displayname, u.avatar, case u.level when 1 then \\'new\\' when 2 then \\'known\\' when 3 then \\'trusted\\' when 4 then \\'admin\\' else null end as level, f.fan as friend, r.name, r.contacturl, r.markdown, r.html, group_concat(concat(e.posted, \\'\\t\\', eu.username, \\'\\t\\', eu.displayname) order by e.posted separator \\'\\n\\') as edits from forum_replies as r left join users as u on u.id=r.user left join users_friends as f on f.friend=r.user and f.fan=\\'' . +$user->ID . '\\' left join forum_edits as e on e.reply=r.id left join users as eu on eu.id=e.editor where r.discussion=\\'' . +$discid . '\\' group by r.id order by r.posted')) {\n\t\t\t\t$ajax->Data->replies = [];\n\t\t\t\twhile($reply = $replies->fetch_object()) {\n\t\t\t\t\t$reply->posted = t7format::TimeTag(t7format::DATE_LONG, $reply->posted);\n\t\t\t\t\tif(!$user->IsLoggedIn() && substr($reply->contacturl, 0, 7) == 'mailto:')\n\t\t\t\t\t\t$reply->contacturl = '';\n\t\t\t\t\t$reply->canchange = $user->IsLoggedIn() && ($reply->canchange == $user->ID && $reply->markdown || $user->IsAdmin());\n\t\t\t\t\tif($reply->edits) {\n\t\t\t\t\t\t$edits = [];\n\t\t\t\t\t\tforeach(explode(\"\\n\", $reply->edits) as $e) {\n\t\t\t\t\t\t\tlist($posted, $username, $display) = explode(\"\\t\", $e);\n\t\t\t\t\t\t\t$edits[] = ['datetime' => $posted, 'posted' => strtolower(t7format::LocalDate(t7format::DATE_LONG, $posted)), 'username' => $username, 'displayname' => $display];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$reply->edits = $edits;\n\t\t\t\t\t} else\n\t\t\t\t\t\t$reply->edits = [];\n\t\t\t\t\tif(!$reply->canchange)\n\t\t\t\t\t\tunset($reply->markdown);\n\t\t\t\t\telseif(!$reply->markdown && $user->IsAdmin())\n\t\t\t\t\t\t$reply->markdown = $reply->html;\n\t\t\t\t\tif($reply->avatar === '')\n\t\t\t\t\t\t$reply->avatar = t7user::DEFAULT_AVATAR;\n\t\t\t\t\t$ajax->Data->replies[] = $reply;\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\t$ajax->Fail('database error looking up discussion detail', $db->errno . ' ' . $db->error);\n\t\telse\n\t\t\t$ajax->Fail('discussion is required');\n\t}", "function forum_get_discussions_fast($forum_id) {\n global $CFG, $USER;\n \n $timelimit='';\n if (!empty($CFG->forum_enabletimedposts)) {\n if (!((isadmin() and !empty($CFG->admineditalways)) || isteacher(get_field('forum', 'course', 'id', $forum_id)))) {\n $now = time();\n $timelimit = \" AND ((d.timestart = 0 OR d.timestart <= '$now') AND (d.timeend = 0 OR d.timeend > '$now')\";\n if (!empty($USER->id)) {\n $timelimit .= \" OR d.userid = '$USER->id'\";\n }\n $timelimit .= ')';\n }\n }\n \n $query = \"\n SELECT \n p.id, \n p.subject, \n p.discussion, \n p.message,\n p.created,\n d.groupid,\n p.userid, \n u.firstname, \n u.lastname\n FROM \n {$CFG->prefix}forum_discussions d\n JOIN \n {$CFG->prefix}forum_posts p \n ON \n p.discussion = d.id\n JOIN \n {$CFG->prefix}user u \n ON \n p.userid = u.id\n WHERE \n d.forum = '{$forum_id}' AND \n p.parent = 0\n $timelimit\n ORDER BY \n d.timemodified DESC\n \";\n return get_records_sql($query);\n}", "function getDiscussionReply()\n\t{\n\t\t//init variable\n\t\t$mainframe = JFactory::getApplication();\n\t\t\n\t\t$group_id = $mainframe->input->get('group_id',0,'INT');\n\t\t$discussId = $mainframe->input->get('discussion_id',0,'INT');\n\t\t$limit = $mainframe->input->get('limit',10,'INT');\n\t\t$limitstart = $mainframe->input->get('limitstart',0,'INT');\t\n\t\t$wres = new stdClass;\n\t\t$valid = 0;\n\n\t\tif(!$group_id)\n\t\t{\n\t\t\t$wres->status = 0;\n\t\t\t$wres->message[] = JText::_( 'PLG_API_EASYSOCIAL_EMPTY_GROUP_ID_MESSAGE' );\n\t\t\treturn $wres;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$group \t\t= FD::group( $group_id );\n\t\t\t\t\t\t\n\t\t\t// Get the current filter type\n\t\t\t$filter \t= $mainframe->input->get('filter','all','STRING');\n\t\t\t$options \t= array();\n\n\t\t\tif( $filter == 'unanswered' )\n\t\t\t{\n\t\t\t\t$options[ 'unanswered' ]\t= true;\n\t\t\t}\n\n\t\t\tif( $filter == 'locked' )\n\t\t\t{\n\t\t\t\t$options[ 'locked' ]\t= true;\n\t\t\t}\n\n\t\t\tif( $filter == 'resolved' )\n\t\t\t{\n\t\t\t\t$options[ 'resolved' ]\t= true;\n\t\t\t}\n\t\t\t\n\t\t\t$options[ 'ordering' ] = 'created';\n\t\t\t$mapp = new EasySocialApiMappingHelper();\n\t\t\t\n\t\t\t$model \t\t\t= FD::model( 'Discussions' );\n\t\t\t$reply_rows\t= $model->getReplies( $discussId,$options);\n\t\t\t\n\t\t\tif($discussId)\n\t\t\t{\n\t\t\t\t$disc_dt = new stdClass();\n\t\t\t\t//create discussion details as per request\n\t\t\t\t$discussion = FD::table( 'Discussion' );\n\t\t\t\t$discussion->load( $discussId );\n\t\t\t\t$data_node[] = $discussion; \n\t\t\t\t$data['discussion'] = $mapp->mapItem($data_node,'discussion',$this->plugin->get('user')->id);\n\t\t\t}\n\t\t\t\n\t\t\tif($limitstart)\n\t\t\t{\n\t\t\t\t$reply_rows = array_slice($reply_rows,$limitstart,$limit);\n\t\t\t}\t\t\t\n\t\t\t$data['data'] = $mapp->mapItem($reply_rows,'reply',$this->plugin->get('user')->id);\n\t\t\treturn( $data );\n\t\t}\n\t}", "function viewDiscussionAnswerByDiscussionId($connection,$discussionId){\n $query = \"SELECT fpr.*,fpd.discussion_title FROM forum_personal_reply fpr LEFT JOIN forum_personal_discussion fpd on fpr.discuss_id=fpd.discussion_id WHERE fpr.discuss_id='$discussionId' \";\n $result = $connection->query($query);\n return $result;\n }", "public function getDiscussionsSend($id_user=null){\n // $id_user correspon à l'id de l'utilisateur\n // retourne un tableau de liste de messages envoyes\n $discussions = array();\n $inst_user = new Model_DbTable_User();\n $inst_list = new Model_DbTable_List();\n \n if($id_user > 0){\n $current_user = $this->find($id_user)->current();\n $id_user = $current_user->idUser;\n }else{\n $current_user = $inst_user->getUser();\n $id_user = $current_user->idUser;\n } \n \n $select = $inst_list->select()->where('categorie_idcategories = ?',$this->Category_id);\n $lists = $current_user->findModel_DbTable_ListViaModel_DbTable_UserHasListByUserAndList($select);\n foreach($lists as $list){\n $discussions[$list->idList] = array(\"user\"=>$current_user->idUser,\"count\"=>count($inst_list->getCountItem($list->idList)));\n }\n krsort($discussions);\n return $discussions; \n }", "function postDiscussionReply()\n\t{\n\t\t//init variable\n\t\t$mainframe = JFactory::getApplication();\n\t\t$log_user = $this->plugin->get('user')->id;\n\t\t// Load the discussion\n\t\t$discuss_id \t= $mainframe->input->get('discussion_id',0,'INT');\n\t\t$groupId \t= $mainframe->input->get('group_id',0,'INT');\n\t\t$content \t= $mainframe->input->get('content','','RAW');\n\t\t\n\t\t$content = str_replace('<p>','',$content);\n\t\t$content = str_replace('</p>','',$content);\n\t\t$content = str_replace('<','[',$content);\n\t\t$content = str_replace('>',']',$content);\n\t\t\n\t\t$wres = new stdClass;\n\t\t\n\t\t$discussion = FD::table( 'Discussion' );\n\t\t$discussion->load( $discuss_id );\n\t\t\n\t\t// Get the current logged in user.\n\t\t$my\t\t= FD::user($log_user);\n\n\t\t// Get the group\n\t\t$group\t\t= FD::group( $groupId );\n\t\t\n\t\t$reply \t\t\t\t= FD::table( 'Discussion' );\n\t\t$reply->uid \t\t= $discussion->uid;\n\t\t$reply->type \t\t= $discussion->type;\n\t\t$reply->content \t= $content;\n\t\t$reply->created_by \t= $log_user;\n\t\t$reply->parent_id \t= $discussion->id;\n\t\t$reply->state \t\t= SOCIAL_STATE_PUBLISHED;\n\n\t\t// Save the reply.\n\t\t$state = $reply->store();\n\t\t\n\t\tif($state)\n\t\t{\t\n\t\t\t$this->createStream($discussion,$group,$reply,$log_user);\n\t\t\t$wres->id = $discussion->id;\n\t\t\t$wres->message[] = JText::_( 'PLG_API_EASYSOCIAL_DISCUSSION_REPLY_MESSAGE' );\n\t\t\treturn $wres;\n\t\t}\n\t}", "public function discussions()\n {\n\n return $this->hasMany('App\\Discussion','channel_id');\n }", "public function run()\n {\n $topicComments = [\n [\n 'cmnt' => 'I was never mad at him.',\n 'sub' => []\n ],\n [\n 'cmnt' => 'ABSOLUTELY HE SHOULD WORK AGAIN! Hes an alcoholic bi-polar. Anything else? I mean the man has been one of the most charming and unpretentious big stars of my generation. Bad husband? Ok, but thats not our business. The thing is he never beat her, and he still is in good relations with his first wife where he went to when his world crashed down, so hes not a monster. He got screwed.',\n 'sub' => []\n ],\n [\n 'cmnt' => 'I liked a lot of his movies before his \"breakdown\" or whatever it was. The guy obviously has some issues - and once they go beyond personal or relationship stuff (i.e. getting into public displays of racism or antisemitism) it can cause irreparable damage.',\n 'sub' => ['He said some things about gays that got him in trouble, and he certainly isnt the first person to comment or bitch about jews in hollywood. Now I dont mean to sound like Archie Bunker but Mel Gibson is from Australia. Now Hit Girl can pummel me publicly for saying this if Im wrong, but most australian men are veeeery chauvanistic and act tough i.e. talk bad about gays. Thats just the way they are, it doesnt mean theyre evil. You know what I mean?',\n ]\n ],\n [\n 'cmnt' => '10 years latter? wow you hold a grudge a long time :)',\n 'sub' => [\n 'Hahaha I phrased that wrong I\\'ve never really cared that much because I can separate art from personality, but I respect people who can\\'t. :)',\n 'Ya, I was just funnin\\' ya. I like Mel! Good director, great actor. So he said a few stupid things when he was drunk an angry. Most everybody in Hollywood has done that. He should have made the 4th Mad Max picture. But I bet he\\'s got some projects going. ',\n 'Mm. I loved Tom Hardys portrayal, but I have to agree. It would have revitalized his career. Hardy would be a star regardless.',\n 'You\\'re telling me you\\'d buy a 59 year old Max doing the things that Hardy did in Fury Road? \\'Cause I sure as hell wouldn\\'t. It\\'d be pathetic. Just like the last Indy movie and the last Terminator movie. '\n ]\n ],\n [\n 'cmnt' => 'As long as he promises not to make a \"Passion of the Christ II\" and maybe finds a way to make a second \"Payback\", sure.',\n 'sub' => []\n ],\n [\n 'cmnt' => 'As long as he does not commit anything prison worthy, why not? ',\n 'sub' => []\n ],\n [\n 'cmnt' => 'I think Mel Gibson should have played Max in Fury Road and Tom Hardy could have been his second-in-command. I would not have been opposed to Tom Hardy having more screen time than Mel Gibson, either. Tom Hardy just doesn\\'t feel like Max to me. ',\n 'sub' => []\n ],\n [\n 'cmnt' => 'No, it would have to be a totally different film. Or have Gibson be his dad or grandfather in supporting role. Sort of like they did with the last Star War films. ',\n 'sub' => []\n ],\n [\n 'cmnt' => 'I swear we typed that at the same time, SC must be reading my mind. ',\n 'sub' => []\n ],\n [\n 'cmnt' => 'I don\\'t know if Tom Hardy should have necessarily been Max\\'s son, but maybe fans could speculate to themselves that he is. ',\n 'sub' => []\n ],\n [\n 'cmnt' => 'I kind of like the idea that there are many different interpretations of Max in the universe. I think Miller once said this awhile back, that their all the same Max\\'s, but it\\'s just how the people view him. I don\\'t know I maybe spouting a bunch of stupid bs, but I could have sworn I read it somewhere. ',\n 'sub' => []\n ],\n [\n 'cmnt' => \"Certainly. I have a friend with very different political opinions of my own who once said that he \\\"hated it when people had to go away for saying the wrong thing.\\\" I've always liked the way he put that.\\n\\n\n\nMel Gibson said a lot of things I don't like, and so have a lot of other people whose art I don't admire and whose presence I don't miss. But overall, I like the cultural trade of a world where we hear offensive things a bit more often and don't need to banish the people who say them from the public eye. I'd like to see a sharper distinction between speech and speaker, and just a generally higher cultural tolerance for even the things we don't like.\",\n 'sub' => ['Well said. Your friend was a smart man.']\n ],\n [\n 'cmnt' => 'Yes! He\\'s one of my favorite actors and I think many people respect him enough to forgive him for something that happened ten years ago. ',\n 'sub' => []\n ],\n\n ];\n\n $voteComments = [\n [\n 'cmnt' => 'I propose to present the keyboard or SSD. I think it will be a good gift for him.',\n 'sub' => []\n ],\n [\n 'cmnt' => 'Let\\'s think. Maybe it is worth presenting something else?',\n 'sub' => []\n ],\n [\n 'cmnt' => 'He likes to play shooters.',\n 'sub' => []\n ],\n [\n 'cmnt' => 'Gaming mouse?!',\n 'sub' => []\n ],\n [\n 'cmnt' => 'Oh, no! I think the HD webcam will be more useful for him.',\n 'sub' => []\n ],\n [\n 'cmnt' => 'If you don\\'t accept any variant, please, offer another.',\n 'sub' => []\n ],\n ];\n\n $users = User::all();\n\n $topic = Topic::where('id', 1)->first();\n $addMin = 2;\n $addSec = 0;\n $time = $topic->created_at;\n\n foreach ($topicComments as $topicComment) {\n $comment = factory(Comment::class)->make();\n $comment->content_origin = $topicComment['cmnt'];\n $comment->content_generated = MarkdownService::baseConvert($topicComment['cmnt']);\n $randomUser = $users->random();\n $comment->user()->associate($randomUser);\n $comment->created_at = $time->addMinutes($addMin)->addSeconds($addSec);\n $addMin = rand(1, 15);\n $addSec = rand(5, 25);\n $comment->save();\n $topic->comments()->save($comment);\n $topic->updated_at = $comment->updated_at;\n $topic->save();\n $subCommentStartTime = $comment->created_at;\n foreach ($topicComment['sub'] as $subComment) {\n $childComment = factory(Comment::class)->make();\n $childComment->content_origin = $subComment;\n $childComment->content_generated = MarkdownService::baseConvert($subComment);\n $randomUser = $users->random();\n $childComment->user()->associate($randomUser);\n $addMin = rand(2, 40);\n $addSec = rand(5, 25);\n $childComment->created_at = $subCommentStartTime->addMinutes($addMin)->addSeconds($addSec);\n $childComment->save();\n $topic->comments()->save($childComment);\n $topic->updated_at = $childComment->updated_at;\n $topic->save();\n $comment->comments()->save($childComment);\n }\n }\n\n $vote = Vote::where('id', 1)->first();\n $addMin = 2;\n $addSec = 0;\n $time = $vote->created_at;\n $vote->created_at = $time-> subHours(3);\n\n\n $usersIds = $vote->votePermissions->pluck('user_id')->all();\n $users = User::whereIn('id', $usersIds)->get();\n\n foreach ($voteComments as $voteComment) {\n $comment = factory(Comment::class)->make();\n $comment->content_origin = $voteComment['cmnt'];\n $comment->content_generated = MarkdownService::baseConvert($voteComment['cmnt']);\n $randomUser = $users->random();\n $comment->user()->associate($randomUser);\n $comment->created_at = $time->addMinutes($addMin)->addSeconds($addSec);\n $addMin = rand(1, 15);\n $addSec = rand(5, 25);\n $comment->save();\n $vote->comments()->save($comment);\n $vote->updated_at = $comment->updated_at;\n $vote->save();\n }\n\n\n// foreach ($topics as $topic) {\n// $commentCount = rand(1, 5);\n// $comments = factory(Comment::class, $commentCount)->make();\n// if (!$comments instanceof Collection) {\n// $comments = new Collection([$comments]);\n// }\n// $comments->each(function ($comment) use ($users) {\n// $randomUser = $users->random();\n// $comment->user()->associate($randomUser);\n// $comment->save();\n// });\n//\n// $topic->comments()->saveMany($comments);\n// }\n\n// foreach ($votes as $vote) {\n// $commentCount = rand(1, 5);\n// $comments = factory(Comment::class, $commentCount)\n// ->make();\n// if (!$comments instanceof Collection) {\n// $comments = new Collection([$comments]);\n// }\n// $comments->each(function ($comment) use ($users) {\n// $randomUser = $users->random();\n// $comment->user()->associate($randomUser);\n// $comment->save();\n// });\n//\n// $vote->comments()->saveMany($comments);\n// }\n\n// foreach ($voteItems as $voteItem) {\n// $commentCount = rand(1, 5);\n// $comments = factory(Comment::class, $commentCount)\n// ->make();\n// if (!$comments instanceof Collection) {\n// $comments = new Collection([$comments]);\n// }\n// $comments->each(function ($comment) use ($users) {\n// $randomUser = $users->random();\n// $comment->user()->associate($randomUser);\n// $comment->save();\n// });\n//\n// $voteItem->comments()->saveMany($comments);\n// }\n\n }", "function updateDiscussionDescriptions() {\n try {\n $project_objects_table = TABLE_PREFIX . 'project_objects';\n $content_backup_table = TABLE_PREFIX . 'content_backup';\n\n DB::beginWork('Updating discussion descriptions @ ' . __CLASS__);\n\n $rows = DB::execute(\"SELECT id, body FROM $project_objects_table WHERE type = 'Discussion' AND body != '' AND body IS NOT NULL\");\n if($rows) {\n foreach($rows as $row) {\n DB::execute(\"INSERT INTO $content_backup_table (parent_type, parent_id, body) VALUES ('Discussion', ?, ?)\", $row['id'], $row['body']);\n DB::execute(\"UPDATE $project_objects_table SET body = ? WHERE id = '$row[id]'\", $this->updateHtmlContent($row['body']));\n } // foreach\n } // if\n\n DB::commit('Discussion descriptions updated @ ' . __CLASS__);\n } catch(Exception $e) {\n DB::rollback('Failed to upgrade discussion descriptions @ ' . __CLASS__);\n return $e->getMessage();\n } // try\n\n return true;\n }", "public function showDiscussionTitles()\n\t\t\t{\n\t\t\t\t$sql = 'SELECT cat_id, cat_name, seo_title, has_child, total_discussions'.\n\t\t\t\t\t\t' FROM '.$this->CFG['db']['tbl']['category'].\n\t\t\t\t\t\t' WHERE status = \\'Active\\'';\n\n\t\t\t\t$field_values = array();\n\t\t\t\tif ($this->fields_arr['cat'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql .= ' AND cat_id ='.$this->dbObj->Param($this->fields_arr['cat']);\n\t\t\t\t\t\t$field_values[] = $this->fields_arr['cat'];\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql .=' AND parent_id = 0';\n\t\t\t\t\t}\n\t\t\t\t$sql .= ' ORDER BY disporder';\n\t\t\t\t$stmt = $this->dbObj->Prepare($sql);\n\t\t\t\t$rs = $this->dbObj->Execute($stmt, $field_values);\n\t\t\t\tif (!$rs)\n\t\t\t\t\t trigger_db_error($this->dbObj);\n\n\t\t\t\t$showDiscussionTitles_arr = array();\n\t\t\t\twhile($row = $rs->FetchRow()) {\n\t\t\t\t\t//$row['subforum_titles'] = array();\n\t\t\t\t\t$row['discussion_titles'] = $this->getDiscussionTitles($row['cat_id']);\n\t\t\t\t\t//if(!$row['discussion_titles'])\n\t\t\t\t\t$row['subforum_titles'] = $this->getSubForumTitles($row['cat_id']);\n\t\t\t\t\t$showDiscussionTitles_arr[] = $row;\n\t\t\t\t}\n\t\t\t\treturn $showDiscussionTitles_arr;\n\t\t\t}", "public function discussionSchema($rows) \n\t{\n\t\t$result = array();\n\n\t\tforeach($rows as $ky=>$row)\n\t\t{\n\t\t\tif(isset($row->id))\n\t\t\t{\n\t\t\t\t$item = new discussionSimpleSchema();\n\t\t\t\t$item->id = $row->id;\n\t\t\t\t$item->title = $row->title;\n\t\t\t\t\n\t\t\t\t//format content\n\t\t\t\t$row->content = str_replace('[','<',$row->content);\n\t\t\t\t$row->content = str_replace(']','>',$row->content);\n\t\t\t\t\n\t\t\t\t$item->description = $row->content;\n\t\t\t\t$item->created_by = $this->createUserObj($row->created_by);\n\t\t\t\t$item->created_date = ES::date($row->created)->format(JText::_('DATE_FORMAT_LC1'));\n\t\t\t\t$item->lapsed = $this->calLaps($row->created);\n\t\t\t\t$item->hits = $row->hits;\n\t\t\t\t$item->replies_count = $row->total_replies;\n\t\t\t\t$item->last_replied = (isset($row->lastreply->author->id))?$this->createUserObj($row->lastreply->author->id):null;\n\t\t\t\t$last_repl = (isset($row->lastreply))?array(0=>$row->lastreply):array();\n\t\t\t\t$item->replies = $this->discussionReply($last_repl);\n\t\t\t\t\n\t\t\t\t$result[] = $item;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "function mergeDiscussionInfo($results,$curArr) \n{\n\n\tglobal $DB;\n\t\n\t//merge the collection values in for these\n\t$sql = \"SELECT object_id FROM docmgr.dm_discussion WHERE object_id IN (\".implode(\",\",$curArr).\")\";\n\t$discArr = $DB->fetch($sql,1);\n\n\t//merge our collection values in\n\tfor ($i=0;$i<$results[\"count\"];$i++) {\n\t\t$keys = @array_keys($discArr[\"object_id\"],$results[$i][\"id\"]);\n\t\t$num = count($keys);\n\t\tif ($num > 0) $results[$i][\"discussion\"] = count($keys);\n\t}\n\n\treturn $results;\n\n}", "abstract public function print_discussion_page($discussion);", "function warquest_lastest_forum_post() {\r\n\t\r\n\tglobal $mid;\r\n\tglobal $sid;\r\n\tglobal $player;\r\n\tglobal $config;\r\n\t\r\n\tglobal $page;\r\n\t\r\n\tif (warquest_db_query_pattern($player, PATTERN_FORUM_SORT)==0) {\r\n\t\treturn;\r\n\t}\r\n\t\r\n\t$query = 'select b.tid, b.fid, b.description, a.date, c.pid as pid1, c.name as name1, ';\r\n\t$query .= 'c.country as country1, d.pid as pid2, d.name as name2, d.country as country2 ';\r\n\t$query .= 'from comment as a left join topic as b on a.tid=b.tid ';\r\n\t$query .= 'left join player c on a.pid1=c.pid left join player d on b.pid=d.pid ';\r\n\t$query .= 'where a.deleted=0 and b.deleted=0 order by a.id desc limit 1';\n\t\t\t\r\n\t$result = warquest_db_query($query);\t\r\n\t$data = warquest_db_fetch_object($result);\r\n\t\r\n\tif (isset($data->tid)) {\r\n\t\t$page .= '<div class=\"subparagraph\">'.t('HOME_LASTEST_FORUM_ITEM').'</div>';\r\n\t\t$page .= '<div class=\"box\">';\r\n\t\r\n\t\t$page .= '<table>';\r\n\t\r\n\t\t$page .= '<tr>';\r\n\t\r\n\t\t$page .= '<td width=\"75\">';\r\n\t\t$page .= '<b></b>';\r\n\t\t$page .= '</td>';\r\n\t\t\r\n\t\t$page .= '<td width=\"215\">';\r\n\t\t$page .= '</td>';\r\n\r\n\t\t$page .= '<td width=\"210\">';\r\n\t\t$page .= '</td>';\r\n\t\t\r\n\t\t$page .= '</tr>';\r\n\t\t\t\t\t\t\r\n\t\t$query = 'select id from comment where deleted=0 and tid='.$data->tid;\t\r\n\t\t$result = warquest_db_query($query);\r\n\t\t$count = warquest_db_num_rows($result);\r\n\t\t\t\t\t\t\t\r\n\t\t$page .= '<tr>';\r\n\t\t\t\r\n\t\t$page .= '<td>';\r\n\t\t$page .= warquest_link('mid='.MENU_FORUMS.'&sid='.PAGE_COMMENT.'&fid='.$data->fid.'&tid='.$data->tid,\r\n\t\t\twarquest_image('other/forum.png','width=\"64\" height=\"64\"'), 'forum1');\r\n\t\t$page .= '</td>';\r\n\t\t\t\t\r\n\t\t$page .= '<td valign=\"top\">';\r\n\t\t$page .= '<span class=\"topic\">';\r\n\t\t$page .= warquest_link('mid='.MENU_FORUMS.'&sid='.PAGE_COMMENT.'&fid='.$data->fid.'&tid='.$data->tid, \r\n\t\t\twarquest_parse_smilies($data->description),'forum2');\r\n\t\t$page .= '</span>';\t\r\n\t\t$page .= '<br/>';\r\n\t\t$page .= '<i>';\t\r\n\t\t$page .= t('TOPIC_CREATED_BY', player_format($data->pid2, $data->name2, $data->country2));\r\n\t\t$page .= '</i>';\r\n\t\t\t\r\n\t\t$page .= '</td>';\r\n\t\t\t\t\r\n\t\t$page .= '<td valign=\"top\">';\r\n\t\t$page .= health_format($count).' '.t('GENERAL_MESSAGES').' ';\r\n\t\t\t\r\n\t\t$page .= '<br/>';\r\n\t\t\t\r\n\t\tif (isset($data->date)) {\r\n\t\t\t$page .= '<br/><b>'.t('GENERAL_LAST_MESSAGE').'</b><br/>';\r\n\t\r\n\t\t\t$page .= warquest_ui_ago($data->date).' '.t('GENERAL_BY').' ';\r\n\t\t\t$page .= player_format($data->pid1, $data->name1, $data->country1);\r\n\t\t}\r\n\t\t$page .= '</td>';\r\n\t\t$page .= '</tr>';\r\n\t\t\t\t\r\n\t\t$page .= '</table>';\r\n\t\t\t\r\n\t\t$page .= '</div>';\r\n\t}\r\n}", "public function threads()\n {\n $questions = Question::has('answers', '=', 0)\n ->where('processed', '=', false)\n ->take(200)\n ->get();\n echo count($questions);\n $created = 0;\n $updated = 0;\n foreach($questions as $question)\n {\n\n if(strpos($question['url'], \"r/AskHistorians/comments\") !== false)\n {\n $parent_id = $question->id;\n $url = explode('/', $question->url);\n array_pop($url);\n $url = implode('/', $url); \n $api = $url.\".json\";\n $client = new \\GuzzleHttp\\Client([\n 'headers' => ['User-Agent' => 'AskHistoriansConsumerBot/0.0 (by /u/steerpike404)'],\n 'verify' => false]);\n $response = $client->request(\"GET\", \n $api);\n $contents = json_decode($response->getBody());\n $collection = collect($contents[1]->data->children);\n $data = $collection->mapWithKeys(function($item) {\n return [$item->data->id => [\n 'reddit_id' => $item->data->id ?? null,\n 'body'=>$item->data->body ?? null,\n 'replies'=>$item->data->replies ?? null,\n 'body_html'=>$item->data->body_html?? null,\n 'permalink'=>$item->data->permalink ?? null,\n 'author'=>$item->data->author ?? null,\n 'author_flair_text'=> $item->data->author_flair_text ?? null,\n 'distinguished'=> $item->data->distinguished ?? null,\n 'created'=>$item->data->created ?? null]\n ];\n });\n foreach($data as $answer)\n {\n if(strpos($answer['body'], \"AskHistorians/wiki/rules\") !== false ||\n strpos(strtolower($answer['body']), \"hello everyone\") !== false ||\n strlen($answer['body']) <= 10)\n {\n //$answer['display'] = false;\n unset($data[$answer['reddit_id']]);\n }\n }\n foreach($data as $item)\n {\n $answer = Answer::updateOrCreate(['reddit_id'=>$item['reddit_id']],\n [\n 'question_id'=>$parent_id,\n 'body'=>$item['body'],\n 'replies'=>json_encode($item['replies']),\n 'body_html'=>$item['body_html'],\n 'permalink'=>$item['permalink'],\n 'author'=>$item['author'],\n 'author_flair_text'=>$item['author_flair_text'],\n 'distinguished'=>$item['distinguished'],\n 'created'=>$item['created']\n ]);\n if($answer->wasRecentlyCreated) {\n $created++;\n } else {\n $updated++;\n }\n }\n }\n $question->processed = true;\n $question->save();\n }\n $result = \"Created: \".$created.\" Updated: \".$updated;\n return $result;\n }", "public function run()\n {\n $discussions=Discussion::all();\n foreach ($discussions as $discussion){\n //Comments\n $comments=Post::where('discussion_id',$discussion->id)->get();\n $comments_count=count($comments);\n Discussion::where('id',$discussion->id)->update(['comment_count'=>$comments_count]);\n if($comments_count>0){\n //$first_post_id=$comments[0]->id;\n $last_post_id=$comments[$comments_count-1]->id;\n $last_post_user=$comments[$comments_count-1]->user_id;\n $last_post_date=$comments[$comments_count-1]->created_at;\n $last_post_number=$comments[$comments_count-1]->number;\n Discussion::where('id',$discussion->id)->update([/*'first_post_id'=>$first_post_id,*/\n 'last_post_id'=>$last_post_id,'last_posted_user_id'=>$last_post_user,\n 'last_posted_at'=>$last_post_date,'last_post_number'=>$last_post_number]);\n }\n //Discussion Users\n if(Discussion_User::where('user_id',$discussion->user_id)->where(\"discussion_id\",$discussion->id)->count()==0){\n Discussion_User::create([\"user_id\"=>$discussion->user_id,\"discussion_id\"=>$discussion->id,\n \"last_read_at\"=>Date::now(),\"last_read_post_number\"=>$discussion->last_post_number]);\n }\n }\n }", "function forum_rss_feed_discussions($forum, $newsince=0) {\n\n global $CFG;\n\n $items = array();\n\n if ($newsince) {\n $newsince = \" AND p.modified > '$newsince'\";\n } else {\n $newsince = \"\";\n }\n\n if ($recs = get_records_sql (\"SELECT d.id AS discussionid, \n d.name AS discussionname, \n u.id AS userid, \n u.firstname AS userfirstname,\n u.lastname AS userlastname,\n p.message AS postmessage,\n p.created AS postcreated,\n p.format AS postformat\n FROM {$CFG->prefix}forum_discussions d,\n {$CFG->prefix}forum_posts p,\n {$CFG->prefix}user u\n WHERE d.forum = '$forum->id' AND\n p.discussion = d.id AND\n p.parent = 0 AND\n u.id = p.userid $newsince\n ORDER BY p.created desc\", 0, $forum->rssarticles)) {\n\n $item = NULL;\n $user = NULL;\n\n $formatoptions = new object;\n $formatoptions->trusttext = true;\n\n foreach ($recs as $rec) {\n unset($item);\n unset($user);\n $item->title = format_string($rec->discussionname);\n $user->firstname = $rec->userfirstname;\n $user->lastname = $rec->userlastname;\n $item->author = fullname($user);\n $item->pubdate = $rec->postcreated;\n $item->link = $CFG->wwwroot.\"/mod/forum/discuss.php?d=\".$rec->discussionid;\n $item->description = format_text($rec->postmessage,$rec->postformat,$formatoptions,$forum->course);\n $items[] = $item;\n }\n }\n return $items;\n }", "function emc_discussion_comments() {\r\n\r\n\t// Get two random comments from the current post\r\n\t$args = array(\r\n\t\t'post_id' => get_the_ID(),\r\n\t\t'status' => 'approve',\r\n\t);\r\n\t$comment_query = new WP_Comment_Query;\r\n\t$comments = $comment_query->query( $args );\r\n\r\n\tif ( ! empty( $comments ) ) {\r\n\t\tshuffle( $comments );\r\n\t\t$comments = array_slice( $comments, 0, 2 );\r\n\t\tdbgx_trace_var( $comments );\r\n\r\n\t\t$html = '';\r\n\t\t// Loop through each comment\r\n\t\tforeach ( $comments as $comment ) {\r\n\t\t\t$excerpt = wp_trim_words( $comment->comment_content, 35 );\r\n\t\t\t$commenter = sprintf( __( '&mdash; <a href=\"%1$s\" title=\"%2$s\">%3$s</a>', 'emc' ),\r\n\t\t\t\tget_comment_link( $comment ),\r\n\t\t\t\tsprintf( __( 'View the full comment by %s', 'emc' ), esc_attr( $comment->comment_author ) ),\r\n\t\t\t\tesc_html( $comment->comment_author )\r\n\t\t\t);\r\n\t\t\t$html .= '<div class=\"emc-comment\">';\r\n\t\t\t$html .= '<blockquote>' . esc_html( $excerpt ) . '</blockquote>';\r\n\t\t\t$html .= '<p class=\"emc-commenter-link\">' . $commenter . '</p>';\r\n\t\t\t$html .= '</div><!-- .emc-comment -->';\r\n\r\n\t\t}\r\n\t} else {\r\n\t\t$html = sprintf( __( '<p class=\"emc-no-comments\">No comments yet. Be the first and <a href=\"%s\" title=\"Start the discussion\">let us know what you think!</a></p>', 'emc' ),\r\n\t\t\tget_permalink()\r\n\t\t);\r\n\t}\r\n\r\n\techo $html;\r\n\r\n}", "function have_discussion() {\n\tglobal $discussions_index, $discussion, $discussions, $discussions_count, $discussion_title;\n\n\t// check if single discussion page\n\tif (!$discussion_title) {\n\t\t$discussions_count = count(discussion::get_discussions());\n\t\t$discussions = discussion::get_discussions();\n\t} else {\n\t\t$discussions_count = 1;\n\t\t$discussions = discussion::get_discussion($discussion_title);\n\t}\n\n\tif ($discussions && $discussions_index + 1 <= $discussions_count) {\n\t\t$discussions_index++;\n\t\treturn true;\n\t} else {\n\t\t$discussions_count = 0;\n\t\treturn false;\n\t}\n}", "function updateDiscussionComments() {\n try {\n $comments_table = TABLE_PREFIX . 'comments';\n $content_backup_table = TABLE_PREFIX . 'content_backup';\n\n DB::beginWork('Updating discussion comments @ ' . __CLASS__);\n\n $rows = DB::execute(\"SELECT id, body FROM $comments_table WHERE parent_type = 'Discussion'\");\n if($rows) {\n foreach($rows as $row) {\n DB::execute(\"INSERT INTO $content_backup_table (parent_type, parent_id, body) VALUES ('DiscussionComment', ?, ?)\", $row['id'], $row['body']);\n DB::execute(\"UPDATE $comments_table SET body = ? WHERE id = '$row[id]'\", $this->updateHtmlContent($row['body']));\n } // foreach\n } // if\n\n DB::commit('Discussion comments updated @ ' . __CLASS__);\n } catch(Exception $e) {\n DB::rollback('Failed to update discussion comments @ ' . __CLASS__);\n return $e->getMessage();\n } // try\n\n return true;\n }", "public function discussionReply($rows) \n\t{\n\t\tif(empty($rows))\n\t\treturn 0;\n\t\t\n\t\t$result = array();\n\t\t\n\t\tforeach($rows as $ky=>$row)\n\t\t{\n\t\t\tif(isset($row->id))\n\t\t\t{\n\t\t\t\t$item = new discussionReplySimpleSchema();\n\t\t\t\t$item->id = $row->id;\n\t\t\t\t$item->reply = $row->content;\n\t\t\t\t$item->created_by = $this->createUserObj($row->created_by);\n\t\t\t\t$item->created_date = $this->dateCreate($row->created);\n\t\t\t\t$item->lapsed = $this->calLaps($row->created);\n\t\t\t\t$result[] = $item;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "function show_parents($queue,$parent,$parent_comments = \"5\"){ global $db_main,$thread_data,$nay;\n\n//the logic is, you will always need the margin unless it's the top ancestor generation \n\n\n\n$show_1 = mysqli_query($db_main, \"SELECT * FROM posts WHERE postid='$parent' AND thread_id='$thread_data[postid]'\");\n$tell_1 = (mysqli_num_rows($show_1) > 0) ? mysqli_fetch_assoc($show_1) : \"dead\";\n\nif($tell_1 !== \"dead\" && $_SESSION['count'] > 0){ $_SESSION['count'] = $_SESSION['count'] - 1; $_SESSION['incr'] = $_SESSION['incr'] + 1; //remember, it has to be limited to 5 ancestor generations\n$show_2 = mysqli_query($db_main, \"SELECT * FROM posts WHERE postid='$tell_1[parent]' AND thread_id='$thread_data[postid]'\");\n$tell_2 = (mysqli_num_rows($show_2) > 0) ? mysqli_fetch_assoc($show_2) : \"dead\";\nif($tell_2 !== \"dead\" && $_SESSION['count'] > 0){ \n $_SESSION['count'] = $_SESSION['count'] - 1; $_SESSION['incr'] = $_SESSION['incr'] + 1; \nif($tell_2['parent'] !== $thread_data['postid']){\nshow_parents($tell_2['postid'],$tell_2['parent'],$_SESSION['count'] - 1); $margin_set = (is_array($tell_1)) ? \"<div class='margin'>\" : \"\";\necho $margin_set;\n}\n\n reply_format::show($tell_2); \n\n} \n\n $margin_set = (is_array($tell_2)) ? \"<div class='margin'>\" : \"\";\necho $margin_set;\n\n reply_format::show($tell_1); \n\n \nmysqli_free_result($show_2);\n}\nmysqli_free_result($show_1);\n //end show_parents();\n\n}", "function html_thread(array $thread, $date_format='%c',\n $locale='en_US.UTF-8', $parent_id=0) {\n setlocale(LC_TIME, $locale);\n foreach ($thread as $subthread) {\n if ($subthread['parent_id'] == $parent_id) {\n echo '<div class=\"comment\">' . PHP_EOL;\n echo '<div class=\"comment_message\"><p>'.\n $subthread['message'] . '</div>' . PHP_EOL;\n echo '<div class=\"comment_signature\">' . \n '<span class=\"comment_username\">' .\n $subthread['username'] . '</span>;' . PHP_EOL;\n echo '<span>' .\n '<time datetime=' .\n strftime('%Y-%m-%dT%H:%M:%S',\n strtotime($subthread['timestamp'])) . '>' .\n strftime($date_format,\n strtotime($subthread['timestamp'])) .\n '</time></span>' . PHP_EOL;\n echo ' &bull; ';\n echo '<span class=\"comment-reply\">'. PHP_EOL;\n echo '<a href=\"#\">Reply</a></span>' . PHP_EOL;\n echo '</div>' . PHP_EOL;\n\n if ($subthread['children']) {\n html_thread($subthread['children'], $date_format,\n $locale, $subthread['id']);\n }\n echo '</div>' . PHP_EOL;\n }\n }\n}", "public function getDiscussions() {\n $comments = $this->getComments();\n $discussions = array();\n\n foreach($comments as $comment) {\n if(!$comment->parentId) {\n $discussions[$comment->id] = array();\n $discussions[$comment->id][] = $comment;\n }\n else {\n $discussions[$comment->parentId][] = $comment;\n }\n }\n\n return $discussions;\n }", "function _hippel_discussions_content_default_fields() {\n $fields = array();\n\n // Exported field: field_discuss_body\n $fields[] = array(\n 'field_name' => 'field_discuss_body',\n 'type_name' => 'discuss',\n 'display_settings' => array(\n 'weight' => '31',\n 'parent' => '',\n 'label' => array(\n 'format' => 'above',\n ),\n 'teaser' => array(\n 'format' => 'default',\n 'exclude' => 0,\n ),\n 'full' => array(\n 'format' => 'default',\n 'exclude' => 0,\n ),\n '4' => array(\n 'format' => 'default',\n 'exclude' => 0,\n ),\n ),\n 'widget_active' => '1',\n 'type' => 'text',\n 'required' => '0',\n 'multiple' => '0',\n 'module' => 'text',\n 'active' => '1',\n 'text_processing' => '1',\n 'max_length' => '',\n 'allowed_values' => '',\n 'allowed_values_php' => '',\n 'widget' => array(\n 'rows' => '5',\n 'size' => 60,\n 'default_value' => array(\n '0' => array(\n 'value' => '',\n '_error_element' => 'default_value_widget][field_discuss_body][0][value',\n ),\n ),\n 'default_value_php' => NULL,\n 'label' => 'Body',\n 'weight' => '-4',\n 'description' => '',\n 'type' => 'text_textarea',\n 'module' => 'text',\n ),\n );\n\n // Exported field: field_discuss_image\n $fields[] = array(\n 'field_name' => 'field_discuss_image',\n 'type_name' => 'discuss',\n 'display_settings' => array(\n 'weight' => '33',\n 'parent' => '',\n 'label' => array(\n 'format' => 'above',\n ),\n 'teaser' => array(\n 'format' => 'image_nodelink',\n 'exclude' => 0,\n ),\n 'full' => array(\n 'format' => 'image_plain',\n 'exclude' => 0,\n ),\n '4' => array(\n 'format' => 'image_plain',\n 'exclude' => 0,\n ),\n ),\n 'widget_active' => '1',\n 'type' => 'filefield',\n 'required' => '0',\n 'multiple' => '1',\n 'module' => 'filefield',\n 'active' => '1',\n 'list_field' => '0',\n 'list_default' => 1,\n 'description_field' => '0',\n 'widget' => array(\n 'file_extensions' => 'png gif jpg jpeg',\n 'file_path' => 'images/[uid]',\n 'progress_indicator' => 'bar',\n 'max_filesize_per_file' => '1M',\n 'max_filesize_per_node' => '3M',\n 'max_resolution' => '0',\n 'min_resolution' => '0',\n 'alt' => '',\n 'custom_alt' => 1,\n 'title' => '',\n 'custom_title' => 0,\n 'title_type' => 'textfield',\n 'default_image' => NULL,\n 'use_default_image' => 0,\n 'label' => 'Image',\n 'weight' => '-3',\n 'description' => '',\n 'type' => 'imagefield_widget',\n 'module' => 'imagefield',\n ),\n );\n\n // Exported field: field_discuss_image\n $fields[] = array(\n 'field_name' => 'field_discuss_image',\n 'type_name' => 'reply',\n 'display_settings' => array(\n 'weight' => '33',\n 'parent' => '',\n 'label' => array(\n 'format' => 'above',\n ),\n 'teaser' => array(\n 'format' => 'image_plain',\n 'exclude' => 0,\n ),\n 'full' => array(\n 'format' => 'image_plain',\n 'exclude' => 0,\n ),\n '4' => array(\n 'format' => 'image_plain',\n 'exclude' => 0,\n ),\n ),\n 'widget_active' => '1',\n 'type' => 'filefield',\n 'required' => '0',\n 'multiple' => '1',\n 'module' => 'filefield',\n 'active' => '1',\n 'list_field' => '0',\n 'list_default' => 1,\n 'description_field' => '0',\n 'widget' => array(\n 'file_extensions' => 'png gif jpg jpeg',\n 'file_path' => 'images/[uid]',\n 'progress_indicator' => 'bar',\n 'max_filesize_per_file' => '1M',\n 'max_filesize_per_node' => '3M',\n 'max_resolution' => '0',\n 'min_resolution' => '0',\n 'alt' => '',\n 'custom_alt' => 1,\n 'title' => '',\n 'custom_title' => 0,\n 'title_type' => 'textfield',\n 'default_image' => NULL,\n 'use_default_image' => 0,\n 'label' => 'Image',\n 'weight' => '-3',\n 'description' => '',\n 'type' => 'imagefield_widget',\n 'module' => 'imagefield',\n ),\n );\n\n // Exported field: field_reply_body\n $fields[] = array(\n 'field_name' => 'field_reply_body',\n 'type_name' => 'reply',\n 'display_settings' => array(\n 'weight' => '31',\n 'parent' => '',\n 'label' => array(\n 'format' => 'above',\n ),\n 'teaser' => array(\n 'format' => 'default',\n 'exclude' => 0,\n ),\n 'full' => array(\n 'format' => 'default',\n 'exclude' => 0,\n ),\n '4' => array(\n 'format' => 'default',\n 'exclude' => 0,\n ),\n ),\n 'widget_active' => '1',\n 'type' => 'text',\n 'required' => '0',\n 'multiple' => '0',\n 'module' => 'text',\n 'active' => '1',\n 'text_processing' => '1',\n 'max_length' => '',\n 'allowed_values' => '',\n 'allowed_values_php' => '',\n 'widget' => array(\n 'rows' => '5',\n 'size' => 60,\n 'default_value' => array(\n '0' => array(\n 'value' => '',\n '_error_element' => 'default_value_widget][field_reply_body][0][value',\n ),\n ),\n 'default_value_php' => NULL,\n 'label' => 'Reply Body',\n 'weight' => '31',\n 'description' => '',\n 'type' => 'text_textarea',\n 'module' => 'text',\n ),\n );\n\n // Exported field: field_reply_refto_discuss\n $fields[] = array(\n 'field_name' => 'field_reply_refto_discuss',\n 'type_name' => 'reply',\n 'display_settings' => array(\n 'weight' => '33',\n 'parent' => '',\n 'label' => array(\n 'format' => 'hidden',\n ),\n 'teaser' => array(\n 'format' => 'hidden',\n 'exclude' => 0,\n ),\n 'full' => array(\n 'format' => 'hidden',\n 'exclude' => 0,\n ),\n '4' => array(\n 'format' => 'default',\n 'exclude' => 0,\n ),\n 'token' => array(\n 'format' => 'default',\n 'exclude' => 0,\n ),\n ),\n 'widget_active' => '1',\n 'type' => 'nodereference',\n 'required' => '1',\n 'multiple' => '0',\n 'module' => 'nodereference',\n 'active' => '1',\n 'referenceable_types' => array(\n 'discuss' => 'discuss',\n 'page' => 0,\n 'reply' => 0,\n 'story' => 0,\n ),\n 'advanced_view' => '--',\n 'advanced_view_args' => '',\n 'widget' => array(\n 'node_link' => array(\n 'teaser' => 1,\n 'full' => 1,\n 'title' => 'Reply to this Topic',\n 'hover_title' => '',\n 'destination' => 'node',\n ),\n 'fallback' => 'page_not_found',\n 'edit_fallback' => 1,\n 'label' => 'Reference to Discussion',\n 'weight' => '37',\n 'description' => '',\n 'type' => 'nodereference_url',\n 'module' => 'nodereference_url',\n ),\n );\n\n // Translatables\n array(\n t('Body'),\n t('Image'),\n t('Reference to Discussion'),\n t('Reply Body'),\n );\n\n return $fields;\n}", "public function listDiscussion($request){\n $userArray = $this->verify_token($request);\n if ($userArray==false){\n return new Response(401, ['Content-Type' => 'application/json'], json_encode(array(\n \"status\" => \"error\",\n \"message\" => \"Invalid authorized access\"\n )));\n }\n\n $user_id = $userArray[\"id\"];\n\n $discussion = new Discussion();\n\n $discussionsArray = $discussion->getDiscussionsFromUserId($user_id);\n\n $discussionsJson = array();\n\n foreach ($discussionsArray as $discussion) {\n $discussionJson = array();\n $discussionJson[\"id\"] = $discussion->getId();\n $discussionJson[\"type\"] = $discussion->getType();\n $discussionJson[\"name\"] = $discussion->getName();\n $discussionJson[\"users\"] = $discussion->getUsersNecessityArray();\n $discussionJson[\"photo_profil\"] = $discussion->getPhoto_profil();\n $discussionJson[\"notseen\"] = $discussion->getNotSeenMessages($user_id);\n $discussionJson[\"last_message\"] = $discussion->getLast_messageArray();\n $discussionsJson[] = $discussionJson;\n }\n\n return $this->renderJson(array(\n \"current_user_id\" => $user_id,\n \"discussions\" => $discussionsJson,\n ));\n }", "function getSingleAnswersByDiscussionId($connection,$discussionId){\n $query = \"SELECT * FROM forum_personal_reply WHERE discuss_id='$discussionId' \";\n $result = $connection->query($query);\n return $result;\n }", "public static function reset_discussion_cache() {\n self::$reactforumdiscussioncache = array();\n self::$discussionfetchedreactforums = array();\n }", "public function index(){\n\n return view('discussions.index', [\n\n 'discussions' => Discussion::filterByChannels()->paginate(5)\n\n ]);\n }", "function ppmess_shortcode_all_communications(){\n\n\t$data = array();\n\t$current_user = wp_get_current_user();\n\n\t/*------------------------- Logged user info -------------------------*/\n\t$data['logged_user'] = array(\n\t\t'user_login'\t=> $current_user->user_login, \n\t\t'user_id'\t\t=> $current_user->ID\n\t);\n\t\n\t$all_communs = ppmess_get_all_communications($current_user->ID);\n\t\n\t/*----------- Zamena datuma diskusije sa najnovijim datumom -----------*/\n\tif(! empty($all_communs)){\n\t\tforeach($all_communs as $key => $commu){\n\t\t\t\n\t\t\t$last_data_mess = ppmess_get_last_message_date($commu['message_id'], $commu['post_id'], $current_user->ID);\n\t\t\t\n\t\t\t// change the message with the latest message\n\t\t\tif( ! empty($last_data_mess)){\n\t\t\t\t$all_communs[$key]['date_created'] = $last_data_mess['date_created'];\n\t\t\t}\t\n\t\t}\n\t}\n\t\t\n\t/*------------ Division the list of communications into two parts -----------*/\n\t/*-------- part1: unread messages (sent_to == logged user ID) ---------------*/\n\t/*-------- part2: rest of the messages --------------------------------------*/\n\t$part1_arr = array();\n\t$part2_arr = array();\n\tif(! empty($all_communs)){\n\t\tforeach($all_communs as $key => $value){\n\t\t\tif($value['sent_to'] == $current_user->ID){\n\t\t\t\t$part1_arr[] = $all_communs[$key];\t\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$part2_arr[] = $all_communs[$key];\n\t\t\t}\n\t\t}\n\t}\n\t\n\t/*------------- Sorting first part by date release, decreasing order -------------*/\n\t$date_created = array();\n\tif(! empty($part1_arr)){\n\t\tforeach ($part1_arr as $key => $row){\n\t\t\t$date_created[$key] = $row['date_created'];\n\t\t}\n\t\t// array_multisort($sent_to, SORT_DESC, $date_created, SORT_DESC, $part1_arr);\n\t\tarray_multisort($date_created, SORT_DESC, $part1_arr);\n\t}\n\t\n\t/*------------- Sorting second part by date release, decreasing order -------------*/\n\t$date_created = array();\n\tif(! empty($part2_arr)){\n\t\tforeach ($part2_arr as $key => $row) {\n\t\t\t$date_created[$key] = $row['date_created'];\n\t\t}\n\t\tarray_multisort($date_created, SORT_DESC, $part2_arr);\n\t}\n\t\n\t/*---------------- Connect two parts into one ------------------*/\n\t$data['all_communs'] = array_merge($part1_arr, $part2_arr);\n\t\n\t/*----------- Adding new row 'number_messages' per communication -----------*/\n\tforeach($data['all_communs'] as $key => $row){\n\t\t// new row\n\t\t$data['all_communs'][$key]['number_messages'] = ppmess_all_unread_messages($row['message_id'], $row['post_id'], $current_user->ID);\t\n\t}\n\t\t\n\treturn $data;\n}", "public function discussions(): MorphToMany\r\n {\r\n return $this->morphToMany(\r\n \\App\\Models\\Discussion::class,\r\n 'model',\r\n 'model_has_discussions',\r\n 'model_id',\r\n 'discussion_id'\r\n );\r\n }", "public function articles()\n {\n return Board::where('news', 1)->first()->threads;\n }", "function caldol_no_replies_bbpress_topics_shortcode() {\n\n\t?>\n\n<!-- html custom-functions -->\n\n<h4 style=\"margin-top: 15px;\">Discussions with No Replies. Be the first to jump in!</h4>\n\n<?php\n\n\n\nif ( bbp_has_topics( array( 'author' => 0, 'show_stickies' => false, 'order' => 'DESC', 'meta_key' => '_bbp_reply_count', 'orderby' => 'post_date', 'meta_value' => '0', 'meta_compare' => '=', 'post_parent' => 'any', 'posts_per_page' => 10 ) ) )\n\nbbp_get_template_part( 'bbpress/loop', 'topics' );\n\n?>\n\n<!-- end -->\n\n<?php }", "public function find_new_comments() {\n\t\t$new = array();\n\n\t\t// Profile comments\n\t\tif ($this->new_comment_count) {\n\t\t\t$new['new-comments'] = HTML::anchor(\n\t\t\t\tURL::user($this),\n\t\t\t\t__(':comments', array(':comments' => '<div></div><var>' . $this->new_comment_count . '</var>')),\n\t\t\t\tarray('title' => __('New comments')\n\t\t\t));\n\t\t}\n\n\t\t// Blog comments\n\t\t$blog_comments = Model_Blog_Entry::find_new_comments($this);\n\t\tif (count($blog_comments)) {\n\t\t\t$new_comments = 0;\n\t\t\tforeach ($blog_comments as $blog_entry) {\n\t\t\t\t$new_comments += $blog_entry->new_comment_count;\n\t\t\t}\n\t\t\t$new['new-blog-comments'] = HTML::anchor(\n\t\t\t\tRoute::model($blog_entry),\n\t\t\t\t__(':comments', array(':comments' => '<div></div><var>' . $new_comments . '</var>')),\n\t\t\t\tarray('title' => __('New blog comments')\n\t\t\t));\n\t\t}\n\t\tunset($blog_comments);\n\n\t\t// Forum quotes\n\t\t$forum_quotes = Model_Forum_Quote::find_by_user($this);\n\t\tif (count($forum_quotes)) {\n\t\t\t$new_quotes = count($forum_quotes);\n\t\t\t$quote = $forum_quotes->current();\n\t\t\t$new['new-forum-quotes'] = HTML::anchor(\n\t\t\t\tRoute::get('forum_post')->uri(array('topic_id' => Route::model_id($quote->topic), 'id' => $quote->post->id)) . '#post-' . $quote->post->id,\n\t\t\t\t__(':quotes', array(':quotes' => '<div></div><var>' . $new_quotes . '</var>')),\n\t\t\t\tarray('title' => __('Forum quotes')\n\t\t\t));\n\t\t}\n\n\t\t// Images waiting for approval\n\t\tif (Permission::has(new Model_Gallery, Model_Gallery::PERMISSION_APPROVE_WAITING, $this)) {\n\t\t\t$gallery_approvals = Model_Gallery::find_pending(Permission::has(new Model_Gallery, Model_Gallery::PERMISSION_APPROVE, $this) ? null : $this);\n\t\t\tif (count($gallery_approvals)) {\n\t\t\t\t$new_approvals = count($gallery_approvals);\n\t\t\t\t$new['new-gallery-approvals'] = HTML::anchor(\n\t\t\t\t\tRoute::get('galleries')->uri(array('action' => 'approval')),\n\t\t\t\t\t__(':galleries', array(':galleries' => '<div></div><var>' . $new_approvals . '</var>')),\n\t\t\t\t\tarray('title' => __('Galleries waiting for approval')\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\n\t\t// Image comments\n\t\t$image_comments = Model_Image::find_new_comments($this);\n\t\tif (count($image_comments)) {\n\t\t\t$new_comments = 0;\n\t\t\tforeach ($image_comments as $image) {\n\t\t\t\t$new_comments += $image->new_comment_count;\n\t\t\t}\n\t\t\t$new['new-image-comments'] = HTML::anchor(\n\t\t\t\tRoute::get('gallery_image')->uri(array('gallery_id' => Route::model_id(Model_Gallery::find_by_image($image->id)), 'id' => $image->id, 'action' => '')),\n\t\t\t\t__(':comments', array(':comments' => '<div></div><var>' . $new_comments . '</var>')),\n\t\t\t\tarray('title' => __('New image comments')\n\t\t\t));\n\t\t}\n\t\tunset($image_comments);\n\n\t\t// Private messages\n\n\t\treturn $new;\n\t}", "function manynewposts_thread() {\n global $thread, $templates, $db, $mybb, $settings;\n\n $query = $db->query(\"\n SELECT\n dateline, pid\n FROM \" . TABLE_PREFIX . \"posts\n WHERE\n tid='\".$db->escape_string($thread['tid']).\"'\n \");\n\n $lastpost = array();\n $lastpost_pid = array();\n\n while($result=$db->fetch_array($query))\n {\n $lastpost[] = $result['dateline'];\n $lastpost_pid[$result['dateline']] = $result['pid'];\n }\n\n $query = $db->query(\"\n SELECT\n tr.dateline AS `tr_dateline`,\n fr.dateline AS `fr_dateline`\n FROM \" . TABLE_PREFIX . \"posts p\n LEFT JOIN\n \" . TABLE_PREFIX . \"threadsread tr\n ON\n tr.tid = p.tid\n LEFT JOIN\n \" . TABLE_PREFIX . \"forumsread fr\n ON\n fr.fid = p.fid\n WHERE\n tr.uid='\".$db->escape_string($mybb->user['uid']).\"' and\n fr.uid='\".$db->escape_string($mybb->user['uid']).\"'\n \");\n\n $userlastview = array();\n $userlastview_forum = array();\n\n while($result=$db->fetch_array($query))\n {\n $userlastview[] = $result['tr_dateline'];\n $userlastview_forum[] = $result['fr_dateline'];\n }\n\n $userlastview = (count($userlastview) > 0) ? max($userlastview) : 0;\n $userlastview_forum = (count($userlastview_forum) > 0) ? max($userlastview_forum) : 0;\n\n $timelimit = $userlastview + ($settings['threadreadcut'] * 24 * 60 * 60);\n $newlastpost = array();\n\n if($userlastview && $timelimit > TIME_NOW) {\n foreach ($lastpost as $lastpost_number) {\n if($lastpost_number > $userlastview_forum && $lastpost_number > $userlastview) {\n $newlastpost[] = $lastpost_number;\n }\n }\n }\n\n $count = count($newlastpost);\n\n if($count == 0) return;\n\n $posts = $count == 1 ? 'post':'posts';\n\n $lastseenpost_pid = $lastpost_pid[min($newlastpost)];\n $manynewposts = \"\";\n\n if($mybb->user['uid']) {\n if($count > 0) {\n $manynewposts = $templates->get('manynewposts');\n $manynewposts = str_replace(\"{newposts_link}\", \"./showthread.php?tid=\".$thread['tid'].\"&pid=\".$lastseenpost_pid.\"#pid\".$lastseenpost_pid, $manynewposts);\n $manynewposts = str_replace(\"{newposts}\", $count, $manynewposts);\n $manynewposts = str_replace(\"{posts}\", $posts, $manynewposts);\n }\n }\n $thread['manynewposts'] = $manynewposts;\n}", "public function run()\n {\n $replies = [\n ['user_id'=>1, 'discussion_id'=>1,'content'=>\"lorem ipsum dotor amet adflit thasdk\"],\n ['user_id'=>2, 'discussion_id'=>2,'content'=>\"lorem ipsum dotor amet adflit thasdk\"],\n ['user_id'=>1, 'discussion_id'=>3,'content'=>\"lorem ipsum dotor amet adflit thasdk\"],\n ['user_id'=>2, 'discussion_id'=>4,'content'=>\"lorem ipsum dotor amet adflit thasdk\"],\n ];\n\n Reply::insert($replies);\n }", "function DisplayForums($parent_id, $forum_id, $title)\n {\n global $DB, $categoryid, $mainsettings, $userinfo, $usersystem;\n\n // SD313: check for view permission for usergroup (id enclosed in pipes!)\n // and moderation status of forums\n $forums_tbl = PRGM_TABLE_PREFIX.'p_forum_forums';\n $posts_tbl = PRGM_TABLE_PREFIX.'p_forum_posts';\n $topics_tbl = PRGM_TABLE_PREFIX.'p_forum_topics';\n $forum_id = (int)$forum_id;\n\n if(empty($parent_id) || !isset($this->conf->forums_cache['parents'][$parent_id])) // SD343: \"isset\"\n {\n $source = array($forum_id);\n }\n else\n {\n $parent_id = (int)$parent_id;\n $source = &$this->conf->forums_cache['parents'][$parent_id];\n }\n\n $output = '';\n $do_body = false;\n if(isset($source) && is_array($source))\n foreach($source as $fid)\n {\n $forum_arr = isset($this->conf->forums_cache['forums'][$fid]) ?\n (array)$this->conf->forums_cache['forums'][$fid] : false;\n if(!$forum_arr) continue;\n $forum_groups = sd_ConvertStrToArray($forum_arr['access_view'],'|');\n if(!$this->conf->IsSiteAdmin)\n {\n if(empty($forum_arr['online'])) continue;\n if(!empty($forum_groups) && !count(@array_intersect($userinfo['usergroupids'], $forum_groups)))\n continue;\n }\n\n if(!$do_body)\n {\n $output .= '\n <tbody>';\n $do_body = true;\n }\n\n $external = false;\n $target = '';\n if(!empty($forum_arr['is_category']))\n {\n $link = '#';\n }\n else\n if(empty($forum_arr['link_to']) || !strlen(trim($forum_arr['link_to'])))\n {\n //SD343 SEO Forum Title linking\n $link = $this->conf->RewriteForumLink($fid);\n }\n else\n {\n $external = true;\n $link = trim($forum_arr['link_to']);\n $target = strlen($forum_arr['target']) ? ' target=\"'.$forum_arr['target'].'\" ' : '';\n }\n\n // Display forum image\n $img_col = false;\n if(!empty($this->conf->plugin_settings_arr['display_forum_image']))\n {\n $image = false;\n if(!empty($forum_arr['image']) && !empty($forum_arr['image_h']) && !empty($forum_arr['image_w']))\n {\n $image = $forum_arr['image'].'\" alt=\"\" width=\"'.$forum_arr['image_w'].'\" height=\"'.$forum_arr['image_h'].'\" style=\"border:none\" />';\n }\n if($image) $image = '<img src=\"'.SDUserCache::$img_path.$image;\n $img_col = '<td class=\"col-forum-icon\"><a class=\"forum-title-link\" '.$target.'href=\"'.$link.'\">'. $image.'</a></td>';\n }\n\n $output .= '\n <tr>'.($img_col?$img_col:'').'\n <td class=\"col-forum-title\"><a class=\"forum-title-link\" '.$target.'href=\"'.$link.'\">'.\n (!$forum_arr['online'] ? '<img src=\"'.SDUserCache::$img_path.'lock.png\" alt=\"'.\n strip_alltags($this->conf->plugin_phrases_arr['forum_offline']).'\" />' : '').$forum_arr['title'].'</a>'.\n (strlen($forum_arr['description']) ? ' <p class=\"forum-description\">' . $forum_arr['description'].'</p>' : '');\n\n // Display sub-forums of current forum\n if(!empty($forum_arr['subforums']))\n {\n $sub_links = array();\n foreach($this->conf->forums_cache['parents'][$fid] as $subid)\n {\n $sub_output = '';\n $sub = $this->conf->forums_cache['forums'][$subid];\n if(!$this->conf->IsSiteAdmin)\n {\n if(empty($sub['online'])) continue;\n $subforum_groups = sd_ConvertStrToArray($sub['access_view'],'|');\n if(!empty($subforum_groups) && !count(@array_intersect($userinfo['usergroupids'], $subforum_groups)))\n continue;\n }\n\n $image = '';\n if(empty($sub['online']) && (empty($sub['link_to']) || !strlen(trim($sub['link_to']))))\n {\n $image = '<img src=\"'.SDUserCache::$img_path.'lock.png\" width=\"16\" height=\"16\" alt=\"'.\n htmlspecialchars($this->conf->plugin_phrases_arr['forum_offline'], ENT_COMPAT).'\" />';\n }\n else\n if(!empty($this->conf->plugin_settings_arr['display_forum_image']))\n {\n if(!empty($sub['image']) && !empty($sub['image_h']) && !empty($sub['image_w']))\n {\n $image = '<img src=\"'.SDUserCache::$img_path.$sub['image'].'\" alt=\"\" width=\"'.$sub['image_w'].'\" height=\"'.$sub['image_h'].'\" style=\"border:none\" />';\n }\n $descr = strip_tags(str_replace(array('<br>','<br />','&quot;'),array(' ',' ',''), $sub['description']));\n }\n\n if(empty($sub['link_to']) || !strlen(trim($sub['link_to'])))\n {\n $target = '';\n //SD343 SEO Forum Title linking\n $link = $this->conf->RewriteForumLink($sub['forum_id']);\n }\n else\n {\n $link = trim($sub['link_to']);\n $target = strlen($sub['target']) ? ' target=\"'.$sub['target'].'\" ' : '';\n if(!$image)\n $image = '<img src=\"'.SDUserCache::$img_path.'arrow-right.png\" width=\"14\" height=\"14\" alt=\"\" />';\n }\n if($descr = strip_tags(str_replace(array('<br>','<br />','&quot;'),array(' ',' ',' '), $sub['description'])))\n {\n $descr = 'title=\"'.htmlspecialchars($descr).'\" ';\n }\n $sub_output .= $image.'<a class=\"forum-sublink\" '.$target.$descr.'href=\"'.$link.'\">'.$sub['title'].'</a>';\n $sub_links[] = $sub_output;\n }\n if(!empty($sub_links))\n $output .= '\n <p class=\"sub-forums\">'.implode(', ',$sub_links).'</p>';\n unset($sub_links);\n }\n\n $output .= '\n </td>';\n if(!empty($mainsettings['enable_rss_forum']))\n {\n $output .= '\n <td class=\"col-rss\"><a title=\"RSS\" class=\"rss-icon\" href=\"forumrss.php?forum_id=' . $fid . '\">RSS</a></td>';\n }\n\n //SD342: add first 100 chars as link title for preview\n $post_hint = '';\n if(!empty($forum_arr['post_text']))\n $post_hint = SDForumConfig::GetBBCodeExtract($forum_arr['post_text']);\n\n $output .= '\n <td class=\"col-topic-count\">' . number_format($forum_arr['topic_count']) . '</td>\n <td class=\"col-post-count\">' . number_format($forum_arr['post_count']) . '</td>\n <td class=\"col-last-updated\"'.$post_hint.' style=\"cursor:normal\">';\n\n if(!empty($forum_arr['last_post_date']))\n {\n $thread_title = $forum_arr['last_topic_title'];\n //SD370: fetch prefix (if present and uncensored) and display it\n $thread_prefix = '';\n if(!empty($forum_arr['last_topic_id']))\n {\n if($prefix = $this->GetTopicPrefix($forum_arr['last_topic_id']))\n {\n $thread_prefix = str_replace('[tagname]', $prefix['tag'], $prefix['html_prefix']).' ';\n }\n unset($prefix);\n }\n\n if(strlen($thread_title) > 30)\n {\n $space_position = strrpos($thread_title, \" \") - 1;\n //SD343: respect utf-8\n if($space_position === false)\n $space_position = 30;\n else\n $space_position++;\n $thread_title = sd_substr($thread_title, 0, $space_position) . '...';\n }\n\n //SD343 SEO Forum Title linking\n $link = $forum_arr['last_topic_seo_url'];\n $output .= '<a class=\"jump-post-link\" href=\"'.$link.'\">'.$thread_prefix.trim($thread_title).'</a>';\n if(!empty($forum_arr['poster_id']))\n {\n $poster_id = (int)$forum_arr['poster_id'];\n //SD342: user caching\n $poster = SDUserCache::CacheUser($poster_id, $forum_arr['last_post_username'], false);\n $output .= '<br />'.$this->conf->plugin_phrases_arr['posted_by'].' '.$poster['profile_link'];\n }\n else\n {\n $output .= $forum_arr['last_post_username'];\n }\n $output .= '<br />\n ' . $this->conf->GetForumDate($forum_arr['last_post_date']);\n }\n\n $output .= '</td>\n </tr>';\n\n } //while\n\n if($do_body)\n {\n $output .= '\n </tbody>\n <!-- DisplayForums -->\n ';\n return $output;\n }\n return false;\n\n }", "public function index()\n {\n\n $notif=\"vous n'êtes pas encore inscrit dans un groupe\";\n\n $messages=DB::table('conversations')->get();\n $users=DB::table('users')->get();\n $group_mbr=DB::table('members_groups')->get();\n\n $group_actuel=DB::table('members_groups')->where('user_id',auth()->user()->id)->first();\n\n if($group_actuel!=null)\n{\n $group_id=$group_actuel->group_id;\n \n $group_actu=DB::table('groups')->where('id',$group_id)->first();\n $nbr_gp = count($group_mbr);\n \n\n \treturn view('discussions',array('messages'=>$messages, 'users'=>$users, 'group_actu'=>$group_actu,'nbr_gp'=>$nbr_gp,'group'=>$group_mbr));\n }\n return view('discussions',array('notif'=>$notif));\n\n\n }", "public function run()\n {\n DB::table('forum_comments')->insert([\n [\n 'topic_id' => 1,\n 'comment_author_id' => 1,\n 'comment_content' => 'นั่นสินะ อย่าให้รู้นะ.. เดี๋ยวปั๊ดทุ่มด้วยโพเดี้ยมแล้วเควี้ยงไปสามเหลี่ยมอิลุมินาติหรอก',\n ],\n [\n 'topic_id' => 2,\n 'comment_author_id' => 1,\n 'comment_content' => 'เอาสาวฟ้าใสมาอยู้ในกรุงเทพสิครับ ผมไม่ตกแน่นอน รับประกันนนนนน',\n ],\n [\n 'topic_id' => 2,\n 'comment_author_id' => 1,\n 'comment_content' => 'ผมว่านะครับทุกคน ตอนนี้รีบเก็บของขึ้นที่สูงดีกว่า เดี๋ยวมันทะลักมาแล้วจะเก็บของไม่ทัน',\n ],\n [\n 'topic_id' => 2,\n 'comment_author_id' => 1,\n 'comment_content' => 'ระวังลุงตู้เอามาอ่านนะครับ',\n ],\n [\n 'topic_id' => 2,\n 'comment_author_id' => 1,\n 'comment_content' => 'เดี๋ยวเอาฟองน้ำดูดน้ำให้ครับผม //หลบตรีนแปปป',\n ]\n ]);\n }", "function generate_discussion_w_no_category() {\n echo '<div class=\"category-symbology\"><i class=\"social-foundicon-chat\"> </i> Discussion</div>';\n}", "function ftopics()\n{\n global $db;\n\n $qry = db(\"SELECT s1.*,s2.kattopic,s2.id AS subid FROM \" . $db['f_threads'] . \" s1, \" . $db['f_skats'] . \" s2, \" . $db['f_kats'] . \" s3\n WHERE s1.kid = s2.id AND s2.sid = s3.id ORDER BY s1.lp DESC LIMIT 100\");\n\n $f = 0;\n $ftopics = '';\n if (_rows($qry)) {\n while ($get = _fetch($qry)) {\n if ($f == config('m_ftopics')) break;\n if (fintern($get['kid'])) {\n $lp = cnt($db['f_posts'], \" WHERE `sid` = '\" . $get['id'] . \"'\");\n $pagenr = ceil($lp / config('m_fposts'));\n\n if ($pagenr == 0) $page = 1;\n else $page = $pagenr;\n\n $info = config('allowhover') == 1 ? 'onmouseover=\"DZCP.showInfo(\\'' . jsconvert(re($get['topic'])) . '\\', \\'' . _forum_kat . ';' . _forum_posts . ';' . _forum_lpost . '\\', \\'' .\n re($get['kattopic']) . ';' . ++$lp . ';' . date(\"d.m.Y H:i\", $get['lp']) . _uhr . '\\')\" onmouseout=\"DZCP.hideInfo()\"' : '';\n $ftopics .= show(\"menu/forum_topics\", array(\"id\" => $get['id'],\n \"pagenr\" => $page,\n \"p\" => $lp,\n \"titel\" => cut(re($get['topic']), config('l_ftopics'), true, false),\n \"info\" => $info,\n \"kid\" => $get['kid']));\n $f++;\n }\n }\n }\n\n return empty($ftopics) ? '' : '<table class=\"navContent\" cellspacing=\"0\">' . $ftopics . '</table>';\n}", "function rw_singleforum_description() {\n echo '<div class=\"bbp-forum-content\">';\n // echo bbp_forum_content();\n echo \"<p>Listed below are the topic-specific areas in which you can initiate and/or participate in a discussion. Click on a topic and you will see the list of discussions in that area. You can start a new discussion at the bottom of that page.</p>\";\n echo '</div>';\n}", "public function GetDiscussList($where){\n // ->where($where)\n // ->join('product', 'product.id = discussion.product_id')\n // ->get('discussion')\n // ->result();\n return $this->db->select('*, discussion.merchant_id as merchant_discuss, product.merchant_id as product_merchant, discussion.created_at as discussion_created')\n ->where($where)\n ->join('discussion', 'product.id = discussion.product_id')\n ->group_by('product_id')\n ->get('product')\n ->result();\n }", "function ftopics() {\n global $sql;\n \n $qry = $sql->select(\"SELECT s1.*,s2.`kattopic`,s2.`id` as `subid` \"\n . \"FROM `{prefix_forumthreads}` as `s1`, `{prefix_forumsubkats}` as `s2`, {prefix_forumkats} as `s3` \"\n . \"WHERE s1.`kid` = s2.`id` AND s2.`sid` = s3.`id` ORDER BY s1.`lp` DESC LIMIT 100;\");\n\n $f = 0; $ftopics = '';\n if($sql->rowCount()) {\n foreach($qry as $get) {\n if($f == settings::get('m_ftopics')) { break; }\n if(fintern($get['kid'])) {\n $lp = cnt(\"{prefix_forumposts}\", \" WHERE `sid` = ?\",\"id\",array($get['id']));\n $pagenr = ceil($lp/settings::get('m_fposts'));\n $page = !$pagenr ? 1 : $pagenr;\n $info = !settings::get('allowhover') == 1 ? '' : 'onmouseover=\"DZCP.showInfo(\\''.jsconvert(stringParser::decode($get['topic'])).'\\', \\''.\n _forum_kat.';'._forum_posts.';'._forum_lpost.'\\', \\''.stringParser::decode($get['kattopic']).';'.++$lp.';'.\n date(\"d.m.Y H:i\", $get['lp'])._uhr.'\\')\" onmouseout=\"DZCP.hideInfo()\"';\n \n $ftopics .= show(\"menu/forum_topics\", array(\"id\" => $get['id'],\n \"pagenr\" => $page,\n \"p\" => $lp,\n \"titel\" => cut(stringParser::decode($get['topic']),settings::get('l_ftopics')),\n \"info\" => $info,\n \"kid\" => $get['kid']));\n $f++;\n }\n }\n }\n\n return empty($ftopics) ? '<center style=\"margin:2px 0\">'._no_entrys.'</center>' : '<table class=\"navContent\" cellspacing=\"0\">'.$ftopics.'</table>';\n}", "function scrividiscussioni($mese, $anno, $mese1, $anno1) {\n\tconnetti($db);\n\t$query=\"select title, postusername, replycount from vb_thread where dateline >= unix_timestamp(DATE('\".$anno.\"-\".$mese.\"-01')) and dateline < unix_timestamp(DATE('\" . $anno1 . \"-\" . ($mese1) . \"-01')) and postusername<>'' and postuserid<>770 order by replycount desc limit 10\";\n\t$result = seleziona($db, $query);\n\t$n_righe = get_num_rows($result);\n\t$arr=array();\n\tif ($n_righe > 0) {\n\t\tfor ($i = 0; $i < $n_righe; $i++) {\n\t\t\t$riga = scorri_record($result);\n\t\t\t$arr[]=array('username' => $riga['postusername'], 'title' => trunc($riga['title'],50), 'reply' => $riga['replycount']);\n\t\t}\n\t\techo json_encode($arr);\n\t}\n}", "function d1() {\r\n\tglobal $board;\r\n\t$query = array(\"board\" => $board, \"ftype\" => \"6\", \"page\" => \"\");\r\n\t$_text = _u(_get(\"http://www.newsmth.net/bbsdoc.php\", $query));\r\n\t//$_text = getThreads($query);\r\n\t$p = \"/c\\\\.o\\\\((\\\\d+),(\\\\d+),'(.*?)','(.*?)',(\\\\d+),'(.*?)',(\\\\d+),\\\\d+,\\\\d+\\\\)/\";\r\n\t$ps = \"/docWriter\\\\('(.*?)',(\\\\d+),(\\\\d+),(\\\\d+),(\\\\d+),(\\\\d+),(\\\\d+)/\";\r\n\t$basic = preg_match($ps, $_text, $info);\r\n\t$cnt_threads= preg_match_all($p, $_text, $subs, PREG_SET_ORDER);\r\n\tprint_r($info);\r\n\t$b = new Board();\r\n\t$b->bname = $info[0];\r\n\t$b->bid = $info[1];\r\n\t$b->page = $info[5];\r\n\t$b->total = $info[6];\r\n\t$threads = array();\r\n\tfor ($i = 0; $i < $cnt_threads; $i++) {\r\n\t\t$sub = new Subject();\r\n\t\t$sub->gid = $subs[$i][1];\r\n\t\t$sub->author = $subs[$i][3];\r\n\t\t$sub->flag = $subs[$i][4];\r\n\t\t$sub->time = $subs[$i][5];\r\n\t\t$sub->title = $subs[$i][6];\r\n\t\t$sub->size = $subs[$i][7];\r\n\t\tarray_push($threads, $sub);\r\n\t}\r\n\tprint_r (array(\"board\" => $b, \"threads\" => $threads));\r\n}", "public function displayForumImp()\r\n {\r\n $servername = \"localhost\";\r\n $username = \"root\";\r\n $password = \"\";\r\n\r\n $db = \"forumdb\";\r\n\r\n $table = \"forum\";\r\n\r\n $count=1;\r\n $frname=array();\r\n $frdesc=array();\r\n\r\n // Create connection\r\n $conn = new mysqli($servername, $username, $password, $db);\r\n\r\n // Check connection\r\n if ($conn->connect_error) {\r\n die(\"Connection failed: \" . $conn->connect_error);\r\n }\r\n else\r\n {\r\n $sql = \"SELECT * FROM $table WHERE sticky='1'\";\r\n $result = $conn->query($sql);\r\n\r\n if ($result->num_rows > 0)\r\n {\r\n // get data of each row\r\n while ($row = $result->fetch_assoc())\r\n {\r\n $frname[$count] = $row['forum_name'];\r\n $frdesc[$count] = $row['forum_desc'];\r\n\r\n $count++;\r\n }\r\n\r\n $CallClassBack = new forumCall();\r\n $CallClassBack->previewForum($frname, $frdesc);\r\n\r\n }\r\n else\r\n {\r\n //echo \"0 results\";\r\n echo \"Be the first the post!\";\r\n }\r\n $conn->close();\r\n }\r\n }", "function warquest_home_messages() {\r\n \r\n\t/* input */\r\n\tglobal $mid;\r\n\tglobal $sid;\r\n\tglobal $offset;\r\n\t\r\n\t/* output */\r\n\tglobal $page;\r\n\tglobal $player;\r\n\tglobal $output;\r\n\t\r\n\t/* Clear new flag */\r\n\t$player->comment_notification=0;\r\n\t\t\r\n\t$output->title = t('HOME_MESSAGES_TITLE');\r\n\t\r\n\t$limit=30;\r\n\t\r\n\t$query = 'select pid1 from comment where pid2='.$player->pid.' and deleted=0';\r\n\t$result = warquest_db_query($query); \r\n\t$total = warquest_db_num_rows($result);\r\n\t\r\n\t$query = 'select a.id, a.pid1, a.pid2, a.date, a.comment, a.cid, b.name, b.country from comment a, player b ';\r\n $query .= 'where ((a.pid1=b.pid and pid2='.$player->pid.') or (a.pid2=b.pid and pid1='.$player->pid.')) ';\r\n\t$query .= 'and deleted=0 order by a.date desc ';\r\n\t$query .= 'limit '.$offset.','.$limit;\r\n\t$result = warquest_db_query($query);\r\n\t$count = warquest_db_num_rows($result);\r\n\t\t\t\r\n\t$page .= '<div class=\"subparagraph\">'.t('HOME_MESSAGES_TITLE').'</div>';\r\n\t\r\n\tif ($count==0) {\r\n\t\t\r\n\t\t$page .= warquest_box_icon(\"info\",t('HOME_NO_MESSAGES'));\r\n\t\t\r\n\t} else {\r\n\t\t\r\n\t\t$page .= '<div class=\"box rows\">';\r\n\t\r\n\t\t$count=0;\r\n\t\t\r\n\t\t$page .= warquest_page_control($offset, $limit, $total, 1);\r\n\t\t\r\n\t\t$page .= '<table>';\r\n\t\t\r\n\t\t$page .= '<tr>';\r\n\t\t$page .= '<th width=\"75\" >'.t('GENERAL_AGO').'</th>';\r\n\t\t$page .= '<th width=\"390\">'.t('GENERAL_MESSAGE').'</th>';\r\n\t\t$page .= '<th width=\"55\" align=\"right\">'.t('GENERAL_ACTION').'</th>';\r\n\t\t$page .= '</tr>';\r\n\t\t\r\n\t\twhile ($data=warquest_db_fetch_object($result)) {\r\n\t\r\n\t\t\t$count++;\r\n\t\t\r\n\t\t\t$page .= '<tr valign=\"top\">';\r\n\t\t\t$page .= '<td>';\r\n\t\t\t$page .= warquest_ui_ago($data->date);\r\n\t\t\t$page .= '</td>';\r\n\t\t\t\r\n\t\t\t$page .= '<td>';\r\n\t\t\t\r\n\t\t\t$page .= '<span class=\"subparagraph2\">';\r\n\t\t\tif ($player->pid==$data->pid2) {\r\n\t\t\t\t$page .= player_format($data->pid1, $data->name, $data->country);\r\n\t\t\t\t$page .= ' -> '.player_format($player->pid, $player->name, $player->country);\r\n\t\t\t} else {\r\n\t\t\t\t$page .= player_format($player->pid, $player->name, $player->country);\r\n\t\t\t\t$page .= ' -> ';\r\n\t\t\t\t\r\n\t\t\t\tif ($data->cid > 0) {\r\n\t\t\t\t\t$clan = warquest_db_clan($data->cid);\r\n\t\t\t\t\t$page .= clan_format($clan).' clan';\r\n\t\t\t\t\t\r\n\t\t\t\t} else if ($data->pid2==0) {\r\n\t\t\t\t\t$page .= t('GENERAL_ALL');\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$page .= player_format($data->pid2, $data->name, $data->country);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$page .= '</span>';\r\n\t\t\t$page .= '<br/>';\r\n\t\t\t$page .= warquest_parse_smilies(wordwrap($data->comment, 40, \"\\n\\r\", true));\r\n\t\t\t\r\n\t\t\t$page .= '</td>';\r\n\t\t\t\r\n\t\t\t$page .= '<td align=\"right\">';\r\n\t\t\t\r\n\t\t\tif ($player->pid==$data->pid2) {\r\n\t\t\t\t$page .= warquest_link('mid='.$mid.'&sid='.$sid.'&eid='.EVENT_HOME_COMMENT_EDIT.'&oid='.$data->pid1, t('LINK_REPLY'), \"reply\".$count);\t\r\n\t\t\t} else if ($player->pid==$data->pid1) {\r\n\t\t\t\t$page .= warquest_link('mid='.$mid.'&sid='.$sid.'&eid='.EVENT_HOME_COMMENT_EDIT.'&oid='.$data->pid2.'&uid='.$data->id, t('LINK_EDIT'), 'edit'.$count);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$page .= '</td>';\r\n\t\t\t\r\n\t\t\t$page .= '</tr>';\r\n\t\t}\r\n\t\t\r\n\t\t$page .= '</table>';\r\n\t\t\r\n\t\t$page .= warquest_page_control($offset, $limit, $total, 0);\r\n\t\t$page .= '</div>';\n\t\r\n\t} \r\n}", "function the_link() {\n\tglobal $discussion;\n\treturn BASE . 'discussion' . DS . discussion::encode_title($discussion['title']);\n}", "function loadDiscussions($db, $filter){\n\n if($filter == 0){\n $query = \"SELECT * FROM Discussions ORDER BY PostID DESC;\";\n }else if($filter == 1){\n $query = \"SELECT * FROM Discussions ORDER BY Views DESC;\";\n }else {\n $query = \"SELECT * FROM Discussions ORDER BY numComment DESC;\";}\n\n $stmt = $db->stmt_init();\n $stmt->prepare($query);\n\n //bind\n //$stmt->bind_param('s', $username);\n $sucess = $stmt->execute();\n\n //check to see if DB insert was successful if not print DB error\n if(!$sucess || $db->affected_rows == 0){\n //echo \"ERROR: \" . $db->error . \" for query\"; // error statement\n //echo \"username does not exists in DB\";\n echo 0;\n }else{\n $stmt->bind_result($id, $date, $T, $B, $A, $C, $V, $com);\n $count = 0;\n $array= [];\n while($stmt->fetch()){\n // $array[$count] = array(\"id\"=>$id, \"date\"=>$date, \"title\"=>$T, \"body\"=>$B, \"auth\"=>$A, \"cat\"=>$C, \"views\"=>$V, \"com\"=>$com);\n // $count++;\n $date = date(\"F j, Y, g:i a\", strtotime($date));\n echo \"<div class='text-wrap text-break'><button value='$id' onclick='showPost(this)' type='button' class='btn rounded border border-primary m-0' style='width:98%; white-space: normal;'>\n <h3 class=' text-left '>\" . $T . \"</h3><hr class='my-1'><div class='lead' style='display: flex; justify-content:space-between;'> <div>By: <kbd> \" . $A . \"</kbd></div><div>Posted: <kbd> \" . $date . \"</kbd></div><div>Views: <kbd> \". $V . \"</div><div>Comments: <kbd> \". $com . \"</div></button></div><br/>\";\n\n }\n //return $array;\n}\n}", "public function getComments() {\n $db = new mysql('testserver', 'testuser', 'testpassword');\n $sql = \"SELECT * FROM comments_table where parent_id=0 ORDER BY create_date DESC;\";\n $result = mysql_query($sql, $db);\n $comments = [];\n while ($row = mysql_fetch_assoc($result)) {\n $comment = $row;\n $reply_1_sql = \"SELECT * FROM comments_table where parent_id=\" . $row['id'] . \" ORDER BY create_date DESC;\";\n $result_reply_1 = mysql_query($reply_1_sql, $db);\n $replies = [];\n while ($row1 = mysql_fetch_assoc($result)) {\n $reply = $row1;\n $reply_2_sql = \"SELECT * FROM comments_table where parent_id=\" . $row1['id'] . \" ORDER BY create_date DESC;\";\n $result_reply_2 = mysql_query($reply_2_sql, $db);\n $replies_to_replies = [];\n while ($row2 = mysql_fetch_assoc($result)) {\n $replies_to_replies[] = $row2;\n }\n $reply['replies'] = $replies_to_replies;\n $replies[] = $reply;\n }\n $comment['replies'] = $replies;\n $comments[] = $comment;\n }\n return $comments;\n }", "public function GetDiscussionDetails(){\n if ($this->get_request_method() != \"POST\") {\n $this->response('', 406);\n }\n $discussion_id = $_POST['discussion_id'];\n $authkey = $_POST['authkey'];\n $format = $_POST['format'];\n $this->dbConnect();\n $conn = $this->db;\n $res = new getService();\n if(!empty($discussion_id) && !empty($authkey)){\n $result = $res->CheckAuthentication('', $authkey, $conn);\n if($result!=false){\n $result=$res->get_discussion_details($discussion_id, $conn);\n }\n else{\n $error = array('status' => \"0\",\"msg\" => \"Not authorised to do this\");\n ($_REQUEST['format'] == 'xml') ? $this->response($this->xml($error), 200) : $this->response($this->json($error), 200);\n }\n }\n else{\n $error = array('status' => \"0\", \"msg\" => \"Fill All Fields\");\n ($_REQUEST['format']=='xml')?$this->response($this->xml($error), 200):$this->response($this->json($error), 200);\n }\n }", "function template_replies()\n{\n\tglobal $context, $settings, $txt, $scripturl, $modSettings;\n\n\techo '\n\t<div id=\"recent\">';\n\n\tif (!empty($context['topics']))\n\t{\n\t\techo '\n\n\t\t\t<div class=\"pagesection\" id=\"top\">\n\t\t\t\t<a href=\"#pbot\" class=\"topbottom floatleft\">', $txt['go_down'], '</a>\n\t\t\t\t<div class=\"pagelinks floatleft\">', $context['page_index'], '</div>\n\t\t\t</div>';\n\n\t\techo '\n\t\t\t<div id=\"unreadreplies\">\n\t\t\t\t<div id=\"topic_header\" class=\"title_bar\">\n\t\t\t\t\t<div class=\"board_icon\"></div>\n\t\t\t\t\t<div class=\"info\">\n\t\t\t\t\t\t<a href=\"', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=subject', $context['sort_by'] === 'subject' && $context['sort_direction'] === 'up' ? ';desc' : '', '\">', $txt['subject'], $context['sort_by'] === 'subject' ? ' <span class=\"generic_icons sort_' . $context['sort_direction'] . '\"></span>' : '', '</a>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"board_stats\">\n\t\t\t\t\t\t<a href=\"', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=replies', $context['sort_by'] === 'replies' && $context['sort_direction'] === 'up' ? ';desc' : '', '\">', $txt['replies'], $context['sort_by'] === 'replies' ? ' <span class=\"generic_icons sort_' . $context['sort_direction'] . '\"></span>' : '', '</a>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"lastpost'. (!empty($modSettings['avatars_on_boardIndex']) ? '_ava' : '') .'\">\n\t\t\t\t\t\t<a href=\"', $scripturl, '?action=unreadreplies', $context['querystring_board_limits'], ';sort=last_post', $context['sort_by'] === 'last_post' && $context['sort_direction'] === 'up' ? ';desc' : '', '\">', $txt['last_post'], $context['sort_by'] === 'last_post' ? ' <span class=\"generic_icons sort_' . $context['sort_direction'] . '\"></span>' : '', '</a>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"moderation\">&nbsp;</div>\n\t\t\t\t</div>\n\t\t\t\t<div id=\"topic_container\">';\n\n\t\tforeach ($context['topics'] as $topic)\n\t\t{\n\t\t\techo '\n\t\t\t\t\t\t<div class=\"', $topic['css_class'], '\">\n\t\t\t\t\t\t\t<div class=\"board_icon\">\n\t\t\t\t\t\t\t\t<img src=\"', $topic['first_post']['icon_url'], '\" alt=\"\">\n\t\t\t\t\t\t\t\t', $topic['is_posted_in'] ? '<img class=\"posted\" src=\"' . $settings['images_url'] . '/icons/profile_sm.png\" alt=\"\">' : '','\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"info\">';\n\n\t\t\t// Now we handle the icons\n\t\t\techo '\n\t\t\t\t\t\t\t\t<div class=\"icons floatright\">';\n\t\t\tif ($topic['is_locked'])\n\t\t\t\techo '\n\t\t\t\t\t\t\t\t\t<span class=\"generic_icons lock\"></span>';\n\t\t\tif ($topic['is_sticky'])\n\t\t\t\techo '\n\t\t\t\t\t\t\t\t\t<span class=\"generic_icons sticky\"></span>';\n\t\t\tif ($topic['is_poll'])\n\t\t\t\techo '\n\t\t\t\t\t\t\t\t\t<span class=\"generic_icons poll\"></span>';\n\t\t\techo '\n\t\t\t\t\t\t\t\t</div>';\n\n\t\t\t$topic['new_href'] = str_replace('#new', '', $topic['new_href']) .'#ptop';\n\t\t\techo '\n\t\t\t\t\t\t\t\t<div class=\"recent_title\">\n\t\t\t\t\t\t\t\t\t<a href=\"', $topic['new_href'], '\" id=\"newicon', $topic['first_post']['id'], '\"><span class=\"new_posts\">' . $txt['new'] . '</span></a>\n\t\t\t\t\t\t\t\t\t', $topic['is_sticky'] ? '<strong>' : '', '<span title=\"', $topic[(empty($modSettings['message_index_preview_first']) ? 'last_post' : 'first_post')]['preview'], '\"><span id=\"msg_' . $topic['first_post']['id'] . '\">', $topic['first_post']['link'], '</span></span>', $topic['is_sticky'] ? '</strong>' : '', '\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<p class=\"floatleft\">\n\t\t\t\t\t\t\t\t\t', $topic['first_post']['started_by'], '\n\t\t\t\t\t\t\t\t</p>';\n\n\t\t\tif(!empty($topic['pages']))\n\t\t\t\techo '\n\t\t\t\t\t\t\t\t<small id=\"pages', $topic['first_post']['id'], '\" class=\"topic_pages\">&nbsp;', $topic['pages'], '</small>';\n\n\t\t\techo '\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"board_stats\">\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t', $txt['replies'], ': ', $topic['replies'], '\n\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t', $txt['views'], ': ', $topic['views'], '\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"lastpost';\n\n\t\t\tif(isset($topic['last_post']['member']['avatar']['url']) && !empty($modSettings['avatars_on_boardIndex']))\n\t\t\t\techo '_ava\">\n\t\t\t\t\t\t\t\t<span class=\"avaspan\"><img src=\"'. $topic['last_post']['member']['avatar']['url'].'\" alt=\"avatar\" class=\"brdidxava'. $topic['last_post']['member']['avatar']['class'] .'\"></span>';\n\t\t\telse\n\t\t\t\techo '\">';\n\t\t\t\n\t\t\techo '\n\t\t\t\t\t\t\t\t', sprintf($txt['last_post_topic'], '<a href=\"' . $topic['last_post']['href'] . '\">' . $topic['last_post']['time'] . '</a>', $topic['last_post']['member']['link']), '\n\t\t\t\t\t\t\t</div>';\n\n\t\t\tshowModeration($topic);\n\n\t\t\t\techo '\n\t\t\t\t\t\t</div>';\n\t\t}\n\n\t\techo '\n\t\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"pagesection\">\n\t\t\t\t', !empty($context['recent_buttons']) ? template_button_strip($context['recent_buttons'], 'right') : '', '\n\t\t\t\t', $context['menu_separator'], '<a href=\"#recent\" class=\"topbottom bottom floatleft\">', $txt['go_up'], '</a>\n\t\t\t\t<div class=\"pagelinks floatleft\">', $context['page_index'], '</div>\n\t\t\t</div>';\n\t}\n\telse\n\t{\n\t\techo '\n\t\t\t<div class=\"cat_bar\">\n\t\t\t\t<h3 class=\"catbg\">\n\t\t\t\t\t', $txt['unread_replies'], '\n\t\t\t\t</h3>\n\t\t\t</div>\n\t\t\t<div class=\"roundframe\" style=\"margin-top:0;border-top-left-radius:0;border-top-right-radius:0\">\n\t\t\t\t', $context['showing_all_topics'] ? $txt['topic_alert_none'] : $txt['unread_topics_updated_none'] , '\n\t\t\t</div>';\n\t}\n\n\techo '\n\t</div>';\n\n\tif (empty($context['no_topic_listing']))\n\t\ttemplate_topic_legend();\n}", "function asForumTopics($data) {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n<tr class='__topic __tid{$data['tid']} <if test=\"!$data['_icon']['is_read']\">unread</if> expandable <if test=\"$data['approved'] != 1\"> moderated</if>' id='trow_{$data['tid']}' data-tid=\"{$data['tid']}\">\n\t<td class='col_f_icon short altrow'>\n\t\t{parse template=\"generateTopicIcon\" group=\"global_other\" params=\"$data['_icon'], $data['_unreadUrl']\"}\n\t</td>\n\t<td>\n\t\t<if test=\"archivedBadge:|:$this->registry->class_forums->fetchArchiveTopicType( $data ) == 'archived'\">\n\t\t\t<span class='ipsBadge ipsBadge_lightgrey'>{$this->lang->words['topic_is_archived']}</span>\n\t\t</if>\n\t\t<if test=\"hasPrefix:|:!empty($data['tags']['formatted']['prefix'])\">\n\t\t\t{$data['tags']['formatted']['prefix']}\n\t\t</if>\n\t\t<h4><a href='{parse url=\"showtopic={$data['tid']}<if test=\"isNewPostTR:|:$this->request['do']=='new_posts' OR $this->request['do']=='active'\">&amp;view=getnewpost<else /><if test=\"resultIsPostTR:|:$data['pid'] AND $data['pid'] != $data['topic_firstpost']\">&amp;view=findpost&amp;p={$data['pid']}</if></if>&amp;hl={$data['cleanSearchTerm']}\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}' title='{$this->lang->words['view_result']}'>{$data['_shortTitle']}</a></h4>\n\t\t<span class='desc blend_links'>\n\t\t\t<foreach loop=\"topicsForumTrail:$data['_forum_trail'] as $i => $f\">\n\t\t\t<if test=\"notLastFtAsForum:|:$i+1 == count( $data['_forum_trail'] )\"><span class='desc lighter'>{$this->lang->words['search_aft_in']}</span> <a href='{parse url=\"{$f[1]}\" template=\"showforum\" seotitle=\"{$f[2]}\" base=\"public\"}'>{$f[0]}</a></if>\n\t\t\t</foreach>\n\t\t</span>\n\t\t<span class='desc lighter blend_links toggle_notify_off'>\n\t\t\t<br />{$this->lang->words['aft_started_by']} {$data['starter']}, {parse date=\"$data['start_date']\" format=\"DATE\"}\n\t\t\t<if test=\"hasTags:|:count($data['tags']['formatted'])\">\n\t\t\t\t&nbsp;<img src='{$this->settings['img_url']}/icon_tag.png' /> {$data['tags']['formatted']['truncatedWithLinks']}\n\t\t\t</if>\n\t\t</span>\n\t\t<if test=\"multipages:|:isset( $data['pages'] ) AND is_array( $data['pages'] ) AND count( $data['pages'] )\">\n\t\t\t<ul class='mini_pagination toggle_notify_off'>\n\t\t\t<foreach loop=\"pages:$data['pages'] as $page\">\n\t\t\t\t\t<if test=\"haslastpage:|:$page['last']\">\n\t\t\t\t\t\t<li><a href=\"{parse url=\"showtopic={$data['tid']}&amp;st={$page['st']}\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}\" title='{$this->lang->words['topic_goto_page']} {$page['page']}'>{$page['page']} {$this->lang->words['_rarr']}</a></li>\n\t\t\t\t\t<else />\n\t\t\t\t\t\t<li><a href=\"{parse url=\"showtopic={$data['tid']}&amp;st={$page['st']}\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}\" title='{$this->lang->words['topic_goto_page']} {$page['page']}'>{$page['page']}</a></li>\n\t\t\t\t\t</if>\n\t\t\t</foreach>\n\t\t\t</ul>\n\t\t</if>\n\t\t<if test=\"bothSearchUnderTitle:|:IPSSearchRegistry::get('set.searchResultType') == 'both'\">\n\t\t\t<span class='desc lighter blend_links toggle_notify_off'>\n\t\t\t\t<br />{$this->lang->words['n_last_post_by']} {$data['last_poster']},\n\t\t\t\t<a href='{parse url=\"showtopic={$data['tid']}&amp;view=getlastpost\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}' title='{$this->lang->words['goto_last_post']}'>{parse date=\"$data['_last_post']\" format=\"DATE\"}</a>\n\t\t\t</span>\n\t\t</if>\n\t\t<if test=\"isFollowedStuff:|:count($data['_followData'])\">\n\t\t\t{parse template=\"followData\" group=\"search\" params=\"$data['_followData']\"}\n\t\t</if>\n\t</td>\n\t<td class='col_f_preview __topic_preview'>\n\t\t<a href='#' class='expander closed' title='{$this->lang->words['view_topic_preview']}'>&nbsp;</a>\n\t</td>\n\t<td class='col_f_views'>\n\t\t<ul>\n\t\t\t<li>{parse format_number=\"$data['posts']\"} <if test=\"replylang:|:intval($data['posts']) == 1\">{$this->lang->words['reply']}<else />{$this->lang->words['replies']}</if></li>\n\t\t\t<li class='views desc'>{parse format_number=\"$data['views']\"} {$this->lang->words['views']}</li>\n\t\t</ul>\n\t</td>\n\t<td class='col_f_post'>\n\t\t{parse template=\"userSmallPhoto\" group=\"global\" params=\"$data\"}\n\t\t<ul class='last_post ipsType_small'>\n\t\t\t<if test=\"bothSearch:|:IPSSearchRegistry::get('set.searchResultType') == 'both'\">\n\t\t\t\t<li>{parse template=\"userHoverCard\" group=\"global\" params=\"$data\"}</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href='{parse url=\"showtopic={$data['tid']}&amp;view=getlastpost\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}' title='{$this->lang->words['goto_last_post']}'>{$this->lang->words['n_posted']} {parse date=\"$data['_post_date']\" format=\"DATE\"}</a>\n\t\t\t\t</li>\n\t\t\t<else />\n\t\t\t\t<li>{$data['last_poster']}</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href='{parse url=\"showtopic={$data['tid']}&amp;view=getlastpost\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}' title='{$this->lang->words['goto_last_post']}'>{parse date=\"$data['_last_post']\" format=\"DATE\"}</a>\n\t\t\t\t</li>\n\t\t\t</if>\n\t\t</ul>\n\t</td>\n\t<if test=\"isFollowedStuff:|:count($data['_followData'])\">\n\t\t<td class='col_f_mod'>\n\t\t\t<input class='input_check checkall toggle_notify_on' type=\"checkbox\" name=\"likes[]\" value=\"{$data['_followData']['like_app']}-{$data['_followData']['like_area']}-{$data['_followData']['like_rel_id']}\" />\n\t\t</td>\n\t<else />\n\t\t<if test=\"isAdmin:|:$this->memberData['g_is_supmod']\">\n\t\t\t<td class='col_f_mod'>\n\t\t\t\t<if test=\"isArchivedCb:|:$this->request['search_app_filters']['forums']['liveOrArchive'] == 'archive'\">\n\t\t\t\t\t&nbsp;\n\t\t\t\t<else />\n\t\t\t\t\t<input type='checkbox' class='input_check topic_mod' id='tmod_{$data['tid']}' />\n\t\t\t\t</if>\n\t\t\t</td>\n\t\t</if>\n\t</if>\n</tr>\n<if test=\"$data['pid']\">\n<script type='text/javascript'>\nipb.global.searchResults[ {$data['tid']} ] = { pid: {parse expression=\"intval($data['pid'])\"}, searchterm:\"{$data['cleanSearchTerm']}\" };\n</script>\n</if>\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}", "function buildRecentComments($comments) {\n foreach($comments as $comment){\n echo \"<div class=\\\"panel-body\\\">\\n\n <p>$comment[1] on <a href=\\\"/phase5/pages/info.php?id=$comment[4]\\\">$comment[3]</a></p>\\n\n <p class=\\\"well\\\">$comment[0]</p>\\n\n </div>\\n\";\n }\n}", "function ppmess_shortcode_all_communications_view($atts = [], $content = null){\n\t\n\tglobal $post;\n\t\n\t$data = ppmess_shortcode_all_communications();\n?>\t\n\t<!--------- User info --------->\n\t<div class=\"post-info-commun\">\n\t\t<?php echo __('Logged user', 'ppmess'); ?>\n\t\t<span class=\"span-mark\"><?php echo esc_html($data['logged_user']['user_login']); ?></span>\n\t\t<a id=\"link-logout\" href=\"<?php echo wp_logout_url(); ?>\">\n\t\t\t<?php echo __('LogOut ?', 'ppmess'); ?>\n\t\t</a>\n\t\t<div class=\"circle-mark-div-frame\">\n\t\t\t<div class=\"ppmess-box-inline\">\n\t\t\t\t<span class=\"circle-mark-1\"></span>\n\t\t\t\t<span style=\"margin-left:5px;\"><?php echo __('my posts', 'ppmess'); ?></span>\n\t\t\t</div>\n\t\t\t<div class=\"ppmess-box-inline\">\n\t\t\t\t<span class=\"circle-mark-2\"></span>\n\t\t\t\t<span style=\"margin-left:5px;\"><?php echo __('sender\\'s posts', 'ppmess'); ?></span>\n\t\t\t</div>\n\t\t</div>\t\n\t</div>\n\t\t\t\n\t<div class=\"ppmess-commun-frame\">\n<?php\t\n\t\tif( ! empty($data['all_communs'])): ?>\n\t\t\t<!------------ List of the communications ------------>\n\t\t\t<div id=\"communsListFrame\" class=\"communsList-frame\">\t\t\t\t\n\t\t\t\t<ul>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<div><?php echo __('Sender', 'ppmess'); ?></div>\n\t\t\t\t\t\t<div><?php echo __('Post title', 'ppmess'); ?></div>\n\t\t\t\t\t\t<div><?php echo __('Date', 'ppmess'); ?></div>\n\t\t\t\t\t\t<div><?php echo __('Status', 'ppmess'); ?></div>\n\t\t\t\t\t\t<div></div>\n\t\t\t\t\t</li>\n\t\t\t\t<?php\t\n\t\t\t\t\tforeach( $data['all_communs'] as $value ):\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$post_info = get_post($value['post_id']);\n\t\t\t\t\t\t$post_author_id = $post_info->post_author;\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Determining secound user\n\t\t\t\t\t\tif($value['sender_id'] != $data['logged_user']['user_id'])\n\t\t\t\t\t\t\t$sender = get_userdata($value['sender_id']);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$sender = get_userdata($value['receiver_id']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Mark new message\n\t\t\t\t\t\tif($value['sent_to'] == $data['logged_user']['user_id']){\n\t\t\t\t\t\t\t$status_class = 'ppmess-new-message';\n\t\t\t\t\t\t\t$status_mess = '';\n\t\t\t\t\t\t\t$title_mess = __('new message', 'ppmess');\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$status_class = '';\t\n\t\t\t\t\t\t\t$status_mess = 'OK';\n\t\t\t\t\t\t\t$title_mess = __('message read', 'ppmess');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// check if the post was deleted or not\n\t\t\t\t\t\tif( ! empty($post_info->post_title) )\n\t\t\t\t\t\t\t$post_title = $post_info->post_title;\t\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$post_title = $value['post_name'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t// token\n\t\t\t\t\t\t$token_single_commun = md5(SALT_SINGLE_COMMUN_PPMESS . $value['message_id'] . $value['post_id'] . $data['logged_user']['user_id'] );\n\t\t\t\t\t\t$token_delete_commun = md5(SALT_DELETE_COMMUN_PPMESS . $value['message_id'] . $value['post_id'] . $data['logged_user']['user_id'] );\n\t\t\t\t\t?>\n\t\t\t\t\t\t<li onmouseover=\"ppmess_change_style(this)\" onmouseout=\"ppmess_return_style(this)\">\n\t\t\t\t\t\t\t<!----------------------- Sender ---------------------->\n\t\t\t\t\t\t\t<div><?php echo esc_html($sender->user_login); ?></div>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!-------------------- Post title -------------------->\n\t\t\t\t\t\t\t<?php if( !empty($post_info->post_status) && $post_info->post_status == 'publish'): ?>\n\t\t\t\t\t\t\t\t\t<div><?php echo esc_html($post_title); ?>\n\t\t\t\t\t\t\t\t\t\t<?php if($data['logged_user']['user_id'] == $post_author_id): ?>\n\t\t\t\t\t\t\t\t\t\t\t\t<br/><span class=\"circle-mark-1\"></span>\n\t\t\t\t\t\t\t\t\t\t<?php else: if($sender->ID == $post_author_id): ?>\n\t\t\t\t\t\t\t\t\t\t\t\t<br/><span class=\"circle-mark-2\"></span>\n\t\t\t\t\t\t\t\t\t\t<?php endif; endif; ?>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t\t\t<div><span style=\"font-style:italic;text-decoration:line-through;\">\n\t\t\t\t\t\t\t\t\t\t<?php echo esc_html($post_title); ?></span>\n\t\t\t\t\t\t\t\t\t\t<?php if($data['logged_user']['user_id'] == $post_author_id): ?>\n\t\t\t\t\t\t\t\t\t\t\t\t<br/><span class=\"circle-mark-1\"></span>\n\t\t\t\t\t\t\t\t\t\t<?php else: if($sender->ID == $post_author_id): ?>\n\t\t\t\t\t\t\t\t\t\t\t\t<br/><span class=\"circle-mark-2\"></span>\n\t\t\t\t\t\t\t\t\t\t<?php endif; endif; ?>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php endif; ?>\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!------------------ Created message date --------------------->\n\t\t\t\t\t\t\t<div><?php echo esc_html(date('d-M-Y', strtotime($value['date_created'])) ); ?></div>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!--------------------- Message status -------------------------->\n\t\t\t\t\t\t\t<div class=\"<?php echo esc_attr($status_class); ?>\" title=\"<?php echo esc_attr($title_mess); ?>\">\n\t\t\t\t\t\t\t\t<?php echo esc_html($status_mess); ?>\n\t\t\t\t\t\t\t\t<?php if($value['number_messages'] > 0): ?>\n\t\t\t\t\t\t\t\t\t<span class=\"colorMark-1\" style=\"float:right;\"><?php echo ' (' . $value['number_messages'] . ')'; ?></span>\n\t\t\t\t\t\t\t\t<?php endif;?>\t\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<!--------------------- View, Delete links --------------------->\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<!-------------- Delete single communication -------------->\n\t\t\t\t\t\t\t\t<a class=\"delete-commun-a\" title=\"<?php echo __('Delete the single communication', 'ppmess'); ?>\" href=\"<?php echo esc_url( get_permalink() . '?delete_commun=1&message_id=' . $value['message_id'] . \n\t\t\t\t\t\t\t\t\t\t'&post_id=' . $value['post_id'] . '&token_delete_commun=' . $token_delete_commun ); ?>\">\n\t\t\t\t\t\t\t\t\t<?php echo __('Delete', 'ppmess'); ?>\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t<!-------------- View single communication -------------->\n\t\t\t\t\t\t\t\t<a class=\"view-commun-a\" title=\"<?php echo __('View the single communication', 'ppmess'); ?>\" href=\"<?php echo esc_url(get_permalink($post) . '?message_id=' . $value['message_id'] . \n\t\t\t\t\t\t\t\t\t\t'&post_id=' . $value['post_id'] . '&token_single_commun=' . $token_single_commun . '&single_commun=1#ppmessage-' . $value['message_id']); ?>\">\n\t\t\t\t\t\t\t\t\t<?php echo __('View', 'ppmess'); ?>\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</li>\n\t\t\t\t<?php\t\n\t\t\t\t\tendforeach;\t?>\n\t\t\t\t</ul>\n\t\t\t</div><!-- all-communications -->\n<?php\telse: ?>\n\t\t\t<div class=\"ppmess-info-light\">\n\t\t\t\t<span class=\"colorMark-1\"><?php echo __('No one communication established', 'ppmess'); ?></span>\n\t\t\t\t<br/><br/>\n\t\t\t\t<?php echo __('For start communication you need a looked to certain post first and send private message to author of the post', 'ppmess'); ?>\n\t\t\t</div>\n<?php \tendif; ?>\t\t\t\t\t\t\n\t</div><!-- ppmess-commun-frame -->\n\t\n\t<?php\n\treturn $content;\n}", "public function get_users_comments_data($discussionid = \"\")\n\t{\n\t\t$result = $this->db->from(\"discussion\")->where(array(\"discussion_id\" => $discussionid))->join(\"deals\",\"deals.deal_id\",\"discussion.deal_id\")->limit(1)->get();\n\t\treturn $result;\n\t}", "function asForumPosts($data) {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n<!--Begin Msg Number {$data['pid']}-->\n<div class='post_block hentry clear no_sidebar ipsBox_container' id='post_id_{$data['pid']}'>\n\t<div class='post_wrap'>\n\t\t<if test=\"postMid:|:$data['member_id']\">\n\t\t\t<h3 class='row2'>\n\t\t<else />\n\t\t\t<h3 class='guest row2'>\n\t\t</if>\n\t\t<if test=\"postModCheckbox:|:$this->memberData['g_is_supmod']\">\n\t\t\t<span class='right'>\n\t\t\t\t<label for='checkbox_{$data['pid']}' class='post_mod hide'>{$this->lang->words['mod_select_post']}</label><input type='checkbox' id='checkbox_{$data['pid']}' name='selectedpids[]' value='{$data['pid']}' class='post_mod right'<if test=\"postModSelected:|:!empty( $data['_pid_selected'] )\"> checked='checked'</if> />\n\t\t\t</span>\n\t\t</if>\n\t\t\t<span class='post_id right ipsType_small desc blend_links'><a href='{parse url=\"showtopic={$data['topic_id']}&amp;view=findpost&amp;p={$data['pid']}\" template=\"showtopic\" seotitle=\"{$data['title_seo']}\" base=\"public\"}' rel='bookmark' title='{$this->lang->words['link_to_post']} #{$data['pid']}'>#{$data['pid']}</a></span>\n\t\t\t<a href=\"{parse url=\"showtopic={$data['tid']}\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}\">{IPSText::truncate( $data['topic_title'], 80)}</a>\n\t\t</h3>\n\t\t<div class='post_body'>\n\t\t\t<p class='posted_info desc lighter ipsType_small'>\n\t\t\t\t<img src='{$data['pp_thumb_photo']}' class='ipsUserPhoto ipsUserPhoto_tiny' /> {$this->lang->words['posted']} {$this->lang->words['search_by']}\n\t\t\t\t<if test=\"postMember:|:$data['member_id']\"><span class=\"author vcard\">{parse template=\"userHoverCard\" group=\"global\" params=\"$data\"}</span><else />{$data['members_display_name']}</if>\n\t\t\t\t{$this->lang->words['on']} <abbr class=\"published\" title=\"{parse expression=\"date( 'c', $data['_post_date'] )\"}\">{parse date=\"$data['_post_date']\" format=\"long\"}</abbr>\n\t\t\t\t<if test=\"hasForumTrail:|:$data['_forum_trail']\">\n\t\t\t\t\t{$this->lang->words['in']}\n\t\t\t\t\t<foreach loop=\"topicsForumTrail:$data['_forum_trail'] as $i => $f\">\n\t\t\t\t\t\t<if test=\"notLastFtAsForum:|:$i+1 == count( $data['_forum_trail'] )\"><a href='{parse url=\"{$f[1]}\" template=\"showforum\" seotitle=\"{$f[2]}\" base=\"public\"}'>{$f[0]}</a></if>\n\t\t\t\t\t</foreach>\n\t\t\t\t</if>\n\t\t\t</p>\n\t\t\t<div class='post entry-content'>\n\t\t\t\t{$data['post']}\n\t\t\t\t{$data['attachmentHtml']}\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<br />\n</div>\n<hr />\n<br />\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}", "public function get_comments($user_id=0, $page = 0)\r\n {\r\n $max_comments = 10;\r\n $max_reply = 3;\r\n $start_reply = $page * $max_reply;\r\n\r\n if ($page==1) {\r\n $start_comment = 0;\r\n } else {\r\n $start_comment = ($page-1)*$max_comments;\r\n }\r\n\r\n global $wpdb;\r\n /* get user by id and extract email */\r\n $ID = $user_id ? $user_id : $this->ID;;\r\n /* get all the comments combined with replies on the forums/meetings */\r\n\r\n /*comments table*/\r\n $commentstable = $wpdb->prefix.'comments';\r\n /* comments sql */\r\n $csql = \"SELECT * FROM `$commentstable` WHERE `user_id` = '$ID' ORDER BY `comment_date` DESC LIMIT $start_comment, $max_comments\";\r\n\r\n /* replies table */\r\n //$replytable = $wpdb->prefix.'posts';\r\n /* reply sql */\r\n //$rsql = \"SELECT * FROM `$replytable` WHERE `post_type`='reply' AND `post_author` = '$ID' ORDER BY `post_date` DESC LIMIT $start_reply, $max_reply\";\r\n\r\n //echo $csql;\r\n\r\n /* chat with user / profile member */\r\n $comments = $wpdb->get_results($csql);\r\n //$replies = $wpdb->get_results($rsql);\r\n\r\n //$total = array_merge( $comments , $replies);\r\n $total = $comments;\r\n\r\n foreach ($total as $key => $comment) {\r\n\r\n /* comments */\r\n if($comment->comment_ID > 0) :\r\n\r\n $content = $comment->comment_content;\r\n $post_comment = get_post($comment->comment_post_ID);\r\n $postTitle = $post_comment->post_title;\r\n $category = get_the_category( $post_comment->ID );\r\n $permalink = get_the_permalink($comment->comment_post_ID);\r\n\r\n $author = new user_info($post_comment->post_author);\r\n $profile = $author->get_profile_link($author->ID);\r\n $date = $comment->comment_date;\r\n \r\n $post_type = get_post_type_object( get_post_type($post_comment->ID) );\r\n $post_content = $post_comment->post_content;\r\n $categoryName = !empty($category[0]->name)?$category[0]->name:$post_type->labels->name;\r\n \r\n /* replies */\r\n else :\r\n\r\n $content = $comment->post_content;\r\n $post_comment = get_post($comment->post_parent);\r\n $postTitle = $post_comment->post_title;\r\n $permalink = get_the_permalink($comment->post_parent);\r\n\r\n $author = new user_info($post_comment->post_author);\r\n $profile = $author->get_profile_link($author->ID);\r\n $date = $comment->post_date;\r\n\r\n $post_content = $post_comment->post_content;\r\n \r\n $category = get_post_custom( $comment->ID );\r\n $parent = get_post($category['_bbp_forum_id'][0]);\r\n $ttl = get_the_title($parent->post_parent);\r\n $parent_title = !empty($ttl)?get_the_title($parent->post_parent).' <i class=\"fa fa-angle-right\"></i> ':'';\r\n $categoryName = get_post($post_comment->post_parent);\r\n $categoryName = $parent_title.$categoryName->post_title;\r\n endif;\r\n\r\n /* normalize data */\r\n $comments_[] = array(\r\n 'permalink' => $permalink,\r\n 'title'=> $postTitle,\r\n 'comment'=> $content,\r\n 'content'=> strip_tags($post_content),\r\n 'name' => $author->name,\r\n 'profile' => $profile,\r\n 'date' => $date,\r\n 'category' =>$categoryName\r\n );\r\n }\r\n\r\n /* custom sorter */\r\n if(is_array($comments_)) :\r\n usort($comments_, function($a, $b) {\r\n $ad = new DateTime($a['date']);\r\n $bd = new DateTime($b['date']);\r\n if ($ad == $bd) {\r\n return 0;\r\n }\r\n return $ad < $bd ? 1 : -1;\r\n });\r\n\r\n return $comments_;\r\n endif;\r\n }", "protected static function repliesAction($ajax) {\n\t\tglobal $db, $user;\n\t\t$before = isset($_GET['before']) && $_GET['before'] ? +$_GET['before'] : time() + 43200;\n\t\t$userid = isset($_GET['userid']) && $_GET['userid'] ? +$_GET['userid'] : 0;\n\t\tif($rs = $db->query('select r.discussion, d.title, r.id, r.posted, r.user as canchange, u.username, u.displayname, u.avatar, case u.level when 1 then \\'new\\' when 2 then \\'known\\' when 3 then \\'trusted\\' when 4 then \\'admin\\' else null end as level, f.fan as friend, r.name, r.contacturl, r.markdown, r.html, group_concat(concat(e.posted, \\'\\t\\', eu.username, \\'\\t\\', eu.displayname) order by e.posted separator \\'\\n\\') as edits from forum_replies as r left join forum_discussions as d on d.id=r.discussion left join users as u on u.id=r.user left join users_friends as f on f.friend=r.user and f.fan=\\'' . +$user->ID . '\\' left join forum_edits as e on e.reply=r.id left join users as eu on eu.id=e.editor where r.posted<\\'' . $before . ($userid ? '\\' and r.user=\\'' . $userid : '') . '\\' group by r.id order by r.posted desc limit ' . self::MAX_THREADS)) {\n\t\t\t$ajax->Data->replies = [];\n\t\t\t$ajax->Data->latest = 0;\n\t\t\twhile($r = $rs->fetch_object()) {\n\t\t\t\t$ajax->Data->latest = $r->posted;\n\t\t\t\t$r->posted = t7format::TimeTag(t7format::DATE_LONG, $r->posted);\n\t\t\t\tif(!$user->IsLoggedIn() && substr($r->contacturl, 0, 7) == 'mailto:')\n\t\t\t\t\t$r->contacturl = '';\n\t\t\t\t$r->canchange = $user->IsLoggedIn() && ($r->canchange == $user->ID && $r->markdown || $user->IsAdmin());\n\t\t\t\tif($r->edits) {\n\t\t\t\t\t$edits = [];\n\t\t\t\t\tforeach(explode(\"\\n\", $r->edits) as $e) {\n\t\t\t\t\t\tlist($posted, $username, $display) = explode(\"\\t\", $e);\n\t\t\t\t\t\t$edits[] = ['datetime' => $posted, 'posted' => strtolower(t7format::LocalDate(t7format::DATE_LONG, $posted)), 'username' => $username, 'displayname' => $display];\n\t\t\t\t\t}\n\t\t\t\t\t$r->edits = $edits;\n\t\t\t\t}\n\t\t\t\tif(!$r->canchange)\n\t\t\t\t\tunset($r->markdown);\n\t\t\t\telseif(!$r->markdown && $user->IsAdmin())\n\t\t\t\t\t$r->markdown = $r->html;\n\t\t\t\tif($r->avatar === '')\n\t\t\t\t\t$r->avatar = t7user::DEFAULT_AVATAR;\n\t\t\t\t$ajax->Data->replies[] = $r;\n\t\t\t}\n\t\t} else\n\t\t\t$ajax->Fail('error looking up replies', $db->errno . ' ' . $db->error);\n\t}", "public function testGet(): void\n {\n $this->createInstance();\n $user = $this->createAndLogin();\n\n $res = $this->fConnector->getDiscussionManagement()->getDiscussions($this->configTest['testTagName'],$user->userId)->wait();\n $this->assertTrue(\\count($res)>0, 'Test get discussions');\n\n }", "function course_announcements() {\r\n global $course_id, $course_code, $langNoAnnounce, $urlAppend, $dateFormatLong;\r\n\r\n if (visible_module(MODULE_ID_ANNOUNCE)) {\r\n $q = Database::get()->queryArray(\"SELECT title, `date`, id\r\n FROM announcement\r\n WHERE course_id = ?d AND\r\n visible = 1\r\n ORDER BY `date` DESC LIMIT 5\", $course_id);\r\n if ($q) { // if announcements exist\r\n $ann_content = '';\r\n foreach ($q as $ann) {\r\n $ann_url = $urlAppend . \"modules/announcements/?course=$course_code&amp;an_id=\" . $ann->id;\r\n $ann_date = claro_format_locale_date($dateFormatLong, strtotime($ann->date));\r\n $ann_content .= \"<li class='list-item'>\r\n <span class='item-wholeline'><div class='text-title'><a href='$ann_url'>\" . q(ellipsize($ann->title, 60)) .\"</a></div>$ann_date</span>\r\n </li>\";\r\n }\r\n return $ann_content;\r\n }\r\n }\r\n return \"<li class='list-item'><span class='item-wholeline'><div class='text-title not_visible'> - $langNoAnnounce - </div></span></li>\";\r\n}", "function get_comments($feed_code, $author) {\n\t \t// echo $check = \"<br> checkpoint 1 inside get comment <br>\";\n\n\t\tinclude 'database.php';\n\t\t \t// echo $check = '<br> checkpoint 2 after connection in function: the feed_code is '.$feed_code.'to db <br>';\n\n//this print the number of comments parents and print the child down there\n\t\t$result = mysqli_query($conn, \"SELECT * FROM `feedcomment` WHERE `feed_code`='$feed_code' AND `is_child`=FALSE ORDER BY `date` DESC\");\n\t\t$row_cnt = mysqli_num_rows($result);\n\n\t\t\tnew_comment($feed_code);\n\t\techo '<div class=\"comment\">';\n\t\techo '<span class = \"showcomment\" code = \"'.$feed_code.'\" ><h4>Comments ('.$row_cnt.')</h4></span>';\n\t\techo '<div class = \"hide hider\" id = \"hider-'.$feed_code.'\" >';\n\n\t\tforeach($result as $item) {\n\t\t\t//this format the date into letter\n\t\t\t$date = new dateTime($item['date']);\n\t\t\t$date = date_format($date, 'M j, Y | H:i:s');\n\t\t\t$auth = $item['author'];\n\t\t\t$par_code = $item['com_code'];\n//this is a query to fetch the replies: child\n\t\t\t$chi_result = mysqli_query($conn, \"SELECT * FROM `feedcomment` WHERE `par_code`='$par_code' AND `is_child`=TRUE\");\n\t\t\t$chi_cnt = mysqli_num_rows($chi_result);\n//this print the comment, author and date\n\t\t\techo '<div class=\"comment\" name=\"'.$par_code.'\"><span class=\"author\">'.$auth.'</span><br/>\n\t\t\t'.$item['comment'].'<br /><span class=\"date\">Posted: '.$date.'</span><br />';\n//this prints the number of reply\n\t\t\t\t\tif($chi_cnt == 0) {\n\t\t\t\t\t\techo '<span class=\"replies\">No replies</span><span class=\"replies\">&emsp;Reply</span>';\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tadd_comment($item['author'], $item['com_code'],$feed_code);\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo '<span class=\"replies\">[+] '.$chi_cnt.' replies</span>'\n\t\t\t\t\t\t\t.'<span class=\"replies\"&emsp;Reply</span>';\n\t\t\t\t\t\t\t//this is the reply box , the form action is reply.php\n\t\t\t\t\t\t\tadd_comment($item['author'], $item['com_code'],$feed_code);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\techo '<div name=\"children\" id=\"children\">';\n\t\t\t\t\t\t//this prints the replies \n\t\t\t\t\t\tforeach($chi_result as $com) {\n\t\t\t\t\t\t\t$chi_date = new dateTime($com['date']);\n\t\t\t\t\t\t\t$chi_date = date_format($chi_date, 'M j, Y | H:i:s');\n\n\t\t\t\t\t\t\techo '<div class=\"child\" name=\"'.$com['com_code'].'\">'\n\t\t\t\t\t\t\t\t\t.'<span class=\"author\">'.$com['author'].'</span><br />'\n\t\t\t\t\t\t\t\t\t.$com['comment'].'<br />'\n\t\t\t\t\t\t\t\t\t.'<span class=\"date\">Posted: '.$chi_date.'</span><br />'\n\t\t\t\t\t\t\t\t.'</div>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t}\n\t\t\t\techo '</div>';\n\t\t\t}\n\t\t\t\t\techo '</div>';\n\t\t\t\t\techo '</div>';\n\t\t\t\t\techo '</div>';\n\t\t\tmysqli_close($connect);\n\t\t}", "public function getNewestThreads() {\n $topic_1 = 4; // Đánh giá phần mềm\n $topic_2 = 8; // Games Online\n $topic_3 = 10; // Thể Thao\n $limit = 5;\n\n $data = [];\n $data[$topic_1]['name'] = 'Đánh giá phần mềm';\n $data[$topic_2]['name'] = 'Games Online';\n $data[$topic_3]['name'] = 'Thể Thao';\n\n $threadModel = new thread_model();\n $result = $threadModel->excute(\"\n SELECT * FROM threads WHERE topic_id = {$topic_1}\n ORDER BY id DESC LIMIT {$limit} OFFSET 0\n \");\n while ($row = $result->fetch_assoc()) {\n $data[$topic_1]['threads'][] = ['id' => $row['id'], 'title' => $row['title']];\n }\n\n $result = $threadModel->excute(\"\n SELECT * FROM threads WHERE topic_id = {$topic_2}\n ORDER BY id DESC LIMIT {$limit} OFFSET 0\n \");\n while ($row = $result->fetch_assoc()) {\n $data[$topic_2]['threads'][] = ['id' => $row['id'], 'title' => $row['title']];\n }\n\n $result = $threadModel->excute(\"\n SELECT * FROM threads WHERE topic_id = {$topic_3}\n ORDER BY id DESC LIMIT {$limit} OFFSET 0\n \");\n while ($row = $result->fetch_assoc()) {\n $data[$topic_3]['threads'][] = ['id' => $row['id'], 'title' => $row['title']];\n }\n\n return $data;\n }", "public function outputReply($topic, $replys, $topictype, $pageinfo){\n \n $html = '<div style=\"position: relative\">';\n if(empty($replys)){\n return $html .= '</div>';\n }\n \n $_i = ($pageinfo['page'] - 1 )* $pageinfo['pageSize'] + 1;\n foreach($replys as $k => $reply){\n $html .= '<div class=\"answer-item\" replyid=\"'.$reply['id'].'\" topicid=\"<?php echo '.$reply['topicid'].'\">\n <div class=\"post-avatar\">\n <a href=\"'.user_space($reply['reply_user']['uid']).'\"><img src=\"'.avatar($topic['uid']).'\" /></a><br>'.$_i.'楼\n </div>';\n \n $html .= '<div class=\"post-content\">';\n \n $html .= '<div class=\"post-user\">\n <a href=\"'.user_space($reply['reply_user']['uid']).'\">'. $reply['reply_user']['username'].'</a>,'. $reply['reply_user']['honorname'].'</div><div class=\"answer-head\"></div><div class=\"answer-agree\"></div>';\n \n if(isset( $reply['reply'] )){\n $html .= '<blockquote>引用<a href=\"'. user_space($reply['reply_user']['uid']) .'\">@' . $reply['reply_user']['username'].'</a>的话:' . $reply['reply']['content'].'</blockquote>';\n }\n \n $html .= '<div class=\"answer-con\">'.filter_content( $reply['content'] ).'</div>';\n \n $html .= '<div class=\"answer-bottom\">\n <a href=\"javascript:;\">'.dgmdate($reply['time']).'</a> \n <a href=\"javascript:;\" replyid=\"'.$reply['id'].'\" openreply=\"0\" class=\"add-reply\">添加评论</a>\n <div id=\"sub-reply-box-'.$reply['id'].'\" class=\"sub-reply-box radius-5\">\n <form method=\"post\" action=\"'.topic_url($topic['id'], $topic['url'], $topictype) . '/answer\">\n <input type=\"hidden\" name=\"topicid\" id=\"topicid\" value=\"' . $reply['topicid'] . '\" />\n <input type=\"hidden\" name=\"replyid\" id=\"replyid\" value=\"'. $reply['id'] .' \" />\n <textarea name=\"reply_content\" class=\"sub-reply-content\"></textarea>\n <button type=\"submit\" class=\"btn btn-success\" style=\"float: right;\">回复</button>\n </form>\n </div>\n </div>';\n \n $html .= '</div></div>';\n $_i ++ ; \n }\n \n $html .= '</div>';\n return $html;\n }", "function widget_content() {\nstatic $content_list_count=0;\nglobal $today;\n\t$para=para(func_get_args(),'data-model=items','show-url=paper/$nodeId','data-limit=5','show-style=div');\n\n\t$ret = '';\n\n\tif ($para->{'data-show'}) {\n\t\tforeach (explode(';',$para->{'data-show'}) as $showStr) {\n\t\t\t$showKey=substr($showStr,0,strpos($showStr,'='));\n\t\t\t$showValue=substr($showStr,strlen($showKey)+1);\n\t\t\t$para->{'show-'.$showKey}=$showValue;\n\t\t}\n\t}\n\t$dateformat=($para->{'show-dateformat'}?'':'@').\\SG\\getFirst($para->{'show-dateformat'},cfg('dateformat'));\n\n\t$patterns = (Object) [\n\t\t'short' => (Object) [],\n\t\t'slide' => (Object) [],\n\t\t'reply' => (Object) [],\n\t\t'shortview' => (Object) [],\n\t\t'detail' => (Object) [],\n\t\t'div' => (Object) [],\n\t\t'ul' => (Object) [],\n\t];\n\n\t$patterns->short->{'show-style'}='ul';\n\t$patterns->short->value='\" <span class=\\\"timestamp\\\"><span class=\\\"date\\\">\".sg_date($created,\\''.$dateformat.'\\').\"</span><span class=\\\"sep\\\"> | </span><span class=\\\"view\\\">\".$view.\" views</span>\".($reply?\"<span class=\\\"sep\\\"> | </span><span class=\\\"reply\\\">\".$reply.\" replies</span>\":\"\").\"</span>\"';\n\n\t$patterns->slide->{'show-style'}='ul';\n\t$patterns->slide->header='h3';\n\t$patterns->slide->value='\"<div class=\\\"timestamp\\\">\".sg_date($created,\\''.$dateformat.'\\').\"</div>\n<div class=\\\"summary\\\"><a href=\\\"$_url\\\" title=\\\"\".htmlspecialchars($title).\"\\\">{$photo}</a>{$summary}</div>\n<div class=\\\"footer\\\"><span class=\\\"view\\\">\".$view.\" views</span>\".($reply?\" | <span class=\\\"reply\\\">\".$reply.\" comments</span>\":\"\").\" | <span class=\\\"readmore\\\"><a href=\\\"$_url\\\">read more &raquo;</a></span></div>\"';\n\n\t$patterns->reply->{'show-style'}='ul';\n\t$patterns->reply->value='\" <span class=\\\"timestamp\\\">\".sg_date($last_reply,\\''.$dateformat.'\\').\" | <span class=\\\"view\\\">\".$view.\" views</span>\".($reply?\" | <span class=\\\"reply\\\">\".$reply.\" replies</span>\":\"\").\"</span>\"';\n\n\t$patterns->shortview->{'show-style'}='ul';\n\t$patterns->shortview->value='\" <span class=\\\"timestamp\\\">\".sg_date($created,\\''.$dateformat.'\\').\" (<span class=\\\"view\\\">\".$view.\"</span>\".($reply?\"|<span class=\\\"reply\\\">\".$reply.\"</span>\":\"\").\")</span>\"';\n\n\t$patterns->detail->{'show-style'}='dl';\n\t$patterns->detail->header='dt';\n\t$patterns->detail->value='\"<dd class=\\\"timestamp\\\">\".sg_date($created,\\''.$dateformat.'\\').\"</dd>\n<dd class=\\\"summary\\\">{$photo}{$summary}</dd>\n<dd class=\\\"footer\\\"><span class=\\\"view\\\">\".$view.\" views</span>\".($reply?\" | <span class=\\\"reply\\\">\".$reply.\" comments</span>\":\"\").\" | <span class=\\\"readmore\\\"><a href=\\\"$_url\\\">read more &raquo;</a></span></dd>\"';\n\n\t$patterns->div->{'show-style'}='div';\n\t$patterns->div->header='h3';\n\t$patterns->div->value = '\"<div class=\\\"timestamp\\\">\".sg_date($created,\\''.$dateformat.'\\').\"</div>'\n\t\t. '<div class=\\\"photo\\\">'\n\t\t. '<a '.($para->{'show-webview'} ? 'class=\\\"sg-action\\\"' : '').' href=\\\"$_url\\\" '.($para->{'show-webview'} ? 'data-webview=\\\"true\\\" data-webview-title=\\\"News\\\"' : '').' title=\\\"\".htmlspecialchars($title).\"\\\">{$photo}</a>'\n\t\t. '</div>'\n\t\t. '<div class=\\\"summary\\\">{$summary}</div>'\n\t\t. '<div class=\\\"footer\\\"><span class=\\\"view\\\">\".$view.\" views</span>\".($reply?\" | <span class=\\\"reply\\\">\".$reply.\" comments</span>\":\"\").\" | <span class=\\\"readmore\\\"><a href=\\\"$_url\\\">read more &raquo;</a></span></div>\"';\n\n\t$patterns->ul->{'show-style'}='ul';\n\t$patterns->ul->header='h3';\n\t$patterns->ul->value='\"<div class=\\\"timestamp\\\">\".sg_date($created,\\''.$dateformat.'\\').\"</div>\n<div class=\\\"photo\\\"><a href=\\\"$_url\\\" title=\\\"\".htmlspecialchars($title).\"\\\">{$photo}</a></div>\n<div class=\\\"summary\\\">{$summary}</div>\n<div class=\\\"footer\\\"><span class=\\\"view\\\">\".$view.\" views</span>\".($reply?\" | <span class=\\\"reply\\\">\".$reply.\" comments</span>\":\"\").\" | <span class=\\\"readmore\\\"><a href=\\\"$_url\\\">read more &raquo;</a></span></div>\"';\n\n\t$topics = (Object) [];\n\n\tif ($para->{'data-model'}) {\n\t\timport('model:paper.php');\n\t\t$model = $para->{'data-model'};\n\t\t$conditions = [\n\t\t\t'tags' => $para->{'data-tags'},\n\t\t\t'type' => $para->{'data-type'},\n\t\t\t'node' => $para->{'data-node'},\n\t\t\t'options' => [\n\t\t\t\t'field' => $para->{'data-field'},\n\t\t\t\t'items' => $para->{'data-limit'},\n\t\t\t],\n\t\t];\n\t\t$topics = PaperModel::$model($conditions);\n\t}\n\t// debugMsg('$model = '.$model);\n\t// debugMsg($para, '$para');\n\t// debugMsg($topics->_query);\n\t// debugMsg($topics,'$topics');\n\n\t// if ($topics->_type == 'record') $topics = mydb::convert_record_to_recordset($topics);\n\t// if ($topics->_empty) return;\n\n\tif (is_string($para->{'show-style'})) $pattern=$patterns->{$para->{'show-style'}};\n\telse if (is_object($para->{'show-style'})) $pattern=$para->{'show-style'};\n\telse if (is_array($para->{'show-style'})) $pattern=(object)$para->{'show-style'};\n\telse if (!isset($para->{'show-style'})) $pattern=$patterns->short;\n\n\tif (isset($para->{'show-style-value'})) $pattern->value=$para->{'show-style-value'};\n\t$pattern->title=isset($para->{'show-style-title'})?$para->{'show-style-title'}:'\"<a '.($para->{'show-webview'} ? 'class=\\\"sg-action\\\"' : '').' href=\\\"{$topic->_url}\\\" '.($para->{'show-webview'} ? 'data-webview=\\\"true\\\" data-webview-title=\\\"News\\\"' : '').'>{$topic->title}</a>\"';\n\n\t// new condition : items number , today , lastdate , day number , least day(number) , last items(number)\n\t$new=(object)NULL;\n\tif ($para->{'show-new'}) {\n\t\tlist($new->type,$new->text)=explode(',',$para->{'show-new'});\n\t\tlist($new->value,$new->type)=explode(' ',$new->type);\n\t\tif (intval($new->value)==0) {$new->type=$new->value;$new->value=NULL;}\n\t\tif (in_array(sg_file_extension($new->text),array('gif','jpg','png'))) $new->text='<img class=\"new\" src=\"'.$new->text.'\" alt=\"new topic\" />';\n\t\tif (empty($new->text)) $new->text='<span class=\"new\">Update</span>';\n\n\t\tswitch ($new->type) {\n\t\t\tcase 'items' : $new->value=intval($new->value); break;\n\t\t\tcase 'today' : $new->time=date('U',mktime(0, 0, 0, date('m')+0, date('d')+0, date('Y')+0)); break;\n\t\t\tcase 'hour' : $new->time=date('U') - intval($new->value)*60*60; break;\n\t\t\tcase 'minute' : $new->time=date('U') - intval($new->value)*60; break;\n\t\t\tcase 'day' : $new->time=date('U') - intval($new->value)*24*60*60; break;\n\t\t\tcase 'lastdate' :\n\t\t\t\t$first_topic=array_slice($topics->items,0,1);\n\t\t\t\t$first_topic=$first_topic[0];\n\t\t\t\tlist($last_date)=explode(' ',$first_topic->created);\n\t\t\t\t$new->time=sg_date($last_date,'U') - intval($new->value)*24*60*60;\n\t\t\t\tbreak;\n\t\t\tcase 'least' : $new->time= date('U',mktime(date('H')+0, date('s')+0, date('i')+0, date('m')+0 , date('d')+0 - intval($new->value), date('Y')+0));break;\n\t\t}\n\t}\n\n\t/* generate list header */\n\t$ret .= '<!-- start of widget::content #'.$content_list_count.'-->'._NL;\n\tif ($pattern->{'show-style'}!='div') $ret .= '<'.$pattern->{'show-style'}.'>'._NL;\n\n\tlist($last_date)=explode(' ',$topics->items[0]->created);\n\t$start = SG\\getFirst($para->{'show-start'},1);\n\t$count = SG\\getFirst($para->{'show-count'},$topics->count);\n\t$no=0;\n\t$debug = SG\\getFirst($para->{'option-debug'}=='eval',debug('eval'));\n\tif ($para->{'data-field'}=='body,photo' && empty($para->{'show-photo'})) $para->{'show-photo'}='image';\n\tif ($para->{'show-photo'}) list($para->{'show-photo'},$showPhotoOption)=explode(',',$para->{'show-photo'});\n\n\t/* generate each item */\n\tforeach ($topics->items as $topic) {\n\t\t// debugMsg($topic, '$topic');\n\t\t$no++;\n\t\tif ($no<$start) continue;\n\t\tif ($no>$start+$count-1) break;\n\t\t// check is new topic by new condition\n\t\t$is_new_topic=false;\n\t\t//\t\t$topic->_url=url(preg_replace('/\\$([a-zA-Z0-9_]*)/e','$topic->\\\\1',$para->{'show-url'}));\n\t\t$topic->_url=url(preg_replace_callback('/\\$([a-zA-Z0-9_]*)/',function($m) use ($topic) {return $topic->{$m[1]};},$para->{'show-url'}));\n\n\t\tif ( $para->{'show-new'} ) {\n\t\t\t$topic_time = sg_date($topic->created,'U');\n\t\t\tif ($new->time && $topic_time >= $new->time) $is_new_topic=true;\n\t\t\telse if ($new->type=='items' && $no<=intval($new->value) ) $is_new_topic=true;\n\t\t}\n\t\t// $ret .= print_o($topic, '$topic');\n\t\tif ($para->{'show-photo'}) {\n\t\t\tif ($topic->photo) {\n\t\t\t\tswitch ($para->{'show-photo'}) {\n\t\t\t\t\tcase 'image' :\n\t\t\t\t\t\t// $photo=array_shift($topic->photo->items);\n\t\t\t\t\t\t$topic->photo= '<div class=\"photo-th\"><img class=\"'.$para->{'show-photo'}.'\" src=\"'.$topic->photo->url.'\" alt=\"\" /></div>';break;\n\t\t\t\t\tcase 'slide' : $topic->photo=view::photo_slide(NULL,$para->{'show-photo-width'},$para->{'show-photo-height'},'get/photoslide/'.$topic->nodeId.'/imagerotator');break;\n\t\t\t\t\tcase 'list' : break;\n\t\t\t\t}\n\t\t\t} else if ($showPhotoOption=='alway') {\n\t\t\t\t$topic->photo= '<div class=\"photo-th\"><img class=\"'.$para->{'show-photo'}.'\" src=\"/css/img/none.gif\" alt=\"\" /></div>';\n\t\t\t} else {\n\t\t\t\t$topic->photo=NULL;\n\t\t\t}\n\t\t} else $topic->photo=null;\n\n\t\tswitch ($pattern->{'show-style'}) {\n\t\t\tcase 'ul' : $ret .= '<li>';break;\n\t\t\tcase 'div' : $ret .= '<div id=\"'.$para->id.'-'.$no.'\" class=\"widget-item widget-item-'.$no.'\">';break;\n\t\t}\n\n\t\t/* generate each topic title */\n\t\tif ($pattern->header) $ret.='<'.$pattern->header.'>';\n\t\t$ret .= '<a href=\"'.$topic->_url.'\"'.($pattern->{'show-style'}=='div'?' title=\"'.htmlspecialchars($topic->title).'\"':'').'>';\n\n\t\t$ret .= $para->{'show-style'}=='short'&&$para->{'show-photo'}&&$topic->photo?$topic->photo:'';\n\t\tif ($showTitle = SG\\getFirst($para->{'show-title'},$pattern->{'show-title'})) {\n\t\t\t// generate each topic title\n\t\t\t$old_error=error_reporting();\n\t\t\t$show= preg_replace('/\\$([a-zA-Z0-9_]*)/','$topic->\\\\1',$showTitle);\n\t\t\t$eval='$show_value='.$show.';';\n\t\t\teval($eval);\n\t\t\terror_reporting($old_error);\n\t\t\t$ret .= $show_value;\n\t\t} else {\n\t\t\t$ret.=$topic->title;\n\t\t}\n\t\t$ret .= '</a>';\n\t\tif ($pattern->header) $ret.='</'.$pattern->header.'>';\n\n\t\t// generate each topic detail\n\t\t$old_error=error_reporting();\n\t\t$show= preg_replace('/\\$([a-zA-Z0-9_]*)/','$topic->\\\\1',$pattern->value);\n\t\t$eval='$show_value='.$show.';';\n\t\tif ($debug) print_o($topic,'$topic',1);\n\t\tif ($debug) echo '<p>'.htmlspecialchars($eval).'</p>';\n\t\tif ($debug) error_reporting(E_ALL); else error_reporting(0);\n\t\teval($eval);\n\t\terror_reporting($old_error);\n\t\t$ret .= $show_value;\n\t\tif ($para->{'show-new'} && $is_new_topic ) $ret .= ' '.$new->text;\n\t\t$ret.=_NL;\n\n\t\tswitch ($pattern->{'show-style'}) {\n\t\t\tcase 'ul' : $ret .= '</li>'._NL;break;\n\t\t\tcase 'div' : $ret .= '</div><!--topic-list-'.$no.'-->'._NL;\n\t\t}\n\t}\n\n\tif ($pattern->{'show-style'}!='div') $ret .= '</'.$pattern->{'show-style'}.'><!--end of widget-item -->'._NL;\n\t$showReadAll = SG\\getFirst($para->{'data-show-readall'},$para->{'data-cfg-readall'},$para->{'show-readall'});\n\tif ($showReadAll) {\n\t\t$readAllitems=explode(',',$showReadAll);\n\t\tif (count($readAllitems)==1) {\n\t\t\tlist($readalltext,$readallurl)=explode(':',$showReadAll);\n\t\t\t$ret.='<p class=\"readall\"><a href=\"'.url($readallurl).'\">'.$readalltext.'</a><span class=\"arrow-right \"></span></p>';\n\t\t} else {\n\t\t\t$ui=new ui();\n\t\t\tforeach ($readAllitems as $readAllItem) {\n\t\t\t\tlist($readalltext,$readallurl)=explode(':',$readAllItem);\n\t\t\t\t$ui->add('<a href=\"'.url($readallurl).'\">'.$readalltext.'</a><span class=\"arrow-right \"></span>');\n\t\t\t}\n\t\t\t$ret.='<div class=\"readall\">'.trim($ui->build('ul')).'</div>';\n\t\t}\n\t}\n\tif ($para->{'data-footer'}) $ret .= $para->{'data-footer'}._NL;\n\t$ret.='<!--end of widget::content #'.$content_list_count.'-->';\n\treturn array($ret,$para);\n}", "public function FBCommentsRepliesLoadMore() {\n $getData = \\Drupal::request()->get('data');\n $option = \\Drupal::request()->get('option');\n $page_id = \\Drupal::request()->get('page_id');\n $getData['page_id'] = $page_id;\n $current_uid = isset($_GET['team']) ? $_GET['muid'] : \\Drupal::currentUser()->id();\n $facebookHelper = new FacebookHelperFunction();\n $fb = $facebookHelper->getFBObject();\n $properties = ['token_access', 'id', 'status'];\n $network_properties = $this->getKabbodeNetworkStatusProperty(166, $current_uid, $properties);\n $access_token = $network_properties['token_access'];\n // we need to validate token\n $validToken = $facebookHelper->getFBTokenProperty($access_token, 'is_valid');\n if ($validToken) {\n $access_token_val = $access_token->getValue();\n //get page access tken with user access token\n $page_access_token = $facebookHelper->getFBPageAccessToken($page_id, $access_token_val);\n }\n // append user picture\n foreach ($getData['data'] as $key => $value) {\n $profile_pic = $facebookHelper->getFBUserOrPagePicture($value['from']['id'], $page_access_token);\n $getData['data'][$key]['from']['profile_pic'] = $profile_pic;\n $getData['data'][$key]['created_ago'] = $this->time_elapsed_string($value['created_time'], false);\n $getData['data'][$key]['created_time'] = $value['created_time'];\n if ($option == 'loadComments') {\n $response = $fb->get('/' . $value['id'] . '/comments?fields=admin_creator,comment_count,like_count,user_likes,message,from,created_time&limit=3&filter=toplevel&summary=1&order=reverse_chronological', $page_access_token);\n $result_replies = $response->getDecodedBody();\n foreach ($result_replies['data'] as $replies_key => $replies_value) {\n $profile_pic = $facebookHelper->getFBUserOrPagePicture($replies_value['from']['id'], $page_access_token);\n $result_replies['data'][$replies_key]['from']['profile_pic'] = $profile_pic;\n $result_replies['data'][$replies_key]['created_ago'] = $this->time_elapsed_string($replies_value['created_time'], false);\n $result_replies['data'][$replies_key]['created_time'] = $replies_value['created_time'];\n }\n $getData['data'][$key]['replies'] = $result_replies;\n }\n }\n if ($option == 'loadReplies') {\n $twigFilePath = drupal_get_path('module', 'social_media') . '/templates/facebook/facebook-replies.html.twig';\n $template = $this->twig->loadTemplate($twigFilePath);\n $markup = $template->render(array('value_comments' => $getData));\n } else {\n $twigFilePath = drupal_get_path('module', 'social_media') . '/templates/facebook/facebook-comments.html.twig';\n $template = $this->twig->loadTemplate($twigFilePath);\n $markup = $template->render(array('value_comment_data' => $getData));\n }\n $output = array('response' => array('data' => $markup));\n $json_response = json_encode($output);\n return new JsonResponse($json_response);\n \n }", "public function actionAll() { //Return all of comment in data base, limit at 100 lastest\n $db = new Connection(Yii::$app->db);\n $posts = $db->createCommand('SELECT * FROM `discuss` ORDER BY `id` DESC LIMIT 100') //Select by decending mean list will start from button\n ->queryAll();\n return json_encode($posts);\n }", "function caldol_most_replies_bbpress_topics_shortcode() {\n\n ?>\n\n<!-- html custom-functions -->\n\n<h4 style=\"margin-top: 15px;\">Discussions with the Most Replies</h4>\n\n<?php\n\nif ( bbp_has_topics( array( 'author' => 0, 'show_stickies' => false, 'order' => 'DESC', 'meta_key' => '_bbp_reply_count', 'orderby' => 'meta_value', 'post_parent' => 'any', 'posts_per_page' => 10 ) ) )\n\nbbp_get_template_part( 'bbpress/loop', 'topics' );\n\n?>\n\n<!-- end -->\n\n<?php }", "public function viewQuestionsAction() {\n\n $all = $this->comments->findAll();\n\n $res = [];\n foreach ($all as $value) {\n if ($this->commentanswer->isAnswer($value->id) == null) {\n $res[] = $value;\n }\n }\n\n /**\n * Alter object by connecting comment tags, adding user information from the database and filtering markdown on the comment object.\n */\n $res = $this->doAll($res);\n\n /**\n * Prepare the view.\n */\n $this->views->add('comment/commentsdb', [\n 'comments' => $res,\n 'title' => 'Browse Discussions',\n 'content' => \"\",\n ]);\n }", "public function run()\n {\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n DB::table('discussions')->insert([\n 'tieuDe' => Str::random(15),\n 'noiDung' =>Str::random(30),\n 'accessCount'=>0,\n 'ngayDang' =>Carbon::create('1998','06','08'),\n 'idAcc' =>App\\Account::all()->random()->id\n ]);\n }", "function apoc_get_group_reply_info() {\n\n\tglobal $bp;\n\t$slug = $bp->action_variables[1];\n\t\n\tglobal $wpdb;\n\t$topic = $wpdb->get_row( \n\t\t$wpdb->prepare( \n\t\t\t\"SELECT post_title AS title, post_name AS url\n\t\t\tFROM $wpdb->posts \n\t\t\tWHERE ID = ( \n\t\t\t\tSELECT post_parent\n\t\t\t\tFROM $wpdb->posts\n\t\t\t\tWHERE post_name = %s )\",\n\t\t\t$slug )\n\t\t);\n\t\t\n\treturn( $topic );\n}", "function list_categories() {\n $project_parent_category = get_category_by_slug('project');\n $project_parent_category_id=$project_parent_category->term_id;\n $categories=get_the_category();\n $count = 0;\n foreach($categories as $category){\n if($category->category_parent==$project_parent_category_id){\n if ($count == 0) {\n echo '<div class=\"category-symbology\">';\n\n if(get_post_type(get_the_id()) == 'discussion') { echo '<i class=\"social-foundicon-chat\"> </i> '; }\n }\n echo \"<a class='one-category' href='/project/\". $category->slug . \"'>\" . $category->name . \"</a>\";\n if ($count == 0) {\n echo '</div>';\n } \n $count++;\n }\n }\n\n //emit a chat symbol for discussion\n if($count == 0 && get_post_type(get_the_id()) == 'discussion') {\n generate_discussion_w_no_category();\n }\n}", "function followedContentForumsWrapperForums($results) {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n<script type='text/javascript'>\n//<![CDATA[\n\tvar markerURL = ipb.vars['base_url'] + \"app=forums&module=ajax&section=markasread&i=1\"; // Ajax URL so don't use &amp;\n\tvar unreadIcon = \"<img src='{$this->settings['img_url']}/f_icon_read.png' />\";\n//]]>\n</script>\n<table class='ipb_table topic_list' id='forum_table'>\n\t<if test=\"count($results)\">\n\t\t<foreach loop=\"NCresultsAsForum:$results as $forum_data\">\n\t\t\t<tr class='<if test=\"$forum_data['_has_unread']\">unread</if>'>\n\t\t\t\t<td class='col_c_icon altrow'>\n\t\t\t\t\t<if test=\"$forum_data['_has_unread']\">\n\t\t\t\t\t\t<a id='forum_img_{$forum_data['id']}' href=\"{parse url=\"app=forums&amp;module=forums&amp;section=markasread&amp;marktype=forum&amp;forumid={$forum_data['id']}&amp;returntoforumid={$this->request['f']}&amp;i=1\" base=\"public\"}\" data-tooltip=\"{$this->lang->words['bi_markread']}\" class='forum_marker'><img src='{$this->settings['img_url']}/f_icon.png' /></a>\n\t\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\tipb.global.registerMarker( \"forum_img_{$forum_data['id']}\", \"{$forum_data['img_new_post']}\", markerURL + \"&forumid={$forum_data['id']}\" );\n\t\t\t\t\t\t</script>\n\t\t\t\t\t<else />\n\t\t\t\t\t\t<img src='{$this->settings['img_url']}/f_icon_read.png' />\n\t\t\t\t\t</if>\n\t\t\t\t</td>\n\t\t\t\t<td class='col_c_forum'>\n\t\t\t\t\t<h4><a href=\"{parse url=\"showforum={$forum_data['id']}\" seotitle=\"{$forum_data['name_seo']}\" template=\"showforum\" base=\"public\"}\" title='{$forum_data['name']}'>{$forum_data['name']}</a></h4>\n\t\t\t\t\t\n\t\t\t\t\t<if test=\"showSubForums:|:$forum_data['show_subforums'] AND count( $forum_data['subforums'] ) AND $forum_data['show_subforums']\">\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t<ol class='ipsList_inline ipsType_small subforums toggle_notify_off' id='subforums_{$forum_data['id']}'>\n\t\t\t\t\t\t\t<foreach loop=\"subforums:$forum_data['subforums'] as $__id => $__data\">\n\t\t\t\t\t\t\t\t<if test=\"showSubForumsLit:|:$__data[3]\"><li class='unread'><else /><li></if>\n\t\t\t\t\t\t\t\t\t<a href=\"{parse url=\"showforum={$__data[0]}\" seotitle=\"{$__data[2]}\" template=\"showforum\" base=\"public\"}\" title='{$__data[1]}'>{$__data[1]}</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</ol>\n\t\t\t\t\t</if>\n\t\t\t\t\t<if test=\"isFollowedStuff:|:count($forum_data['_followData'])\">\n\t\t\t\t\t\t{parse template=\"followData\" group=\"search\" params=\"$forum_data['_followData']\"}\n\t\t\t\t\t</if>\n\t\t\t\t</td>\n\t\t\t\t<td class='col_c_stats ipsType_small'>\n\t\t\t\t\t<strong>{$forum_data['topics']}</strong> {$this->lang->words['topics']}<br />\n\t\t\t\t\t<strong>{$forum_data['posts']}</strong> {$this->lang->words['replies']}\n\t\t\t\t</td>\n\t\t\t\t<td class='col_c_post'>\n\t\t\t\t\t<if test=\"hideLastInfo:|:$forum_data['hide_last_info']\">\n\t\t\t\t\t\t<ul class='last_post'>\n\t\t\t\t\t\t\t<li class='desc'>{$this->lang->words['f_protected']}</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t<else />\n\t\t\t\t\t\t<if test=\"hasphoto:|:$forum_data['pp_small_photo'] AND !$forum_data['hide_last_info']\">\n\t\t\t\t\t\t\t<a href='{parse url=\"showuser={$forum_data['last_poster_id']}\" template=\"showuser\" seotitle=\"{$forum_data['seo_last_name']}\" base=\"public\"}' class='ipsUserPhotoLink left'>\n\t\t\t\t\t\t\t\t<img src='{$forum_data['pp_small_photo']}' alt='{$this->lang->words['photo']}' class='ipsUserPhoto ipsUserPhoto_mini' />\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</if>\n\t\t\t\t\t\t<ul class='last_post ipsType_small'>\n\t\t\t\t\t\t\t<if test=\"!$forum_data['last_id']\">\n\t\t\t\t\t\t\t\t<li class='desc lighter'><em>{$this->lang->words['f_none']}</em></li>\n\t\t\t\t\t\t\t<else />\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<a href='{parse url=\"showtopic={$forum_data['last_topic_id']}&amp;view=getnewpost\" seotitle=\"{$forum_data['seo_last_title']}\" template=\"showtopic\" base=\"public\"}' title=\"{$this->lang->words['view_new_post']}\">\n\t\t\t\t\t\t\t\t\t\t{parse expression=\"IPSText::truncate( $forum_data['last_title'], 28)\"}\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t<if test=\"lastPosterID:|:$forum_data['last_poster_id']\">\n\t\t\t\t\t\t\t\t\t<li>{$this->lang->words['by_ucfirst']} {parse template=\"userHoverCard\" group=\"global\" params=\"$forum_data\"}</li>\n\t\t\t\t\t\t\t\t</if>\n\t\t\t\t\t\t\t\t<if test=\"hideDateUrl:|:$forum_data['_hide_last_date']\">\n\t\t\t\t\t\t\t\t\t<li class='desc lighter'>{parse date=\"$forum_data['last_post']\" format=\"DATE\"}</li>\n\t\t\t\t\t\t\t\t<else />\n\t\t\t\t\t\t\t\t\t<li class='desc lighter blend_links'><a href='{parse url=\"showtopic={$forum_data['last_id']}&amp;view=getlastpost\" base=\"public\" template=\"showtopic\" seotitle=\"{$forum_data['seo_last_title']}\"}' title='{$this->lang->words['view_last_post']}'>{parse date=\"$forum_data['last_post']\" format=\"DATE\"}</a></li>\n\t\t\t\t\t\t\t\t</if>\n\t\t\t\t\t\t\t</if>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</if>\n\t\t\t\t</td>\n\t\t\t\t<td class='col_f_mod'>\n\t\t\t\t\t<input class='input_check checkall toggle_notify_on' type=\"checkbox\" name=\"likes[]\" value=\"{$forum_data['_followData']['like_app']}-{$forum_data['_followData']['like_area']}-{$forum_data['_followData']['like_rel_id']}\" />\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</foreach>\n\t</if>\n</table>\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}", "private function extractQuestions(){\n $this->selectQuestions();\n $num=mysqli_num_rows($this->arrResultQuestions);\n for($i=0; $i<$num; $i++):\n $row=mysqli_fetch_object($this->arrResultQuestions);\n $misc=new misc();\n $fromWho=$misc->singleSelection('username', 'users', 'user_id', '=', $row->user_id);\n ?>\n <article class=\"homePageQuestions homePageArticle<?php echo $i; ?>\">\n <h3 class=\"homePageQuestionHeading\"><a href=\"?questionBody=<?php echo $row->post_id; ?>\"><?php echo $row->name; ?></a></h3>\n <span class=\"homePageQuestionAddFrom\"><span class=\"glyphicon glyphicon-user\"></span><a href=\"?user=<?php echo $row->user_id; ?>\"><?php echo $fromWho; ?></a></span>\n <span class=\"homePageQuestionAddTime\"><span class=\"glyphicon glyphicon-time\"></span><?php echo date('d.m.Y в H:i', $row->timeadded); ?></span>\n <span class=\"homePageQuestionAddTime\"><span class=\"glyphicon glyphicon-tag\"></span><?php echo $this->selectCategory($row->cat_id); ?></span>\n <span class=\"homePageQuestionVisits\"><?php echo $row->visits ?> Показвания</span>\n <?php\n $this->showingQuestionsFooter($row->lastanswered, $row->lastanswer, $row->post_id);\n ?>\n </article>\n <?php\n endfor;\n }", "public function displayPost()\r\n {\r\n $forumName = $_GET['name'];\r\n\r\n $servername = \"localhost\";\r\n $username = \"root\";\r\n $password = \"\";\r\n\r\n $db = \"forumdb\";\r\n\r\n $table = \"post\";\r\n\r\n // Create connection\r\n $conn = new mysqli($servername, $username, $password, $db);\r\n\r\n // Check connection\r\n if ($conn->connect_error) {\r\n die(\"Connection failed: \" . $conn->connect_error);\r\n }\r\n else\r\n {\r\n $sql = \"SELECT * FROM $table WHERE forum_name = '$forumName'\";\r\n $result = $conn->query($sql);\r\n\r\n if ($result->num_rows > 0)\r\n {\r\n // get data of each row\r\n while ($row = $result->fetch_assoc())\r\n {\r\n if (strpos($row[\"post_body\"], 'https://')!==false)\r\n {\r\n /*this part checks if a url exists in the chat, the !==false is there on purpose because\r\n strpos returns either the offset at which the needle string begins in the haystack string\r\n or the boolean false if the needle isn't found.\r\n */\r\n echo \"<p style='color:greenyellow;'>\" . $row[\"post_author\"] . \" - Posted @ \" . $row[\"timin\"] . \" : </p>\" .\"<a href='\". $row[\"post_body\"] . \"'>\".$row[\"post_body\"].\"</a><br><br>\";\r\n echo \"</br>\";\r\n }\r\n else if(strpos($row[\"post_body\"], '.com')!==false) //if you want to add more options for link detections you can do it here and keep advancing the else if statements\r\n {\r\n echo \"<p style='color:greenyellow;'>\" . $row[\"post_author\"] . \" - Posted @ \" . $row[\"timin\"] . \" : </p>\" .\"<a href='\". $row[\"post_body\"] . \"'>\".$row[\"post_body\"].\"</a><br><br>\";\r\n echo \"</br>\";\r\n }\r\n else\r\n {\r\n echo \"<p style='color:greenyellow;'>\" . $row[\"post_author\"] . \" - Posted @ \" . $row[\"timin\"] . \" : </p>\" . $row[\"post_body\"] . \"<br><br>\";\r\n echo \"</br>\";\r\n }\r\n }\r\n\r\n }\r\n else\r\n {\r\n //echo \"0 results\";\r\n echo \"Be the first the post!\";\r\n }\r\n $conn->close();\r\n }\r\n }", "function _hippel_discussions_strongarm() {\n $export = array();\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'ant_discuss';\n $strongarm->value = '0';\n\n $export['ant_discuss'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'ant_pattern_discuss';\n $strongarm->value = '';\n\n $export['ant_pattern_discuss'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'ant_pattern_reply';\n $strongarm->value = '<?php echo substr(\\'[field_reply_body-formatted]\\', 0, 30); ?>';\n\n $export['ant_pattern_reply'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'ant_php_discuss';\n $strongarm->value = 0;\n\n $export['ant_php_discuss'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'ant_php_reply';\n $strongarm->value = 1;\n\n $export['ant_php_reply'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'ant_reply';\n $strongarm->value = '1';\n\n $export['ant_reply'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'comment_anonymous_discuss';\n $strongarm->value = 0;\n\n $export['comment_anonymous_discuss'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'comment_anonymous_reply';\n $strongarm->value = 0;\n\n $export['comment_anonymous_reply'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'comment_controls_discuss';\n $strongarm->value = '3';\n\n $export['comment_controls_discuss'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'comment_controls_reply';\n $strongarm->value = '3';\n\n $export['comment_controls_reply'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'comment_default_mode_discuss';\n $strongarm->value = '4';\n\n $export['comment_default_mode_discuss'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'comment_default_mode_reply';\n $strongarm->value = '2';\n\n $export['comment_default_mode_reply'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'comment_default_order_discuss';\n $strongarm->value = '1';\n\n $export['comment_default_order_discuss'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'comment_default_order_reply';\n $strongarm->value = '2';\n\n $export['comment_default_order_reply'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'comment_default_per_page_discuss';\n $strongarm->value = '50';\n\n $export['comment_default_per_page_discuss'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'comment_default_per_page_reply';\n $strongarm->value = '30';\n\n $export['comment_default_per_page_reply'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'comment_discuss';\n $strongarm->value = '0';\n\n $export['comment_discuss'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'comment_form_location_discuss';\n $strongarm->value = '0';\n\n $export['comment_form_location_discuss'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'comment_form_location_reply';\n $strongarm->value = '0';\n\n $export['comment_form_location_reply'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'comment_preview_discuss';\n $strongarm->value = '1';\n\n $export['comment_preview_discuss'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'comment_preview_reply';\n $strongarm->value = '0';\n\n $export['comment_preview_reply'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'comment_reply';\n $strongarm->value = '2';\n\n $export['comment_reply'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'comment_subject_field_discuss';\n $strongarm->value = '1';\n\n $export['comment_subject_field_discuss'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'comment_subject_field_reply';\n $strongarm->value = '0';\n\n $export['comment_subject_field_reply'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'content_extra_weights_discuss';\n $strongarm->value = array(\n 'title' => '-5',\n 'revision_information' => '-1',\n 'comment_settings' => '0',\n 'menu' => '-2',\n );\n\n $export['content_extra_weights_discuss'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'content_extra_weights_reply';\n $strongarm->value = array(\n 'title' => '33',\n 'revision_information' => '35',\n 'comment_settings' => '36',\n 'menu' => '34',\n );\n\n $export['content_extra_weights_reply'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'node_options_discuss';\n $strongarm->value = array(\n '0' => 'status',\n '1' => 'revision',\n );\n\n $export['node_options_discuss'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'node_options_reply';\n $strongarm->value = array(\n '0' => 'status',\n '1' => 'revision',\n );\n\n $export['node_options_reply'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'vud_node_reset';\n $strongarm->value = '0';\n\n $export['vud_node_reset'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'vud_node_types';\n $strongarm->value = array(\n 'discuss' => 'discuss',\n 'reply' => 'reply',\n 'page' => 0,\n 'story' => 0,\n );\n\n $export['vud_node_types'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'vud_node_votes';\n $strongarm->value = '3';\n\n $export['vud_node_votes'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'vud_node_widget';\n $strongarm->value = 'updown';\n\n $export['vud_node_widget'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'vud_node_widget_show';\n $strongarm->value = '3';\n\n $export['vud_node_widget_show'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'vud_node_widget_vote_on_teaser';\n $strongarm->value = 1;\n\n $export['vud_node_widget_vote_on_teaser'] = $strongarm;\n return $export;\n}", "function RealTimePosts($c_id,$last_post=false,$uid=false){\r\n\r\n$posts=helpers::get_controller(POSTS)->RealTimePosts($c_id,$last_post,helpers::uid($uid));\r\n\r\nif(!empty($posts)){\r\n\r\nforeach($posts as $post){\r\n\r\n$return[]=helpers::WidgetOutput(\"Post\",array(\"post\"=>$post,\"options\"=>array(\r\n\r\n\t\t\"comments_enabled\"=>true,\r\n\t\t\"class\"=>Helpers::CoulmnClass(),\r\n\r\n\t\t)));\r\n\r\n}\r\n\r\nreturn $return;\r\n\r\n}\r\n\r\nreturn array();\r\n\r\n}", "public function getForumTopicCommentList($debug_to_pass = '') {\n\n $this->db->select('ft.topic_id,ft.topic_title,ft.category_id,ft.topic_short_description,ft.topic_content,ft.posted_by,ft.posted_on,ft.status as ft_status,fc.category_id,fc.category_name,fc.page_description,u.user_name,u.user_id');\n $this->db->from('mst_forum_topics as ft');\n $this->db->join('mst_forum_categories as fc', 'ft.category_id = fc.category_id', 'inner');\n $this->db->join('mst_users as u', 'ft.posted_by=u.user_id', 'inner');\n// $this->db->join('trans_forum_comments as tfc', 'tfc.topic_id=ft.topic_id', 'inner');\n $this->db->where('ft.status', '1');\n// $this->db->where('tfc.status','1');\n $this->db->order_by('ft.topic_id desc');\n $query = $this->db->get();\n if ($debug_to_pass)\n echo $this->db->last_query();\n return $query->result_array();\n }", "function DisplayForumCategories()\n {\n global $DB, $categoryid, $mainsettings, $sdlanguage, $sdurl, $userinfo, $usersystem;\n\n //SD343: display optional tag cloud\n $forum_tags = false;\n if(!empty($this->conf->plugin_settings_arr['display_tagcloud']))\n {\n require_once(SD_INCLUDE_PATH.'class_sd_tags.php');\n SD_Tags::$maxentries = 30;\n SD_Tags::$plugins = $this->conf->plugin_id;\n SD_Tags::$tags_title = $sdlanguage['tags_title'];\n SD_Tags::$targetpageid = $categoryid;\n SD_Tags::$tag_as_param = 'tag';\n if($forum_tags = SD_Tags::DisplayCloud(false))\n {\n if(in_array($this->conf->plugin_settings_arr['display_tagcloud'],array(1,3)))\n {\n echo $forum_tags;\n }\n }\n }\n\n echo '\n <table border=\"0\" class=\"forums\" cellpadding=\"0\" cellspacing=\"0\" summary=\"layout\" width=\"100%\"><thead><tr>';\n if(!empty($this->conf->plugin_settings_arr['display_forum_image']))\n {\n echo '<th class=\"col-forum-icon\"> </th>';\n }\n echo '<th class=\"col-forum-title\">'.$this->conf->plugin_phrases_arr['column_forum'].'</th>';\n if(!empty($mainsettings['enable_rss_forum']))\n {\n echo '<th class=\"col-rss\"><a title=\"RSS\" class=\"rss-icon\" href=\"forumrss.php\">RSS</a></th>';\n }\n echo '<th class=\"col-topic-count\">'.$this->conf->plugin_phrases_arr['column_topics'].'</th>\n <th class=\"col-post-count\">'.$this->conf->plugin_phrases_arr['column_posts'].'</th>\n <th class=\"col-last-updated\">'.$this->conf->plugin_phrases_arr['column_last_updated'].'</th>\n </tr></thead>';\n\n if(isset($this->conf) && isset($this->conf->forums_cache['categories'])) //SD343\n foreach($this->conf->forums_cache['categories'] as $fid)\n {\n if(!isset($this->conf->forums_cache['forums'][$fid])) continue; //SD343\n $entry = $this->conf->forums_cache['forums'][$fid];\n\n if(!$this->conf->IsSiteAdmin)\n {\n if(empty($entry['online'])) continue;\n $entry_groups = sd_ConvertStrToArray($entry['access_view'],'|');\n if(!empty($entry_groups) && !count(@array_intersect($userinfo['usergroupids'], $entry_groups)))\n continue;\n }\n\n if(empty($entry['parent_forum_id']) && empty($entry['is_category']))\n {\n if($res = $this->DisplayForums(0,$fid,$entry['title']))\n {\n echo $res;\n }\n continue;\n }\n\n $output = '\n <tbody>\n <tr>\n <td colspan=\"6\" class=\"category-cell\">\n <div class=\"category-title-container\">';\n\n if(strlen($entry['title']))\n {\n $image = '';\n if(!empty($entry['image']) && !empty($entry['image_h']) && !empty($entry['image_w']))\n {\n $image = '<img src=\"'.SDUserCache::$img_path.$entry['image'].'\" alt=\"\" width=\"'.(int)$entry['image_w'].'\" height=\"'.(int)$entry['image_h'].'\" />';\n }\n $output .= '<span class=\"category-image\">'.($image?$image:'&nbsp;').'</span> <span class=\"category-title\">'.$entry['title'].'</span>';\n if(strlen($entry['description']))\n {\n $output .= '\n <span class=\"category-description\">' . $entry['description']. '</span>';\n }\n }\n $output .= '\n </div>\n </td>\n </tr>\n </tbody>';\n\n if($res = $this->DisplayForums($fid,0,$entry['title']))\n {\n echo $output . $res;\n }\n\n } //foreach\n\n echo '\n </table>\n ';\n\n //SD343: display optional tag cloud\n if(!empty($forum_tags) && !empty($this->conf->plugin_settings_arr['display_tagcloud']) &&\n in_array($this->conf->plugin_settings_arr['display_tagcloud'],array(2,3)))\n {\n echo $forum_tags;\n }\n\n }", "function process_board($card)\r\r\n{\r\r\n if($card['var']['themecolor']){\r\r\n $color = 'style=\"color:'.$card['var']['themecolor'].'\"';\r\r\n $bordercolor = 'style=\"border-top-color:'.$card['var']['themecolor'].'\"';\r\r\n }\r\r\n\r\r\n $title_link = $card['var']['title_link'] ? $card['var']['title_link'] : 'javascript:void(0);';\r\r\n $header = '<div class=\"news-t\" '.$bordercolor.'><h3>'.\r\r\n '<a '.$color.' href=\"'.$title_link.'\">'.$card['var']['title'].'</a></h3>';\r\r\n if($card['var']['subtitle']){\r\r\n $header .= '<nav class=\"tmore\">';\r\r\n foreach ($card['var']['subtitle'] as $i => $subtitle) {\r\r\n $header .= '<a '.$color.' href=\"'.$card['var']['subtitle_link'][$i].'\">'.$subtitle.'</a>';\r\r\n }\r\r\n $header .= '</nav>';\r\r\n }\r\r\n $header .= '</div>';\r\r\n\r\r\n include_once libfile('function/forumlist');\r\r\n $fids = dintval($card['var']['fids'], TRUE);\r\r\n $forums = C::t('forum_forum')->fetch_all_by_fid($fids);\r\r\n $forum_fields = C::t('forum_forumfield')->fetch_all($fids);\r\r\n foreach($forums as $forum) {\r\r\n\r\r\n if($forum_fields[$forum['fid']]['fid']) {\r\r\n $forum = array_merge($forum, $forum_fields[$forum['fid']]);\r\r\n }\r\r\n $forum['extra'] = empty($forum['extra']) ? array() : dunserialize($forum['extra']);\r\r\n if(!is_array($forum['extra'])) {\r\r\n $forum['extra'] = array();\r\r\n }\r\r\n\r\r\n if($forum['icon']) {\r\r\n $forum['icon'] = get_forumimg($forum['icon']);\r\r\n }\r\r\n $forumlist[ $forum['fid'] ] = $forum;\r\r\n }\r\r\n\r\r\n $list = '<ul class=\"b-l cl\">';\r\r\n foreach ($forumlist as $f) {\r\r\n\r\r\n $link = forum_link($f['fid']);\r\r\n\r\r\n $list .= ' <li><a href=\"'.$link.'\"><img src=\"'.$f['icon'].'\" onerror=\"this.error=null;this.src=\\'source/plugin/xigua_portal/template/cards/board/images/bg.png\\'\"><span class=\"b-tit\">'.$f['name'].'</span></a></li>';\r\r\n }\r\r\n $list .= '</ul>';\r\r\n\r\r\n $card['var']['html'] = $header . $list;\r\r\n\r\r\n return $card;\r\r\n}", "public static function prevent_forumngfeature_discussion() {\n return array();\n }", "public function getParentRelationship()\n {\n return auth()->user()->ministryDiscussions();\n }", "function getComments($conn){\r\n $sql = \"SELECT * FROM comments ORDER BY cid DESC LIMIT 20\";\r\n $result = $conn->query($sql);\r\n while ($row = $result->fetch_assoc()){\r\n echo \"<div class='comment-box'><p>\";\r\n echo $row['uid'].\"<br>\";\r\n echo $row['date'].\"<br>\";\r\n echo nl2br($row['message']);\r\n echo \"</p></div>\";\r\n }\r\n \r\n}", "public function index()\n {\n $discussions = Discussion::filterByChannels()->paginate(10);\n return view('discussion.index', compact('discussions'));\n }", "protected static function ShowDocumentation() {\n?>\n\t\t\t<h2 id=postdelete>post delete</h2>\n\t\t\t<p>\n\t\t\t\tdeletes a reply from a discussion. also deletes the discussion if it\n\t\t\t\tonly had one reply.\n\t\t\t</p>\n\t\t\t<dl class=parameters>\n\t\t\t\t<dt>id</dt>\n\t\t\t\t<dd>id of the reply to delete</dd>\n\t\t\t</dl>\n\n\t\t\t<h2 id=getdiscussion>get discussion</h2>\n\t\t\t<p>retrieves a discussion with all of its replies.</p>\n\t\t\t<dl class=parameters>\n\t\t\t\t<dt>discussion</dt>\n\t\t\t\t<dd>id of the discussion to look up.</dd>\n\t\t\t</dl>\n\n\t\t\t<h2 id=getlist>get list</h2>\n\t\t\t<p>\n\t\t\t\tretrieves the lastest forum discussions with most recently replied\n\t\t\t\tfirst.\n\t\t\t</p>\n\t\t\t<dl class=parameters>\n\t\t\t\t<dt>tagid</dt>\n\t\t\t\t<dd>specify a tag id to only retrieve discussions with that tag.</dd>\n\t\t\t\t<dt>before</dt>\n\t\t\t\t<dd>specify a timestamp to only return entries before then.</dd>\n\t\t\t</dl>\n\n\t\t\t<h2 id=getreplies>get replies</h2>\n\t\t\t<p>\n\t\t\t\tget replies newest to oldest without regard for which discussion they\n\t\t\t\tbelong to.\n\t\t\t</p>\n\t\t\t<dl class=parameters>\n\t\t\t\t<dt>before</dt>\n\t\t\t\t<dd>if specified, only get replies older than this timestamp.</dd>\n\t\t\t\t<dt>userid</dt>\n\t\t\t\t<dd>if specified, only get replies posted by this user.</dd>\n\t\t\t</dl>\n\n\t\t\t<h2 id=postreply>post reply</h2>\n\t\t\t<p>\n\t\t\t\tsaves a new reply to the discussion.\n\t\t\t</p>\n\t\t\t<dl class=parameters>\n\t\t\t\t<dt>discussion</dt>\n\t\t\t\t<dd>id of discussion being replied to. required.</dd>\n\t\t\t\t<dt>markdown</dt>\n\t\t\t\t<dd>reply content in markdown format. required.</dd>\n\t\t\t\t<dt>authorname</dt>\n\t\t\t\t<dd>\n\t\t\t\t\tname of the reply’s author. ignored if reply comes from a logged-in\n\t\t\t\t\tuser. anonymous if blank or missing and not logged in.\n\t\t\t\t</dd>\n\t\t\t\t<dt>authorcontact</dt>\n\t\t\t\t<dd>\n\t\t\t\t\tcontact url for the reply’s author. ignored if reply comes from a\n\t\t\t\t\tlogged-in user. author name displayed without a link if blank or\n\t\t\t\t\tmissing.\n\t\t\t\t</dd>\n\t\t\t</dl>\n\n\t\t\t<h2 id=getreplyid>get replyid</h2>\n\t\t\t<p>\n\t\t\t\tretrieves a reply id from the old post id. used to translate links from\n\t\t\t\tthe previous database.\n\t\t\t</p>\n\t\t\t<dl class=parameters>\n\t\t\t\t<dt>postid</dt>\n\t\t\t\t<dd>id of the post to translate into a reply id.</dd>\n\t\t\t</dl>\n\n\t\t\t<h2 id=poststart>post start</h2>\n\t\t\t<p>\n\t\t\t\tstart a new discussion.\n\t\t\t</p>\n\t\t\t<dl class=parameters>\n\t\t\t\t<dt>name</dt>\n\t\t\t\t<dd>\n\t\t\t\t\tname of the author. anonymous if blank or not provided. ignored if\n\t\t\t\t\tdiscussion started by a logged-in user.\n\t\t\t\t</dd>\n\t\t\t\t<dt>contact</dt>\n\t\t\t\t<dd>\n\t\t\t\t\tcontact url or e-mail address of the author. no contact link if\n\t\t\t\t\tblank or not provided. ignored if discussion started by a logged-in\n\t\t\t\t\tuser.\n\t\t\t\t</dd>\n\t\t\t\t<dt>title</dt>\n\t\t\t\t<dd>discussion title. required.</dd>\n\t\t\t\t<dt>tags[]</dt>\n\t\t\t\t<dd>\n\t\t\t\t\tlist of tag ids for this discussion. untagged if empty or not\n\t\t\t\t\tpresent.\n\t\t\t\t</dd>\n\t\t\t\t<dt>markdown</dt>\n\t\t\t\t<dd>discussion content in markdown format. required.</dd>\n\t\t\t</dl>\n\n\t\t\t<h2 id=postupdate>post update</h2>\n\t\t\t<p>\n\t\t\t\tupdates an existing reply. users may only update replies they own.\n\t\t\t</p>\n\t\t\t<dl class=parameters>\n\t\t\t\t<dt>id</dt>\n\t\t\t\t<dd>id of the reply to update. required.</dd>\n\t\t\t\t<dt>markdown</dt>\n\t\t\t\t<dd>reply content in markdown format. required.</dd>\n\t\t\t</dl>\n\n<?php\n\t}", "public function run()\n {\n DB::table('threads')->insert([\n 'id' => 1,\n 'creator' => 1,\n 'title' => 'Hilo inaugural de TekPlaza',\n 'locked' => false,\n 'pinned' => true,\n 'subforum' => 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 DB::table('threads')->insert([\n 'id' => 2,\n 'creator' => 4,\n 'title' => 'Propuesta de nuevas normas para los foros de soporte técnico',\n 'locked' => false,\n 'pinned' => false,\n 'subforum' => 2,\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 DB::table('threads')->insert([\n 'id' => 3,\n 'creator' => 1,\n 'title' => 'Normas del subforo general de tecnología',\n 'locked' => true,\n 'pinned' => true,\n 'subforum' => 3,\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 DB::table('threads')->insert([\n 'id' => 4,\n 'creator' => 5,\n 'title' => 'Normas de los subforos de marcas',\n 'locked' => true,\n 'pinned' => true,\n 'subforum' => 4,\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 DB::table('threads')->insert([\n 'id' => 5,\n 'creator' => 5,\n 'title' => 'Normas de los subforos de marcas',\n 'locked' => true,\n 'pinned' => true,\n 'subforum' => 5,\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 DB::table('threads')->insert([\n 'id' => 6,\n 'creator' => 5,\n 'title' => 'Normas de los subforos de marcas',\n 'locked' => true,\n 'pinned' => true,\n 'subforum' => 6,\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 DB::table('threads')->insert([\n 'id' => 7,\n 'creator' => 4,\n 'title' => 'Normas del subforo de montaje de PCs',\n 'locked' => true,\n 'pinned' => true,\n 'subforum' => 7,\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 DB::table('threads')->insert([\n 'id' => 8,\n 'creator' => 3,\n 'title' => 'Normas de los subforos de soporte técnico',\n 'locked' => true,\n 'pinned' => true,\n 'subforum' => 8,\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 DB::table('threads')->insert([\n 'id' => 9,\n 'creator' => 3,\n 'title' => 'Normas de los subforos de soporte técnico',\n 'locked' => true,\n 'pinned' => true,\n 'subforum' => 9,\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 DB::table('threads')->insert([\n 'id' => 10,\n 'creator' => 3,\n 'title' => 'Normas de los subforos de soporte técnico',\n 'locked' => true,\n 'pinned' => true,\n 'subforum' => 10,\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 DB::table('threads')->insert([\n 'id' => 11,\n 'creator' => 7,\n 'title' => 'Placas solares',\n 'locked' => false,\n 'pinned' => false,\n 'subforum' => 3,\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 DB::table('threads')->insert([\n 'id' => 12,\n 'creator' => 1,\n 'title' => 'Hilo de prueba 1234567890 abcdefg',\n 'locked' => true,\n 'pinned' => true,\n 'subforum' => 3,\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 DB::table('threads')->insert([\n 'id' => 13,\n 'creator' => 6,\n 'title' => 'Hilo 1',\n 'locked' => false,\n 'pinned' => false,\n 'subforum' => 3,\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 DB::table('threads')->insert([\n 'id' => 14,\n 'creator' => 4,\n 'title' => 'Hilo 2',\n 'locked' => true,\n 'pinned' => false,\n 'subforum' => 3,\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 DB::table('threads')->insert([\n 'id' => 15,\n 'creator' => 2,\n 'title' => 'Hilo 3',\n 'locked' => false,\n 'pinned' => false,\n 'subforum' => 3,\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 }", "function multicultural_custom_comments($comment, $args, $depth)\r\n{\r\n $GLOBALS['comment'] = $comment;\r\n $GLOBALS['comment_depth'] = $depth;\r\n ?>\r\n\r\n\r\n <div>\r\n <ul class=\"comments-list no-bullet\" id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\r\n <li>\r\n <div class=\"position-relative\">\r\n <div>\r\n <div class=\"comment-image-wrapper\">\r\n <?php echo get_avatar($id_or_email, $size, $default, $alt, $args); ?>\r\n </div>\r\n </div>\r\n <div class=\"comment-content\" style=\"margin-left: 100px;\">\r\n <div class=\"multicultural-comments\"><?php comment_text() ?></div>\r\n <ul class=\"comments-option inline-list oslo-grey-font-color px-8-font no-margin\">\r\n <li style=\"margin: 0 5px !important;\">\r\n <?php // echo the comment reply link\r\n if ($args['type'] == 'all' || get_comment_type() == 'comment') :\r\n\r\n $extraclass = 'comment-reply display-inline-block-important';\r\n echo preg_replace(\r\n '/comment-reply-link/',\r\n 'comment-reply-link ' . $extraclass,\r\n get_comment_reply_link(array_merge($args, array(\r\n 'add_below' => $add_below,\r\n 'reply_text' => __('Reply', 'eti-theme'),\r\n 'login_text' => __('Log in to reply.', 'eti-theme'),\r\n 'depth' => $depth,\r\n 'max_depth' => $args['max_depth']\r\n ))),\r\n 1\r\n );\r\n endif;\r\n ?>\r\n\r\n </li>\r\n <!-- <li style=\"margin: 0 5px !important;\"><a href=\"#\"><i class=\"fa fa-share\"></i>&nbsp;Share</a></li> -->\r\n </ul>\r\n </div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n </li>\r\n </ul>\r\n </div>\r\n<?php }", "function displaycomments(){\nif(isset($_POST['vid'])){$this->presentation_url = safeAddSlashes($_POST['vid']);}else{$this->presentation_url = safeAddSlashes($_GET['vid']);}\nif(isset($_POST['lead_comment_author'])){$this->lead_comment_author = safeAddSlashes($_POST['lead_comment_author']);}else{$this->lead_comment_author = safeAddSlashes($_GET['lead_comment_author']);}\nif(isset($_POST['comment_author'])){$this->comment_author = safeAddSlashes($_POST['comment_author']);}else{$this->comment_author = safeAddSlashes($_GET['comment_author']);}\n//database connection begins\nrequire('database/connx.php');\n\n$db = & new MySQL($host,$dbUser,$dbPass,$dbName);\n$sql1=\"select str_name,str_comment,time_pubdate,str_msg_type from comments where str_presentation_url='\" . $this->presentation_url . \"' and str_msg_type='Posted'\" ;\n$result1=$db->query($sql1);\n$this->strcommenthtml3 = \"\";\n$this->strcommenthtml1 = \"<div><div name='no_of_comments'>\" . $result1->size() . \" comments</div>\";\nwhile ($row1 = $result1->fetch()) {\n if($row1['str_msg_type'] == 'Posted'){$this->strcommenthtml2 = \"<div id='msg_type_posted'>\";}\n else{$this->strcommenthtml2 = \"<div id='msg_type_reply'>\";};\n $this->strcommenthtml3 .= $this->strcommenthtml2 . \"<span id='db_comment'>\" . $row1['str_comment'] . \"</span><br/>\" . \"<span id='db_comment_author'>\" . $row1['str_msg_type'] . \" by \" . $row1['str_name'] . \" on \" . $row1['time_pubdate'] . \"</span> <span id='reply'><a href='#postcomment' onclick=\\\"postcomment('reply', '\" . $row1['str_name'] . \"');\\\">Reply</a></span></div>\";\n\n//comment out the reply link\n//$this->strcommenthtml3 .= $this->strcommenthtml2 . \"<span id='db_comment'>\" . $row1['str_comment'] . \"</span><br/>\" . \"<span id='db_comment_author'>\" . $row1['str_msg_type'] . \" by \" . $row1['str_name'] . \" on \" . $row1['time_pubdate'] . \"</span></div>\";\n\n//for each comment, display corresponding replies\n$sql2=\"select str_name,str_comment,time_pubdate,str_msg_type from comments where str_lead_name = '\" . $row1['str_name'] . \"' and str_presentation_url='\" . $this->presentation_url . \"' and str_msg_type='Replied'\";\n//echo $sql2 . \"<p>\";\n$result2=$db->query($sql2);\n$this->strcommenthtml5 = \"\";\n$this->strcommenthtml_1 = \"<div>\";\nwhile ($row2 = $result2->fetch()) {\n if($row2['str_msg_type'] == 'Replied'){$this->strcommenthtml6 = \"<div id='msg_type_reply'>\";}\n else{$this->strcommenthtml7 = \"<div id='msg_type_posted'>\";};\n $this->strcommenthtml5 .= $this->strcommenthtml6 . \"<span id='db_comment'>\" . $row2['str_comment'] . \"</span><br/>\" . \"<span id='db_comment_author'>\" . $row2['str_msg_type'] . \" by \" . $row2['str_name'] . \" on \" . $row2['time_pubdate'] . \"</span> <span id='reply'><a href='#postcomment' onclick=\\\"postcomment('reply', '\" . $row1['str_name'] . \"');\\\">Reply</a></span></div>\";\n\n//comment out the reply link\n//$this->strcommenthtml5 .= $this->strcommenthtml6 . \"<span id='db_comment'>\" . $row2['str_comment'] . \"</span><br/>\" . \"<span id='db_comment_author'>\" . $row2['str_msg_type'] . \" by \" . $row2['str_name'] . \" on \" . $row2['time_pubdate'] . \"</span></div>\";\n }\n$this->strcommenthtml4 = \"</div>\";\n$this->strcommenthtml3 .= $this->strcommenthtml_1 . $this->strcommenthtml5 . $this->strcommenthtml4;\n//end of display of replies\n }\n$this->strcommenthtml4 = \"</div>\";\necho $this->strcommenthtml1 . $this->strcommenthtml3 . $this->strcommenthtml4;\n\n }", "public function run()\n {\n DB::table('comments')->insert([\n 'comment' => 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has',\n 'post_id' => 2,\n 'user_id' => 5\n ]);\n\n DB::table('comments')->insert([\n 'comment' => 't is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distributio',\n 'post_id' => 5,\n 'user_id' => 2\n ]);\n\n DB::table('comments')->insert([\n 'comment' => 'Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard ',\n 'post_id' => 1,\n 'user_id' => 6\n ]);\n\n DB::table('comments')->insert([\n 'comment' => 'There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, ',\n 'post_id' => 2,\n 'user_id' => 8\n ]);\n\n DB::table('comments')->insert([\n 'comment' => 'The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from \"de Finibus Bonorum et Malorum\"',\n 'post_id' => 4,\n 'user_id' => 2\n ]);\n\n DB::table('comments')->insert([\n 'comment' => 'Pulvinar sapien et ligula ullamcorper malesuada proin. Morbi tincidunt ornare massa eget egestas purus viverra. Elit duis tristique sollicitudin nibh sit amet.',\n 'post_id' => 6,\n 'user_id' => 7\n ]);\n\n DB::table('comments')->insert([\n 'comment' => 'Lacus viverra vitae congue eu consequat ac. Tristique nulla aliquet enim tortor at. ',\n 'post_id' => 1,\n 'user_id' => 4\n ]);\n\n DB::table('comments')->insert([\n 'comment' => 'Est placerat in egestas erat. Vestibulum morbi blandit cursus risus at ultrices. ',\n 'post_id' => 4,\n 'user_id' => 4\n ]);\n\n DB::table('comments')->insert([\n 'comment' => 'Leo duis ut diam quam nulla. Neque vitae tempus quam pellentesque nec nam aliquam sem et. Enim ut tellus elementum sagittis.',\n 'post_id' => 7,\n 'user_id' => 2\n ]);\n\n DB::table('comments')->insert([\n 'comment' => 'Nec nam aliquam sem et. Est ullamcorper eget nulla facilisi etiam. Tortor id aliquet lectus proin.',\n 'post_id' => 4,\n 'user_id' => 2\n ]);\n\n DB::table('comments')->insert([\n 'comment' => 'Faucibus turpis in eu mi bibendum neque egestas congue. Vitae aliquet nec ullamcorper sit amet risus nullam eget felis. Mauris pharetra et ultrices neque ornare aenean ',\n 'post_id' => 5,\n 'user_id' => 1\n ]);\n\n DB::table('comments')->insert([\n 'comment' => 'Convallis posuere morbi leo urna molestie. Id diam vel quam elementum pulvinar etiam non quam.',\n 'post_id' => 2,\n 'user_id' => 6\n ]);\n }", "public function run()\n {\n $reply_1 = [\n 'user_id' => 1,\n 'discussion_id' => 1,\n 'content' => 'Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium'\n ];\n\n $reply_2 = [\n 'user_id' => 1,\n 'discussion_id' => 2,\n 'content' => 'Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium'\n ];\n\n $reply_3 = [\n 'user_id' => 2,\n 'discussion_id' => 3,\n 'content' => 'Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium'\n ];\n\n Reply::create($reply_1);\n Reply::create($reply_2);\n Reply::create($reply_3);\n }", "public function run()\n {\n //\n\n $filmData = [];\n $films = \\DB::table(\"films\")->get();\n\n if (!empty($films) && sizeof($films)) {\n foreach ($films as $film) {\n $filmData[$film->slug] = $film->id;\n }\n }\n\n $commentData =\n [\n [\n \"film_id\" => $filmData[\\Str::slug(\"The Conjuring\")],\n \"user_id\" => User::inRandomOrder()->first()->id,\n \"comment\" => \"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\",\n ],\n [\n \"film_id\" => $filmData[\\Str::slug(\"Triumph\")],\n \"user_id\" => User::inRandomOrder()->first()->id,\n \"comment\" => \"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\",\n ],\n [\n \"film_id\" => $filmData[\\Str::slug(\"Buckskin\")],\n \"user_id\" => User::inRandomOrder()->first()->id,\n \"comment\" => \"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\",\n ],\n [\n \"film_id\" => $filmData[\\Str::slug(\"Rogue Hostage\")],\n \"user_id\" => User::inRandomOrder()->first()->id,\n \"comment\" => \"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\",\n ],\n [\n \"film_id\" => $filmData[\\Str::slug(\"Infinite\")],\n \"user_id\" => User::inRandomOrder()->first()->id,\n \"comment\" => \"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\",\n ]\n ];\n\n \\DB::table(\"comments\")->insert($commentData);\n }", "public function discuss($id_forum ) {\n //-- Title Halaman\n $data ['title'] = 'Halaman Forum Detail | alumni';\n $data['detail'] = $this->Forum_diskusi_model->getDataForumById( $id_forum );\n $data['diskusi'] = $this->Forum_diskusi_model->getDataForumDetail( $id_forum );\n //----------------------------\n $this->load->view('Template/alumni/navbar_alumni',$data);\n $this->load->view('Template/alumni/sidebar_alumni',$data);\n $this->load->view('alumni/forum_diskusi/forum_detail',$data);\n $this->load->view('Template/alumni/footer_alumni');\n \n }", "public function instaLoadMoreComments() {\n $mode = \\Drupal::request()->get('mode');\n if (isset($mode)) {\n $getData = \\Drupal::request()->get('data');\n $option = \\Drupal::request()->get('option');\n if ($option == 'loadComments') {\n $data['single_insta_post']['comments'] = $getData;\n \\Drupal::logger('social media insta load more comments')->warning('<pre><code>' . print_r($getData, TRUE) . '</code></pre>');\n $twigFilePath = drupal_get_path('module', 'social_media') . '/templates/instagram/instagram-comments.html.twig';\n $template = $this->twig->loadTemplate($twigFilePath);\n $markup = $template->render(array('data' => $data));\n\n } else {\n $comment_value['replies'] = $getData;\n // \\Drupal::logger('social media insta')->warning('<pre><code>' . print_r($comment_value , TRUE) . '</code></pre>');\n $twigFilePath = drupal_get_path('module', 'social_media') . '/templates/instagram/instagram-replies.html.twig';\n $template = $this->twig->loadTemplate($twigFilePath);\n $markup = $template->render(array('comment_value' => $comment_value));\n }\n $output = array('response' => array('data' => $markup));\n $json_response = json_encode($output);\n return new Response($json_response);\n }\n }", "public function Forum() {\n\t $this->sql .= \" UNION\t\n\t SELECT 3, forum_id, thread_id, post_id, post_subject, LEFT(post_message, \".$this->nahlad.\") as post_message, post_datestamp\tFROM `fusion_posts`\n\t\t WHERE '\".$this->a.\"' > post_datestamp AND post_datestamp > '\".$this->b.\"'\tAND post_author = '\".$this->id.\"'\n\t \";\n\t}", "function newSubmissions()\n{\n global $dateformat;\n $storyarray = NewsStory :: getAllSubmitted();\n if ( count( $storyarray ) > 0 )\n {\n\t\tnews_collapsableBar('newsub', 'topnewsubicon');\n\t\techo \"<img onclick='toggle('toptable'); toggleIcon('toptableicon');' id='topnewsubicon' name='topnewsubicon' src=\" . XOOPS_URL . \"/modules/news/images/close12.gif alt='' /></a>&nbsp;\"._AM_NEWSUB.\"</h4>\";\n\t\techo \"<div id='newsub'>\";\n\t\techo \"<br />\";\n echo \"<div style='text-align: center;'><table width='100%' cellspacing='1' cellpadding='3' border='0' class='outer'><tr class='bg3'><td align='center'>\" . _AM_TITLE . \"</td><td align='center'>\" . _AM_TOPIC . \"</td><td align='center'>\" . _AM_POSTED . \"</td><td align='center'>\" . _AM_POSTER . \"</td><td align='center'>\" . _AM_ACTION . \"</td></tr>\\n\";\n $class='';\n foreach( $storyarray as $newstory )\n {\n $class = ($class == 'even') ? 'odd' : 'even';\n echo \"<tr class='\".$class.\"'><td align='left'>\\n\";\n $title = $newstory->title();\n if (!isset($title) || ($title == \"\" )) {\n echo \"<a href='\".XOOPS_URL.\"/modules/news/admin/index.php?op=edit&amp;returnside=1&amp;storyid=\" . $newstory -> storyid() . \"'>\" . _AD_NOSUBJECT . \"</a>\\n\";\n } else {\n echo \"&nbsp;<a href='\".XOOPS_URL.\"/modules/news/submit.php?returnside=1&amp;op=edit&amp;storyid=\" . $newstory -> storyid() . \"'>\" . $title . \"</a>\\n\";\n }\n echo \"</td><td>\" . $newstory->topic_title() . \"</td><td align='center' class='nw'>\" . formatTimestamp($newstory->created(),$dateformat) . \"</td><td align='center'><a href='\" . XOOPS_URL . \"/userinfo.php?uid=\" . $newstory->uid() . \"'>\" . $newstory->uname() . \"</a></td><td align='right'><a href='\".XOOPS_URL.\"/modules/news/admin/index.php?op=delete&amp;storyid=\" . $newstory->storyid() . \"'>\" . _AM_DELETE . \"</a></td></tr>\\n\";\n }\n echo \"</table></div>\";\n echo \"<br /></div><br />\";\n }\n}", "public function run()\n {\n \n #foreach($this->toTruncate as $table) {\n # DB::table($table)->truncate();\n #}\n \n \n // Parent forum categories\n $general = $this->CreateCategory('General', 'General Discussion', 10);\n $nost = $this->CreateCategory('Odyssey', 'Nostalrius - PvE - Alliance', 20);\n $offtopic = $this->CreateCategory('Off Topic', 'Random Discussion', 30);\n \n // Subcategories\n $public = $this->CreateCategory('Public', 'Public Discussion', 10, $nost->id);\n $guild = $this->CreateCategory('Guild', 'Member only discussion', 20, $nost->id);\n $officer = $this->CreateCategory('Officers', 'Officer Discussion', 30, $nost->id);\n \n // Forums - General\n $this->CreateForum('News and Announcements', 'Important information regarding this site', 10, $general->id);\n $this->CreateForum('Feature Requests', 'Let us know what you would like to see', 20, $general->id);\n $this->CreateForum('General Discussion', 'For discussion related to the site as a whole', 30, $general->id);\n \n // Public\n $this->CreateForum('Guild News', 'Important updates regarding the guild', 10, $public->id);\n $this->CreateForum('Public Discussion', 'All Welcome!', 20, $public->id);\n $this->CreateForum('Rules and Guidelines', 'Things you should read', 30, $public->id);\n \n // Guild\n $this->CreateForum('Member Discussion', 'Private discussion', 10, $guild->id);\n $this->CreateForum('Strategies', 'Collection of strategies to be used', 20, $guild->id);\n $this->CreateForum('Off Topic', 'Post whatever', 30, $guild->id);\n \n // Officer\n $this->CreateForum('Officer Discussion', 'Management Only', 10, $officer->id);\n $this->CreateForum('Applications', 'Applications posted here for discussion', 20, $officer->id);\n \n //Off Topic\n $this->CreateForum('Off Topic', 'Randomness Encouraged', 10, $offtopic->id);\n }" ]
[ "0.682397", "0.68030304", "0.655425", "0.6408482", "0.6391527", "0.6326928", "0.6306945", "0.62996197", "0.62706053", "0.615329", "0.61452824", "0.6124728", "0.6105931", "0.60695803", "0.60664845", "0.6031067", "0.6028963", "0.60231733", "0.6021441", "0.59579223", "0.5940689", "0.5889355", "0.5866106", "0.5855068", "0.58547914", "0.5853822", "0.5846027", "0.58215344", "0.5764743", "0.56936395", "0.5682078", "0.5677991", "0.56727535", "0.56245124", "0.561785", "0.560257", "0.55811936", "0.5573308", "0.55580354", "0.5550752", "0.55469227", "0.5540916", "0.5537804", "0.55236214", "0.5522868", "0.55193996", "0.5518778", "0.55028874", "0.54967976", "0.5489512", "0.5483146", "0.5483034", "0.5480473", "0.5479648", "0.5472056", "0.54694724", "0.54692626", "0.5469104", "0.54640365", "0.545131", "0.54173136", "0.5413528", "0.53856766", "0.5381325", "0.53763723", "0.53699476", "0.5363552", "0.5347889", "0.53452015", "0.53419095", "0.5333649", "0.5331996", "0.53277063", "0.5326263", "0.53227526", "0.53218436", "0.53110933", "0.53066117", "0.53066075", "0.5297352", "0.52929485", "0.5284357", "0.5282065", "0.52688843", "0.5258583", "0.5256315", "0.52534497", "0.5242316", "0.52395993", "0.52380145", "0.5237564", "0.5236219", "0.5220017", "0.5217989", "0.5213599", "0.5210205", "0.5206862", "0.5205208", "0.52042246", "0.5201456" ]
0.6545409
3
........................ comments ..!!.. comments ..!!.. comments ..!!.. comments ..!!..
public function getComments($id){ $id = (int)$id; $sql = "select * from comments WHERE discussion_id = '{$id}'"; return $this->db->query($sql); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function comment();", "function get_comments(){\n\n\t}", "public function next_comment()\n {\n }", "function upgrade_430_fix_comments()\n {\n }", "function the_comment()\n {\n }", "public function comments(){\n }", "protected function get__comments()\n\t{\n\t\treturn NULL;\n\t}", "public function the_comment()\n {\n }", "public function record_comment(){\n\t\t\t\n\t\t}", "public function testProfilePrototypeCountComments()\n {\n\n }", "function obishortcodes_comment_worker() {\n return null;\n}", "function have_comments()\n {\n }", "protected function _refine() {\n\n\t}", "public function testProfilePrototypeGetComments()\n {\n\n }", "public function testProfilePrototypeCreateComments()\n {\n\n }", "function comment_connection($comment) {\nglobal $wpdb;\n\n//replace new lines \\n with line breaks <br /> in order to detect comment reference\n$comment = nl2br($comment);\n\n//replace extra spaces after @\n$r = \"@\";\n$s = \"@ \";\n$i = 1;\n$blank = substr_count($comment, $s);\nif ($blank > 0) \n\t$comment = str_replace($s, $r, $comment, $i);\n\n\t//determine if someone is referencing a comment\n\t$count = substr_count($comment, \"@\");\n\n\tif ($count > 0) {\n\n\t\t//find the post ID without printing to screen\n\t\t$pid = get_the_ID();\n\n\t\t//find the comment ID without printing to screen\n\t\t$cid = get_comment_ID();\n\t\n\t\t//this is the big change\n\t\t//determine all occurances of @ and their following authors\n\t\t//then loads into array\n\t\tpreg_match_all(\"/@(.*)(:|\\<br \\/\\>|,|-)/\", $comment, $out);\n\n\t\tforeach ($out[1] as $ref) {\n\t\t\t//solves little problem with colon usage\n\t\t\tif (substr_count($ref, ':') > 0) \n\t\t\t\t$ref = substr($ref, 0, strpos($ref, ':'));\n\t\t\t//solves other little problem with extra spaces\n\t\t\tif (substr_count($ref, ' ') <= 2)\n\t\t\t\t$array[$x] = $ref;\n\n\t\t\t//retrieve comment info from database\n\t\t\t$d = db_query($pid, $cid, $array[$x]);\n\n\t\t\t//replace the authors with their comment IDs\n\t\t\t//don't worry, that extra i there isn't a spelling mistake\n\t\t\t//it simply means that references with the wrong case are still replaced\n\t\t\tif ($d != NULL) {\n\t\t\t\t$replacement = preg_replace('/\\s$/', '', $array[$x]);\n\t\t\t\t$comment = str_ireplace('@' . $replacement, '@<a href=#comment-' . $d . '>' . $replacement . '</a>', $comment);\n\t\t}\n\t}\n}\nreturn $comment; //print the modified comments\n}", "function __desctuct(){\r\n\t\t?>\r\n\r\n\t\t</body>\r\n\t\t</html>\r\n\t\t<?php\r\n\t}", "function separate_comments(&$comments)\n {\n }", "function wap8_trackbacks( $comment ) {\n$GLOBALS['comment'] = $comment; ?>\n<li><?php printf( __( '%s', 'designcrumbs' ), get_comment_author_link() ) ?> <?php edit_comment_link( __( 'Edit', 'designcrumbs' ), '<span>', '</span>' ); ?>\n<?php\n}", "function newUnderComment();", "public function recent_comments_style()\n {\n }", "function iterateComments(){\n $this->commentsNumber += 1;\n }", "public function testProfilePrototypeFindByIdComments()\n {\n\n }", "public function testProfilePrototypeExistsComments()\n {\n\n }", "public function helper()\n\t{\n\t\n\t}", "function dp_trackback_source ($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; ?>\n<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID() ?>\">\n<div id=\"comment-<?php comment_ID(); ?>\">\n<div class=\"comment-author vcard clearfix\">\n<?php printf(__('<cite class=\"comment_author_name icon-home\">%s</cite>'), get_comment_author_link()) ?>\n<div class=\"comment-meta commentmetadata\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php printf(__('%1$s at %2$s','DigiPress'), get_comment_date(), get_comment_time()) ?></a><?php edit_comment_link(__('(Edit)',''),' ','') ?></div>\n</div>\n<?php if ($comment->comment_approved == '0') : ?>\n<p><?php _e('Your trackback is awaiting moderation.', 'DigiPress') ?></p>\n<?php endif; ?>\n<div><?php comment_text() ?></div>\n</div>\n<?php }", "function fix() ;", "private function _i() {\n }", "private function j() {\n }", "function tcf_end_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n </div></div>\n<?php\n}", "public function rewind_comments()\n {\n }", "function tz_list_pings($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; ?>\n<li id=\"comment-<?php comment_ID(); ?>\"><?php comment_author_link(); ?>\n<?php }", "public function have_comments()\n {\n }", "function getContent() ;", "function bones_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n <div id=\"comment-<?php comment_ID(); ?>\" <?php comment_class('cf'); ?>>\n <?php echo comment_placeholder($comment, $args, $depth); ?>\n <?php // </li> is added by WordPress automatically ?>\n<?php\n}", "function buildRecentComments($comments) {\n foreach($comments as $comment){\n echo \"<div class=\\\"panel-body\\\">\\n\n <p>$comment[1] on <a href=\\\"/phase5/pages/info.php?id=$comment[4]\\\">$comment[3]</a></p>\\n\n <p class=\\\"well\\\">$comment[0]</p>\\n\n </div>\\n\";\n }\n}", "private function __() {\n }", "function list_pings($comment, $args, $depth) {\r\n\r\n\t$GLOBALS['comment'] = $comment; ?>\r\n\t\r\n\t<li id=\"comment-<?php comment_ID(); ?>\">\r\n\t\t<span class=\"author\"><?php comment_author_link(); ?></span> - \r\n\t\t<span class=\"date\"><?php echo get_comment_date() ?></span>\r\n\t\t<span class=\"pingcontent\"><?php comment_text() ?></span>\r\n\r\n<?php \r\n}", "function mCOMMENT(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$COMMENT;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:616:3: ( '#' ( . )* EOL ) \n // Tokenizer11.g:617:3: '#' ( . )* EOL \n {\n $this->matchChar(35); \n // Tokenizer11.g:617:7: ( . )* \n //loop35:\n do {\n $alt35=2;\n $LA35_0 = $this->input->LA(1);\n\n if ( ($LA35_0==$this->getToken('10')||$LA35_0==$this->getToken('13')) ) {\n $alt35=2;\n }\n else if ( (($LA35_0>=$this->getToken('0') && $LA35_0<=$this->getToken('9'))||($LA35_0>=$this->getToken('11') && $LA35_0<=$this->getToken('12'))||($LA35_0>=$this->getToken('14') && $LA35_0<=$this->getToken('65535'))) ) {\n $alt35=1;\n }\n\n\n switch ($alt35) {\n \tcase 1 :\n \t // Tokenizer11.g:617:7: . \n \t {\n \t $this->matchAny(); \n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop35;\n }\n } while (true);\n\n $this->mEOL(); \n $_channel = HIDDEN; \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 get_comments()\n {\n }", "function dp_comment_source ($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; ?>\n<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID() ?>\">\n<div id=\"comment-<?php comment_ID(); ?>\">\n<div class=\"comment-author vcard clearfix\">\n<div class=\"comment-avator\"><?php echo get_avatar($comment,$size='60'); ?></div>\n<?php printf(__('<cite class=\"comment_author_name\">By %s</cite>'), get_comment_author_link()) ?>\n<div class=\"comment-meta commentmetadata\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php printf(__('%1$s at %2$s','DigiPress'), get_comment_date(), get_comment_time()) ?></a><?php edit_comment_link(__('(Edit)',''),' ','') ?><?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n</div>\n</div>\n<?php if ($comment->comment_approved == '0') : ?>\n<p><?php _e('Your comment is awaiting moderation.', 'DigiPress') ?></p>\n<?php endif; ?>\n<?php comment_text() ?>\n</div>\n<?php }", "public function testProfilePrototypeLinkComments()\n {\n\n }", "function check_comment_flood_db()\n {\n }", "static function before(){\n\t\t$text = \"\n\t\t\\n== Background == \n\t\tThis databrowser queries data from this paper. <ref name='PMID:########'/>\n\t\t\n\t\t\\n== References ==\n\t\t<references/>\n\t\t\t\n\t\t\\n== Search ==\n\t\t\";\n\treturn $text;\n\t}", "function register_block_core_comments()\n {\n }", "function testInternal2() \n {\n $this->assertTrue(array_key_exists(T_COMMENT, $this->oBeaut->aTokenFunctions));\n }", "function make_comments($comment, $level,$editable)\n{\n\tglobal $comments,$userdata,$board_config,$lang;\n\t$comment_infos['level'] = $level;\n\t$comment_infos['id'] = $comment->id; //get_id();\n\t$comment_infos['text'] = nl2br(htmlspecialchars($comment->get_feedback()));\n\t$comment_userdata = get_userdata(intval($comment->get_user_id()));\n\t$comment_infos['username'] = $comment_userdata['username'];\n\tswitch( $comment_userdata['user_avatar_type'] )\n\t{\n\t\tcase USER_AVATAR_UPLOAD:\n\t\t\t$poster_avatar = ( $board_config['allow_avatar_upload'] ) ? '<img src=\"'.PHPBB_PATH . $board_config['avatar_path'] . '/' . $comment_userdata['user_avatar'] . '\" alt=\"\" border=\"0\" />' : '';\n\t\t\tbreak;\n\t\tcase USER_AVATAR_REMOTE:\n\t\t\t$poster_avatar = ( $board_config['allow_avatar_remote'] ) ? '<img src=\"'. $comment_userdata['user_avatar'] . '\" alt=\"\" border=\"0\" />' : '';\n\t\t\tbreak;\n\t\tcase USER_AVATAR_GALLERY:\n\t\t\n\t\t\t$poster_avatar = ( $board_config['allow_avatar_local'] ) ? '<img src=\"'.PHPBB_PATH . $board_config['avatar_gallery_path'] . '/' . $comment_userdata['user_avatar'] . '\" alt=\"\" border=\"0\" />' : '';\n\t\t\tbreak;\n\t}\n\t\n\t$comment_infos['avatar'] = $poster_avatar;\n\t$comment_infos['topic'] = htmlspecialchars($comment->get_topic());\n\t$comment_infos['creation_date'] = date($userdata['user_dateformat'],strtotime($comment->get_creation_date()));\n\t$comment_infos['changed_count'] = $comment->get_changed_count();\n\t$comment_infos['last_changed_date'] = date($userdata['user_dateformat'],strtotime($comment->get_last_changed_date()));\n\t$comment_infos['poster_name'] = htmlspecialchars($comment->get_poster_name());\n\t$comment_infos['comment_has_been_changed'] = sprintf($lang['comment_has_been_changed'],$comment_infos['changed_count'],$comment_infos['last_changed_date']);\n\tif (($comment_userdata['user_id'] == $userdata['user_id']) or ($editable))\n\t{\n\t\t$comment_infos['editable'] = true;\n\t}\n\t\n\t// check if comment is new\n\t\n\t$newest = strtotime($comment->get_creation_date());\n\tif (strtotime($comment->get_last_changed_date()) > $newest)\n \t{\n \t\t$newest = strtotime($comment->get_last_changed_date());\n \t}\n\t\n\t//echo date(\"Y-m-d H:i:s\",$userdata['user_lastvisit']).\"<br>\";\n\t\n\t\n\tif ($userdata['user_lastvisit'] < $newest)\n\t{\n\t\t$comment_infos['new'] = true;\n\t}\n\t\n\t$comments[] = $comment_infos;\n\t\n\t//echo ($comment->get_feedback().\"<br>\");\n\t$comment_childs = $comment->get_childs();\n\tif (is_array($comment_childs))\n\t{\n\t\tfor ($i = 0; $i < sizeof($comment_childs); $i++)\n\t\t{\n\t\t\tmake_comments($comment_childs[$i],$level+1,$editable);\n\t\t}\n\t}\n}", "function get_comments_by_module(){\n\n\t}", "function df_disable_comments_status()\n{\n return false;\n}", "function tempera_comments_on() {\nglobal $temperas;\nforeach ($temperas as $key => $value) { ${\"$key\"} = $value; }\t\n\tif ( comments_open() && ! post_password_required() && $tempera_blog_show['comments'] && ! is_single()) :\n\t\tprint '<div class=\"comments-link\"><i class=\"icon-comments icon-metas\" title=\"' . __('Comments', 'tempera') . '\"></i>';\n\t\tprintf ( comments_popup_link( __( '<b>0</b>', 'tempera' ), __( '<b>1</b>', 'tempera' ), __( '<b>%</b>', 'tempera' ),(''),__('<b>-</b>','tempera') ));\n\t\tprint '</div>';\n\tendif;\n}", "static public function upd_comment_stat(object $pp1, array $other=[]): string\n {\n self::$pp1 = $pp1 ;\n if (isset($pp1->shared_dbadapter_obj)) self::$utldb = $pp1->shared_dbadapter_obj ;\n //copy of an already created object can be made by cloning it.\n $uriq = $pp1->uriq ;\n if ('') { echo '<br /><h3>'.__METHOD__ .', line '. __LINE__ .' SAYS:</h3>'\n .'<br />works if redirect commented U R L query array ='.'$u riq=' ;\n if (isset($uriq))\n { echo '<pre>'; print_r($uriq) ; echo '</pre>'; }\n else { echo ' u riq arr. not set<br />' ; } \n //echo '<br />c l a s s name of $dm='.get_class($dm);\n }\n // outputs :\n //c l a s s name of $dm=B12phpfw\\Home_ctr\n //c l a s s name of $Db_post_comment=B12phpfw\\Db_post_comment\n\n $flds = \"SET status=:status, approvedby=:admin\" ;\n $qrywhere = \"WHERE id=:id\" ;\n\n $id = $uriq->id ;\n $stat = $uriq->stat ;\n $binds = [\n ['placeh'=>':status', 'valph'=>$stat, 'tip'=>'str']\n ,['placeh'=>':admin', 'valph'=>$_SESSION[\"adminname\"], 'tip'=>'str']\n ,['placeh'=>':id', 'valph'=>$id, 'tip'=>'int']\n ] ;\n\n $cursor = self::$utldb::uu( self::$tbl, $flds, $qrywhere, $binds );\n\n if ($cursor) {\n if ($stat == 'ON') {$_SESSION[\"MsgSuccess\"]=\"Comment $id approved ! \" ;\n } else {$_SESSION[\"MsgSuccess\"]=\"Comment $id DisApproved ! \" ;}\n }\n else { $_SESSION[\"MsgErr\"]=\"Update Comment $id Went Wrong (Comment approve failed). Try Again !\"; }\n\n /* ?><SCRIPT LANGUAGE=\"JavaScript\">\n alert( \"<?php echo __METHOD__ .', line '. __LINE__ .' SAYS: '\n .'\\\\n $dm->pp1[\\'comments\\']=' \n . (isset($dm->pp1->comments)?$dm->pp1->comments:'NOT SET')\n ; ?>\" \n ) ;\n </SCRIPT><?php */ //works if redirect commented\n //$dm->Redirect_to($dm->pp1->comments);\n return '1';\n }", "function comment_excerpt($comment_id = 0)\n {\n }", "function get_comment_ID()\n {\n }", "function comment_text_rss()\n {\n }", "public function providerMakeComments() {\n return [\n [\n '/* */ ',\n [''],\n ],\n [\n '/* Exploit * / DROP TABLE node. -- */ ',\n ['Exploit * / DROP TABLE node; --'],\n ],\n [\n '/* Exploit * / DROP TABLE node. --. another comment */ ',\n ['Exploit * / DROP TABLE node; --', 'another comment'],\n ],\n ];\n }", "function getCommentsHTML(&$data){\n\t\tglobal $_JC_CONFIG, $_JCPROFILER, $_JOMCOMMENT;\n\t\tglobal $mosConfig_cachepath, $mosConfig_live_site, $mosConfig_absolute_path, $my, $mosConfig_debug;\n\t\t\n\t\t//$comments_tpl \t= new Template(); // this is the inner template\n\t\t$cacheid = \"\";\n\t\tif(is_array($data)){\n\t\t\t$cacheid = strval(count($data));\n\t\t}\n\t\t\n\t\t$_JCPROFILER->mark('Serialize:');\n\t\t$comments_tpl \t= new AzrulJXCachedTemplate(serialize($data). $my->id .$_JC_CONFIG->get('template') );\n\t\t$_JCPROFILER->mark('Building Jom COmment:');\n\t\t\n\t\tif(!$comments_tpl->is_cached()){\n\t\t\t$dataArray = array();\n\t\t\t$styleOffset = 0;\n\t\t\t$createdBy\t = 0;\n\t\t\t$_JCPROFILER->mark('Load List:');\n\t\t\t\n\t\t\t# The data could be an array or a single data. Convert it all to array. \n\t\t\t# if it is a single data, we need to make sure we get the corret style\n\t\t\tif(is_array($data)){\n\t\t\t\t$dataArray = $data;\n\t\t\t} else if(isset($data)){\n\t\t\t\t$dataArray = array();\n\t\t\t\t$dataArray[] = $data;\n\t\t\t\t$numComment = $_JOMCOMMENT->_dataMgr->getNumComment($data->contentid, $data->option);\n\t\t\t\t$styleOffset = intval(!($numComment & 1));\n\t\t\t}else {\n\t\t\t\t$dataArray = array();\n\t\t\t}\n\t\t\t\n\t\t\t# If the data is for \"com_content\", we need to find the content author \n\t\t\t# to apply the author specific css\n\t\t\tif($dataArray)\n\t\t\t\tif($dataArray[0]->option == 'com_content'){\n\t\t\t\t\t$createdBy = jcContentAuthorGet($dataArray[0]->contentid);\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\n\t\t\t$styles = explode(\",\", $_JC_CONFIG->get('cycleStyle'));\n\t\t\tarray_walk($styles, \"jctrim\");\n\t\t\t$numStyle = count($styles);\n\t\t\t$styleCount = 1;\n\t\t\t$size = @count($dataArray);\n\t\t\tfor($i = 0; $i < $size; $i++) {\n\t\t\t\t$style = ($styleCount+ $styleOffset) % $numStyle;\n\t\t\t\t$style = $styles[$style];\n\t\t\t\tif (isset($dataArray[$i]->created_by) && ($dataArray[$i]->user_id != 0) && ($dataArray[$i]->user_id == $dataArray[$i]->created_by)) {\n\t\t\t\t\t$style .= \" \". $_JC_CONFIG->get('authorStyle');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->prepData($dataArray[$i], $i+1, $style);\n\t\t\t\t$dataArray[$i]->style = $style;\n\t\t\t\t\n\t\t\t\t$dataArray[$i]->comment = $this->censorText(stripslashes($dataArray[$i]->comment));\n\t\t\t\t$dataArray[$i]->title = $this->censorText($dataArray[$i]->title);\n\t\t\t\t$dataArray[$i]->name = $this->censorText($dataArray[$i]->name);\n\t\t\t\t\n\t\t\t\t# apply the shorted URL filter\n\t\t\t\t$dataArray[$i]->comment = $this->shortenURL($dataArray[$i]->comment);\n\t\t\t\t$dataArray[$i]->title \t= $this->shortenURL($dataArray[$i]->title);\t\t\t\t\n\t\t\t\t\n\t\t\t\t$styleCount++;\n\t\t\t}\n\t\t\t\n\t\t\t// Make sure $dataArray is not empty\n\t\t\tif(!$dataArray){\n\t\t\t\t$dataArray = array();\n\t\t\t}\n\t\t\t$comments_tpl->set('adminPanel', \"\"); \n\t\t\t$comments_tpl->set('comments', $dataArray);\n\t\t\t$comments_tpl->set('debugview', false);\n\t\t}\n\t\t\n\t\t\n\t\t$html = $comments_tpl->fetch_cache(JC_BOT_PATH . \"templates/\" .$_JC_CONFIG->get('template') .'/comment.tpl.html');\n\t\t$_JCPROFILER->mark('Fetch Cache:');\n\t\t$html = trim($html); \n\t\t\n\t\t# Censored code cannot be applied here since it will affect the untranslated\n\t\t# test as well\t\t\n\t\t//$html = $this->censorText($html);\n\t\t$html = $this->_translateTemplate($html);\n\t\treturn $html;\n\t}", "function _pre() {\n\n\t}", "public function ogs()\r\n {\r\n }", "public function templateComment()\n {\n // just showing how powerful can commenting be with extension\n }", "protected function get_comment_ids()\n {\n }", "function custom_comment($comment, $args, $depth) {\r\n $GLOBALS['comment'] = $comment; ?>\r\n\r\n <?php if (!$comment->comment_parent) { ?>\r\n <?php $GLOBALS['comment_r_count'] = 0; ?>\r\n \t<a name=\"comment-<?php comment_ID() ?>\"></a>\r\n\t<div class=\"comment_entry <?php comment_class(); ?>\" id=\"li-comment-<?php comment_ID() ?>\">\r\n\t\t<div class=\"comments_entry_top\"></div>\r\n\t\t<div class=\"comments_entry_middle\">\r\n\t\t\t<div class=\"user_info\">\r\n\t\t\t\t<p class=\"name\"><?php the_commenter_link() ?></p>\r\n\t\t\t\t<p class=\"entry_info\"><?php echo get_comment_date() ?></p>\r\n\t\t\t</div>\r\n\t\t\t<!-- .user_info -->\r\n\r\n\r\n<?php $reply_enable = get_option('thread_comments');\r\n \r\n if( $reply_enable == 1 ) { ?>\r\n\t\t\t<div class=\"add_a_comment\">\r\n\t\t\t\t<div class=\"older_articles\">\r\n\t\t\t\t\t<div class=\"button_left\"></div>\r\n\t\t\t\t\t<div class=\"button_middle\"><?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?></div>\r\n\t\t\t\t\t<div class=\"button_right\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<!-- .add_a_comment -->\r\n <?php }?>\r\n\r\n\r\n\t\t\t<div class=\"clear_container\"></div>\r\n\t <?php \r\n\t //$text =get_option('thread_comments');\r\n//print_r ($text); \r\n\t \r\n\t //print_r ($comment); ?>\r\n\t\t\t<?php comment_text() ?>\r\n\t\t\t<?php if ($comment->comment_approved == '0') { ?>\r\n\t\t\t\t<p class='unapproved'><?php _e('Your comment is awaiting moderation.', 'tfuse'); ?></p>\r\n\t\t\t<?php } ?>\r\n\r\n\t\t</div>\r\n\t\t<div class=\"comments_entry_bottom\"></div>\r\n\t</div>\r\n\t<br />\r\n\t<!-- .comment_entry -->\r\n\t\r\n <?php } else { ?>\r\n <?php $GLOBALS['comment_r_count'] ++; ?>\r\n\t\t<a name=\"comment-<?php comment_ID() ?>\"></a>\r\n\t\t<?php $stylesheet = explode( '-', get_option(PREFIX.\"_alt_stylesheet\") ); if($stylesheet[0]=='light') $logofolder = 'light'; else $logofolder = 'dark'; ?>\r\n\t\t<img class=\"reply_icon\" src=\"<?php echo get_bloginfo('template_directory').'/styles/'.$logofolder ?>/images/reply_icon.gif\" alt=\"\" />\r\n\t\t<div class=\"comment_entry reply\">\r\n\t\t\t<div class=\"reply_top\"></div>\r\n\t\t\t<div class=\"reply_middle\">\r\n\t\t\t\t<div class=\"user_info\">\r\n\t\t\t\t\t<p class=\"name\"><?php the_commenter_link() ?></p>\r\n\t\t\t\t\t<p class=\"entry_info\"><?php echo get_comment_date() ?></p>\r\n\t\t\t\t</div>\r\n\t\t\t\t<!-- .user_info -->\r\n\t\t\t\t<div class=\"clear_container\"></div>\r\n\t\t \t\t\t<?php comment_text(); ?>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"reply_bottom\"></div>\r\n\t\t</div>\r\n\t\t<!-- .comment_entry -->\r\n\t\t<div class=\"clear_container\"></div>\r\n\t\t<br />\r\n <?php } ?>\r\n\t\t\r\n<?php \r\n}", "public function getComments() {}", "function starter_comment_block() {\n $items = array();\n $number = variable_get('comment_block_count', 10);\n\n foreach (comment_get_recent($number) as $comment) {\n //kpr($comment->changed);\n //print date('Y-m-d H:i', $comment->changed);\n $items[] =\n '<h3>' . l($comment->subject, 'comment/' . $comment->cid, array('fragment' => 'comment-' . $comment->cid)) . '</h3>' .\n ' <time datetime=\"'.date('Y-m-d H:i', $comment->changed).'\">' . t('@time ago', array('@time' => format_interval(REQUEST_TIME - $comment->changed))) . '</time>';\n }\n\n if ($items) {\n return theme('item_list', array('items' => $items, 'daddy' => 'comments'));\n }\n else {\n return t('No comments available.');\n }\n}", "function ffeeeedd_comment( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment;\n switch ( $comment->comment_type ) {\n case 'pingback' :\n case 'trackback' :\n // On affiche différemment les trackbacks. ?>\n <li <?php comment_class(); ?>>\n <p><?php _e( 'Pingback :', 'ffeeeedd' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'ffeeeedd' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n <?php break;\n default :\n // On passe aux commentaires standards.\n global $post; ?>\n <li itemscope itemtype=\"http://schema.org/UserComments\">\n <article role=\"article\">\n <header>\n <?php echo get_avatar( $comment, 44 );\n printf( '<cite itemprop=\"creator\">%1$s %2$s</cite>',\n get_comment_author_link(),\n ( $comment->user_id === $post->post_author ) ? '<small> (' . __( 'Post author', 'ffeeeedd' ) . ' ) </small>' : ''\n );\n printf( '<time datetime=\"%2$s\" itemprop=\"commentTime\">%3$s</time>',\n esc_url( get_comment_link( $comment->comment_ID ) ),\n get_comment_time( 'c' ),\n sprintf( '%1$s à %2$s', get_comment_date(), get_comment_time() )\n ); ?>\n </header>\n\n <?php if ( '0' == $comment->comment_approved ) { ?>\n <p><?php _e( 'Your comment is awaiting moderation.', 'ffeeeedd' ); ?>.</p>\n <?php } ?>\n\n <div itemprop=\"commentText\">\n <?php comment_text(); ?>\n <?php edit_comment_link( __( 'Edit', 'ffeeeedd' ), '<p>', '</p>' ); ?>\n </div>\n\n <div class=\"reply\" itemprop=\"replyToUrl\">\n <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'ffeeeedd' ), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n </div>\n </article>\n <?php break;\n }\n }", "function bones_comments($comment, $args, $depth) {\r\n $GLOBALS['comment'] = $comment; ?>\r\n\t<li <?php comment_class(); ?>>\r\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"clearfix\">\r\n\t\t\t<header class=\"comment-author vcard\">\r\n\t\t\t\t<?php echo get_avatar($comment,$size='32',$default='<path_to_url>' ); ?>\r\n\t\t\t\t<?php printf(__('<cite class=\"fn\">%s</cite>'), get_comment_author()) ?>\r\n\t\t\t\t<time><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php printf(__('%1$s'), get_comment_date(), get_comment_time()) ?></a></time>\r\n\t\t\t\t<?php edit_comment_link(__('(Edit)'),' ','') ?>\r\n\t\t\t</header>\r\n\t\t\t<?php if ($comment->comment_approved == '0') : ?>\r\n \t\t\t<div class=\"help\">\r\n \t\t\t<p><?php _e('Your comment is awaiting moderation.') ?></p>\r\n \t\t</div>\r\n\t\t\t<?php endif; ?>\r\n\t\t\t<section class=\"comment_content clearfix\">\r\n\t\t\t\t<?php comment_text() ?>\r\n\t\t\t</section>\r\n\t\t\t<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\r\n\t\t</article>\r\n <!-- </li> is added by wordpress automatically -->\r\n<?php\r\n}", "public function boleta()\n\t{\n\t\t//\n\t}", "function __construct() { //phpcs:ignore ?>\n\n\t\t\t<h3><?php comments_number( __( 'No Responses to', 'foundationpress' ), __( 'One Response to', 'foundationpress' ), __( '% Responses to', 'foundationpress' ) ); ?> &#8220;<?php the_title(); ?>&#8221;</h3>\n\t\t\t<ol class=\"comment-list\">\n\n\t\t\t<?php\n\t\t}", "function bones_comments($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; ?>\n\t<li <?php comment_class(); ?>>\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"clearfix\">\n\t\t\t<header class=\"comment-author vcard\">\n\t\t\t\t<?php echo get_avatar($comment,$size='32',$default='<path_to_url>' ); ?>\n\t\t\t\t<?php printf(__('<cite class=\"fn\">%s</cite>'), get_comment_author_link()) ?>\n\t\t\t\t<time><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php printf(__('%1$s'), get_comment_date(), get_comment_time()) ?></a></time>\n\t\t\t\t<?php edit_comment_link(__('(Edit)'),' ','') ?>\n\t\t\t</header>\n\t\t\t<?php if ($comment->comment_approved == '0') : ?>\n \t\t\t<div class=\"help\">\n \t\t\t<p><?php _e('Your comment is awaiting moderation.') ?></p>\n \t\t</div>\n\t\t\t<?php endif; ?>\n\t\t\t<section class=\"comment_content clearfix\">\n\t\t\t\t<?php comment_text() ?>\n\t\t\t</section>\n\t\t\t<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n\t\t</article>\n <!-- </li> is added by wordpress automatically -->\n<?php\n}", "function post_process() {\n $this->_format_doc_comment();\n }", "function starkers_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment; \n\t?>\n\t<?php if ( $comment->comment_approved == '1' ): ?>\t\n\t<li>\n\t\t<article id=\"comment-<?php comment_ID() ?>\">\n\t\t\t<?php echo get_avatar( $comment ); ?>\n\t\t\t<h4><?php comment_author_link() ?></h4>\n\t\t\t<time><a href=\"#comment-<?php comment_ID() ?>\" pubdate><?php comment_date() ?> at <?php comment_time() ?></a></time>\n\t\t\t<?php comment_text() ?>\n\t\t</article>\n\t<?php endif; ?>\n\t</li>\n\t<?php \n}", "function comment_type($commenttxt = \\false, $trackbacktxt = \\false, $pingbacktxt = \\false)\n {\n }", "function f()\n\t{\n\t\t// Comment in an empty function 1\n\t\t// Comment in an empty function 2\n\t}", "public function getComment() {}", "protected function _getLines() {}", "function register_block_core_comment_content()\n {\n }", "function voyage_mikado_comments_title() {\n ?>\n\n <div class=\"mkdf-comment-number\">\n <div class=\"mkdf-comment-number-inner\">\n <h3><?php comments_number(esc_html__('No Comments', 'voyage'), ''.esc_html__(' Comment ', 'voyage'), ' '.esc_html__(' Comments: ', 'voyage')); ?></h3>\n </div>\n </div>\n\n <?php\n }", "function warquest_home_comment_edit_do() {\r\n\r\n\t/* input */\r\n\tglobal $mid;\r\n\tglobal $sid;\r\n\tglobal $uid;\r\n\tglobal $other;\r\n\t\t \r\n\t/* output */\r\n\tglobal $page;\r\n\t\t\t\r\n\tif ($uid!=0) {\r\n\t\t$query = 'select comment from comment where id='.$uid;\r\n\t\t$result = warquest_db_query($query);\r\n\t\t$data = warquest_db_fetch_object($result);\r\n\t\t\r\n\t\t$comment = $data->comment;\r\n\t\t\r\n\t} else {\r\n\t\r\n\t\t/* Clear input parameters */\r\n\t\t$comment = \"\";\r\n\t}\r\n\t\r\n\t$page .= \"<script language=\\\"JavaScript\\\" type=\\\"text/javascript\\\">function limitText(limitField, limitNum) { if (limitField.value.length >= limitNum) { limitField.value = limitField.value.substring(0, limitNum); } } </script>\";\r\n\t\t\r\n\t$page .= '<div class=\"box\">';\t\r\n\t\r\n\t$page .= '<table>';\r\n\t$page .= '<tr>';\r\n\t$page .= '<td width=\"500\">';\r\n\r\n\tif (isset($other->pid)) {\r\n\t\t$tmp = player_format($other->pid, $other->name, $other->country);\r\n\t} else {\r\n\t\t$tmp = t('GENERAL_ALL');\r\n\t}\r\n\t$page .= t('ALLIANCE_COMMENT_TEXT2', $tmp).'<br/>'; \r\n\t\r\n\t$page .= '<textarea style=\"width:100%\" id=\"comment\" name=\"comment\" rows=\"5\" ';\r\n\t$page .= 'onKeyDown=\"limitText(this,400)\">'.$comment.'</textarea><br/>';\r\n\t$page .= warquest_show_smilies();\r\n\t$page .= '<br/><br/>';\r\n\t\r\n\tif (isset($other->pid)) {\r\n\t\t$page .= warquest_link('mid='.$mid.'&sid='.$sid.'&eid='.EVENT_HOME_COMMENT_SAVE.'&oid='.$other->pid.'&uid='.$uid, t('LINK_SAVE'), 'save').' ';\r\n\t} else {\r\n\t\t$page .= warquest_link('mid='.$mid.'&sid='.$sid.'&eid='.EVENT_HOME_COMMENT_SAVE.'&uid='.$uid, t('LINK_SAVE'), 'save').' ';\r\n\t}\r\n\t\r\n\tif ($uid!=0) {\r\n\t\t$page .= ' ';\r\n\t\t$page .= warquest_link('mid='.$mid.'&sid='.$sid.'&eid='.EVENT_HOME_COMMENT_DELETE.'&uid='.$uid, t('LINK_DELETE'), 'delete');\r\n\t}\r\n\t\r\n\t$page .= '</td>';\r\n\t$page .= '</tr>';\r\n\t$page .= '</table>';\r\n\r\n\t$page .= '</div>';\t\r\n}", "function df_disable_comments_status()\r\n\t{\r\n\t\treturn false;\r\n\t}", "public function AggiornaPrezzi(){\n\t}", "public function nadar()\n {\n }", "private function inlineComment()\n {\n do {\n $this->next();\n if ($this->currentByte === \"\\n\" || $this->currentByte === \"\\r\") {\n $this->next();\n\n return;\n }\n } while ($this->currentByte !== null);\n }", "function pixelgrade_shape_comment( $comment, $args, $depth ) {\n\t\tswitch ( $comment->comment_type ) :\n\t\t\tcase 'pingback':\n\t\t\tcase 'trackback':\n\t\t\t\t?>\n\t\t\t\t<li class=\"post pingback\">\n\t\t\t\t<p><?php esc_html_e( 'Pingback:', '__components_txtd' ); ?><?php comment_author_link(); ?><?php edit_comment_link( esc_html__( '(Edit)', '__components_txtd' ), ' ' ); ?></p>\n\t\t\t\t<?php\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t?>\n\t\t\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t\t\t<article id=\"div-comment-<?php comment_ID(); ?>\" class=\"comment__wrapper\">\n\t\t\t\t\t<?php if ( 0 != $args['avatar_size'] ) : ?>\n\t\t\t\t\t\t<div class=\"comment__avatar\"><?php echo get_avatar( $comment, $args['avatar_size'] ); ?></div>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t<div class=\"comment__body\">\n\t\t\t\t\t\t<header class=\"c-meta\">\n\t\t\t\t\t\t\t<div class=\"comment__author vcard\">\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t/* translators: %s: comment author link */\n\t\t\t\t\t\t\t\tprintf( wp_kses_post( __( '%s <span class=\"says\">says:</span>', '__components_txtd' ) ), sprintf( '<b class=\"fn\">%s</b>', get_comment_author_link( $comment ) ) );\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t</div><!-- .comment-author -->\n\n\t\t\t\t\t\t\t<div class=\"comment__metadata\">\n\t\t\t\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link( $comment, $args ) ); ?>\">\n\t\t\t\t\t\t\t\t\t<time datetime=\"<?php esc_attr( get_comment_time( 'c' ) ); ?>\">\n\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t/* translators: 1: comment date, 2: comment time */\n\t\t\t\t\t\t\t\t\t\tprintf( esc_html__( '%1$s at %2$s', '__components_txtd' ), esc_html( get_comment_date( '', $comment ) ), esc_html( get_comment_time() ) );\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t</time>\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t<?php edit_comment_link( esc_html__( 'Edit', '__components_txtd' ), '<span class=\"edit-link\">', '</span>' ); ?>\n\t\t\t\t\t\t\t</div><!-- .comment-metadata -->\n\n\t\t\t\t\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php esc_html_e( 'Your comment is awaiting moderation.', '__components_txtd' ); ?></p>\n\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t</header><!-- .comment-meta -->\n\n\t\t\t\t\t\t<div class=\"comment__content\">\n\t\t\t\t\t\t\t<?php comment_text( $comment ); ?>\n\t\t\t\t\t\t</div><!-- .comment-content -->\n\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\tcomment_reply_link(\n\t\t\t\t\t\t\tarray_merge(\n\t\t\t\t\t\t\t\t$args, array(\n\t\t\t\t\t\t\t\t\t'add_below' => 'div-comment',\n\t\t\t\t\t\t\t\t\t'depth' => $depth,\n\t\t\t\t\t\t\t\t\t'max_depth' => $args['max_depth'],\n\t\t\t\t\t\t\t\t\t'before' => '<div class=\"reply\">',\n\t\t\t\t\t\t\t\t\t'after' => '</div>',\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$comment\n\t\t\t\t\t\t);\n\t\t\t\t\t\t?>\n\t\t\t\t\t</div>\n\t\t\t\t</article><!-- .comment-body -->\n\t\t\t\t<?php\n\t\t\t\tbreak;\n\t\tendswitch;\n\t}", "function parse_comments ( &$comment_text, &$comment_author, $comment_email )\n\t{\n\t\tglobal $cbwordwrap, $wwwidth, $bbc, $htc, $wfcom, $comallowbr, $smilcom;\n \n $comment_text = str_replace ('&br;', ($comallowbr ? '<br />': ''), $comment_text);\n $comment_text = format_message ($comment_text, $htc, $bbc, $smilcom, $wfcom);\n\n\t\tif ( !empty ($comment_email) )\n\t\t{\n\t\t\t$comment_author = '<a href=\"mailto:' . $comment_email . '\">' . $comment_author . '</a>';\n\t\t}\n\t}", "function comment_ID()\n {\n }", "function register_block_core_latest_comments()\n {\n }", "function itstar_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n <div id=\"comment-<?php comment_ID(); ?>\" <?php comment_class('cf'); ?>>\n <article class=\"cf\">\n <header class=\"comment-author vcard\">\n <?php\n /*\n this is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n echo get_avatar($comment,$size='32',$default='<path_to_url>' );\n */\n ?>\n <?php // custom gravatar call ?>\n <?php\n // create variable\n $bgauthemail = get_comment_author_email();\n ?>\n <img data-gravatar=\"http://www.gravatar.com/avatar/<?php echo md5( $bgauthemail ); ?>?s=40\" class=\"load-gravatar avatar avatar-48 photo\" height=\"40\" width=\"40\" src=\"<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif\" />\n <?php // end custom gravatar call ?>\n <?php printf(__( '<cite class=\"fn\">%1$s</cite> %2$s', 'itstar' ), get_comment_author_link(), edit_comment_link(__( '(Edit)', 'itstar' ),' ','') ) ?>\n <time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time(__( 'F jS, Y', 'itstar' )); ?> </a></time>\n\n </header>\n <?php if ($comment->comment_approved == '0') : ?>\n <div class=\"alert alert-info\">\n <p><?php _e( 'Your comment is awaiting moderation.', 'itstar' ) ?></p>\n </div>\n <?php endif; ?>\n <section class=\"comment_content cf\">\n <?php comment_text() ?>\n </section>\n <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n </article>\n <?php // </li> is added by WordPress automatically ?>\n<?php\n}", "function itstar_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n <div id=\"comment-<?php comment_ID(); ?>\" <?php comment_class('cf'); ?>>\n <article class=\"cf\">\n <header class=\"comment-author vcard\">\n <?php\n /*\n this is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n echo get_avatar($comment,$size='32',$default='<path_to_url>' );\n */\n ?>\n <?php // custom gravatar call ?>\n <?php\n // create variable\n $bgauthemail = get_comment_author_email();\n ?>\n <img data-gravatar=\"http://www.gravatar.com/avatar/<?php echo md5( $bgauthemail ); ?>?s=40\" class=\"load-gravatar avatar avatar-48 photo\" height=\"40\" width=\"40\" src=\"<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif\" />\n <?php // end custom gravatar call ?>\n <?php printf(__( '<cite class=\"fn\">%1$s</cite> %2$s', 'itstar' ), get_comment_author_link(), edit_comment_link(__( '(Edit)', 'itstar' ),' ','') ) ?>\n <time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time(__( 'F jS, Y', 'itstar' )); ?> </a></time>\n\n </header>\n <?php if ($comment->comment_approved == '0') : ?>\n <div class=\"alert alert-info\">\n <p><?php _e( 'Your comment is awaiting moderation.', 'itstar' ) ?></p>\n </div>\n <?php endif; ?>\n <section class=\"comment_content cf\">\n <?php comment_text() ?>\n </section>\n <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n </article>\n <?php // </li> is added by WordPress automatically ?>\n<?php\n}", "public function testProfilePrototypeDeleteComments()\n {\n\n }", "function kdw_row_tiles_txt (){ \r\n \r\n}", "function td_comment( $comment, $args, $depth ) {\r\n $GLOBALS['comment'] = $comment;\r\n\r\n $td_isPingTrackbackClass = '';\r\n\r\n if($comment->comment_type == 'pingback') {\r\n $td_isPingTrackbackClass = 'pingback';\r\n }\r\n\r\n if($comment->comment_type == 'trackback') {\r\n $td_isPingTrackbackClass = 'trackback';\r\n }\r\n\r\n if (!empty($comment->comment_author_email)) {\r\n $td_comment_auth_email = $comment->comment_author_email;\r\n } else {\r\n $td_comment_auth_email = '';\r\n }\r\n\r\n $td_article_date_unix = @strtotime(\"{$comment->comment_date_gmt} GMT\");\r\n //print_r($td_article_date_unix);\r\n\r\n\r\n\t?>\r\n <li class=\"comment <?php echo $td_isPingTrackbackClass ?>\" id=\"comment-<?php comment_ID() ?>\">\r\n\t\t\t<article>\r\n\t <footer>\r\n <?php\r\n\t //echo get_template_directory_uri() . \"/images/avatar.jpg\";\r\n\t //echo get_avatar($td_comment_auth_email, 50, get_template_directory_uri() . \"/images/avatar.jpg\");\r\n\t echo get_avatar($td_comment_auth_email, 50);\r\n ?>\r\n <cite><?php comment_author_link() ?></cite>\r\n\r\n <a class=\"comment-link\" href=\"#comment-<?php comment_ID() ?>\">\r\n <time pubdate=\"<?php echo $td_article_date_unix ?>\"><?php comment_date() ?> at <?php comment_time() ?></time>\r\n </a>\r\n </footer>\r\n\r\n <div class=\"comment-content\">\r\n <?php if ($comment->comment_approved == '0') { ?>\r\n <em><?php echo __td('Your comment is awaiting moderation', TD_THEME_NAME); ?></em>\r\n <?php }\r\n comment_text(); ?>\r\n </div>\r\n\r\n\t <div class=\"comment-meta\" id=\"comment-<?php comment_ID() ?>\">\r\n <?php comment_reply_link(array_merge( $args, array(\r\n 'depth' => $depth,\r\n 'max_depth' => $args['max_depth'],\r\n 'reply_text' => __td('Reply', TD_THEME_NAME),\r\n 'login_text' => __td('Log in to leave a comment', TD_THEME_NAME)\r\n )))\r\n ?>\r\n </div>\r\n </article>\r\n <?php\r\n\r\n}", "function testBugInternal1() \n {\n $sText = <<<SCRIPT\n<?php\n\\$a = <<<HEREDOC\nsdsdsds\nHEREDOC;\n?>\nSCRIPT;\n $this->setText($sText);\n $sActual = $this->oBeaut->get();\n $this->assertTrue(preg_match(\"/HEREDOC;\\n\\s*?\\?>/ms\", $sActual));\n }", "abstract protected function get_commentable_object();", "function custom_pings($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n ?>\n <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\n <div class=\"comment-author\"><?php printf(__('By %1$s on %2$s at %3$s', 'Foundation'),\n get_comment_author_link(),\n get_comment_date(),\n get_comment_time() );\n edit_comment_link(__('Edit', 'Foundation'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?></div>\n <?php if ($comment->comment_approved == '0') _e('\\t\\t\\t\\t\\t<span class=\"unapproved\">Your trackback is awaiting moderation.</span>\\n', 'Foundation') ?>\n <div class=\"comment-content\">\n <?php comment_text() ?>\n </div>\n<?php }", "function tempera_comments_off() { \nif ( ! comments_open() ) : ?>\n\t<p class=\"nocomments\"><?php _e( 'Comments are closed.', 'tempera' ); ?></p>\n<?php endif; // end ! comments_open() \n}", "function comments_link_feed()\n {\n }", "abstract public function getLinesOfCode();", "function __construct(){\n $this->stdin = fopen('php://stdin', 'r');\n $this->commentsNumber = 0;\n do{\n $line = utf8_encode($this->readLine()); //mozna ne encode tady musim otestovat\n if(preg_match('/#/', $line)){\n $this->iterateComments();\n } \n $line = preg_replace('/\\s*/','', $line); \n }while($line == null && !feof($this->stdin));\n if(strtolower($line) != \".ippcode18\"){\n exit(21);\n }\n }", "function clean_comment_cache($ids)\n {\n }", "function custom_pings($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n ?>\n <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\n <div class=\"comment-author\"><?php printf(__('By %1$s on %2$s at %3$s', 'flipblog'),\n get_comment_author_link(),\n get_comment_date(),\n get_comment_time() );\n edit_comment_link(__('Edit', 'flipblog'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?></div>\n <?php if ($comment->comment_approved == '0') _e('\\t\\t\\t\\t\\t<span class=\"unapproved\">Your trackback is awaiting moderation.</span>\\n', 'your-theme') ?>\n <div class=\"comment-content\">\n <?php comment_text() ?>\n </div>\n<?php }", "public function getComment()\n {\n return array();\n }", "function register_block_core_comments_title()\n {\n }" ]
[ "0.61599505", "0.607438", "0.6004968", "0.59842724", "0.5921784", "0.59010357", "0.58689713", "0.58653474", "0.5812107", "0.57694155", "0.5762497", "0.5756422", "0.5647247", "0.5611007", "0.55964744", "0.5595256", "0.55836886", "0.5569505", "0.5565242", "0.5518044", "0.550003", "0.54996395", "0.5498698", "0.5452637", "0.5442396", "0.5441272", "0.54359317", "0.54248655", "0.5421331", "0.5414538", "0.5407152", "0.5405288", "0.5392984", "0.5380307", "0.53741646", "0.53728", "0.5368142", "0.536087", "0.5357094", "0.5355697", "0.53323287", "0.5330734", "0.53219384", "0.5318605", "0.5306954", "0.530271", "0.5301359", "0.53012574", "0.53008455", "0.52920717", "0.5278724", "0.52744895", "0.5270829", "0.5259991", "0.52597624", "0.5259023", "0.5258027", "0.52402455", "0.5238827", "0.5226187", "0.5224592", "0.52233934", "0.52143073", "0.5196563", "0.5189428", "0.51783806", "0.5177798", "0.51704293", "0.5170362", "0.51694113", "0.51685905", "0.5164796", "0.516278", "0.5158022", "0.5157657", "0.5155792", "0.51549125", "0.514964", "0.5147319", "0.5142561", "0.5141761", "0.5137634", "0.51374483", "0.51336116", "0.51328194", "0.51319015", "0.51319015", "0.51300746", "0.51297635", "0.51271135", "0.5122012", "0.5121502", "0.5119957", "0.51192546", "0.5118299", "0.5117158", "0.51146954", "0.5111315", "0.51102626", "0.5098763", "0.5097282" ]
0.0
-1
This section is for duplicating routes to test versions of pages and resources on the live server
public function test_project($project_url) { $user = Auth::user(); $project = Project::where('project_url', $project_url)->firstOrFail(); if ($project->project_active == 1) { $content = view('pages.project_home_2', compact('project', 'user')); $response = response($content); $response->header('Cache-Control', 'max-age=5, public'); return $response; } else { return redirect(env('PROJECT_URL')); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testPrimaryRoutes()\n\t{\n\t/*\t//Filters disabled during unit tests unless you enable them\n\t\t//I need them enabled because they log the user in as anonymous\n\t\tRoute::enableFilters();\n\n\t\t// Test base route\n\t\t// Should show post id 1\n\t\t$response = $this->call('GET', '/');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(1, $post->id);\n\t\t$this->assertEquals('9d3e171a-62a9-e958-bdfa-d6f224ca8cad', $post->uuid);\n\n\t\t// Test /home is post 1\n\t\t$clicksBefore = Router::where('slug', '=', 'home')->first()->clicks;\n\t\t$response = $this->call('GET', '/home');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(1, $post->id);\n\t\t$this->assertEquals('9d3e171a-62a9-e958-bdfa-d6f224ca8cad', $post->uuid);\n\t\t$clicksAfter = Router::where('slug', '=', 'home')->first()->clicks;\n\t\t$this->assertEquals(++$clicksBefore, $clicksAfter);\n\n\t\t// Test /about is post 2\n\t\t$response = $this->call('GET', '/about');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(2, $post->id);\n\t\t$this->assertEquals('f1112648-782e-aad3-785d-640fcfefaa9b', $post->uuid);\n\n\n\t\t// ##### Login as mReschke #####\n\t\tAuth::login(User::find(2)); Auth::user()->login();\n\n\t\t// Test /13/mreschke-home-page (non named route)\n\t\t$response = $this->call('GET', '/13/mreschke-home-page');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(13, $post->id);\n\t\t$this->assertEquals('1a52e0e3-3174-7b2b-a582-03a39e52e34a', $post->uuid);\n\n\t\t// Test /14/squaethem-home-page (non named route)\n\t\t$response = $this->call('GET', '/14/squaethem-home-page');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(14, $post->id);\n\t\t$this->assertEquals('e80e907e-50d4-8ed4-70f7-5d1815672966', $post->uuid);\n\t\t*/\n\n\t}", "public function testLegacyRoutes()\n\t{\n\t\t/*//Filters disabled during unit tests unless you enable them\n\t\t//I need them enabled because they log the user in as anonymous\n\t\tRoute::enableFilters();\n\n\t\t// Test /topic/1 redirects to /home\n\t\t$this->call('GET', '/topic/1');\n\t\t$this->assertRedirectedTo('/home');\n\t\t$this->call('GET', '/topic/1/doesnt/matter');\n\t\t$this->assertRedirectedTo('/home');\n\n\t\t// ?? files/1 does not currently redirect\n\t\t// not sure if it should or not yet\n\t\t*/\n\n\t}", "public function testOtherRoutes()\n\t{\n\t\t/*//Filters disabled during unit tests unless you enable them\n\t\t//I need them enabled because they log the user in as anonymous\n\t\tRoute::enableFilters();\n\n\t\t// /google redirects to http://google.com\n\t\t$clicksBefore = Router::where('slug', '=', 'google')->first()->clicks;\n\t\t$this->call('GET', '/google');\n\t\t$this->assertRedirectedTo('http://google.com');\n\t\t$clicksAfter = Router::where('slug', '=', 'google')->first()->clicks;\n\t\t$this->assertEquals(++$clicksBefore, $clicksAfter);\n\n\t\t// /google2 is a disabled route\n\t\t$this->call('GET', '/google2');\n\t\t$this->assertResponseStatus(404);\n\n\t\t$this->call('GET', '/99/invalid');\n\t\t$this->assertResponseStatus(404);\n\n\t\t$this->call('GET', '/this/is/invalid');\n\t\t$this->assertResponseStatus(404);\n\t\t\n\n\t\t// Test search route\n\t\t// ??\n\n\t\t// Test net route\n\t\t// ??\n\n\t\t// Test login route\n\t\t$this->call('GET', '/login');\n\t\t$this->assertResponseOk();\n\n\t\t// Test logout route redirects to /\n\t\t$this->call('GET', '/logout');\n\t\t$this->assertRedirectedTo('/');\n\t\t*/\n\n\t}", "public function testSecondaryRoutes()\n\t{\n\t\t/*//Filters disabled during unit tests unless you enable them\n\t\t//I need them enabled because they log the user in as anonymous\n\t\tRoute::enableFilters();\n\n\t\t// Test /1 redirects to /home\n\t\t$this->call('GET', '/1');\n\t\t$this->assertRedirectedTo('/home');\n\n\t\t// Test /1/anything/here redirects to /home\n\t\t$this->call('GET', '/1/anything/here');\n\t\t$this->assertRedirectedTo('/home');\n\n\t\t// Test /1 redirects to /home\n\t\t$this->call('GET', '/post/1');\n\t\t$this->assertRedirectedTo('/home');\n\n\t\t// Test /9d3e171a-62a9-e958-bdfa-d6f224ca8cad redirects to /home\n\t\t$this->call('GET', '/9d3e171a-62a9-e958-bdfa-d6f224ca8cad');\n\t\t$this->assertRedirectedTo('/home');\n\n\t\t// Test /home2 is post 1 (this is an optional route to post 1)\n\t\t// /home2 displays post 1, it does not redirect to /home\n\t\t$clicksBefore = Router::where('slug', '=', 'home2')->first()->clicks;\n\t\t$response = $this->call('GET', '/home2');\n\t\t$post = $response->original['post'];\n\t\t$this->assertResponseOk();\n\t\t$this->assertViewHas('post');\n\t\t$this->assertEquals(1, $post->id);\n\t\t$this->assertEquals('9d3e171a-62a9-e958-bdfa-d6f224ca8cad', $post->uuid);\n\t\t$clicksAfter = Router::where('slug', '=', 'home2')->first()->clicks;\n\t\t$this->assertEquals(++$clicksBefore, $clicksAfter);\n\n\n\t\t// Test /home3 which is a disabled route\n\t\t$this->call('GET', '/home3');\n\t\t$this->assertResponseStatus(404);\n\n\n\t\t// ##### Login as mReschke #####\n\t\tAuth::login(User::find(2)); Auth::user()->login();\n\n\t\t// Test /13/blah redirects to /13/mreschke-home-page\n\t\t$this->call('GET', '/13/blah');\n\t\t$this->assertRedirectedTo('/13/mreschke-home-page');\n\n\t\t// Test /13 and /13/ redirects to /13/mreschke-home-page\n\t\t$this->call('GET', '/13');\n\t\t$this->assertRedirectedTo('/13/mreschke-home-page');\n\t\t$this->call('GET', '/13/');\n\t\t$this->assertRedirectedTo('/13/mreschke-home-page');\n\n\t\t// Test /13 redirects to /13/mreschke-home-page\n\t\t$this->call('GET', '/post/13');\n\t\t$this->assertRedirectedTo('/13/mreschke-home-page');\n\t\t*/\n\n\t}", "function create_initial_rest_routes()\n {\n }", "function defineRoutes() {\n Router::map('homepage', '', array('controller' => DEFAULT_CONTROLLER, 'action' => DEFAULT_ACTION, 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('admin', 'admin', array('controller' => 'admin', 'action' => 'index', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('public', 'public', array('controller' => 'public', 'action' => 'index', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n Router::map('wireframe_updates', 'wireframe-updates', array('controller' => 'backend', 'action' => 'wireframe_updates', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n Router::map('menu_refresh_url', 'refresh-menu', array('controller' => 'backend', 'action' => 'refresh_menu', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('quick_add', 'quick-add', array('controller' => 'backend', 'action' => 'quick_add', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n \n // API\n Router::map('info', 'info', array('controller' => 'api', 'action' => 'info', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n // Disk Space\n Router::map('disk_space_admin', 'admin/disk-space', array('controller' => 'disk_space_admin', 'action' => 'index', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('disk_space_usage', 'admin/disk-space/usage', array('controller' => 'disk_space_admin', 'action' => 'usage', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('disk_space_admin_settings', 'admin/disk-space/settings', array('controller' => 'disk_space_admin', 'action' => 'settings', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('disk_space_remove_application_cache', 'admin/disk-space/tools/remove-application-cache', array('controller' => 'disk_space_admin', 'action' => 'remove_application_cache', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('disk_space_remove_logs', 'admin/disk-space/tools/remove-logs', array('controller' => 'disk_space_admin', 'action' => 'remove_logs', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('disk_space_remove_old_application_versions', 'admin/disk-space/tools/remove-old-application-versions', array('controller' => 'disk_space_admin', 'action' => 'remove_old_application_versions', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n // Appearance\n Router::map('appearance_admin', 'admin/appearance', array('controller' => 'appearance', 'action' => 'index', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('appearance_admin_add_scheme', 'admin/appearance/add-scheme', array('controller' => 'appearance', 'action' => 'add', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('appearance_admin_edit_scheme', 'admin/appearance/:scheme_id/edit', array('controller' => 'appearance', 'action' => 'edit', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('appearance_admin_rename_scheme', 'admin/appearance/:scheme_id/rename', array('controller' => 'appearance', 'action' => 'rename', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('appearance_admin_delete_scheme', 'admin/appearance/:scheme_id/delete', array('controller' => 'appearance', 'action' => 'delete', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('appearance_admin_set_as_default_scheme', 'admin/appearance/:scheme_id/set-as-default', array('controller' => 'appearance', 'action' => 'set_as_default', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n // Scheduled Tasks Admin\n Router::map('scheduled_tasks_admin', 'admin/scheduled-tasks', array('controller' => 'scheduled_tasks_admin', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n // Network settings\n Router::map('network_settings', 'admin/network', array('controller' => 'network_admin', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n \n // Indices admin\n Router::map('indices_admin', 'admin/indices', array('controller' => 'indices_admin', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('indices_admin_rebuild', 'admin/indices/rebuild', array('controller' => 'indices_admin', 'action' => 'rebuild', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('indices_admin_rebuild_finish', 'admin/indices/rebuild/finish', array('controller' => 'indices_admin', 'action' => 'rebuild_finish', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n \n Router::map('object_contexts_admin_rebuild', 'admin/indices/object-contexts/rebuild', array('controller' => 'object_contexts_admin', 'action' => 'rebuild', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('object_contexts_admin_clean', 'admin/indices/object-contexts/clean', array('controller' => 'object_contexts_admin', 'action' => 'clean', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n \n // Scheduled tasks\n Router::map('frequently', 'frequently', array('controller' => 'scheduled_tasks', 'action' => 'frequently', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('hourly', 'hourly', array('controller' => 'scheduled_tasks', 'action' => 'hourly', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('daily', 'daily', array('controller' => 'scheduled_tasks', 'action' => 'daily', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n \n // trash related\n Router::map('trash', 'trash', array('controller' => 'trash', 'action' => 'index', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('trash_section', 'trash/:section_name', array('controller' => 'trash', 'action' => 'section', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('trash_empty', 'trash/empty', array('controller' => 'trash', 'action' => 'empty_trash', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n Router::map('object_untrash', 'trash/untrash-object', array('controller' => 'trash', 'action' => 'untrash_object', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO), array('object_id' => Router::MATCH_ID));\n Router::map('object_delete', 'trash/delete-object', array('controller' => 'trash', 'action' => 'delete_object', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO), array('object_id' => Router::MATCH_ID));\n\n // Control Tower\n Router::map('control_tower', 'control-tower', array('controller' => 'control_tower', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('control_tower_empty_cache', 'control-tower/empty-cache', array('controller' => 'control_tower', 'action' => 'empty_cache', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('control_tower_delete_compiled_templates', 'control-tower/delete-compiled-templates', array('controller' => 'control_tower', 'action' => 'delete_compiled_templates', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('control_tower_rebuild_images', 'control-tower/rebuild-images', array('controller' => 'control_tower', 'action' => 'rebuild_images', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n Router::map('control_tower_rebuild_localization', 'control-tower/rebuild-localization', array('controller' => 'control_tower', 'action' => 'rebuild_localization', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n Router::map('control_tower_settings', 'admin/control-tower', array('controller' => 'control_tower', 'action' => 'settings', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n\n\t // Firewall\n\t Router::map('firewall', 'admin/firewall', array('controller' => 'firewall', 'module' => ENVIRONMENT_FRAMEWORK_INJECT_INTO));\n }", "public function test_route_override() {\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'GET' ),\n\t\t\t\t'callback' => '__return_null',\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t\t'should_exist' => false,\n\t\t\t)\n\t\t);\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'POST' ),\n\t\t\t\t'callback' => '__return_null',\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t\t'should_exist' => true,\n\t\t\t),\n\t\t\ttrue\n\t\t);\n\n\t\t// Check we only have one route.\n\t\t$endpoints = $GLOBALS['wp_rest_server']->get_routes();\n\t\t$endpoint = $endpoints['/test-ns/test'];\n\t\t$this->assertCount( 1, $endpoint );\n\n\t\t// Check it's the right one.\n\t\t$this->assertArrayHasKey( 'should_exist', $endpoint[0] );\n\t\t$this->assertTrue( $endpoint[0]['should_exist'] );\n\t}", "public function testUrlGenerationBasic(): void\n {\n /**\n * @var string $ID\n * @var string $UUID\n * @var string $Year\n * @var string $Month\n * @var string $Action\n */\n extract(Router::getNamedExpressions());\n\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/', ['controller' => 'Pages', 'action' => 'display', 'home']);\n $out = Router::url(['controller' => 'Pages', 'action' => 'display', 'home']);\n $this->assertSame('/', $out);\n\n $routes->connect('/pages/*', ['controller' => 'Pages', 'action' => 'display']);\n $result = Router::url(['controller' => 'Pages', 'action' => 'display', 'about']);\n $expected = '/pages/about';\n $this->assertSame($expected, $result);\n\n Router::reload();\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/{plugin}/{id}/*', ['controller' => 'Posts', 'action' => 'view'], ['id' => $ID]);\n\n $result = Router::url([\n 'plugin' => 'CakePlugin',\n 'controller' => 'Posts',\n 'action' => 'view',\n 'id' => '1',\n ]);\n $expected = '/CakePlugin/1';\n $this->assertSame($expected, $result);\n\n $result = Router::url([\n 'plugin' => 'CakePlugin',\n 'controller' => 'Posts',\n 'action' => 'view',\n 'id' => '1',\n '0',\n ]);\n $expected = '/CakePlugin/1/0';\n $this->assertSame($expected, $result);\n\n $result = Router::url([\n 'plugin' => 'CakePlugin',\n 'controller' => 'Posts',\n 'action' => 'view',\n 'id' => '1',\n null,\n ]);\n $expected = '/CakePlugin/1';\n\n Router::reload();\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/{controller}/{action}/{id}', [], ['id' => $ID]);\n\n $result = Router::url(['controller' => 'Posts', 'action' => 'view', 'id' => '1']);\n $expected = '/Posts/view/1';\n $this->assertSame($expected, $result);\n\n Router::reload();\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/{controller}/{id}', ['action' => 'view']);\n\n $result = Router::url(['controller' => 'Posts', 'action' => 'view', 'id' => '1']);\n $expected = '/Posts/1';\n $this->assertSame($expected, $result);\n\n $routes->connect('/view/*', ['controller' => 'Posts', 'action' => 'view']);\n $result = Router::url(['controller' => 'Posts', 'action' => 'view', '1']);\n $expected = '/view/1';\n $this->assertSame($expected, $result);\n\n Router::reload();\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/{controller}/{action}');\n $request = new ServerRequest([\n 'params' => [\n 'action' => 'index',\n 'plugin' => null,\n 'controller' => 'Users',\n ],\n ]);\n Router::setRequest($request);\n\n $result = Router::url(['action' => 'login']);\n $expected = '/Users/login';\n $this->assertSame($expected, $result);\n\n Router::reload();\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/contact/{action}', ['plugin' => 'Contact', 'controller' => 'Contact']);\n\n $result = Router::url([\n 'plugin' => 'Contact',\n 'controller' => 'Contact',\n 'action' => 'me',\n ]);\n\n $expected = '/contact/me';\n $this->assertSame($expected, $result);\n\n Router::reload();\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/{controller}', ['action' => 'index']);\n $request = new ServerRequest([\n 'params' => [\n 'action' => 'index',\n 'plugin' => 'Myplugin',\n 'controller' => 'Mycontroller',\n ],\n ]);\n Router::setRequest($request);\n\n $result = Router::url(['plugin' => null, 'controller' => 'Myothercontroller']);\n $expected = '/Myothercontroller';\n $this->assertSame($expected, $result);\n }", "public function testNonPublicPages()\n {\n $this->get('/home')->assertStatus(302);\n $this->get('/routes')->assertStatus(302);\n $this->get('/themes')->assertStatus(302);\n $this->get('/users')->assertStatus(302);\n $this->get('/users/create')->assertStatus(302);\n $this->get('/phpinfo')->assertStatus(302);\n $this->get('/profile/create')->assertStatus(302);\n }", "public function testGetRoutes()\n {\n $this->disableExceptionHandling();\n\n $this->visit(route('voyager.login'));\n $this->type('[email protected]', 'email');\n $this->type('password', 'password');\n $this->press(__('voyager::generic.login'));\n\n $urls = [\n route('voyager.dashboard'),\n route('voyager.media.index'),\n route('voyager.settings.index'),\n route('voyager.roles.index'),\n route('voyager.roles.create'),\n route('voyager.roles.show', 1),\n route('voyager.roles.edit', 1),\n route('voyager.users.index'),\n route('voyager.users.create'),\n route('voyager.users.show', 1),\n route('voyager.users.edit', 1),\n route('voyager.posts.index'),\n route('voyager.posts.create'),\n route('voyager.posts.show', 1),\n route('voyager.posts.edit', 1),\n route('voyager.pages.index'),\n route('voyager.pages.create'),\n route('voyager.pages.show', 1),\n route('voyager.pages.edit', 1),\n route('voyager.categories.index'),\n route('voyager.categories.create'),\n route('voyager.categories.show', 1),\n route('voyager.categories.edit', 1),\n route('voyager.menus.index'),\n route('voyager.menus.create'),\n route('voyager.menus.show', 1),\n route('voyager.menus.edit', 1),\n route('voyager.database.index'),\n route('voyager.bread.edit', 'categories'),\n route('voyager.database.edit', 'categories'),\n route('voyager.database.create'),\n ];\n\n foreach ($urls as $url) {\n $response = $this->call('GET', $url);\n $this->assertEquals(200, $response->status(), $url.' did not return a 200');\n }\n }", "public function registerSiteRoutes()\n\t{\n\t\t// NOTE: the second route is used to capture files in subdirectories as well\n\t\treturn array(\n\t\t\t'internal/(?P<id>.\\d*)' => array('action' => 'AssetManagement/Assets/findById'),\n\t\t\t'internal/(?P<directory>.*)/(?P<name>.*)' => array('action' => 'AssetManagement/Assets/findInDirectory')\n\t\t);\n\t}", "function endpoints() {\r\n\t\tadd_rewrite_endpoint( 'backers', EP_PERMALINK | EP_PAGES );\r\n\t}", "public function testSetupRoutingDebug(): void\n {\n $routes = $this->getExpectedDefaultRoutes();\n $routes['GET']['/debugbar/[{filePath:.*}]'] = DebugBarController::class . '::staticFileAction';\n $this->checkRoutes($routes, ['settings.debug' => true]);\n }", "public function test_route_merge() {\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'GET' ),\n\t\t\t\t'callback' => '__return_null',\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\t\tregister_rest_route(\n\t\t\t'test-ns',\n\t\t\t'/test',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'POST' ),\n\t\t\t\t'callback' => '__return_null',\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\n\t\t// Check both routes exist.\n\t\t$endpoints = $GLOBALS['wp_rest_server']->get_routes();\n\t\t$endpoint = $endpoints['/test-ns/test'];\n\t\t$this->assertCount( 2, $endpoint );\n\t}", "public static function updateRoutes()\n {\n File::copy(__DIR__.'/stubs/routes/web.stub', base_path('/routes/web.php'));\n }", "protected function setUpFakeSitePathAndHost() {}", "protected function setUpRoutes()\n {\n parent::setUpRoutes();\n $this->setRoutes([\n 'createInvitationLink' => 'private/product-reviews/business-units/{businessUnitId}/invitation-links?token={token}',\n 'findPrivate' => 'private/product-reviews/business-units/{businessUnitId}/reviews?token={token}'\n ]);\n }", "public function testAllSuperadminUrls()\n {\n $this->loginAsSuperadmin();\n\n $testUrls = [\n $this->Slug->getAdminHome(),\n $this->Slug->getCartDetail(),\n $this->Slug->getOrderDetailsList(),\n $this->Slug->getOrderDetailsList().'?groupBy=customer&pickupDay[]=02.02.2018',\n $this->Slug->getOrderDetailsList().'?groupBy=manufacturer&pickupDay[]=02.02.2018',\n $this->Slug->getOrderDetailsList().'?groupBy=product&pickupDay[]=02.02.2018',\n $this->Slug->getOrderLists(),\n $this->Slug->getActionLogsList(),\n $this->Slug->getPagesListAdmin(),\n $this->Slug->getPageAdd(),\n $this->Slug->getPageEdit(3),\n $this->Slug->getDepositList(4),\n $this->Slug->getDepositOverviewDiagram(),\n $this->Slug->getDepositDetail(4, '2016-11'),\n $this->Slug->getCreditBalance(88),\n $this->Slug->getCreditBalanceSum(),\n $this->Slug->getChangePassword(),\n $this->Slug->getCustomerListAdmin(),\n $this->Slug->getCustomerProfile(),\n $this->Slug->getCustomerEdit(88),\n $this->Slug->getProductAdmin(),\n $this->Slug->getProductAdmin('all'),\n $this->Slug->getReport('product'),\n $this->Slug->getReport('payback'),\n $this->Slug->getReport('deposit'),\n $this->Slug->getPaymentEdit(1),\n $this->Slug->getBlogPostListAdmin(),\n $this->Slug->getBlogPostAdd(),\n $this->Slug->getBlogPostEdit(2),\n $this->Slug->getManufacturerAdmin(),\n $this->Slug->getManufacturerList(),\n $this->Slug->getManufacturerAdd(),\n $this->Slug->getManufacturerEdit(5),\n $this->Slug->getManufacturerEditOptions(5),\n $this->Slug->getAttributesList(),\n $this->Slug->getAttributeAdd(),\n $this->Slug->getAttributeEdit(33),\n $this->Slug->getCategoriesList(),\n $this->Slug->getCategoryAdd(),\n $this->Slug->getCategoryEdit(16),\n $this->Slug->getTaxesList(),\n $this->Slug->getTaxAdd(),\n $this->Slug->getTaxEdit(2),\n $this->Slug->getSlidersList(),\n $this->Slug->getSliderAdd(),\n $this->Slug->getSliderEdit(6),\n $this->Slug->getStatistics(4),\n $this->Network->getSyncDomainAdd(),\n $this->Network->getSyncDomainEdit(1),\n $this->Slug->getConfigurationsList(),\n $this->Slug->getConfigurationEdit(544),\n ];\n\n $this->assertPagesForErrors($testUrls);\n\n $this->logout();\n }", "public function test_rest_url_generation() {\n\t\t// In pretty permalinks case, we expect a path of wp-json/ with no query.\n\t\t$this->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' );\n\t\t$this->assertSame( 'http://' . WP_TESTS_DOMAIN . '/wp-json/', get_rest_url() );\n\n\t\t// In index permalinks case, we expect a path of index.php/wp-json/ with no query.\n\t\t$this->set_permalink_structure( '/index.php/%year%/%monthnum%/%day%/%postname%/' );\n\t\t$this->assertSame( 'http://' . WP_TESTS_DOMAIN . '/index.php/wp-json/', get_rest_url() );\n\n\t\t// In non-pretty case, we get a query string to invoke the rest router.\n\t\t$this->set_permalink_structure( '' );\n\t\t$this->assertSame( 'http://' . WP_TESTS_DOMAIN . '/index.php?rest_route=/', get_rest_url() );\n\t}", "public final function tearDown(){\n\n \\Disco\\classes\\Router::processRoutes();\n\n /**\n * did this requested URI not find a match? If so thats a 404.\n */\n if(!\\Disco\\classes\\Router::$routeMatch){\n $this['View']->serve(404);\n }//if\n else {\n $this['View']->serve();\n }//el\n\n }", "private function configureRoutes()\n {\n $this->files->copy(__DIR__ . '/../../stubs/routes/api.stub', base_path('routes/api.php'));\n }", "public function testIndex()\n\t{\n\t\t// correct route for posts\n\t\t$this->call('GET', '/api/posts');\n\t}", "protected function preReRouting()\n {\n\n }", "public function testRoutes()\n {\n foreach ($this->testRoutes as $method => $testRoutes) {\n switch ($method) {\n case 'GET':\n foreach ($testRoutes as $path => $param) {\n $response = $this->json($method, '/' . $path . $param);\n $response->assertJsonStructure(['error']);\n }\n break;\n case 'PUT':\n case 'POST':\n case 'DELETE':\n foreach ($testRoutes as $path => $params) {\n $response = $this->json($method, '/' . $path . $params['path_params'], $params['request_params']);\n dump($response->getContent());\n $response->assertJsonStructure(['message']);\n }\n break;\n }\n }\n }", "function myAccountNewEndpoints()\n{\n add_rewrite_endpoint(SUBS_ENDPOINT, EP_ROOT | EP_PAGES);\n}", "function add_urls() {\n\tadd_rewrite_rule( '^sso-login/?', 'index.php?sso-login=sso-login', 'top' );\n add_rewrite_endpoint( 'sso-login', EP_PERMALINK);\n\n\t// URLs for step 2 of webserver oauth flow\n\tadd_rewrite_rule( '^sso-callback/?', 'index.php?sso-callback=sso-callback', 'top' );\n add_rewrite_endpoint( 'sso-callback', EP_PERMALINK);\n}", "public function testBasicRouteMatching() {\n\t\tRouter::connect('/hello', ['controller' => 'Posts', 'action' => 'index']);\n\t\t$expected = ['controller' => 'Posts', 'action' => 'index'];\n\n\t\tforeach (['/hello/', '/hello', 'hello/', 'hello'] as $url) {\n\t\t\t$this->request->url = $url;\n\t\t\t$result = Router::parse($this->request);\n\t\t\t$this->assertEqual($expected, $result->params);\n\t\t\t$this->assertEqual(['controller'], $result->persist);\n\t\t}\n\t}", "public function setUpTest()\n\t{\n\t\t$_SERVER['REQUEST_URI'] = \"/\";\n\t\t$_SERVER['REQUEST_METHOD'] = \"GET\";\n\t}", "protected function routes()\n {\n if ($this->app->routesAreCached()) {\n return;\n }\n\n\n /**\n * Porteiro; Routes\n */\n $this->loadRoutesForRiCa(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'routes');\n }", "public function testUrlGenerationWithPrefix(): void\n {\n $routes = Router::createRouteBuilder('/');\n\n $routes->connect('/pages/*', ['controller' => 'Pages', 'action' => 'display']);\n $routes->connect('/reset/*', ['admin' => true, 'controller' => 'Users', 'action' => 'reset']);\n $routes->connect('/tests', ['controller' => 'Tests', 'action' => 'index']);\n $routes->connect('/admin/{controller}/{action}/*', ['prefix' => 'Admin']);\n Router::extensions('rss', false);\n\n $request = new ServerRequest([\n 'params' => [\n 'controller' => 'Registrations',\n 'action' => 'index',\n 'plugin' => null,\n 'prefix' => 'Admin',\n '_ext' => 'html',\n ],\n 'url' => '/admin/registrations/index',\n ]);\n Router::setRequest($request);\n\n $result = Router::url([]);\n $expected = '/admin/registrations/index';\n $this->assertSame($expected, $result);\n\n Router::reload();\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/admin/subscriptions/{action}/*', ['controller' => 'Subscribe', 'prefix' => 'Admin']);\n $routes->connect('/admin/{controller}/{action}/*', ['prefix' => 'Admin']);\n\n $request = new ServerRequest([\n 'params' => [\n 'action' => 'index',\n 'plugin' => null,\n 'controller' => 'Subscribe',\n 'prefix' => 'Admin',\n ],\n 'webroot' => '/magazine/',\n 'base' => '/magazine',\n 'url' => '/admin/subscriptions/edit/1',\n ]);\n Router::setRequest($request);\n\n $result = Router::url(['action' => 'edit', 1]);\n $expected = '/magazine/admin/subscriptions/edit/1';\n $this->assertSame($expected, $result);\n\n $result = Router::url(['prefix' => 'Admin', 'controller' => 'Users', 'action' => 'login']);\n $expected = '/magazine/admin/Users/login';\n $this->assertSame($expected, $result);\n\n Router::reload();\n\n $request = new ServerRequest([\n 'params' => [\n 'prefix' => 'Admin',\n 'action' => 'index',\n 'plugin' => null,\n 'controller' => 'Users',\n ],\n 'webroot' => '/',\n 'url' => '/admin/users/index',\n ]);\n Router::setRequest($request);\n\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/page/*', ['controller' => 'Pages', 'action' => 'view', 'prefix' => 'Admin']);\n\n $result = Router::url(['prefix' => 'Admin', 'controller' => 'Pages', 'action' => 'view', 'my-page']);\n $expected = '/page/my-page';\n $this->assertSame($expected, $result);\n\n Router::reload();\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/admin/{controller}/{action}/*', ['prefix' => 'Admin']);\n\n $request = new ServerRequest([\n 'params' => [\n 'plugin' => null,\n 'controller' => 'Pages',\n 'action' => 'add',\n 'prefix' => 'Admin',\n ],\n 'webroot' => '/',\n 'url' => '/admin/pages/add',\n ]);\n Router::setRequest($request);\n\n $result = Router::url(['plugin' => null, 'controller' => 'Pages', 'action' => 'add', 'id' => false]);\n $expected = '/admin/Pages/add';\n $this->assertSame($expected, $result);\n\n Router::reload();\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/admin/{controller}/{action}/*', ['prefix' => 'Admin']);\n $request = new ServerRequest([\n 'params' => [\n 'plugin' => null,\n 'controller' => 'Pages',\n 'action' => 'add',\n 'prefix' => 'Admin',\n ],\n 'webroot' => '/',\n 'url' => '/admin/pages/add',\n ]);\n Router::setRequest($request);\n\n $result = Router::url(['plugin' => null, 'controller' => 'Pages', 'action' => 'add', 'id' => false]);\n $expected = '/admin/Pages/add';\n $this->assertSame($expected, $result);\n\n Router::reload();\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/admin/{controller}/{action}/{id}', ['prefix' => 'Admin'], ['id' => '[0-9]+']);\n $request = new ServerRequest([\n 'params' => [\n 'plugin' => null,\n 'controller' => 'Pages',\n 'action' => 'edit',\n 'pass' => ['284'],\n 'prefix' => 'Admin',\n ],\n 'url' => '/admin/pages/edit/284',\n ]);\n Router::setRequest($request);\n\n $result = Router::url(['plugin' => null, 'controller' => 'Pages', 'action' => 'edit', 'id' => '284']);\n $expected = '/admin/Pages/edit/284';\n $this->assertSame($expected, $result);\n\n Router::reload();\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/admin/{controller}/{action}/*', ['prefix' => 'Admin']);\n\n $request = new ServerRequest([\n 'params' => [\n 'plugin' => null, 'controller' => 'Pages', 'action' => 'add', 'prefix' => 'Admin',\n ],\n 'url' => '/admin/pages/add',\n ]);\n Router::setRequest($request);\n\n $result = Router::url(['plugin' => null, 'controller' => 'Pages', 'action' => 'add', 'id' => false]);\n $expected = '/admin/Pages/add';\n $this->assertSame($expected, $result);\n\n Router::reload();\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/admin/{controller}/{action}/*', ['prefix' => 'Admin']);\n\n $request = new ServerRequest([\n 'params' => [\n 'plugin' => null, 'controller' => 'Pages', 'action' => 'edit', 'prefix' => 'Admin',\n ],\n 'url' => '/admin/pages/edit/284',\n ]);\n Router::setRequest($request);\n\n $result = Router::url(['plugin' => null, 'controller' => 'Pages', 'action' => 'edit', 284]);\n $expected = '/admin/Pages/edit/284';\n $this->assertSame($expected, $result);\n\n Router::reload();\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/admin/posts/*', ['controller' => 'Posts', 'action' => 'index', 'prefix' => 'Admin']);\n $request = new ServerRequest([\n 'params' => [\n 'plugin' => null, 'controller' => 'Posts', 'action' => 'index', 'prefix' => 'Admin',\n 'pass' => ['284'],\n ],\n 'url' => '/admin/pages/edit/284',\n ]);\n Router::setRequest($request);\n\n $result = Router::url(['all']);\n $expected = '/admin/posts/all';\n $this->assertSame($expected, $result);\n }", "public function setRoutes()\n {\n $this->route('/test_extend', function() {\n $this->get(function($request, $response, $params) {\n $array = array_merge($this->foo(), $request->getHeaders());\n $response->write(200, $array);\n\n return $response;\n })->auth(\\Dioxide\\AUTH_BASIC); // require basic auth to use this method\n });\n\n\n // send the request headers back to the user\n $this->route('/headers', function() {\n $this->get(function($request, $response, $params) {\n $rateHeaders = $this->emit('rate.limit.headers', [$request->getRealRemoteAddr()]);\n\n $response->write(200, $request->getHeaders()); // send the request headers back\n $response->headers($rateHeaders);\n\n return $response;\n });\n });\n\n $this->route('/post_test', function() {\n $this->post(function($request, $response, $params) {\n $response->write(200, $request->getContent());\n return $response;\n });\n });\n\n $this->route('/server_vars', function() {\n $this->get(function($request, $response, $params) {\n $response->write(200, $_SERVER);\n return $response;\n });\n });\n\n $this->route('/cache_test', function() {\n $this->get(function($request, $response, $params) {\n $response->write(200, ['foo' => 'bar']); // will be a 304 with no response body if cached\n return $response;\n });\n });\n\n }", "public static function routes(): void\n {\n //\n }", "function qa_page_routing()\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\treturn array(\n\t\t'account' => 'pages/account.php',\n\t\t'activity/' => 'pages/activity.php',\n\t\t'admin/' => 'pages/admin/admin-default.php',\n\t\t'admin/approve' => 'pages/admin/admin-approve.php',\n\t\t'admin/categories' => 'pages/admin/admin-categories.php',\n\t\t'admin/flagged' => 'pages/admin/admin-flagged.php',\n\t\t'admin/hidden' => 'pages/admin/admin-hidden.php',\n\t\t'admin/layoutwidgets' => 'pages/admin/admin-widgets.php',\n\t\t'admin/moderate' => 'pages/admin/admin-moderate.php',\n\t\t'admin/pages' => 'pages/admin/admin-pages.php',\n\t\t'admin/plugins' => 'pages/admin/admin-plugins.php',\n\t\t'admin/points' => 'pages/admin/admin-points.php',\n\t\t'admin/recalc' => 'pages/admin/admin-recalc.php',\n\t\t'admin/stats' => 'pages/admin/admin-stats.php',\n\t\t'admin/userfields' => 'pages/admin/admin-userfields.php',\n\t\t'admin/usertitles' => 'pages/admin/admin-usertitles.php',\n\t\t'answers/' => 'pages/answers.php',\n\t\t'ask' => 'pages/ask.php',\n\t\t'categories/' => 'pages/categories.php',\n\t\t'comments/' => 'pages/comments.php',\n\t\t'confirm' => 'pages/confirm.php',\n\t\t'favorites' => 'pages/favorites.php',\n\t\t'favorites/questions' => 'pages/favorites-list.php',\n\t\t'favorites/users' => 'pages/favorites-list.php',\n\t\t'favorites/tags' => 'pages/favorites-list.php',\n\t\t'feedback' => 'pages/feedback.php',\n\t\t'forgot' => 'pages/forgot.php',\n\t\t'hot/' => 'pages/hot.php',\n\t\t'ip/' => 'pages/ip.php',\n\t\t'login' => 'pages/login.php',\n\t\t'logout' => 'pages/logout.php',\n\t\t'messages/' => 'pages/messages.php',\n\t\t'message/' => 'pages/message.php',\n\t\t'questions/' => 'pages/questions.php',\n\t\t'register' => 'pages/register.php',\n\t\t'reset' => 'pages/reset.php',\n\t\t'search' => 'pages/search.php',\n\t\t'tag/' => 'pages/tag.php',\n\t\t'tags' => 'pages/tags.php',\n\t\t'unanswered/' => 'pages/unanswered.php',\n\t\t'unsubscribe' => 'pages/unsubscribe.php',\n\t\t'updates' => 'pages/updates.php',\n\t\t'user/' => 'pages/user.php',\n\t\t'users' => 'pages/users.php',\n\t\t'users/blocked' => 'pages/users-blocked.php',\n\t\t'users/new' => 'pages/users-newest.php',\n\t\t'users/special' => 'pages/users-special.php',\n\t);\n}", "#[Route(path: '/projects/', name: 'translationalresearch_project_index', methods: ['GET'])]\n #[Route(path: '/my-projects/', name: 'translationalresearch_my_project_index', methods: ['GET'])]\n #[Route(path: '/projects-where-i-am-the-requester/', name: 'translationalresearch_my_request_project_index', methods: ['GET'])]\n #[Route(path: '/draft-projects-where-i-am-the-requester/', name: 'translationalresearch_my_request_project_draft_index', methods: ['GET'])]\n #[Route(path: '/projects-i-have-reviewed/', name: 'translationalresearch_my_reviewed_project_index', methods: ['GET'])]\n #[Route(path: '/projects-pending-my-review/', name: 'translationalresearch_my_pending_review_project_index', methods: ['GET'])]\n #[Route(path: '/projects-pending-review/', name: 'translationalresearch_pending_review_project_index', methods: ['GET'])]\n #[Route(path: '/projects-awaiting-additional-info-to-be-reviewed/', name: 'translationalresearch_my_missinginfo_review_project_index', methods: ['GET'])]\n #[Route(path: '/active-project-requests-with-expired-approval/', name: 'translationalresearch_active_expired_project_index', methods: ['GET'])]\n #[Route(path: '/active-project-requests-with-approval-expiring-soon/', name: 'translationalresearch_active_expired_soon_project_index', methods: ['GET'])]\n #[Route(path: '/active-project-requests-non-funded-over-budget/', name: 'translationalresearch_active_non_funded_over_budget_project_index', methods: ['GET'])]\n #[Route(path: '/approved-project-requests-funded/', name: 'translationalresearch_approved_funded_project_index', methods: ['GET'])]\n #[Route(path: '/approved-project-requests-non-funded/', name: 'translationalresearch_approved_non_funded_project_index', methods: ['GET'])]\n #[Template('AppTranslationalResearchBundle/Project/index.html.twig')]\n public function indexAction(Request $request)\n {\n\n //TODO: check performance scan_perSiteSettings?\n if( false === $this->isGranted('ROLE_TRANSRES_USER') ) {\n return $this->redirect( $this->generateUrl($this->getParameter('translationalresearch.sitename').'-nopermission') );\n }\n\n //test: only 12 queries vs ~800 queries in regular run\n// return array(\n// 'filterError' => true,\n// 'title' => \"Test Performance\",\n// );\n\n $transresUtil = $this->container->get('transres_util');\n //$transResFormNodeUtil = $this->container->get('transres_formnode_util');\n $em = $this->getDoctrine()->getManager();\n $user = $this->getUser();\n $routeName = $request->get('_route');\n $title = \"Project Requests\";\n\n //testing\n// $roles = $user->getRoles();\n// foreach( $roles as $role ) {\n// echo \"role=$role <br>\";\n// }\n// if( $this->isGranted(\"ROLE_TRANSRES_REQUESTER_COVID19\") ) {\n// echo \"covid role is OK <br>\";\n// }\n// if( $this->isGranted(\"ROLE_TRANSRES_REQUESTER_APCP\") ) {\n// echo \"apcp role is OK <br>\";\n// }\n\n if( $routeName == \"translationalresearch_project_index\" ) {\n if( \n $transresUtil->isAdminOrPrimaryReviewer() === false && \n $this->isGranted('ROLE_TRANSRES_TECHNICIAN') === false \n ) {\n if ($this->isGranted('ROLE_TRANSRES_REQUESTER')) {\n return $this->redirectToRoute('translationalresearch_my_project_index');\n }\n }\n }\n\n //get allowed and denied projectSpecialties\n $projectSpecialtyAllowedRes = $transresUtil->getAllowedProjectSpecialty($user);\n $projectSpecialtyAllowedArr = $projectSpecialtyAllowedRes['projectSpecialtyAllowedArr'];\n $projectSpecialtyDeniedArr = $projectSpecialtyAllowedRes['projectSpecialtyDeniedArr'];\n\n// if( $routeName == \"translationalresearch_my_pending_review_project_index\" ) {\n// return $this->redirectToRoute(\n// 'translationalresearch_my_review_project_index',\n// array(\n// 'filter[state][0]' => 'irb_review',\n// 'filter[state][1]' => 'admin_review',\n// 'filter[state][2]' => 'committee_review',\n// 'filter[state][3]' => 'final_review',\n// 'filter[preroute]' => 'translationalresearch_my_pending_review_project_index'\n// )\n// );\n// }\n\n if( $routeName == \"translationalresearch_pending_review_project_index\" ) {\n\n $indexParams = array(\n 'filter[state][0]' => 'irb_review',\n 'filter[state][1]' => 'irb_missinginfo',\n 'filter[state][2]' => 'admin_review',\n 'filter[state][3]' => 'admin_missinginfo',\n 'filter[state][4]' => 'committee_review',\n 'filter[state][5]' => 'final_review',\n 'title' => \"Project Requests Pending Review\",\n );\n\n //projectSpecialty filter[projectSpecialty][]=2\n foreach($projectSpecialtyAllowedArr as $projectSpecialtyAllowed) {\n $indexParams['filter[projectSpecialty]'][] = $projectSpecialtyAllowed->getId();\n }\n\n return $this->redirectToRoute(\n 'translationalresearch_project_index',\n $indexParams\n );\n }\n\n //$projects = $em->getRepository('AppTranslationalResearchBundle:Project')->findAll();\n\n //process.py script: replaced namespace by ::class: ['AppTranslationalResearchBundle:Project'] by [Project::class]\n $repository = $em->getRepository(Project::class);\n $dql = $repository->createQueryBuilder(\"project\");\n $dql->select('project');\n\n $dql->leftJoin('project.submitter','submitter');\n\n $dql->leftJoin('project.principalInvestigators','principalInvestigators');\n $dql->leftJoin('principalInvestigators.infos','principalInvestigatorsInfos');\n\n $dql->leftJoin('project.principalIrbInvestigator','principalIrbInvestigator');\n\n $dql->leftJoin('project.irbReviews','irbReviews');\n $dql->leftJoin('irbReviews.reviewer','irbReviewer');\n $dql->leftJoin('irbReviews.reviewerDelegate','irbReviewerDelegate');\n\n $dql->leftJoin('project.adminReviews','adminReviews');\n $dql->leftJoin('adminReviews.reviewer','adminReviewer');\n $dql->leftJoin('adminReviews.reviewerDelegate','adminReviewerDelegate');\n\n $dql->leftJoin('project.committeeReviews','committeeReviews');\n $dql->leftJoin('committeeReviews.reviewer','committeeReviewer');\n $dql->leftJoin('committeeReviews.reviewerDelegate','committeeReviewerDelegate');\n\n $dql->leftJoin('project.finalReviews','finalReviews');\n $dql->leftJoin('finalReviews.reviewer','finalReviewer');\n $dql->leftJoin('finalReviews.reviewerDelegate','finalReviewerDelegate');\n\n $dql->leftJoin('project.submitInvestigators','submitInvestigators');\n $dql->leftJoin('project.coInvestigators','coInvestigators');\n $dql->leftJoin('project.pathologists','pathologists');\n $dql->leftJoin('project.billingContact','billingContact');\n $dql->leftJoin('project.contacts','contacts');\n\n $dql->leftJoin('project.projectType','projectType');\n\n $advancedFilter = 0;\n $formnode = false;\n $dqlParameters = array();\n\n $humanName = $transresUtil->getHumanName();\n\n// //get allowed and denied projectSpecialties\n// $projectSpecialtyAllowedRes = $transresUtil->getAllowedProjectSpecialty($user);\n// $projectSpecialtyAllowedArr = $projectSpecialtyAllowedRes['projectSpecialtyAllowedArr'];\n// $projectSpecialtyDeniedArr = $projectSpecialtyAllowedRes['projectSpecialtyDeniedArr'];\n\n //////// create filter //////////\n //$filterError = true;\n //$transresUsers = array($user);\n $transresUsers = $transresUtil->getAppropriatedUsers();\n //echo \"transresUsers count=\".count($transresUsers).\"<br>\";\n\n $stateChoiceArr = $transresUtil->getStateChoisesArr();\n $stateChoiceArr[\"All except Drafts\"] = \"All-except-Drafts\";\n $stateChoiceArr[\"All except Drafts and Canceled\"] = \"All-except-Drafts-and-Canceled\";\n //$stateChoiceArr[\"Closed\"] = \"Closed\";\n //$stateChoiceArr[\"Canceled\"] = \"Canceled\";\n //$defaultStatesArr = $transresUtil->getDefaultStatesArr();\n $transresPricesList = $transresUtil->getPricesList();\n\n $expectedExpirationDateChoices = $transresUtil->getExpectedExpirationDateChoices();\n\n $requesterGroup = $transresUtil->getProjectRequesterGroupChoices();\n\n $trpAdminOrTech = false;\n if(\n $this->isGranted('ROLE_TRANSRES_ADMIN') ||\n $this->isGranted('ROLE_TRANSRES_TECHNICIAN')\n ) {\n $trpAdminOrTech = true;\n }\n \n $params = array(\n //'SecurityAuthChecker' => $this->container->get('security.authorization_checker'),\n 'trpAdminOrTech' => $trpAdminOrTech,\n 'transresUsers' => $transresUsers,\n 'stateChoiceArr' => $stateChoiceArr,\n //'defaultStatesArr' => $defaultStatesArr,\n 'projectSpecialtyAllowedArr' => $projectSpecialtyAllowedArr,\n 'defaultStatesArr' => array(\"All-except-Drafts-and-Canceled\"),\n //'defaultStatesArr' => array(\"All-except-Drafts\",\"Canceled\",\"Closed\"),\n 'toImplicitExpDate' => null,\n 'fromImplicitExpDate' => null,\n 'humanName' => $transresUtil->getHumanName(),\n 'humanAnimalNameBracket' => $transresUtil->getHumanAnimalName(\"brackets\"),\n 'humanAnimalNameSlash' => $transresUtil->getHumanAnimalName(\"slash\"),\n 'transresPricesList' => $transresPricesList,\n 'expectedExpirationDateChoices' => $expectedExpirationDateChoices,\n 'requesterGroup' => $requesterGroup,\n 'overBudget' => 'all',\n 'fundingType' => null\n );\n\n if( $routeName == \"translationalresearch_my_request_project_draft_index\" ) {\n $params['defaultStatesArr'] = array('draft');\n }\n\n if( $routeName == \"translationalresearch_active_expired_project_index\" ) {\n $params['defaultStatesArr'] = array(\n 'irb_review','irb_missinginfo',\n 'admin_review','admin_missinginfo',\n 'committee_review','final_review','final_approved'\n );\n $params['toImplicitExpDate'] =new \\DateTime();\n $title = \"Active Project Requests with Expired $humanName\";\n }\n if( $routeName == \"translationalresearch_active_expired_soon_project_index\" ) {\n $params['defaultStatesArr'] = array(\n 'irb_review','irb_missinginfo',\n 'admin_review','admin_missinginfo',\n 'committee_review','final_review','final_approved'\n );\n $today = new \\DateTime();\n $params['fromImplicitExpDate'] = new \\DateTime();\n $params['toImplicitExpDate'] = $today->modify('+3 months');\n $title = \"Active Project Requests with $humanName Expiring Soon\";\n }\n if( $routeName == \"translationalresearch_active_non_funded_over_budget_project_index\" ) {\n //?filter[projectSpecialty][]=2&filter[projectSpecialty][]=1&filter[projectSpecialty][]=5&\n //filter[projectSpecialty][]=4&filter[searchId]=&filter[state][]=irb_review&filter[state][]=irb_missinginfo&\n //filter[state][]=admin_review&filter[state][]=admin_missinginfo&filter[state][]=committee_review&\n //filter[state][]=final_review&filter[state][]=final_approved&\n //filter[startDate]=&filter[endDate]=&\n //filter[searchIrbNumber]=&filter[searchTitle]=&filter[submitter]=&filter[fundingNumber]=&\n //filter[fundingType]=&filter[searchProjectType]=&filter[exportId]=&\n //filter[humanTissue]=&filter[exemptIrbApproval]=&\n //filter[fromExpectedCompletionDate]=&filter[toExpectedCompletionDate]=&\n //filter[briefDescription]=&filter[fromImplicitExpDate]=&\n //filter[toImplicitExpDate]=&filter[priceList]=all&\n //filter[overBudget]=over-budget-with-no-budget\n\n //do not show all project that have “No Budget Limit” checked\n //list all projects that are also active and non-funded,\n // and that have the “Remaining Budget” amount less than zero\n //AND all projects that have unspent amount of “No Info” (Approved Project Budget is NULL)\n\n //echo \"routeName=$routeName <br>\";\n $params['defaultStatesArr'] = array(\n 'irb_review','irb_missinginfo',\n 'admin_review','admin_missinginfo',\n 'committee_review','final_review','final_approved'\n );\n $params['overBudget'] = 'over-budget-with-no-budget'; //'Over Budget or With No Budget';\n $params['fundingType'] = \"Non-Funded\";\n $title = \"Active Non-Funded Projects Over Budget or With No Budget\";\n }\n if( $routeName == \"translationalresearch_approved_funded_project_index\" ) {\n //echo \"routeName=$routeName <br>\";\n $params['defaultStatesArr'] = array(\n 'final_approved'\n );\n $params['fundingType'] = \"Funded\";\n $title = \"Approved Funded Projects\";\n }\n if( $routeName == \"translationalresearch_approved_non_funded_project_index\" ) {\n //echo \"routeName=$routeName <br>\";\n $params['defaultStatesArr'] = array(\n 'final_approved'\n );\n $params['fundingType'] = \"Non-Funded\";\n $title = \"Approved Non-Funded Projects\";\n }\n\n $filterform = $this->createForm(FilterType::class, null,array(\n 'method' => 'GET',\n 'form_custom_value'=>$params\n ));\n\n if( count($projectSpecialtyAllowedArr) == 0 ) { //testing getTransResAdminEmails\n $sysAdminEmailArr = $transresUtil->getTransResAdminEmails(null,true,true); //indexAction\n $errorMsg = \"You don't have any allowed project specialty in your profile.\".\n \"<br>Please contact the system admin(s):\".\n \"<br>\".implode(\", \",$sysAdminEmailArr);\n //no allowed specialty\n return array(\n 'filterError' => true,\n //'allProjects' => array(),\n 'title' => $errorMsg,\n //'filterform' => $filterform->createView(),\n //'eventObjectTypeId' => null,\n //'advancedFilter' => $advancedFilter\n );\n }\n\n $filterform->handleRequest($request);\n\n if(1) { //testing\n $principalInvestigators = $filterform['principalInvestigators']->getData();\n $associatedUsers = $filterform['associatedUsers']->getData();\n $submitter = $filterform['submitter']->getData();\n $reviewers = $filterform['reviewers']->getData();\n } else {\n $principalInvestigators = null;\n $associatedUsers = null;\n $submitter = null;\n $reviewers = null;\n }\n\n $projectSpecialties = $filterform['projectSpecialty']->getData();\n $states = $filterform['state']->getData();\n $startDate = $filterform['startDate']->getData();\n $endDate = $filterform['endDate']->getData();\n $searchId = $filterform['searchId']->getData();\n $searchTitle = $filterform['searchTitle']->getData();\n $searchIrbNumber = $filterform['searchIrbNumber']->getData();\n $fundingNumber = $filterform['fundingNumber']->getData();\n $fundingType = $filterform['fundingType']->getData();\n $searchProjectType = $filterform['searchProjectType']->getData();\n $exportId = $filterform['exportId']->getData();\n $humanTissue = $filterform['humanTissue']->getData();\n $exemptIrbApproval = $filterform['exemptIrbApproval']->getData();\n $fromExpectedCompletionDate = $filterform['fromExpectedCompletionDate']->getData();\n $toExpectedCompletionDate = $filterform['toExpectedCompletionDate']->getData();\n $fromImplicitExpDate = $filterform['fromImplicitExpDate']->getData();\n $toImplicitExpDate = $filterform['toImplicitExpDate']->getData();\n $briefDescription = $filterform['briefDescription']->getData();\n $expectedExpirationDateChoices = $filterform['expectedExpirationDateChoices']->getData();\n $requesterGroup = $filterform['requesterGroup']->getData();\n\n $priceList = NULL;\n if( isset($filterform['priceList']) ) {\n $priceList = $filterform['priceList']->getData();\n }\n\n $overBudget = NULL;\n if( isset($filterform['overBudget']) ) {\n $overBudget = $filterform['overBudget']->getData();\n }\n\n //$showMatchingAndTotal = $filterform['showMatchingAndTotal']->getData();\n// $archived = $filterform['completed']->getData();\n// $complete = $filterform['review']->getData();\n// $interviewee = $filterform['missinginfo']->getData();\n// $active = $filterform['approved']->getData();\n// $reject = $filterform['closed']->getData();\n if( isset($filterform['preroute']) ) {\n $preroute = $filterform['preroute']->getData();\n }\n\n $filterTitle = trim((string)$request->get('title'));\n\n if( $filterTitle ) {\n $title = $filterTitle;\n }\n //////// EOF create filter //////////\n\n //force to set project specialty filter for non-admin users\n if( $transresUtil->isAdminOrPrimaryReviewer() === false ) {\n //1) check if $projectSpecialties is not set => set $projectSpecialties as $projectSpecialtyAllowedArr\n if (count($projectSpecialties) == 0) {\n $projectSpecialtyReturn = $transresUtil->getReturnIndexSpecialtyArray($projectSpecialtyAllowedArr);\n return $this->redirectToRoute(\n $routeName,\n $projectSpecialtyReturn\n );\n } else {\n //2) construct $tempAllowedProjectSpecialties containing only allowed specialty from the $projectSpecialties\n $tempAllowedProjectSpecialties = new ArrayCollection();\n foreach ($projectSpecialties as $projectSpecialty) {\n if (!$projectSpecialtyDeniedArr->contains($projectSpecialty)) {\n $tempAllowedProjectSpecialties->add($projectSpecialty);\n }\n }\n\n //to prevent redirection loop, check if $projectSpecialties is different than $tempAllowedProjectSpecialties\n $diff = $transresUtil->getObjectDiff($projectSpecialties, $tempAllowedProjectSpecialties->toArray());\n\n if (count($diff) > 0) {\n $projectSpecialtyReturn = $transresUtil->getReturnIndexSpecialtyArray($tempAllowedProjectSpecialties);\n return $this->redirectToRoute(\n $routeName,\n $projectSpecialtyReturn\n );\n }\n }\n }//if not admin\n\n\n //////////////////// Start Filter ////////////////////\n\n //Non admin, Primary Reviewers, Technicians and Executive can see all projects.\n // All other users can view only their projects (where they are requesters: PI, Pathologists Involved, Co-Investigators, Contacts, Billing Contacts)\n// if(\n// $transresUtil->isAdminOrPrimaryReviewer() === false &&\n// $this->isGranted('ROLE_TRANSRES_TECHNICIAN') === false &&\n// $this->isGranted('ROLE_TRANSRES_EXECUTIVE_HEMATOPATHOLOGY') === false &&\n// $this->isGranted('ROLE_TRANSRES_EXECUTIVE_APCP') === false\n// ) {\n//\n// }\n\n //$testingDisable = 0;\n //if( $testingDisable ) {\n\n /////////////////////// Limit access for non-admin, non-reviewer, non-executive users /////////////////////////////\n //Non admin, Primary Reviewers, Reviewers and Executive can see all projects.\n // All other users can view only their projects\n // (where they are requesters: PI, Pathologists Involved, Co-Investigators, Contacts, Billing Contacts or reviewers)\n if (\n $transresUtil->isAdminOrPrimaryReviewerOrExecutive() //index\n || $this->isGranted('ROLE_TRANSRES_TECHNICIAN')\n || $transresUtil->hasReviewerRoles()\n ) {\n $showOnlyMyProjects = false;\n } else {\n //this will hide projects \"Project Requests Pending My Review\" for added reviewers directly to the project without reviewer role\n $showOnlyMyProjects = true;\n }\n //echo \"showOnlyMyProjects=$showOnlyMyProjects <br>\";\n /////////////////////// EOF Limit access for non-admin, non-reviewer, non-executive users /////////////////////////////\n\n if ($projectSpecialties && count($projectSpecialties) > 0) {\n //echo \"testing where projectSpecialty <br>\";\n $dql->leftJoin('project.projectSpecialty', 'projectSpecialty');\n $projectSpecialtyIdsArr = array();\n foreach ($projectSpecialties as $projectSpecialty) {\n $projectSpecialtyIdsArr[] = $projectSpecialty->getId();\n }\n $dql->andWhere(\"projectSpecialty.id IN (:projectSpecialtyIdsArr)\");\n $dqlParameters[\"projectSpecialtyIdsArr\"] = $projectSpecialtyIdsArr;\n }\n\n //echo \"count states=\".count($states).\"<br>\";\n if ($states && count($states) > 0) {\n //echo \"testing where state <br>\";\n //All except Drafts\n $allExceptDraft = \"\";\n if (in_array(\"All-except-Drafts\", $states)) {\n $allExceptDraft = \" OR project.state != 'draft' OR project.state IS NULL\";\n }\n if (in_array(\"All-except-Drafts-and-Canceled\", $states)) {\n $allExceptDraft = \" OR (project.state != 'draft' AND project.state != 'canceled') OR project.state IS NULL\";\n }\n $dql->andWhere(\"project.state IN (:states)\" . $allExceptDraft);\n $dqlParameters[\"states\"] = $states;\n\n if (count($states) == 1 && $states[0] == \"All-except-Drafts-and-Canceled\") {\n //as regular filter\n } else {\n $advancedFilter++;\n }\n }\n\n if ($searchId) {\n //echo \"testing where searchId <br>\";\n //echo \"searchId=$searchId<br>\";\n $dql->andWhere(\"LOWER(project.oid) LIKE LOWER(:oid)\");\n //$dql->andWhere(\"project.oid LIKE :oid\");\n $dqlParameters[\"oid\"] = \"%\" . $searchId . \"%\";\n }\n\n if ($exportId) {\n //echo \"testing where exportId <br>\";\n //$dql->andWhere(\"LOWER(project.exportId) LIKE LOWER(:exportId)\");\n $dql->andWhere(\"CAST(project.exportId as VARCHAR) LIKE LOWER(:exportId)\");\n $dqlParameters[\"exportId\"] = \"%\" . $exportId . \"%\";\n $advancedFilter++;\n }\n\n if ($briefDescription) {\n $dql->andWhere(\"LOWER(project.description) LIKE LOWER(:description)\");\n $dqlParameters[\"description\"] = \"%\" . $briefDescription . \"%\";\n $advancedFilter++;\n }\n\n if ($priceList) {\n if ($priceList != 'all') {\n $dql->leftJoin('project.priceList', 'priceList');\n if( $priceList == 'external' ) {\n //if ($priceList == 'default') {\n $dql->andWhere(\"priceList.id IS NULL\");\n } else {\n $dql->andWhere(\"priceList.id = :priceListId\");\n $dqlParameters[\"priceListId\"] = $priceList;\n }\n $advancedFilter++;\n }\n }\n\n //TODO: use approvedProjectBudget and $grandTotal (Total) from work requests ($invoice->getTotal(), $grandTotal = $total + $subsidy;)\n //1 way) How to: Add overBudget to the project entity. Update overBudget when invoice is created/updated\n //2 way) Add \"Total\" (GrandTotal) with subsidy (positive or negative),\n //Update Total when create/edit invoice, change invoice status (Canceled) and change Work Request status (draft, canceled)\n //Then make a query to get approvedProjectBudget-Total\n //3 way) use DoctrineListener, when invoice or work request is updated, update project's total\n //echo \"overBudget=$overBudget<br>\";\n if ($overBudget) {\n //echo \"testing where over-budget <br>\";\n if ($overBudget != 'all') {\n\n if ($overBudget == 'over-budget-with-no-budget') {\n //do not show all project that have “No Budget Limit” checked\n //list all projects that are also active and non-funded,\n // and that have the “Remaining Budget” amount less than zero\n //AND all projects that have unspent amount of “No Info” (Approved Project Budget is NULL)\n// $dql->andWhere(\n// \"\n// project.approvedProjectBudget IS NULL OR\n// (project.approvedProjectBudget IS NOT NULL AND project.grandTotal IS NOT NULL AND project.grandTotal > project.approvedProjectBudget)\n// OR\n// (project.totalCost IS NOT NULL AND project.grandTotal IS NOT NULL AND project.grandTotal > CAST(project.totalCost as NUMERIC))\n// \"\n// );\n //populate approvedProjectBudget according to the totalCost\n //$dql->andWhere(\"project.approvedProjectBudget IS NULL OR (project.total IS NOT NULL AND project.total > project.approvedProjectBudget)\");\n //$dql->andWhere(\"(project.grandTotal IS NOT NULL AND project.grandTotal > project.approvedProjectBudget)\");\n// $dql->andWhere(\"\n// project.approvedProjectBudget IS NULL\n// OR\n// (project.approvedProjectBudget IS NOT NULL AND project.noBudgetLimit = FALSE AND project.total > project.approvedProjectBudget)\n// \");\n\n $dql->andWhere(\n \"project.noBudgetLimit = FALSE\" .\n \" AND\" .\n //\" project.funded != TRUE\"\n //.\" AND\".\n \" (\" .\n \"project.approvedProjectBudget IS NULL\" .\n \" OR\" .\n \" (project.total IS NOT NULL AND project.approvedProjectBudget IS NOT NULL AND project.total > project.approvedProjectBudget)\" .\n \")\"\n );\n }\n\n if ($overBudget == 'over-budget') {\n //$dql->andWhere(\"project.approvedProjectBudget IS NOT NULL OR project.grandTotal > project.approvedProjectBudget\");\n //$dql->andWhere(\"project.grandTotal > CAST(project.approvedProjectBudget AS integer)\");\n\n// $dql->andWhere(\"\n// project.approvedProjectBudget IS NOT NULL AND project.noBudgetLimit = FALSE AND project.total > project.approvedProjectBudget\n// \");\n\n// $dql->andWhere(\"\n// project.total IS NOT NULL AND project.approvedProjectBudget IS NOT NULL AND project.noBudgetLimit = FALSE AND project.total > project.approvedProjectBudget\n// \");\n\n $dql->andWhere(\n \"project.noBudgetLimit = FALSE\" .\n \" AND\" .\n \" (\" .\n \" (project.total IS NOT NULL AND project.approvedProjectBudget IS NOT NULL AND project.total > project.approvedProjectBudget)\" .\n \")\"\n );\n }\n\n if ($overBudget == 'with-no-budget') {\n //$dql->andWhere(\"project.approvedProjectBudget IS NULL OR project.noBudgetLimit = FALSE\");\n $dql->andWhere(\"project.approvedProjectBudget IS NULL\");\n }\n\n $advancedFilter++;\n }\n }\n\n if( $expectedExpirationDateChoices ) {\n\n $expectedExpirationDateChoices = strtolower($expectedExpirationDateChoices);\n $expectedExpirationDateProcessed = false;\n\n if ($expectedExpirationDateChoices == strtolower('All')) {\n //do nothing\n $expectedExpirationDateProcessed = true;\n }\n\n //only for non-funded projects. clear for all funded projects.\n // However we have a separate filter for funded/non-funded projects.\n // Therefore, should we include \"project.funded != TRUE\" condition here?\n\n $now = new \\DateTime();\n $nowStr = $now->format('Y-m-d H:i:s');\n\n if( $expectedExpirationDateChoices == strtolower('Expired') ) {\n $dql->andWhere('(:nowDatetime > project.expectedExpirationDate AND project.funded != TRUE)');\n $dqlParameters['nowDatetime'] = $nowStr;\n $expectedExpirationDateProcessed = true;\n }\n\n if( $expectedExpirationDateChoices == strtolower('Expiring') ) {\n //([expiration date - “Default number of months in advance…” (var from site settings)] older than today)\n $projectExprDurationEmail = $transresUtil->getProjectExprDurationEmail();\n if( $projectExprDurationEmail ) {\n $advanceDate = $now->modify(\"+\" . $projectExprDurationEmail . \" months\");\n $dql->andWhere('(project.expectedExpirationDate BETWEEN :nowDatetime and :advanceDate AND project.funded != TRUE)');\n $dqlParameters['nowDatetime'] = $nowStr;\n $dqlParameters['advanceDate'] = $advanceDate->format('Y-m-d H:i:s');\n }\n $expectedExpirationDateProcessed = true;\n }\n\n if( $expectedExpirationDateChoices == strtolower('Current/Non-expired') ) {\n $dql->andWhere('project.expectedExpirationDate > :nowDatetime AND project.funded != TRUE');\n $dqlParameters['nowDatetime'] = $nowStr;\n $expectedExpirationDateProcessed = true;\n }\n\n if( $expectedExpirationDateProcessed == false ) {\n $this->addFlash(\n 'warning',\n \"Expiration filter '$expectedExpirationDateChoices' not found\"\n );\n }\n\n $advancedFilter++;\n }\n\n if( $requesterGroup ) {\n if( $requesterGroup == 'Any' ) {\n //filter nothing\n }\n elseif( $requesterGroup == 'None' ) {\n $dql->andWhere('project.requesterGroup IS NULL');\n }\n else {\n $dql->andWhere('project.requesterGroup = :requesterGroup');\n $dqlParameters['requesterGroup'] = $requesterGroup;\n }\n\n }\n\n //////////////// get Projects IDs with the form node filter ////////////////\n if ($formnode) {\n //echo \"testing where formnode <br>\";\n if ($searchProjectType) {\n $projectTypeIds = $transresUtil->getProjectIdsFormNodeByFieldName($searchProjectType->getId(), \"Project Type\");\n $dql->andWhere(\"project.id IN (:projectTypeIds)\");\n $dqlParameters[\"projectTypeIds\"] = $projectTypeIds;\n $advancedFilter++;\n }\n if ($searchTitle) {\n $titleIds = $transresUtil->getProjectIdsFormNodeByFieldName($searchTitle, \"Title\");\n //$dql->andWhere(\"project.id IN (\".implode(\",\",$titleIds).\")\");\n $dql->andWhere(\"project.id IN (:titleIds)\");\n $dqlParameters[\"titleIds\"] = $titleIds;\n $advancedFilter++;\n }\n if ($searchIrbNumber) {\n $irbnumberIds = $transresUtil->getProjectIdsFormNodeByFieldName($searchIrbNumber, \"$humanName Number\");\n //$dql->andWhere(\"project.id IN (\".implode(\",\",$irbnumberIds).\")\");\n $dql->andWhere(\"project.id IN (:irbnumberIds)\");\n $dqlParameters[\"irbnumberIds\"] = $irbnumberIds;\n $advancedFilter++;\n }\n if ($fundingNumber) {\n $fundingNumberIds = $transresUtil->getProjectIdsFormNodeByFieldName($fundingNumber, \"If funded, please provide account number\");\n //$dql->andWhere(\"project.id IN (\".implode(\",\",$fundingNumberIds).\")\");\n $dql->andWhere(\"project.id IN (:fundingNumberIds)\");\n $dqlParameters[\"fundingNumberIds\"] = $fundingNumberIds;\n $advancedFilter++;\n }\n if ($fundingType) {\n //echo \"fundingType=\" . $fundingType . \"<br>\";\n $compareType = NULL;\n if ($fundingType == \"Funded\") {\n $compareType = 1;\n }\n if ($fundingType == \"Non-Funded\") {\n $compareType = 0;\n }\n if (isset($compareType)) {\n //$transResFormNodeUtil->getProjectFormNodeFieldByName(project,\"Funded\");\n $fundedIds = $transresUtil->getProjectIdsFormNodeByFieldName($compareType, \"Funded\");\n //echo \"fundingNumberIds:\" . implode(\",\", $fundingNumberIds) . \"<br>\";\n $dql->andWhere(\"project.id IN (:fundedIds)\");\n $dqlParameters[\"fundedIds\"] = $fundedIds;\n }\n $advancedFilter++;\n }\n }\n //////////////// EOF get Projects IDs with the form node filter ////////////////\n\n if ($searchProjectType) {\n $dql->andWhere(\"projectType.id = :projectTypeId\");\n $dqlParameters[\"projectTypeId\"] = $searchProjectType->getId();\n $advancedFilter++;\n }\n //echo \"searchTitle=$searchTitle <br>\";\n if ($searchTitle) {\n //exit('111');\n $dql->andWhere(\"LOWER(project.title) LIKE LOWER(:title)\");\n $dqlParameters[\"title\"] = \"%\" . $searchTitle . \"%\";\n $advancedFilter++;\n }\n if ($searchIrbNumber) {\n $dql->andWhere(\"LOWER(project.irbNumber) LIKE LOWER(:irbNumber) OR LOWER(project.iacucNumber) LIKE LOWER(:irbNumber)\");\n $dqlParameters[\"irbNumber\"] = \"%\" . $searchIrbNumber . \"%\";\n $advancedFilter++;\n }\n if ($fundingNumber) {\n $dql->andWhere(\"LOWER(project.fundedAccountNumber) LIKE LOWER(:fundedAccountNumber)\");\n $dqlParameters[\"fundedAccountNumber\"] = \"%\" . $fundingNumber . \"%\";\n $advancedFilter++;\n }\n if ($fundingType) {\n //echo \"fundingType=\" . $fundingType . \"<br>\";\n if ($fundingType == \"Funded\") {\n $dql->andWhere(\"project.funded = true\");\n }\n if ($fundingType == \"Non-Funded\") {\n $dql->andWhere(\"project.funded = false OR project.funded IS NULL\");\n }\n $advancedFilter++;\n }\n\n if ($humanTissue) {\n //echo \"fundingType=\" . $humanTissue . \"<br>\";\n if ($humanTissue == \"Involves Human Tissue\") {\n $dql->andWhere(\"project.involveHumanTissue = 'Yes'\");\n }\n if ($humanTissue == \"Does Not Involve Human Tissue\") {\n $dql->andWhere(\"project.involveHumanTissue = 'No' OR project.involveHumanTissue IS NULL\");\n }\n $advancedFilter++;\n }\n if ($exemptIrbApproval) {\n //echo \"fundingType=\" . $exemptIrbApproval . \"<br>\";\n if ($exemptIrbApproval == \"exempt-from-irb-approval\") {\n $dql->andWhere(\"project.exemptIrbApproval = true OR project.exemptIrbApproval IS NULL\");\n }\n if ($exemptIrbApproval == \"not-exempt-from-irb-approval\") {\n $dql->andWhere(\"project.exemptIrbApproval = false\");\n }\n $advancedFilter++;\n }\n\n\n if ($principalInvestigators && count($principalInvestigators) > 0) {\n //echo \"testing where principalInvestigators <br>\";\n $dql->andWhere(\"principalInvestigators.id IN (:principalInvestigators) OR principalIrbInvestigator.id IN (:principalInvestigators)\");\n $principalInvestigatorsIdsArr = array();\n foreach ($principalInvestigators as $principalInvestigator) {\n $principalInvestigatorsIdsArr[] = $principalInvestigator->getId();\n }\n $dqlParameters[\"principalInvestigators\"] = $principalInvestigatorsIdsArr; //implode(\",\",$principalInvestigatorsIdsArr);\n }\n\n //$associatedUsers\n if( $associatedUsers && count($associatedUsers) > 0 ) {\n\n $showAssCriterion =\n \"principalInvestigators.id IN (:assUserIds) OR \".\n \"principalIrbInvestigator.id IN (:assUserIds) OR \".\n \"submitInvestigators.id IN (:assUserIds) OR \".\n \"coInvestigators.id IN (:assUserIds) OR \".\n \"pathologists.id IN (:assUserIds) OR \".\n \"contacts.id IN (:assUserIds) OR \".\n \"billingContact.id IN (:assUserIds) OR \".\n \"submitter.id IN (:assUserIds)\";\n\n $dql->andWhere($showAssCriterion);\n $dqlParameters[\"assUserIds\"] = $associatedUsers;\n\n $advancedFilter++;\n }\n\n if ($submitter) {\n //echo \"submitter=\".$submitter->getId().\"<br>\";\n $dql->andWhere(\"submitter.id = :submitterId\");\n $dqlParameters[\"submitterId\"] = $submitter->getId();\n $advancedFilter++;\n }\n\n if ($reviewers && count($reviewers) > 0) {\n //echo \"testing where reviewerIds <br>\";\n //\"principalInvestigators.id IN (:principalInvestigators)\"\n $reviewersCriterion =\n \"irbReviewer.id IN (:reviewerIds) OR \" .\n \"irbReviewerDelegate.id IN (:reviewerIds) OR \" .\n\n \"adminReviewer.id IN (:reviewerIds) OR \" .\n \"adminReviewerDelegate.id IN (:reviewerIds) OR \" .\n\n \"committeeReviewer.id IN (:reviewerIds) OR \" .\n \"committeeReviewerDelegate.id IN (:reviewerIds) OR \" .\n\n \"finalReviewer.id IN (:reviewerIds) OR \" .\n \"finalReviewerDelegate.id IN (:reviewerIds)\";\n $dql->andWhere($reviewersCriterion);\n\n $reviewersIdsArr = array();\n foreach ($reviewers as $reviewer) {\n $reviewersIdsArr[] = $reviewer->getId();\n }\n\n $dqlParameters[\"reviewerIds\"] = $reviewersIdsArr; //implode(\",\",$principalInvestigatorsIdsArr);\n $advancedFilter++;\n }\n\n if ($startDate) {\n //echo \"startDate=\" . $startDate->format('Y-m-d H:i:s') . \"<br>\";\n $dql->andWhere('project.createDate >= :startDate');\n $dqlParameters['startDate'] = $startDate->format('Y-m-d H:i:s');\n $advancedFilter++;\n }\n if ($endDate) {\n $endDate->modify('+1 day');\n //echo \"endDate=\" . $endDate->format('Y-m-d H:i:s') . \"<br>\";\n $dql->andWhere('project.createDate <= :endDate');\n $dqlParameters['endDate'] = $endDate->format('Y-m-d H:i:s');\n $advancedFilter++;\n }\n\n if ($fromExpectedCompletionDate) {\n $dql->andWhere('project.expectedCompletionDate >= :fromExpectedCompletionDate');\n $dqlParameters['fromExpectedCompletionDate'] = $fromExpectedCompletionDate->format('Y-m-d H:i:s');\n $advancedFilter++;\n }\n if ($toExpectedCompletionDate) {\n $toExpectedCompletionDate->modify('+1 day');\n $dql->andWhere('project.expectedCompletionDate <= :toExpectedCompletionDate');\n $dqlParameters['toExpectedCompletionDate'] = $toExpectedCompletionDate->format('Y-m-d H:i:s');\n $advancedFilter++;\n }\n\n if ($fromImplicitExpDate) {\n $dql->andWhere('project.implicitExpirationDate >= :fromImplicitExpirationDate');\n $dqlParameters['fromImplicitExpirationDate'] = $fromImplicitExpDate->format('Y-m-d H:i:s');\n $advancedFilter++;\n }\n if ($toImplicitExpDate) {\n $toImplicitExpDate->modify('+1 day');\n $dql->andWhere('project.implicitExpirationDate <= :toImplicitExpirationDate');\n $dqlParameters['toImplicitExpirationDate'] = $toImplicitExpDate->format('Y-m-d H:i:s');\n $advancedFilter++;\n }\n\n //In the project list, show Draft projects only to the project's requester and to admins\n if ($transresUtil->isAdminOrPrimaryReviewer() === false) {\n //echo \"testing where project.state != 'draft' <br>\";\n //show projects where Iam requester\n $showOnlyMyProjectsCriterion = $this->getProjectWhereIamRequester();\n\n //OR show projects with state!= draft\n $allowedStatesCriterion = \"project.state != 'draft'\";\n\n $limitedProjectsCriterion = \"(\" . $showOnlyMyProjectsCriterion . \")\" . \" OR \" . $allowedStatesCriterion;\n\n $dql->andWhere($limitedProjectsCriterion);\n $dqlParameters[\"userId\"] = $user->getId();\n }\n\n// /////////////////////// Limit access for non-admin, non-reviewer, non-executive users /////////////////////////////\n// //Non admin, Primary Reviewers, Reviewers and Executive can see all projects.\n// // All other users can view only their projects\n// // (where they are requesters: PI, Pathologists Involved, Co-Investigators, Contacts, Billing Contacts or reviewers)\n// if (\n// $transresUtil->isAdminOrPrimaryReviewerOrExecutive() //index\n// || $this->isGranted('ROLE_TRANSRES_TECHNICIAN')\n// || $transresUtil->hasReviewerRoles()\n// ) {\n// $showOnlyMyProjects = false;\n// } else {\n// //this will hide projects \"Project Requests Pending My Review\" for added reviewers directly to the project without reviewer role\n// $showOnlyMyProjects = true;\n// }\n// //echo \"showOnlyMyProjects=$showOnlyMyProjects <br>\";\n//\n// if ($showOnlyMyProjects || $routeName == \"translationalresearch_my_project_index\") {\n// $showOnlyMyProjectsCriterion = $this->getProjectWhereIamRequester();\n// $dql->andWhere($showOnlyMyProjectsCriterion);\n// $dqlParameters[\"userId\"] = $user->getId();\n// $title = \"My Project Requests, where I am a Requester\";\n// }\n// /////////////////////// EOF Limit access for non-admin, non-reviewer, non-executive users /////////////////////////////\n\n if ($routeName == \"translationalresearch_my_request_project_index\") {\n $myRequestProjectsCriterion = \"submitter.id = :userId\";\n $dql->andWhere($myRequestProjectsCriterion);\n\n $dqlParameters[\"userId\"] = $user->getId();\n $title = \"Projects I Personally Requested\"; //\"My Project Requests, Where I am a Requester\";\n }\n\n if ($routeName == \"translationalresearch_my_request_project_draft_index\") {\n $myRequestProjectsCriterion = $this->getProjectWhereIamRequester();\n $dql->andWhere($myRequestProjectsCriterion . \" AND project.state != 'draft'\");\n\n $dqlParameters[\"userId\"] = $user->getId();\n $title = \"Draft Projects, where I am a Requester\"; //\"My Project Requests, Where I am a Requester\";\n }\n\n //Projects I have reviewed (History):\n // only shows projects previously reviewed by the reviewer, not any of the projects currently pending this user's review\n if( $routeName == \"translationalresearch_my_reviewed_project_index\" ) {\n //echo \"testing where translationalresearch_my_reviewed_project_index <br>\";\n //$myReviewProjectsCriterion = $this->getProjectWhereIamReviewer();\n\n //rely on decision: problem that imported projects do not have decision set\n// $myReviewedProjectsCriterion =\n// \"( (irbReviewer.id = :userId OR irbReviewerDelegate.id = :userId) AND (irbReviews.decision='approved' OR irbReviews.decision='rejected') )\".\n// \" OR \".\n// \"((adminReviewer.id = :userId OR adminReviewerDelegate.id = :userId) AND (adminReviews.decision='approved' OR adminReviews.decision='rejected') )\".\n// \" OR \".\n// \"((committeeReviewer.id = :userId OR committeeReviewerDelegate.id = :userId) AND (committeeReviews.decision='approved' OR committeeReviews.decision='rejected') )\".\n// \" OR \".\n// \"((finalReviewer.id = :userId OR finalReviewerDelegate.id = :userId) AND (finalReviews.decision='approved' OR finalReviews.decision='rejected') )\"\n// ;\n\n //rely on state after reviewer's state\n $myReviewedProjectsCriterion =\n \"( (irbReviewer.id = :userId OR irbReviewerDelegate.id = :userId) AND (\".\n \"project.state='irb_rejected' OR project.state='admin_review' OR \".\n \"project.state='admin_rejected' OR project.state='committee_review' OR \".\n \"project.state='committee_rejected' OR project.state='final_review' OR \".\n \"project.state='final_review' OR project.state='final_approved' OR \".\n \"project.state='final_rejected' OR project.state='closed'\".\n \"))\".\n \" OR \".\n \"((adminReviewer.id = :userId OR adminReviewerDelegate.id = :userId) AND (\".\n \"project.state='admin_rejected' OR project.state='committee_review' OR \".\n \"project.state='committee_rejected' OR project.state='final_review' OR \".\n \"project.state='final_review' OR project.state='final_approved' OR \".\n \"project.state='final_rejected' OR project.state='closed'\".\n \"))\".\n \" OR \".\n \"((committeeReviewer.id = :userId OR committeeReviewerDelegate.id = :userId) AND (\".\n \"project.state='committee_rejected' OR project.state='final_review' OR \".\n \"project.state='final_review' OR project.state='final_approved' OR \".\n \"project.state='final_rejected' OR project.state='closed'\".\n \"))\".\n \" OR \".\n \"((finalReviewer.id = :userId OR finalReviewerDelegate.id = :userId) AND (\".\n \"project.state='final_review' OR project.state='final_approved' OR \".\n \"project.state='final_rejected' OR project.state='closed'\".\n \"))\"\n ;\n\n $dql->andWhere($myReviewedProjectsCriterion);\n\n $dqlParameters[\"userId\"] = $user->getId();\n $title = \"Projects I Have Reviewed (History)\";\n\n $showOnlyMyProjects = false;\n }\n\n if( $routeName == \"translationalresearch_my_pending_review_project_index\" ) {\n //echo \"testing where translationalresearch_my_pending_review_project_index <br>\";\n //Pending my review: I'm a reviewer and project's review where I'm a reviewer has decision = NULL (\"Pending Review\")\n //TODO: should filter current state, and corresponding current state review:decision is NULL (pending) and reviewer is logged in user?\n// $myPendingProjectsCriterion =\n// \"((irbReviewer.id = :userId OR irbReviewerDelegate.id = :userId) AND irbReviews.decision IS NULL)\".\n// \" OR \".\n// \"((adminReviewer.id = :userId OR adminReviewerDelegate.id = :userId) AND adminReviews.decision IS NULL)\".\n// \" OR \".\n// \"((committeeReviewer.id = :userId OR committeeReviewerDelegate.id = :userId) AND committeeReviews.decision IS NULL)\".\n// \" OR \".\n// \"((finalReviewer.id = :userId OR finalReviewerDelegate.id = :userId) AND finalReviews.decision IS NULL)\"\n// .\" AND project.state LIKE '%_review'\"\n// //.\" AND project.state LIKE 'irb_review'\"\n// //.\" AND (project.state=irbReviews.status OR project.state=adminReviews.status OR project.state=committeeReviews.status OR project.state=finalReviews.status)\"\n// ;\n// $myPendingProjectsCriterion =\n// \"((irbReviewer.id = :userId OR irbReviewerDelegate.id = :userId) AND project.state=irbReviews.status)\".\n// \" OR \".\n// \"((adminReviewer.id = :userId OR adminReviewerDelegate.id = :userId) AND project.state=adminReviews.status)\".\n// \" OR \".\n// \"((committeeReviewer.id = :userId OR committeeReviewerDelegate.id = :userId) AND project.state=committeeReviews.status)\".\n// \" OR \".\n// \"((finalReviewer.id = :userId OR finalReviewerDelegate.id = :userId) AND project.state=finalReviews.status)\"\n// .\" AND project.state LIKE '%_review'\"\n// //.\" AND (project.state=irbReviews.status OR project.state=adminReviews.status OR project.state=committeeReviews.status OR project.state=finalReviews.status)\"\n// ;\n //echo \"routeName=$routeName <br>\";\n $myPendingProjectsCriterion =\n \"((irbReviewer.id = :userId OR irbReviewerDelegate.id = :userId) AND project.state='irb_review')\".\n \" OR \".\n \"((adminReviewer.id = :userId OR adminReviewerDelegate.id = :userId) AND project.state='admin_review')\".\n \" OR \".\n \"((committeeReviewer.id = :userId OR committeeReviewerDelegate.id = :userId) AND project.state='committee_review')\".\n \" OR \".\n \"((finalReviewer.id = :userId OR finalReviewerDelegate.id = :userId) AND project.state='final_review')\"\n .\" AND project.state LIKE '%_review'\"\n //.\" AND (project.state=irbReviews.status OR project.state=adminReviews.status OR project.state=committeeReviews.status OR project.state=finalReviews.status)\"\n ;\n\n //testing\n //TODO: why added reviewer does not see the project on the project to review page\n //$myPendingProjectsCriterion =\n // \"((adminReviewer.id = :userId OR adminReviewerDelegate.id = :userId) AND project.state='admin_review')\"\n //;\n\n $dql->andWhere($myPendingProjectsCriterion);\n $dqlParameters[\"userId\"] = $user->getId();\n\n $title = \"Project Requests Pending My Review\";\n\n $showOnlyMyProjects = false;\n }\n\n// if( $routeName == \"translationalresearch_pending_review_project_index\" ) {\n// //echo \"testing where translationalresearch_pending_review_project_index <br>\";\n// //echo \"routeName=$routeName <br>\";\n// //all statuses not equal to Closed/Canceled/Draft/Approved\n// $pendingProjectsCriterion =\n// \"project.state LIKE '%_review' OR project.state LIKE '%_missinginfo'\"\n// ;\n//\n// $dql->andWhere($pendingProjectsCriterion);\n//\n// $title = \"Project Requests Pending Review\";\n//\n// $showOnlyMyProjects = false;\n// }\n\n if( $routeName == \"translationalresearch_my_missinginfo_review_project_index\" ) {\n //echo \"testing where translationalresearch_my_missinginfo_review_project_index <br>\";\n $myPendingProjectsCriterion =\n \"((irbReviewer.id = :userId OR irbReviewerDelegate.id = :userId) AND project.state='irb_missinginfo')\".\n \" OR \".\n \"((adminReviewer.id = :userId OR adminReviewerDelegate.id = :userId) AND project.state='admin_missinginfo')\"\n ;\n\n $dql->andWhere($myPendingProjectsCriterion);\n\n $dqlParameters[\"userId\"] = $user->getId();\n $title = \"Projects Awaiting Additional Info To Be Reviewed\";\n\n $showOnlyMyProjects = false;\n }\n\n //set title\n if( $routeName == \"translationalresearch_active_expired_project_index\" ) {\n $title = \"Active Projects with Expired $humanName\";\n }\n if( $routeName == \"translationalresearch_active_expired_soon_project_index\" ) {\n $title = \"Active Projects with $humanName Expiring Soon\";\n }\n if( $routeName == \"translationalresearch_active_non_funded_over_budget_project_index\" ) {\n $title = \"Active Non-Funded Projects Over Budget or With No Budget\";\n }\n if( $routeName == \"translationalresearch_approved_funded_project_index\" ) {\n $title = \"Approved Funded Projects\";\n }\n if( $routeName == \"translationalresearch_approved_non_funded_project_index\" ) {\n $title = \"Approved Non-Funded Projects\";\n }\n\n /////////////////////// Limit access for non-admin, non-reviewer, non-executive users /////////////////////////////\n// //Non admin, Primary Reviewers, Reviewers and Executive can see all projects.\n// // All other users can view only their projects\n// // (where they are requesters: PI, Pathologists Involved, Co-Investigators, Contacts, Billing Contacts or reviewers)\n// if (\n// $transresUtil->isAdminOrPrimaryReviewerOrExecutive() //index\n// || $this->isGranted('ROLE_TRANSRES_TECHNICIAN')\n// || $transresUtil->hasReviewerRoles()\n// ) {\n// $showOnlyMyProjects = false;\n// } else {\n// //this will hide projects \"Project Requests Pending My Review\" for added reviewers directly to the project without reviewer role\n// $showOnlyMyProjects = true;\n// }\n// //echo \"showOnlyMyProjects=$showOnlyMyProjects <br>\";\n\n if( $showOnlyMyProjects || $routeName == \"translationalresearch_my_project_index\" ) {\n $showOnlyMyProjectsCriterion = $this->getProjectWhereIamRequester();\n $dql->andWhere($showOnlyMyProjectsCriterion);\n $dqlParameters[\"userId\"] = $user->getId();\n if( $routeName == \"translationalresearch_my_project_index\" ) {\n $title = \"My Project Requests, where I am a Requester\";\n }\n }\n //////////////////// EOF Start Filter ////////////////////\n\n $dql->orderBy('project.createDate', 'DESC');\n\n //echo \"showMatchingAndTotal=\".$showMatchingAndTotal.\"<br>\";\n// if( $showMatchingAndTotal == \"WithTotal\" ) {\n// $withMatching = true; //slower 7.5 sec\n// $advancedFilter++;\n// } else {\n// $withMatching = false; //twice faster 3.5 sec\n// }\n\n $limit = 10;\n $query = $dql->getQuery(); //$query = $em->createQuery($dql);\n\n// if( $withMatching ) {\n// $query2 = $em->createQuery($dql);\n// }\n\n if( count($dqlParameters) > 0 ) {\n $query->setParameters($dqlParameters);\n\n// if( $withMatching ) {\n// $query2->setParameters($dqlParameters);\n// }\n }\n\n //echo \"query=\".$query->getSql().\"<br>\";\n\n $paginationParams = array(\n 'defaultSortFieldName' => 'project.id',\n 'defaultSortDirection' => 'DESC',\n 'wrap-queries' => true\n );\n\n $paginator = $this->container->get('knp_paginator');\n $projects = $paginator->paginate(\n $query,\n $request->query->get('page', 1), /*page number*/\n $limit, /*limit per page*/\n $paginationParams\n );\n\n $allProjectIdsArr = array();\n //if( $withMatching ) {\n //$allProjects = $query2->getResult();\n //$allGlobalProjects = $em->getRepository('AppTranslationalResearchBundle:Project')->findAll();\n //$title = $title . \" (Matching \" . count($allProjects) . \", Total \" . count($allGlobalProjects) . \")\";\n $allProjectIdsArr = $transresUtil->getProjectIdsArrByDqlParameters($dql,$dqlParameters);\n $allGlobalProjects = $transresUtil->getTotalProjectCount();\n $title = $title . \" (Matching \" . count($allProjectIdsArr) . \", Total \" . $allGlobalProjects . \")\";\n //}\n// if( count($allProjects) > 0 ) {\n// //$allProjects = $projects->getTotalItemCount();\n// $pageNumber = $projects->getCurrentPageNumber();\n// $items = $projects->getItems();\n// $startPageItems = (intval($pageNumber) - 1) * intval($limit) + 1;\n// $endPageItems = intval($startPageItems) + count($items) - 1;\n// //echo \"pageNumber=$pageNumber; items=\".count($items).\"; startPageItems=\".$startPageItems.\"; endPageItems=\".$endPageItems.\"<br>\";\n// $title = $title . \" (\" . $startPageItems . \" of \" . $endPageItems . \", Total \" . count($allProjects) . \")\";\n// } else {\n// $title = $title . \" (Total \" . count($allProjects) . \")\";\n// }\n\n //return array('filterError' => true,'title' => \"Test Performance\",); //test 18(295ms) queries vs 800(431ms)\n\n $eventObjectType = $em->getRepository(EventObjectTypeList::class)->findOneByName(\"Project\");\n if( $eventObjectType ) {\n $eventObjectTypeId = $eventObjectType->getId();\n } else {\n $eventObjectTypeId = null;\n }\n\n// return array(\n// 'filterError' => true,\n// 'title' => \"Test Performance\",\n// 'filterform' => $filterform->createView()\n// ); //test 18 queries vs 800\n\n //echo \"before ... <br>\";\n return array(\n //'projectsTableDisable' => true, //testing\n //'filterDisable' => true, //testing\n //'filterError' => true, //testing\n 'projects' => $projects,\n 'allProjectIdsArr' => $allProjectIdsArr,\n 'title' => $title,\n 'filterform' => $filterform->createView(),\n 'eventObjectTypeId' => $eventObjectTypeId,\n 'advancedFilter' => $advancedFilter\n );\n }", "public static function register_rest_routes() {\n\t\tforeach (static::$apis as $api) {\n\t\t\t$api->register_rest_route();\n\t\t}\n }", "public function testProductRoutes()\n\t{\n\t\t//$response = $this->call('GET', '/admin/website/2/products');\n\t\t\n\t\t//$this->assertEquals(200, $response->status());\n\t}", "public function testUrlCatchAllRoute(): void\n {\n Router::createRouteBuilder('/')\n ->connect('/*', ['controller' => 'Categories', 'action' => 'index']);\n $result = Router::url(['controller' => 'Categories', 'action' => 'index', '0']);\n $this->assertSame('/0', $result);\n\n $expected = [\n 'plugin' => null,\n 'controller' => 'Categories',\n 'action' => 'index',\n 'pass' => ['0'],\n '_matchedRoute' => '/*',\n ];\n $result = Router::parseRequest($this->makeRequest('/0', 'GET'));\n unset($result['_route']);\n $this->assertEquals($expected, $result);\n\n $result = Router::parseRequest($this->makeRequest('0', 'GET'));\n unset($result['_route']);\n $this->assertEquals($expected, $result);\n }", "private static function createVersionRoute()\n {\n self::$Router->map('GET|POST', '/[a:version]', function(string $version){\n if(isset(Handler::$MainConfiguration->VersionConfigurations[$version]) == false)\n {\n UnsupportedVersion::executeResponse();\n exit();\n }\n else\n {\n /** @var VersionConfiguration $VersionConfiguration */\n $VersionConfiguration = Handler::$MainConfiguration->VersionConfigurations[$version];\n\n $Modules = array();\n\n /** @var ModuleConfiguration $module */\n foreach($VersionConfiguration->Modules as $module)\n {\n $ModuleObject = self::getModuleObject($version, $module);\n\n $Modules['/' . $module->Path] = array(\n 'name' => $ModuleObject->name,\n 'version' => $ModuleObject->version,\n 'description' => $ModuleObject->description\n );\n }\n\n ModuleListingResponse::executeResponse($Modules);\n exit();\n }\n });\n }", "function register_rest_routes() {\n\tif ( class_exists( '\\WP_REST_Controller' ) ) {\n\t\tinclude_once __DIR__ . '/wprest-shortcodes-controller.php';\n\t\t$controller = new rest\\WPREST_Shortcodes_Controller();\n\t\t$controller->register_routes();\n\t}\n}", "protected function loadRoute()\n {\n $this->post('/task', 'task.controller:saveAction');\n\n // Url for update task\n $this->put('/task/{id}', 'task.controller:updateAction');\n\n // Url for see one task\n $this->get('/task/{id}', 'task.controller:getAction');\n\n // Url for delete task\n $this->delete('/task/{id}', 'task.controller:deleteAction');\n\n // Url for list of tasks\n $this->get('/task', 'task.controller:listAction');\n\n //Get Tag list\n $this->get('/tags', 'tag.controller:listAction');\n\n //Add tag to task\n $this->post('/addTag', 'tag.controller:setTagAction');\n\n //Add tag to tag list\n $this->post('/tag', 'tag.controller:saveAction');\n\n //Search by tag\n $this->get('/search/tag', 'tag.controller:searchAction'); \n\n // Url for delete tag in tag list\n $this->delete('/tag', 'tag.controller:deleteAction');\n \n // Url for auth github\n $this->post('/github', 'github.controller:authAction'); \n }", "public function testPublicPagesAllowed()\n {\n $this->get('/')->assertStatus(200);\n $this->get('/login')->assertStatus(200);\n $this->get('/password/reset')->assertStatus(200);\n $this->get('/register')->assertStatus(200);\n }", "public function testLeaseIndexFrontEnd()\n {\n $this->get(route('lease'))->assertStatus(200);\n }", "public function register_routes() {\n\t\t$version = '1';\n\t\t$namespace = 'askmedesk/v' . $version;\n register_rest_route( $namespace, '/tipi-richiesta', array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => [$this, 'get_tipi_richiesta'],\n 'permission_callback' => [$this, 'askmedesk_permission_check']\n\t\t));\n\t\tregister_rest_route($namespace, '/creazione-richiesta', array(\n\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t'callback' => [$this, 'crea_richiesta'],\n\t\t\t'permission_callback' => [$this, 'askmedesk_permission_check'],\n\t\t\t'args' => $this->get_endpoint_args_for_item_schema( false )\n\t\t));\n\t}", "public function add_endpoints() {\n\t\tadd_rewrite_endpoint( self::$endpoint, EP_ROOT | EP_PAGES );\n\t\t//flush_rewrite_rules();\n\t}", "public function testUrlGenerationWithAutoPrefixes(): void\n {\n Router::reload();\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/protected/{controller}/{action}/*', ['prefix' => 'Protected']);\n $routes->connect('/admin/{controller}/{action}/*', ['prefix' => 'Admin']);\n $routes->connect('/{controller}/{action}/*');\n\n $request = new ServerRequest([\n 'url' => '/images/index',\n 'params' => [\n 'plugin' => null, 'controller' => 'Images', 'action' => 'index',\n 'prefix' => null, 'protected' => false, 'url' => ['url' => 'images/index'],\n ],\n ]);\n Router::setRequest($request);\n\n $result = Router::url(['controller' => 'Images', 'action' => 'add']);\n $expected = '/Images/add';\n $this->assertSame($expected, $result);\n\n $result = Router::url(['controller' => 'Images', 'action' => 'add', 'prefix' => 'Protected']);\n $expected = '/protected/Images/add';\n $this->assertSame($expected, $result);\n\n $result = Router::url(['controller' => 'Images', 'action' => 'add_protected_test', 'prefix' => 'Protected']);\n $expected = '/protected/Images/add_protected_test';\n $this->assertSame($expected, $result);\n\n $result = Router::url(['action' => 'edit', 1]);\n $expected = '/Images/edit/1';\n $this->assertSame($expected, $result);\n\n $result = Router::url(['action' => 'edit', 1, 'prefix' => 'Protected']);\n $expected = '/protected/Images/edit/1';\n $this->assertSame($expected, $result);\n\n $result = Router::url(['action' => 'protectedEdit', 1, 'prefix' => 'Protected']);\n $expected = '/protected/Images/protectedEdit/1';\n $this->assertSame($expected, $result);\n\n $result = Router::url(['action' => 'edit', 1, 'prefix' => 'Protected']);\n $expected = '/protected/Images/edit/1';\n $this->assertSame($expected, $result);\n\n $result = Router::url(['controller' => 'Others', 'action' => 'edit', 1]);\n $expected = '/Others/edit/1';\n $this->assertSame($expected, $result);\n\n $result = Router::url(['controller' => 'Others', 'action' => 'edit', 1, 'prefix' => 'Protected']);\n $expected = '/protected/Others/edit/1';\n $this->assertSame($expected, $result);\n }", "protected function loadBackendRoutes() {}", "function add_custom_admin_routes($app) {\n\n}", "public function testAction() {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*$uri = \"$_SERVER[REQUEST_URI]\";\n\t\t\t$arr = explode('/', $uri );\n\t\t\t\n\t\t$path = \"$_SERVER[HTTP_HOST]\" . '/' . $arr[1] . '/';\n\t\t\n\t\techo \"<br/>Test Path: http://$path\";*/\n\t\t\n\t\t// Create directory, with full permissions\n\t\t//mkdir(\"NewDir\", \"0777\");\n\t\t// Rename\n\t\t//rename(\"newDir\", \"renameDir\");\n\t\n\t\t/*\n\t\t\t$indicesServer = array('PHP_SELF',\n\t\t\t\t\t'argv',\n\t\t\t\t\t'argc',\n\t\t\t\t\t'GATEWAY_INTERFACE',\n\t\t\t\t\t'SERVER_ADDR',\n\t\t\t\t\t'SERVER_NAME',\n\t\t\t\t\t'SERVER_SOFTWARE',\n\t\t\t\t\t'SERVER_PROTOCOL',\n\t\t\t\t\t'REQUEST_METHOD',\n\t\t\t\t\t'REQUEST_TIME',\n\t\t\t\t\t'REQUEST_TIME_FLOAT',\n\t\t\t\t\t'QUERY_STRING',\n\t\t\t\t\t'DOCUMENT_ROOT',\n\t\t\t\t\t'HTTP_ACCEPT',\n\t\t\t\t\t'HTTP_ACCEPT_CHARSET',\n\t\t\t\t\t'HTTP_ACCEPT_ENCODING',\n\t\t\t\t\t'HTTP_ACCEPT_LANGUAGE',\n\t\t\t\t\t'HTTP_CONNECTION',\n\t\t\t\t\t'HTTP_HOST',\n\t\t\t\t\t'HTTP_REFERER',\n\t\t\t\t\t'HTTP_USER_AGENT',\n\t\t\t\t\t'HTTPS',\n\t\t\t\t\t'REMOTE_ADDR',\n\t\t\t\t\t'REMOTE_HOST',\n\t\t\t\t\t'REMOTE_PORT',\n\t\t\t\t\t'REMOTE_USER',\n\t\t\t\t\t'REDIRECT_REMOTE_USER',\n\t\t\t\t\t'SCRIPT_FILENAME',\n\t\t\t\t\t'SERVER_ADMIN',\n\t\t\t\t\t'SERVER_PORT',\n\t\t\t\t\t'SERVER_SIGNATURE',\n\t\t\t\t\t'PATH_TRANSLATED',\n\t\t\t\t\t'SCRIPT_NAME',\n\t\t\t\t\t'REQUEST_URI',\n\t\t\t\t\t'PHP_AUTH_DIGEST',\n\t\t\t\t\t'PHP_AUTH_USER',\n\t\t\t\t\t'PHP_AUTH_PW',\n\t\t\t\t\t'AUTH_TYPE',\n\t\t\t\t\t'PATH_INFO',\n\t\t\t\t\t'ORIG_PATH_INFO') ;\n\t\n\t\techo \"<br/>\";\n\t\n\t\n\t\techo '<table cellpadding=\"10\">' ;\n\t\tforeach ($indicesServer as $arg) {\n\t\tif (isset($_SERVER[$arg])) {\n\t\techo '<tr><td>'.$arg.'</td><td>' . $_SERVER[$arg] . '</td></tr>' ;\n\t\t}\n\t\telse {\n\t\techo '<tr><td>'.$arg.'</td><td>-</td></tr>' ;\n\t\t}\n\t\t}\n\t\techo '</table>' ;\n\t\t*/\n\t}", "protected function routes()\n {\n Nova::routes()\n ->withAuthenticationRoutes()\n ->withPasswordResetRoutes()\n ->register();\n }", "protected function routes()\n {\n Nova::routes()\n ->withAuthenticationRoutes()\n ->withPasswordResetRoutes()\n ->register();\n }", "public function testUrlGenerationWithBasePath(): void\n {\n Router::createRouteBuilder('/')\n ->connect('/{controller}/{action}/*');\n $request = new ServerRequest([\n 'params' => [\n 'action' => 'index',\n 'plugin' => null,\n 'controller' => 'Subscribe',\n ],\n 'url' => '/subscribe',\n 'base' => '/magazine',\n 'webroot' => '/magazine/',\n ]);\n Router::setRequest($request);\n\n $result = Router::url();\n $this->assertSame('/magazine/subscribe', $result);\n\n $result = Router::url([]);\n $this->assertSame('/magazine/subscribe', $result);\n\n $result = Router::url('/');\n $this->assertSame('/magazine/', $result);\n\n $result = Router::url('/articles/');\n $this->assertSame('/magazine/articles/', $result);\n\n $result = Router::url('/articles::index');\n $this->assertSame('/magazine/articles::index', $result);\n\n $result = Router::url('/articles/view');\n $this->assertSame('/magazine/articles/view', $result);\n\n $result = Router::url(['controller' => 'Articles', 'action' => 'view', 1]);\n $this->assertSame('/magazine/Articles/view/1', $result);\n }", "public function testUrlGenerationWithRoutePathWithContext(): void\n {\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/articles', 'Articles::index');\n $routes->connect('/articles/view/*', 'Articles::view');\n $routes->connect('/admin/articles', 'Admin/Articles::index');\n $routes->connect('/cms/articles', 'Cms.Articles::index');\n $routes->connect('/cms/admin/articles', 'Cms.Admin/Articles::index');\n\n $request = new ServerRequest([\n 'params' => [\n 'plugin' => 'Cms',\n 'prefix' => 'Admin',\n 'controller' => 'Articles',\n 'action' => 'edit',\n 'pass' => ['3'],\n ],\n 'url' => '/admin/articles/edit/3',\n ]);\n Router::setRequest($request);\n\n $expected = '/articles';\n $result = Router::pathUrl('Articles::index');\n $this->assertSame($result, $expected);\n $result = Router::url(['_path' => 'Articles::index']);\n $this->assertSame($result, $expected);\n\n $expected = '/articles/view/3';\n $result = Router::pathUrl('Articles::view', [3]);\n $this->assertSame($result, $expected);\n $result = Router::url(['_path' => 'Articles::view', 3]);\n $this->assertSame($result, $expected);\n\n $expected = '/admin/articles';\n $result = Router::pathUrl('Admin/Articles::index');\n $this->assertSame($result, $expected);\n $result = Router::url(['_path' => 'Admin/Articles::index']);\n $this->assertSame($result, $expected);\n\n $expected = '/cms/admin/articles';\n $result = Router::pathUrl('Cms.Admin/Articles::index');\n $this->assertSame($result, $expected);\n $result = Router::url(['_path' => 'Cms.Admin/Articles::index']);\n $this->assertSame($result, $expected);\n\n $expected = '/cms/articles';\n $result = Router::pathUrl('Cms.Articles::index');\n $this->assertSame($result, $expected);\n $result = Router::url(['_path' => 'Cms.Articles::index']);\n $this->assertSame($result, $expected);\n }", "public static function preRouter(){\n\t\t\n\t}", "public function register_routes(): void {\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base,\n\t\t\t[\n\t\t\t\t[\n\t\t\t\t\t'methods' => WP_REST_Server::ALLMETHODS,\n\t\t\t\t\t'callback' => [ $this, 'status_check' ],\n\t\t\t\t\t'permission_callback' => [ $this, 'status_check_permissions_check' ],\n\t\t\t\t\t'args' => [\n\t\t\t\t\t\t'content' => [\n\t\t\t\t\t\t\t'description' => __( 'Test HTML content.', 'web-stories' ),\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'type' => 'string',\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}", "private function route() {\n\n// if (!in_array($_GET['page'], $pages)) {\n// echo \"bad\";\n// exit;\n// }\n\n if (!empty($_GET['page']) && file_exists( __ROOT__.'controller/'.$_GET['page'].'.php')) {\n include __ROOT__.'controller/'.$_GET['page'].'.php';\n } else {\n include __ROOT__.'controller/home.php';\n }\n include __ROOT__.'public/footer.html';\n }", "protected function _rebuildRoutes() {\n \\Drupal::service('router.builder')->rebuild();\n }", "protected function loadRemoteRoutes()\n {\n Route::as('larapush.')\n ->middleware('same-token', 'client')\n //->namespace('Brunocfalcao\\Larapush\\Http\\Controllers')\n ->prefix(app('config')->get('larapush.remote.suffix'))\n ->group(__DIR__.'/../routes/api.php');\n\n // Load Laravel Passport routes.\n Passport::routes();\n }", "protected function setupAdminRoutes() {\n if ( class_exists('GetStartedController') ) {\n add_action('wp_ajax_getstarted', 'GetStartedController::pageAjax');\n add_action('wp_ajax_nopriv_getstarted', 'GetStartedController::pageAjax');\n }\n if ( class_exists('PricingController') ) {\n add_action('wp_ajax_pricing', 'PricingController::pageAjax');\n add_action('wp_ajax_nopriv_pricing', 'PricingController::pageAjax');\n }\n if ( class_exists('AppearanceController') ) {\n add_action('wp_ajax_appearance', 'AppearanceController::pageAjax');\n add_action('wp_ajax_nopriv_appearance', 'AppearanceController::pageAjax');\n }\n if ( class_exists('AccountController') ) {\n add_action('wp_ajax_account', 'AccountController::pageAjax');\n add_action('wp_ajax_nopriv_account', 'AccountController::pageAjax');\n }\n }", "protected function defineSitePath() {}", "private function uri_reroute()\n {\n $match = false;\n\n $uri = parse_url($_SERVER['REQUEST_URI']);\n if (isset($uri['path']) && $uri['path'] !== \"/\") {\n $_ = preg_split(\"|/|\", $uri['path'], -1, PREG_SPLIT_NO_EMPTY);\n\n $i = 0;\n $route = null;\n $router = null;\n // while ($match === false) {\n // $path = $_[$i];\n\n // if (isset($this->configuration['ROUTES']['/' . $path])) {\n // $match = true;\n // $route = \"/$path\";\n // $router = $this->configuration['ROUTES']['/' . $path];\n // $this->route_map = $route;\n // }\n\n // if (isset($this->configuration['ROUTES'][$path])) {\n // $match = true;\n // $route = \"$path\";\n // $router = $this->configuration['ROUTES'][$path];\n // $this->route_map = $route;\n // }\n\n // ++$i;\n // }\n\n // unset($_);\n // unset($i);\n // unset($uri);\n // unset($path);\n\n if (isset($_) && is_array($_) && count($_) > 0) {\n $path = \"\";\n foreach ($_ as $k => $v) {\n $path .= \"/\" . $v;\n\n if (isset($this->configuration['ROUTES'][$path])) {\n $match = true;\n $route = \"$path\";\n $router = $this->configuration['ROUTES'][$path];\n $this->route_map = $route;\n\n // if(is_array($router['params'])){\n\n // }elseif($router['params'] == \"*\"){\n // break;\n // }\n\n break;\n }\n }\n }\n\n if (isset($router['controller'])) {\n $this->controller = $router['controller'];\n } else {\n $this->controller = \"main\";\n }\n\n if (isset($router['method'])) {\n $this->method = $router['method'];\n } else {\n $this->method = \"index\";\n }\n\n if (isset($router['action']) && isset($this->http)) {\n if (trim(strtolower($router['action'])) != strtolower($this->http->action)) {\n $this->http->http_error(403);\n }\n }\n \n if (isset($router['type']) && isset($router['type'])){\n if (trim(strtolower($router['type'])) == \"json\" && $this->http->type != \"json\"){\n $this->http->http_error(406, \"Form \" . $this->http->action . \" data is not json\");\n }\n }\n\n if (isset($router['params'])) {\n if (is_array($router['params'])) {\n $uri = preg_split(\"|/|\", str_replace($route, \"\", $_SERVER['REQUEST_URI']), -1, PREG_SPLIT_NO_EMPTY);\n\n if (is_array($router['params'])) {\n $_ = $router['params'];\n unset($router['params']);\n\n $router['params'][] = $_;\n unset($_);\n }\n\n $nums_params = count($router['params'][0]);\n\n if ($nums_params > 0) {\n foreach ($router['params'][0] as $k => $v) {\n $this->params[$v] = trim(urldecode($uri[$k]));\n }\n }\n\n $i = 0;\n $x = 0;\n while ($nums_params < $i) {\n if (isset($uri[$x]) && is_value($uri[$x])) {\n $this->params[$router['params'][$i]] = trim(urldecode($uri[$x]));\n ++$i;\n }\n ++$x;\n }\n\n } elseif ($router['params'] != \"*\") {\n return $this->http->http_error(404);\n }\n } else {\n $uri = preg_split(\"|/|\", str_replace($route, \"\", $_SERVER['REQUEST_URI']), -1, PREG_SPLIT_NO_EMPTY);\n\n if (count($uri) > 0) {\n return $this->http->http_error(404);\n }\n }\n\n unset($uri);\n unset($i);\n unset($x);\n unset($route);\n unset($router);\n }\n\n return $match;\n }", "public function routes()\n {\n register_rest_route('can', '/donation-forms', [\n 'methods' => 'GET',\n 'callback' => [\n $this, 'fundraisingPages'\n ],\n ]);\n\n register_rest_route('can', '/forms', [\n 'methods' => 'GET',\n 'callback' => [\n $this, 'forms'\n ],\n ]);\n\n register_rest_route('can', '/petitions', [\n 'methods' => 'GET',\n 'callback' => [\n $this, 'petitions'\n ],\n ]);\n\n register_rest_route('can', '/person/add', [\n 'methods' => 'GET',\n 'callback' => [\n $this, 'addPerson'\n ],\n ]);\n }", "public function testFindAllByRoute()\n {\n $this->markTestIncomplete('WebTestCases are not implemented yet.');\n }", "public function testUrlWritingWithPrefixesAndCustomRoutes(): void\n {\n $routes = Router::createRouteBuilder('/');\n $routes->connect(\n '/admin/login',\n ['controller' => 'Users', 'action' => 'login', 'prefix' => 'Admin']\n );\n $request = new ServerRequest([\n 'url' => '/',\n 'params' => [\n 'plugin' => null,\n 'controller' => 'Posts',\n 'action' => 'index',\n 'prefix' => 'Admin',\n ],\n 'webroot' => '/',\n ]);\n Router::setRequest($request);\n $result = Router::url(['controller' => 'Users', 'action' => 'login']);\n $this->assertSame('/admin/login', $result);\n\n $result = Router::url(['controller' => 'Users', 'action' => 'login']);\n $this->assertSame('/admin/login', $result);\n }", "public function testServiceAppRouteUsage() {\n // The assumption of our test is that DRUPAL_ROOT is not defined.\n $this->assertFalse(defined('DRUPAL_ROOT'), 'Constant DRUPAL_ROOT is defined.');\n $container = new ContainerBuilder();\n // Set a dummy container app.root to test against.\n $container->set('app.root', '/dummy/app/root');\n \\Drupal::setContainer($container);\n // Instantiate an Extension object for testing unserialization.\n $extension = new Extension($container->get('app.root'), 'module', 'core/modules/system/system.info.yml', 'system.module');\n $extension = unserialize(serialize($extension));\n $this->assertEquals('/dummy/app/root', $this->readAttribute($extension, 'root'));\n }", "public function test_page_cache()\n {\n }", "public function testGetUsingApplicationWithPluginRoutes(): void\n {\n // first clean routes to have Router::$initailized === false\n Router::reload();\n $this->clearPlugins();\n\n $this->configApplication(Configure::read('App.namespace') . '\\ApplicationWithPluginRoutes', null);\n\n $this->get('/test_plugin');\n $this->assertResponseOk();\n }", "function routes_install()\r\n{\r\n\tregister_hook('init_1', 'addon/routes/routes.php', 'routes_init_1');\r\n\tregister_hook('post_local', 'addon/routes/routes.php', 'routes_post_local_end_hook');\r\n\tregister_hook('profile_tabs', 'addon/routes/routes.php', 'routes_profile_tabs_hook');\r\n}", "public function testUrlGenerationWithRegexQualifiedParams(): void\n {\n $routes = Router::createRouteBuilder('/');\n\n $routes->connect(\n '{language}/galleries',\n ['controller' => 'Galleries', 'action' => 'index'],\n ['language' => '[a-z]{3}']\n );\n\n $routes->connect(\n '/{language}/{admin}/{controller}/{action}/*',\n ['admin' => 'admin'],\n ['language' => '[a-z]{3}', 'admin' => 'admin']\n );\n\n $routes->connect(\n '/{language}/{controller}/{action}/*',\n [],\n ['language' => '[a-z]{3}']\n );\n\n $result = Router::url(['admin' => false, 'language' => 'dan', 'action' => 'index', 'controller' => 'Galleries']);\n $expected = '/dan/galleries';\n $this->assertSame($expected, $result);\n\n $result = Router::url(['admin' => false, 'language' => 'eng', 'action' => 'index', 'controller' => 'Galleries']);\n $expected = '/eng/galleries';\n $this->assertSame($expected, $result);\n\n Router::reload();\n $routes = Router::createRouteBuilder('/');\n $routes->connect(\n '/{language}/pages',\n ['controller' => 'Pages', 'action' => 'index'],\n ['language' => '[a-z]{3}']\n );\n $routes->connect('/{language}/{controller}/{action}/*', [], ['language' => '[a-z]{3}']);\n\n $result = Router::url(['language' => 'eng', 'action' => 'index', 'controller' => 'Pages']);\n $expected = '/eng/pages';\n $this->assertSame($expected, $result);\n\n $result = Router::url(['language' => 'eng', 'controller' => 'Pages']);\n $this->assertSame($expected, $result);\n\n $result = Router::url(['language' => 'eng', 'controller' => 'Pages', 'action' => 'add']);\n $expected = '/eng/Pages/add';\n $this->assertSame($expected, $result);\n\n Router::reload();\n $routes = Router::createRouteBuilder('/');\n $routes->connect(\n '/forestillinger/{month}/{year}/*',\n ['plugin' => 'Shows', 'controller' => 'Shows', 'action' => 'calendar'],\n ['month' => '0[1-9]|1[012]', 'year' => '[12][0-9]{3}']\n );\n\n $result = Router::url([\n 'plugin' => 'Shows',\n 'controller' => 'Shows',\n 'action' => 'calendar',\n 'month' => '10',\n 'year' => '2007',\n 'min-forestilling',\n ]);\n $expected = '/forestillinger/10/2007/min-forestilling';\n $this->assertSame($expected, $result);\n\n Router::reload();\n $routes = Router::createRouteBuilder('/');\n $routes->connect(\n '/kalender/{month}/{year}/*',\n ['plugin' => 'Shows', 'controller' => 'Shows', 'action' => 'calendar'],\n ['month' => '0[1-9]|1[012]', 'year' => '[12][0-9]{3}']\n );\n $routes->connect('/kalender/*', ['plugin' => 'Shows', 'controller' => 'Shows', 'action' => 'calendar']);\n\n $result = Router::url(['plugin' => 'Shows', 'controller' => 'Shows', 'action' => 'calendar', 'min-forestilling']);\n $expected = '/kalender/min-forestilling';\n $this->assertSame($expected, $result);\n\n $result = Router::url([\n 'plugin' => 'Shows',\n 'controller' => 'Shows',\n 'action' => 'calendar',\n 'year' => '2007',\n 'month' => '10',\n 'min-forestilling',\n ]);\n $expected = '/kalender/10/2007/min-forestilling';\n $this->assertSame($expected, $result);\n }", "public function routes()\n {\n return [\n 'GET' => [\n 'main' => [\n 'index' => [\n 'name' => 'index'\n ],\n 'services' => [\n 'name' => 'services'\n ],\n 'contacts' => [\n 'name' => 'contacts'\n ],\n 'typography' => [\n 'name' => 'typography'\n ],\n 'test' => [\n 'name' => 'test'\n ],\n 'test1' => [\n 'name' => 'test1'\n ]\n ],\n 'blog' => [\n 'index' => [\n 'name' => 'index'\n ],\n 'create' => [\n 'name' => 'create',\n 'required' => [\n 'auth' => true\n ]\n ],\n 'view' => [\n 'name' => 'view',\n 'required' => [\n 'param' => true\n ]\n ],\n 'edit' => [\n 'name' => 'view',\n 'required' => [\n 'auth' => true,\n 'param' => true\n ]\n ]\n ],\n 'user' => [\n //'index' => 'index',\n 'login' => [\n 'name' => 'login'\n ],\n 'register' => [\n 'name' => 'register'\n ],\n 'logout' => [\n 'name' => 'logout',\n 'required' => [\n 'auth' => true\n ],\n ],\n 'change-password' => [\n 'name' => 'change-password',\n 'required' => [\n 'auth' => true\n ],\n ],\n 'forget-password' => [\n 'name' => 'forget-password',\n 'required' => [\n 'auth' => true\n ],\n ]\n ],\n 'auth' => [\n 'vk' => [\n 'name' => 'vk'\n ]\n ],\n 'config' => [\n 'index' => [\n 'name' => 'index',\n 'required' => [\n 'auth' => true\n ]\n ],\n 'sitemap' => [\n 'name' => 'sitemap',\n 'required' => [\n 'auth' => true\n ]\n ]\n ],\n 'portfolio' => [\n 'view' => [\n 'name' => 'view',\n 'required' => [\n 'param' => true\n ]\n ]\n ],\n 'ajax' => [\n 'template' => [\n 'name' => 'template',\n 'required' => [\n 'ajax' => true\n ]\n ],\n 'test' => [\n 'name' => 'test',\n 'required' => [\n 'ajax' => true\n ]\n ]\n ]\n ],\n 'POST' => [\n 'ajax' => [\n 'form-feedback' => [\n 'name' => 'form-feedback',\n 'required' => [\n 'refer' => 'https://uiweb.ru/'\n ]\n ],\n 'form-backcall' => [\n 'name' => 'form-backcall',\n 'required' => [\n 'refer' => 'https://uiweb.ru/main/contacts'\n ]\n ],\n 'form-login' => [\n 'name' => 'form-login'\n ],\n 'form-register' => [\n 'name' => 'form-register'\n ],\n 'form-change-password' => [\n 'name' => 'form-change-password'\n ]\n ],\n 'blog' => [\n 'create' => [\n 'name' => 'create',\n 'required' => [\n 'auth' => true\n ]\n ],\n 'edit' => [\n 'name' => 'create',\n 'required' => [\n 'auth' => true,\n 'param' => true\n ]\n ]\n ]\n ],\n 'PUT',\n 'PATCH',\n 'TRACE',\n 'DELETE',\n 'HEAD',\n 'OPTIONS'\n ];\n }", "protected function defineRoutes()\n {\n $this->register(ImageServiceProvider::class);\n if (! $this->app->routesAreCached()) {\n $router = app('router');\n $router->group([\n 'namespace' => 'Socieboy\\Jupiter\\Http\\Controllers',\n 'middleware' => 'web',\n ], function ($router) {\n require __DIR__.'/../Http/routes.php';\n });\n }\n }", "private function registerRoutes(){\n $appRouter = require_once __DIR__.'/../../routes/app.php';\n $this->registerApplicationRoutes($appRouter);\n $this->registerApplicationRoutes($appRouter, false);\n $this->registerAuthenticationRoutes();\n }", "private static function createModuleRoute()\n {\n self::$Router->map('GET|POST', '/[a:version]/[**:path]', function(string $version, string $path){\n $version = strtolower($version);\n $path = strtolower($path);\n\n if(isset(self::$PathRoutes[$version][$path]))\n {\n /** @var VersionConfiguration $VersionConfiguration */\n $VersionConfiguration = self::$MainConfiguration->VersionConfigurations[$version];\n\n /** @var ModuleConfiguration $ModuleConfiguration */\n $ModuleConfiguration = $VersionConfiguration->Modules[self::$PathRoutes[$version][$path]];\n\n if($VersionConfiguration->Available == false)\n {\n ResourceNotAvailable::executeResponse($VersionConfiguration->UnavailableMessage);\n exit();\n }\n\n if($ModuleConfiguration->Available == false)\n {\n ResourceNotAvailable::executeResponse($ModuleConfiguration->UnavailableMessage);\n exit();\n }\n\n self::verifyRequest();\n\n $AccessRecord = new AccessRecord();\n $AccessRecord->ID = 0;\n $AccessRecord->ApplicationID = 0;\n\n if($ModuleConfiguration->AuthenticationRequired)\n {\n $AccessRecord = self::authenticateUser();\n }\n\n /** @var Module $ModuleObject */\n $ModuleObject = self::getModuleObject($version, $ModuleConfiguration);\n $ModuleObject->access_record = $AccessRecord;\n\n // Process the request\n self::startTimer();\n\n $ModuleException = null;\n\n try\n {\n $ModuleObject->processRequest();\n\n header('Content-Type: ' . $ModuleObject->getContentType());\n header('Content-Size: ' . $ModuleObject->getContentLength());\n http_response_code($ModuleObject->getResponseCode());\n\n // Create the response\n if($ModuleObject->isFile())\n {\n header(\"Content-disposition: attachment; filename=\\\"\" . basename($ModuleObject->getFileName()) . \"\\\"\");\n }\n }\n catch(Exception $exception)\n {\n $ModuleException = $exception;\n //InternalServerError::executeResponse($exception);\n //exit();\n }\n\n $ExecutionTime = self::stopTimer();\n self::logRequest($AccessRecord, $version, $ModuleObject, $ExecutionTime);\n self::setHeaders();;\n\n // Update the last used state\n $AccessRecord->LastActivity = (int)time();\n $IntellivoidAPI = self::getIntellivoidAPI();\n $IntellivoidAPI->getAccessKeyManager()->updateAccessRecord($AccessRecord);\n\n if($ModuleException == null)\n {\n print($ModuleObject->getBodyContent());\n }\n else\n {\n $RequestRecordObject = $IntellivoidAPI->getRequestRecordManager()->getRequestRecord(\n RequestRecordSearchMethod::byReferenceId, self::$ReferenceCode\n );\n\n $IntellivoidAPI->getExceptionRecordManager()->recordException(\n $RequestRecordObject->ID, $AccessRecord, $ModuleException\n );\n\n InternalServerError::executeResponse($ModuleException);\n }\n\n exit();\n }\n else\n {\n ResourceNotFound::executeResponse();\n exit();\n }\n\n });\n }", "function wp_oembed_register_route()\n {\n }", "private static function setupRoutes()\n {\n $container = self::$kernel->getContainer();\n $router = $container->get('router');\n self::$login_url = $router->generate('fos_user_security_login');\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }" ]
[ "0.69602436", "0.6664708", "0.6597086", "0.65218884", "0.6422269", "0.6379093", "0.62590635", "0.6250403", "0.62309605", "0.62263185", "0.6216701", "0.62007236", "0.61991894", "0.6166579", "0.61486673", "0.6145505", "0.6132882", "0.6097042", "0.60692245", "0.6035312", "0.6017008", "0.5995831", "0.5975373", "0.5966892", "0.5960174", "0.5948745", "0.59436375", "0.59232", "0.5922004", "0.58964765", "0.58911353", "0.58866256", "0.587384", "0.58691645", "0.58422744", "0.58278847", "0.58273816", "0.5825767", "0.58234096", "0.5820712", "0.5815654", "0.5812468", "0.5805766", "0.58051664", "0.5799152", "0.57942957", "0.57878417", "0.57766473", "0.57726175", "0.57726175", "0.5771856", "0.57432514", "0.57421154", "0.57416666", "0.5741666", "0.5738736", "0.57296294", "0.5721964", "0.5714107", "0.57017297", "0.56998515", "0.56874245", "0.5676869", "0.56704783", "0.5666489", "0.56636876", "0.5663085", "0.5656823", "0.5651229", "0.5650521", "0.5649908", "0.5647341", "0.5630382", "0.56299317", "0.5620636", "0.5620636", "0.5620636", "0.5620636", "0.5620636", "0.5620636", "0.5620636", "0.5620636", "0.5620636", "0.5620636", "0.5620636", "0.5620636", "0.5620636", "0.5620636", "0.5620636", "0.5620636", "0.5620636", "0.5620636", "0.5620636", "0.5620636", "0.5620636", "0.5620636", "0.5620636", "0.5620636", "0.5620636", "0.5620636", "0.5620636" ]
0.0
-1
Validate environment and throw exception if not compatible
protected function _validateEnvironment() { /* @var $helper EW_NativePasswords_Helper_Data */ $helper = Mage::helper('ew_nativepasswords'); if(!$helper->isEnvironmentCompatible()) { throw new EW_NativePasswords_Exception_IncompatibleEnvironmentException( $helper->__( 'Native passwords are enabled in system configuration, but PHP version is incompatible. ' . 'Reminder: %s <= PHP version < %s can use compatibility library. ' . 'PHP version >= %s use native functionality. ' . 'Found version: %s.', EW_NativePasswords_Helper_Data::MINIMUM_REQUIRED_PHP_VERSION, EW_NativePasswords_Helper_Data::NATIVE_PHP_VERSION, EW_NativePasswords_Helper_Data::NATIVE_PHP_VERSION, phpversion() ) ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function checkEnvironmentOrDie() {}", "protected function checkEnvironmentOrDie(): void\n {\n if (PHP_SAPI !== 'cli') {\n die('Not called from a command line interface (e.g. a shell or scheduler).' . LF);\n }\n }", "public function testCallThrowsExceptionIfEnvironmentIsInvalid()\n {\n $this->setExpectedException('OutOfBoundsException');\n \n // method name must be defined in possible values array\n (new DetectEnvironment($this->name, []))->isDevelopment();\n \n return;\n }", "public function testEnvironmentVariablesCanBeValidated()\n {\n /** @noinspection PhpParamsInspection */\n $egg = $this->cloneEggAndVariables(Egg::query()->findOrFail(1));\n\n try {\n $this->getService()->handle($egg->id, [\n 'BUNGEE_VERSION' => '1.2.3',\n ]);\n\n $this->assertTrue(false, 'This statement should not be reached.');\n } catch (ValidationException $exception) {\n $errors = $exception->errors();\n\n $this->assertCount(2, $errors);\n $this->assertArrayHasKey('environment.BUNGEE_VERSION', $errors);\n $this->assertArrayHasKey('environment.SERVER_JARFILE', $errors);\n $this->assertSame('The Bungeecord Version variable may only contain letters and numbers.', $errors['environment.BUNGEE_VERSION'][0]);\n $this->assertSame('The Bungeecord Jar File variable field is required.', $errors['environment.SERVER_JARFILE'][0]);\n }\n\n $response = $this->getService()->handle($egg->id, [\n 'BUNGEE_VERSION' => '1234',\n 'SERVER_JARFILE' => 'server.jar',\n ]);\n\n $this->assertInstanceOf(Collection::class, $response);\n $this->assertCount(2, $response);\n $this->assertSame('BUNGEE_VERSION', $response->get(0)->key);\n $this->assertSame('1234', $response->get(0)->value);\n $this->assertSame('SERVER_JARFILE', $response->get(1)->key);\n $this->assertSame('server.jar', $response->get(1)->value);\n }", "public function overload()\n {\n $this->checkForSpecificEnvironmentFile();\n $dotEnv = Dotenv::createImmutable($this->getEnvironmentPath(),$this->getEnvironmentFile());\n //$dotEnv = new Dotenv($this->getEnvironmentPath(), $this->getEnvironmentFile());\n $dotEnv->load();\n\n $this->validateEnvironmentFile($dotEnv);\n }", "protected function verifyEnvironment()\n {\n $environment = null;\n if (strstr(__DIR__, '/media/sf_code/')) {\n $environment = ENVIRONMENT_DEV;\n } elseif (getenv('IS_TEST_ENVIRONMENT')) {\n $environment = ENVIRONMENT_TEST;\n } else {\n $environment = ENVIRONMENT_PRODUCTION;\n }\n\n define('ENVIRONMENT', $environment);\n }", "protected function __checkEnvironment(){\n\t\tif (ini_get('register_globals'))\n\t\t\tthrow new Fruit(\"Automatically shut down due to the ability to insert data directly into the global namespace.<br>\\n\\t\\tDisable <code>register_globals</code> to proceed. <strong>This is a serious security precaution.</strong>\", 500);\n\n\t\tif (isset($_GET['rw']) !== true)\n\t\t\tthrow new Fruit('Proper rewrite could not be performed on this server. Enabled <code>mod_rewrite</code> and htaccess file support is required.', 500);\n\n\t\t$this->__checkExts();\n\t\tself::$arr = array(\n\t\t\t'directory' => array(),\n\t\t\t'file' => array(),\n\t\t\t'non' => array()\n\t\t);\n\t\t$this->__checkPerms();\n\t\t$this->__buildPermsMsg();\n\n\t\t# try to prevent from remote file inclusion (allow_url_include\n\t\t# requires allow_url_fopen; fopen check covers both);\n\t\t# info about why this is not 100 % secure:\n\t\t# http://blog.php-security.org/archives/45-PHP-5.2.0-and-allow_url_include.html\n\t\tif (ini_get('allow_url_fopen'))\n\t\t\tthrow new Fruit(\"Automatically shut down due to allowed remote file inclusion. If this should be intended, ignore it.<br>\\n\\t\\t<strong>But note that you better make sure you use <a href=http://www.hardened-php.net/suhosin/>Suhosin</a> in this case.</strong><br>\\n\\t\\tThe debug mode may now be turned off.\", 500);\n\t}", "private function checkEnvironmentVariables()\n {\n $this->checkEnvironmentVariable(\"DB_HOST\", self::$db_host, \"localhost\");\n $this->checkEnvironmentVariable(\"DB_DATABASE\", self::$db_database, \"tracker\");\n $this->checkEnvironmentVariable(\"DB_USERNAME\", self::$db_username, \"tracker\");\n $this->checkEnvironmentVariable(\"DB_PASSWORD\", self::$db_password, \"tracker\");\n }", "protected function checkEnv()\n {\n $requireVars = [\n 'SOA_MAILER_SEND',\n 'SOA_MAILER_CLIENT_ALIAS',\n 'SOA_MAILER_CLIENT_SECRET',\n 'SOA_MAILER_TEMPLATE_ALIAS',\n ];\n\n foreach ($requireVars as $var) {\n if (!getenv($var)) {\n throw new \\LogicException(\"[Mailer] Required variable $var not set in .env\");\n }\n }\n }", "private function validateEnv(): void\n {\n $this->getAuthJsonContent();\n\n if (!$this->isWritableDir($this->env->getProjectsRootDir())) {\n throw new FilesystemException(\n \"Directory does not exist or is not writeable: {$this->env->getProjectsRootDir()}\"\n );\n }\n\n if (!$this->isWritableDir($this->env->getSslCertificatesDir())) {\n throw new FilesystemException(\n \"Directory does not exist or is not writeable: {$this->env->getSslCertificatesDir()}\"\n );\n }\n\n $this->getDirPath(self::DIR_PHP_DOCKERFILES);\n $this->getDirPath(self::DIR_PROJECT_TEMPLATE);\n\n if (!$this->isWritableFile($this->getTraefikRulesFile())) {\n throw new FilesystemException(\n \"Missing Traefik SSL configuration file: {$this->getTraefikRulesFile()}\\n\" .\n 'Maybe the infrastructure has not been set up yet.'\n );\n }\n }", "public function validate() {\n\t\t$errors = [];\n\t\t\n\t\t$requiredFiles = [\n\t\t\t\"{$this->dmDir}/config.json\",\n\t\t\t\"{$this->dmDir}/email-transport.json.template\",\n\t\t\t\"{$this->dmDir}/create-database.sql.template\",\n\t\t\t\"{$this->dmDir}/dbc.json.template\",\n\t\t];\n\t\t$missingFiles = [];\n\t\tforeach( $requiredFiles as $f ) {\n\t\t\tif( !file_exists($f) ) $missingFiles[] = $f;\n\t\t}\n\t\tif( $missingFiles ) {\n\t\t\t$errors[] = \"The following required files are missing:\\n- \".implode(\"\\n- \", $missingFiles);\n\t\t}\n\t\t\n\t\t$requiredConfigVars = [\n\t\t\t\"hostname-postfix\",\n\t\t\t\"deployment-root\",\n\t\t\t\"users\",\n\t\t\t\"users/postgres/username\",\n\t\t\t\"users/deployment-owner/username\",\n\t\t\t\"users/apache-manager/username\",\n\t\t\t\"sendgrid-password\",\n\t\t\t\"email-recipient-override\",\n\t\t];\n\t\t$missingConfigVars = [];\n\t\tforeach( $requiredConfigVars as $var ) {\n\t\t\tif( $this->getConfig($var,'__UNS') === '__UNS' ) {\n\t\t\t\t$missingConfigVars[] = $var;\n\t\t\t}\n\t\t}\n\t\tif( $missingConfigVars ) {\n\t\t\t$errors[] = \"The following required config entries are missing:\\n- \".implode(\"\\n- \",$missingConfigVars);\n\t\t}\n\t\t\n\t\tif( $errors ) {\n\t\t\tthrow new EarthIT_PhrebarDeploymentManager_EnvironmentException(implode(\"\\n\\n\", $errors));\n\t\t}\n\t}", "public function checkEnvironment(): bool\n {\n return empty($this->getEnvironments()) || app()->environment($this->getEnvironments());\n }", "function requires(string $key): bool\n{\n if (array_key_exists($key, $_ENV)) {\n return true;\n }\n\n throw new UnexpectedValueException(\"$key is not set in the environment variables\");\n}", "private function _environmentCheck()\n {\n if ( php_sapi_name() != \"cli\" )\n {\n die(\"ArrowWorker hint : only run in command line mode\".PHP_EOL);\n }\n\n if ( !function_exists('pcntl_signal_dispatch') )\n {\n declare(ticks = 10);\n }\n\n if ( !function_exists('pcntl_signal') )\n {\n die('ArrowWorker hint : php environment do not support pcntl_signal'.PHP_EOL);\n }\n\n if ( function_exists('gc_enable') )\n {\n gc_enable();\n }\n\n }", "private function checkEnvironment(): self\n {\n if (Environment::is(Environment::ENV_PROD)) {\n $this->banner('WARNING: The app is in PRODUCTION', 'error');\n if (!$this->confirm('Continue with migration?', true)) {\n throw new ConsoleException();\n }\n }\n\n return $this;\n }", "function validate(Configuration $configurable, string $environment);", "public function testGetAppEnvironmentUnknown(): void\n {\n $this->var('APP_ENV', 'unknown');\n $this->expectException(EnvironmentException::class);\n $this->expectExceptionMessage('Environment unknown not supported.');\n Env::getAppEnvironment();\n }", "public function testEnvSettingTest()\n {\n /** @var Kernel $kernel */\n $kernel = Injector::inst()->get(Kernel::class);\n $kernel->setEnvironment('test');\n\n $this->assertTrue(Director::isTest());\n\n $checker = Injector::inst()->get(EnvTypeCheck::class);\n $result = $checker->check();\n\n $this->assertSame($result[0], EnvironmentCheck::ERROR);\n }", "protected function verifyEnvironment()\n {\n if ($this->option('safe')) {\n //Safe to run\n return true;\n }\n\n if (in_array($this->core->environment(), $this->migrator()->config()['environments'])) {\n //Safe to run\n return true;\n }\n\n $this->writeln(interpolate(\n \"<fg=red>Application environment '{environment}' does not allowed to run migrations.</fg=red>\",\n ['environment' => $this->core->environment()]\n ));\n\n if (!$this->ask()->confirm(\"Do you wish to continue?\")) {\n $this->writeln(\"<comment>Cancelling operation.</comment>\");\n\n return false;\n }\n\n return true;\n }", "public function checkEnv()\n {\n $result = $this->_results->createResult();\n $mageMode = strtolower($this->_env['MAGE_MODE']);\n if (in_array($mageMode, ['developer', 'production', 'default'])) {\n $status = Result::STATUS_OK;\n $message = '<info><comment>MAGE_MODE</comment> has correct value.</info>';\n } else {\n $status = Result::STATUS_ERROR;\n $message = \"<error><comment>MAGE_MODE</comment> has incorrect value. It should be either 'developer', 'production' or 'default'. Your value: <comment>$mageMode</comment></error>\";\n }\n\n $result->setStatus($status);\n $result->setMessage($message);\n }", "private static function validate( $key = null, $value = null ) {\n\t\tif ( empty( $key ) && empty( $value ) ) {\n\t\t\tthrow new InvalidArgumentException('nothing to validate');\n\t\t}\n\n\t\tif ( $key === 'environment' && ! in_array( $value, self::$_validEnvironments ) ) {\n\t\t\tthrow new Exception( '\"' . $value . '\" is not a valid environment.' );\n\t\t}\n\n\t\tif ( ! isset( self::$_cache[ $key ] ) ) {\n\t\t\tthrow new Exception( $key . ' is not a valid configuration setting.' );\n\t\t}\n\n\t\tif ( empty( $value ) ) {\n\t\t\tthrow new InvalidArgumentException( $key . ' cannot be empty.' );\n\t\t}\n\n\t\treturn true;\n\t}", "public function testEnvSettingDev()\n {\n /** @var Kernel $kernel */\n $kernel = Injector::inst()->get(Kernel::class);\n $kernel->setEnvironment('dev');\n\n $this->assertTrue(Director::isDev());\n\n $checker = Injector::inst()->get(EnvTypeCheck::class);\n $result = $checker->check();\n\n $this->assertSame($result[0], EnvironmentCheck::ERROR);\n }", "protected function validateOrThrow() {}", "public function testCallReturnsFalseIfEnvironmentsDoNotMatch()\n {\n // define the possible values\n $values = [\n 'foo' => $this->value,\n 'bar' => strrev($this->value)\n ];\n \n $this->assertFalse((new DetectEnvironment($this->name, $values))->isBar());\n \n return;\n }", "private function check()\n {\n $valid = true;\n\n // @todo Use manifest ?\n // - Check mains layout exists (home + page?)\n\n if (! $valid) {\n // @todo Create an explained Exception\n throw new \\Exception(sprintf('%s named \"%s\" is not valid', __CLASS__, $this->getName()));\n }\n }", "private static function checkRequirements()\n {\n $checker = (new envChecker)\n ->requirePhpVersion('>=7.1')\n ->requirePhpExtensions(self::$required_extensions)\n ->requireDirectory(SYST_DIR, envChecker::CHECK_IS_READABLE)\n ->requireDirectory(APP_DIR, envChecker::CHECK_IS_READABLE);\n\n $output = $checker->check();\n if (! $checker->isSatisfied()) \n {\n echo '<h3>An error encourred</h3>';\n exit(join('<br/> ', $checker->getErrors()));\n }\n }", "public function checkCompatibility(): void\n {\n if ( ! $this->satisfiesPHPVersion()) {\n throw IncompatiblePlatformException::create(\n 'The client required PHP version >= ' . self::MIN_PHP_VERSION . ', you have ' . PHP_VERSION . '.',\n IncompatiblePlatformException::INCOMPATIBLE_PHP_VERSION\n );\n }\n\n if ( ! $this->satisfiesJSONExtension()) {\n throw IncompatiblePlatformException::create(\n 'PHP extension json is not enabled. Please make sure to enable \"json\" in your PHP configuration.',\n IncompatiblePlatformException::INCOMPATIBLE_JSON_EXTENSION\n );\n }\n }", "public function checkForErrors()\n {\n if ($this->getDebtor() == '' && $this->getDebtorCode() == '') {\n throw new \\InvalidArgumentException(\n sprintf('Debtor or DebtorCode must be defined')\n );\n }\n\n if ($this->getDomain() == '') {\n throw new \\InvalidArgumentException(\n sprintf('Domain must be defined')\n );\n }\n\n if ($this->getTld() == '') {\n throw new \\InvalidArgumentException(\n sprintf('Tld must be defined')\n );\n }\n }", "private function is_safe_environment(): bool {\n\t\treturn in_array( $this->environment(), [ 'development', 'local' ], true );\n\t}", "function check_environment_correct()\n {\n $environment_array = explode('|', strtolower($this->EE->TMPL->fetch_param('environment')));\n\n return ( ! empty($environment_array))\n ? (in_array(strtolower($_SERVER['SERVER_NAME']), $environment_array))\n : TRUE;\n }", "public function checkCurrentEnv() {\n $currentEnv = $this->getCurrentEnv();\n if (!in_array($currentEnv, $this->defaultEnvs)) {\n $this->log( 'ENV must be set to a value within ('.implode(', ', $this->defaultEnvs).')'.\"\\n\" ,'ERROR');\n }\n }", "public function testConstructThrowsExceptionIfVariableIsNotDefined()\n {\n $this->setExpectedException('OutOfBoundsException');\n \n // set the environment variable's name to *anything* but the name used in\n // the setUp() method\n //\n (new DetectEnvironment(strrev($this->name), []))();\n \n return;\n }", "public function checkOperationality()\n {\n $this->checkOperationalityExecTrait();\n\n if (!$this->isInstalled()) {\n throw new SystemRequirementsNotMetException('gmagick is not installed');\n }\n if (!$this->isWebPDelegateInstalled()) {\n throw new SystemRequirementsNotMetException('webp delegate missing');\n }\n }", "public static function isBrokenEmailEnvironment() {}", "function validate() {\n throw new Exception(\"Invalid validate call\");\n }", "public function testCallThrowsExceptionIfMethodIsInvalid()\n {\n $this->setExpectedException('BadMethodCallException');\n \n // method name must start with \"is\"\n (new DetectEnvironment($this->name, []))->foo();\n \n return;\n }", "private function checkValid()\n\t{\n\t\tif(!$this->isValid()) {\n\t\t\tthrow new \\RuntimeException(\"TypeStruct Error: '\".get_called_class().\"' not validated to perform further operations\");\t\n\t\t}\n\t}", "public function getEnvironment(): Environment;", "public function checkRequirements()\n {\n }", "protected function setupEnvironment()\n {\n Dotenv::create(project_root())->load();\n\n if (!in_array($_SERVER['APP_ENV'], [self::ENV_DEV, self::ENV_PRODUCTION, self::ENV_STAGING, self::ENV_TEST])) {\n throw new RuntimeException(\"Unrecognized application environment\");\n }\n\n $this->debug = (bool) (\n $_SERVER['APP_DEBUG']\n ?? $_SERVER['APP_ENV'] == self::ENV_DEV\n );\n }", "public function environmentIsConfigured();", "function env();", "private function _initEnvironment()\n {\n App_Utf8::clean_globals();\n App_Input::instance();\n ini_set('log_errors', true);\n if('development' === APPLICATION_ENV){\n ini_set('display_errors', true);\n error_reporting(E_ALL | E_STRICT);\n }\n else{\n ini_set('display_errors', false);\n error_reporting(E_COMPILE_ERROR | E_RECOVERABLE_ERROR | E_ERROR | E_CORE_ERROR);\n }\n umask(0);\n }", "public function testThrowExceptionWhenNotOnBuildMachine(): void\n {\n \\putenv('TRAVIS=false');\n\n $this->assertFalse(TravisContext::onBuildMachine());\n\n $this->expectException(\\LogicException::class);\n $this->expectExceptionMessage('Travis environment variables not found');\n\n new TravisContext();\n }", "function validateBeforeUpgrade($params) {\n $this->cleanUpValidationLog();\n\n if(version_compare(PHP_VERSION, '5.3.3', '<')) {\n $this->validationLogError('PHP version that is required to run the system is 5.3.3. You have ' . PHP_VERSION);\n } // if\n\n if(extension_loaded('phar')) {\n $this->validationLogOk('Phar extension is available');\n } else {\n $this->validationLogError('Required Phar PHP extension was not found. Please install it before continuing');\n } // if\n\n // Check memory limit\n $memory_limit = php_config_value_to_bytes(ini_get('memory_limit'));\n\n if($memory_limit == -1 || $memory_limit >= 67108864) {\n $formatted_memory_limit = $memory_limit == -1 ? \"unlimited\" : format_file_size($memory_limit);\n $this->validationLogOk('Your memory limit is: ' . $formatted_memory_limit);\n } else {\n $this->validationLogError('Your memory is too low to complete the upgrade. Minimal value is 64MB, and you have it set to ' . format_file_size($memory_limit));\n } // if\n\n // Check whether ROOT is writable\n if(folder_is_writable(ROOT)) {\n $this->validationLogOk('/activecollab folder is writable');\n } else {\n $this->validationLogError('/activecollab folder is not writable. Make it writable to continue');\n } // if\n\n // Check if public/assets folder is writable\n if (defined('PROTECT_ASSETS_FOLDER') && PROTECT_ASSETS_FOLDER) {\n $this->validationLogOk(\"Assets folder is protected, skipping writable check\");\n } else {\n if(folder_is_writable(PUBLIC_PATH . '/assets')) {\n $this->validationLogOk('public/assets folder is writable');\n } else {\n $this->validationLogError('public/assets folder is not writable. Make it writable to continue');\n } // if\n } // if\n\n // Check versions.php\n if(file_is_writable(CONFIG_PATH . '/version.php')) {\n $this->validationLogOk('config/version.php is writable');\n } else {\n $this->validationLogError('config/version.php is not writable. Make it writable to continue');\n } // if\n\n // Validate login parameters\n $email = $params['email']; \n $password = $params['pass'];\n \n if(php_sapi_name() !== 'cli' && $email && $password) {\n if(is_valid_email($email)) {\n $user_table_fields = DB::listTableFields(TABLE_PREFIX . 'users');\n\n // Version 4.0.0 or newer\n if(in_array('type', $user_table_fields)) {\n $user = DB::executeFirstRow('SELECT type, password FROM ' . TABLE_PREFIX . 'users WHERE email = ?', $email);\n\n // Versions older than 4.0.0\n } else {\n $user = DB::executeFirstRow('SELECT role_id, password FROM ' . TABLE_PREFIX . 'users WHERE email = ?', $email);\n } // if\n\n if(is_array($user)) {\n if($this->checkUserPassword($password, $user['password'])) {\n if($this->isUserAdministrator($user)) {\n $this->validationLogOk(\"User '$email' authenticated\");\n } // if\n } else {\n $this->validationLogError(\"Invalid password\");\n } // if\n } else {\n $this->validationLogError(\"User '$email' not found\");\n } // if\n } else {\n $this->validationLogError(\"'$email' is not a valid email address\");\n } // if\n } else {\n $this->validationLogError('Authentication data not provided');\n } // if\n \n return $this->everythingValid();\n }", "private static function secureEnvConfig() {\n //check session config\n //check db, plugin, encryption\n //make sure default apps are all registered\n $titleCheck = (!isset(DSettings::$globalName[2]) || isset(DSettings::$globalName[29]));\n $routerCheck = empty(DSettings::$router['apps']) || empty(DSettings::$router['apps']);\n if ($titleCheck)\n trigger_error(DMainLang::$errorConsts['websiteTitleError']);\n elseif ($routerCheck)\n trigger_error(DMainLang::$errorConsts['routerInitError']);\n }", "public function cli_validateArgs() {}", "public function checkOperationality()\n {\n if (!extension_loaded('gd')) {\n throw new SystemRequirementsNotMetException('Required Gd extension is not available.');\n }\n\n if (!function_exists('imagewebp')) {\n throw new SystemRequirementsNotMetException(\n 'Gd has been compiled without webp support.'\n );\n }\n }", "protected function verifyEnvironment(): bool\n {\n if ($this->option('force') || $this->config->isSafe()) {\n //Safe to run\n return true;\n }\n\n $this->writeln('<fg=red>Confirmation is required to run migrations!</fg=red>');\n\n if (!$this->askConfirmation()) {\n $this->writeln('<comment>Cancelling operation...</comment>');\n\n return false;\n }\n\n return true;\n }", "private function _check() {\n $cfgStrKey = array('nkVersion', 'nkMinimumVersion', 'minimalPhpVersion', 'partnersKey');\n $cfgArrayKey = array('phpExtension', 'uploadDir', 'changelog', 'infoList', 'deprecatedFiles');\n $i18n = i18n::getInstance();\n\n foreach (array_merge($cfgStrKey, $cfgArrayKey) as $cfgKey) {\n if (! array_key_exists($cfgKey, $this->_configuration))\n throw new Exception(sprintf($i18n['MISSING_CONFIG_KEY'], $cfgKey));\n\n if (in_array($cfgKey, $cfgStrKey) && (! is_string($this->_configuration[$cfgKey]) || empty($this->_configuration[$cfgKey])))\n throw new Exception(sprintf($i18n['CONFIG_KEY_MUST_BE_STRING'], $cfgKey));\n elseif (in_array($cfgKey, $cfgArrayKey) && (! is_array($this->_configuration[$cfgKey]) || empty($this->_configuration[$cfgKey])))\n throw new Exception(sprintf($i18n['CONFIG_KEY_MUST_BE_ARRAY'], $cfgKey));\n }\n }", "public static function isValidEngine(): bool\n {\n return extension_loaded('openssl') && static::class != __CLASS__;\n }", "protected static function _validate()\n\t{\n\t\tif (!file_exists(self::$jar)) {\n\t\t\tthrow new Exception('MergeMinify_Minification:$jar(' . self::$jar . ') is not a valid file.');\n\t\t}\n\t\tif (!is_dir(self::$tmpDir) || !is_writable(self::$tmpDir)) {\n\t\t\tthrow new Exception('MergeMinify_Minification:$temp(' . self::$temp . ') is not a valid directory.');\n\t\t}\n\t}", "protected function validatePHP()\n {\n $version = phpversion();\n\n if (!preg_match('/^7\\./', $version)) {\n die(var_dump($version));\n throw new \\RuntimeException('PHP 7.x is required');\n }\n }", "protected static function throwHardCheckError()\n {\n throw new \\InvalidArgumentException('Value has wrong type');\n }", "private function check() {\n\t\t$module = $this->packageService->getModule();\n\t\tif ($module === null) {\n\t\t\tthrow new \\DomainException('No module definition found in composer.json - please run `keeko init`.');\n\t\t}\n\t}", "private function check() {\n\t\t$module = $this->packageService->getModule();\n\t\tif ($module === null) {\n\t\t\tthrow new \\DomainException('No module definition found in composer.json - please run `keeko init`.');\n\t\t}\n\t}", "public static function setup()\n {\n try {\n $env = \\Dotenv\\Dotenv::create(__DIR__ . '/../../private/');\n $env->load();\n $env->required([\n 'ENVIRONMENT',\n ]);\n } catch (\\Exception $e) {\n echo $e;\n }\n }", "protected function checkPHPVersion()\n {\n // Init\n $current = ( false === strpos( phpversion(), '-' ) ? phpversion() : substr( phpversion(), 0, strpos( phpversion(), '-' ) ) );\n $required = '5.3.10';\n \n if( 0 > strnatcmp( $current, $required ) )\n {\n throw new Exception( sprintf( 'NNScripts'. PHP_EOL .'Error: PHP version %s is required but version %s is found.', $required, $current ) );\n }\n }", "public function testEnvSettingLive()\n {\n /** @var Kernel $kernel */\n $kernel = Injector::inst()->get(Kernel::class);\n $kernel->setEnvironment('live');\n\n $this->assertTrue(Director::isLive());\n\n $checker = Injector::inst()->get(EnvTypeCheck::class);\n $result = $checker->check();\n\n $this->assertSame($result[0], EnvironmentCheck::OK);\n }", "public function check_environment(array $errors = array()) {\n if (!is_callable('socket_create'))\n $errors[] = 'Socket support is currently unavailable: You must add the php_sockets extension to your php.ini or recompile php with the --enable-sockets option set';\n\n return $errors;\n }", "public function verifyRequirements() {\n\n $problems = array(\n 'warnings' => array(),\n 'errors' => array()\n );\n\n // Requirement: PHP 5.3\n if (version_compare(phpversion(), '5.3.0') < 0) {\n $problems['errors'][] = 'PHP 5.3.0 or greater is required. Your installed version is '.phpversion().'.';\n }\n\n // Requirement: PDO\n if (!class_exists('PDO')) {\n $problems['errors'][] = 'The PHP Data Objects (PDO) extension is required.';\n }\n\n // Requirement: mod_rewrite\n if (function_exists('apache_get_modules') && !in_array('mod_rewrite', apache_get_modules())) {\n $problems['errors'][] = 'The Apache mod_rewrite module is required.';\n }\n\n // Requirement: cURL\n if (!function_exists('curl_init')) {\n $problems['errors'][] = 'The PHP cURL extension is required.';\n }\n\n // Requirement: writable config.php\n if (!is_writable($this->directory)) {\n $problems['errors'][] = 'The directory for your config.php file is not writable. Please change the permissions on this directory (through SSH or your FTP client) so it writable to all users. When this installer is completed, you can change the permissions back. The directory to make writable: <code>'.$this->directory.'</code>';\n }\n\n // Optional: json_decode\n if (!function_exists('json_decode')) {\n $problems['warnings'][] = 'Your version of PHP is missing the <code>json_decode()</code> function. This is included and enabled by default for PHP versions 5.2.0 and higher. This is only required if you want to import tweets from an official twitter archive download, otherwise Archive My Tweets can run without it.';\n }\n\n // Optional: 64-bit integers\n if (PHP_INT_SIZE != 8) {\n $problems['warnings'][] = 'Your PHP installation does not support 64 bit integers and this may cause problems for you. Support for 64 bit integers is recommended and is offered by most modern web hosts.';\n }\n\n return $problems;\n\n }", "protected function checkPcreVersion() {}", "private function check_compatibility()\n\t{\n\t\tif ( ! extension_loaded( 'curl' ) || ! extension_loaded( 'json' ) )\n\t\t{\n\t\t\tthrow new CentrifugeException('There is missing dependant extensions - please ensure both cURL and JSON modules are installed');\n\t\t}\n\n\t\tif ( ! in_array( 'md5', hash_algos() ) )\n\t\t{\n\t\t\tthrow new CentrifugeException('md5 appears to be unsupported - make sure you have support for it, or upgrade your version of PHP.');\n\t\t}\n\n\t}", "public static function validate() {}", "function check_environmet()\n{\n $SandboxFile = dirname(__DIR__) . '/sandbox_server.txt';\n if (file_exists($SandboxFile)) {\n return 0;\n } else {\n return 1;\n }\n}", "public function testGetAppEnvironmentNotSet(): void\n {\n $this->var('APP_ENV', null);\n $this->assertSame(Env::PRODUCTION, Env::getAppEnvironment());\n }", "protected function checkParams()\n {\n if ((null === $this->jar) or !file_exists($this->jar)) {\n throw new BuildException(\n sprintf(\n 'Specify the name of the LiquiBase.jar. \"%s\" does not exist!',\n $this->jar\n )\n );\n }\n\n $this->checkChangeLogFile();\n\n if (null === $this->classpathref) {\n throw new BuildException('Please provide a classpath!');\n }\n\n if (null === $this->username) {\n throw new BuildException('Please provide a username for database acccess!');\n }\n\n if (null === $this->password) {\n throw new BuildException('Please provide a password for database acccess!');\n }\n\n if (null === $this->url) {\n throw new BuildException('Please provide a url for database acccess!');\n }\n }", "function env($key)\n {\n if(!is_string($key)) {\n throw new \\InvalidArgumentException(\"Please provide string argument.\");\n }\n\n $json = file_get_contents('env.json');\n $data = (array) json_decode($json);\n\n if(!array_key_exists($key, $data)) {\n throw new \\ErrorException(\"The given key not match with any.\");\n }\n\n return $data[$key];\n }", "public function load()\n {\n $this->checkForSpecificEnvironmentFile();\n $dotEnv = Dotenv::createImmutable($this->getEnvironmentPath(),$this->getEnvironmentFile());\n //$dotEnv = new Dotenv($this->getEnvironmentPath(), $this->getEnvironmentFile());\n\n $dotEnv->load();\n\n $this->validateEnvironmentFile($dotEnv);\n }", "private function _assertTestEnvironment( )\n {\n if( sfConfig::get('sf_environment') != 'test' )\n {\n self::_halt(sprintf(\n 'JPUP is trying to run in the %s environment instead of test!',\n sfConfig::get('sf_environment')\n ));\n }\n\n if( sfConfig::get('sf_error_reporting') !== (E_ALL | E_STRICT) )\n {\n self::_halt('error_reporting should be set to %d (%s) in %s.',\n (E_ALL | E_STRICT),\n 'E_ALL | E_STRICT', // Split out for easy editing if necessary.\n $this->_getSettingsFilename()\n );\n }\n\n /* In same places, Symfony checks for sf_test rather than sf_environment.\n * Since we've just finished verifying that we're in the test environment,\n * we can also assume that test mode is on.\n *\n * Even if we have to set it ourselves.\n */\n sfConfig::set('sf_test', true);\n }", "public function getEnvironment();", "public function getEnvironment();", "public function getEnvironment();", "public function getEnvironment();", "public function getEnvironment();", "public function getEnvironment();", "private function _validate_compatibility()\n {\n // Check if the current version of codeigniter is compatible\n if (substr(CI_VERSION, 0, 1) !== '3') {\n show_error($this->lang->line('auth_ci_version_mismatch'));\n }\n\n // password_hash functions is required for encrytion of user password\n if (!function_exists('password_hash')) {\n show_error($this->lang->line('auth_hashing_unavailable'));\n }\n\n // password_verify functions is required for the verification of the encrypted password\n if (!function_exists('password_verify')) {\n show_error($this->lang->line('auth_pass_verify_unavailable'));\n }\n }", "public function validate() {\n\t\tthrow new \\RuntimeException('Invalid message');\n\t}", "protected function checkForSpecificEnvironmentFile()\n {\n if ($this->isRunningInConsole() && isset($_SERVER['argv'])) {\n $input = new ArgvInput();\n\n if ($input->hasParameterOption('--env')) {\n $file = $this->getEnvironmentFile() . '.' . $input->getParameterOption('--env');\n\n $this->loadEnvironmentFile($file);\n }\n }\n\n if (!$this->get('APP_ENV')) {\n return;\n }\n\n if (empty($file)) {\n $file = $this->getEnvironmentFile() . '.' . $this->get('APP_ENV');\n $this->loadEnvironmentFile($file);\n }\n }", "public function check(): ResultInterface\n {\n $missingVariables = array_filter(self::REQUIRED_ENV, fn($name) => !getenv($name) && !isset($_ENV[$name]));\n\n if ($missingVariables !== []) {\n $missing = implode(\"\\n\", $missingVariables);\n\n return new Failure(\n \"\\nMissing:\\n\" . $missing . \"\\n For help see: \\n \" . self::INSTRUCTIONS_URL\n );\n }\n\n if (getenv('ILIOS_DATABASE_MYSQL_VERSION') || isset($_ENV['ILIOS_DATABASE_MYSQL_VERSION'])) {\n return new Failure(\n \"\\nILIOS_DATABASE_MYSQL_VERSION should be migrated. See \\n \" . self::UPDATE_URL .\n \" for details.\\n\"\n );\n }\n return new Success('All required ENV variables are setup');\n }", "private function checkDependencies()\n {\n if (!($this->di instanceof DiInterface)) {\n throw new DiNotSetException();\n }\n\n if (!$this->di->has('view')) {\n throw new ViewNotSetException();\n }\n\n if (!$this->di->has('assets')) {\n throw new InvalidAssetsManagerException();\n }\n }", "private function checkForModuleOrFunctionException():void\n {\n // check for module and function error\n if ($this->hasError()) {\n //check for bad module\n $this->moduleExceptionChecker();\n\n //check for bad function\n $this->functionExceptionChecker();\n }\n }", "public function checkOperationality()\n {\n $this->checkOperationalityExecTrait();\n\n if (!$this->isInstalled()) {\n throw new SystemRequirementsNotMetException(\n 'imagemagick is not installed (cannot execute: \"' . $this->getPath() . '\")'\n );\n }\n if (!$this->isWebPDelegateInstalled()) {\n throw new SystemRequirementsNotMetException('webp delegate missing');\n }\n }", "public function validate() {\n\n if (empty($this->config['default_pool_read'])) {\n throw new neoform\\config\\exception('\"default_pool_read\" must be set');\n }\n\n if (empty($this->config['default_pool_write'])) {\n throw new neoform\\config\\exception('\"default_pool_write\" must be set');\n }\n\n if (empty($this->config['pools']) || ! is_array($this->config['pools']) || ! $this->config['pools']) {\n throw new neoform\\config\\exception('\"pools\" must contain at least one server');\n }\n }", "public function hasEnvironment($name);", "public function checkOperationality()\n {\n if (!extension_loaded('Gmagick')) {\n throw new SystemRequirementsNotMetException('Required Gmagick extension is not available.');\n }\n\n if (!class_exists('Gmagick')) {\n throw new SystemRequirementsNotMetException(\n 'Gmagick is installed, but not correctly. The class Gmagick is not available'\n );\n }\n\n $im = new \\Gmagick($this->source);\n\n if (!in_array('WEBP', $im->queryformats())) {\n throw new SystemRequirementsNotMetException('Gmagick was compiled without WebP support.');\n }\n }", "protected function checkPhpVersion() {}", "public function setEnvironment();", "function validateEnvironment($name) {\n\n $this->db->select('Environment');\n $this->db->from('environment');\n $this->db->where('Environment', $name);\n $query = $this->db->get();\n return $query->num_rows();\n }", "public function validate()\n {\n throw new Fdap_Model_Exception(\"This function must be declared and completed in the concrete model class.\");\n }", "public function testValidationCaseForInvalidTypeOfKeyExpansionServicePassedOnInitialization()\n {\n // Backward compatible for different versions of PHPUnit\n if (method_exists($this, 'expectException')) {\n $this->expectException(\\RuntimeException::class);\n\n $protocol = new KeyExchange(null);\n } else {\n $hasThrown = null;\n\n try {\n $protocol = new KeyExchange(null);\n } catch (\\RuntimeException $exception) {\n $hasThrown = !empty($exception->getMessage());\n } catch (\\Exception $exception) {\n $hasThrown = $exception->getMessage();\n }\n\n $this->assertTrue($hasThrown);\n\n return;\n }\n }", "public function validateArguments() {}", "final public function check() : void {\n\t\tif($this !== self::current()) {\n\t\t\tthrow new PlatformMismatchException(self::current(), $this);\n\t\t}\n\t}", "private function windowsOnly() {\n\t\tif(PHP_OS != \"WINNT\") {\r\n\t\t\t$this -> setExpectedException('Exception');\r\n\t\t}\n\t}", "public function checkConfig();", "public function validate(): void\n {\n $requiredParams = [\n 'username',\n 'api_key',\n 'BRANCH',\n 'CUST_ID',\n 'CREATE_BY',\n 'REQUEST_AWB',\n 'REQUEST_BY',\n 'REQUEST_NO',\n 'REASON',\n ];\n\n foreach ($requiredParams as $param) {\n if (! ($this->attributes[$param] ?? null)) {\n throw new InvalidStockAwbRequestException(\"$param is required.\");\n }\n }\n\n return;\n }", "public abstract function validateConfig($config);", "protected function validateParameters()\n {\n if (empty($this->save_path)) {\n throw new \\Exception(\"The 'save_path' is not specified!\");\n }\n }", "public function is(string $env): bool;", "public function versionIsInvalid(string $version): void;" ]
[ "0.796451", "0.68811566", "0.6718176", "0.64361763", "0.6413818", "0.63720465", "0.63031435", "0.62825966", "0.6279313", "0.62007195", "0.6183477", "0.6141189", "0.61323124", "0.60558873", "0.60426724", "0.6017852", "0.59798163", "0.5973952", "0.5919907", "0.5917128", "0.5915265", "0.58891904", "0.5838787", "0.5832164", "0.58253926", "0.5821183", "0.5820562", "0.5804468", "0.5751143", "0.57501054", "0.5742954", "0.5696968", "0.5640228", "0.5638407", "0.55864066", "0.55813307", "0.55683744", "0.55632603", "0.55042166", "0.5470759", "0.5447305", "0.5443085", "0.54379743", "0.54358125", "0.54169905", "0.5416795", "0.54105705", "0.5409359", "0.54064834", "0.54012406", "0.5384618", "0.5384107", "0.5375977", "0.5367204", "0.5363667", "0.5363667", "0.53632903", "0.535596", "0.5349781", "0.53460294", "0.53318685", "0.5322368", "0.5317648", "0.5308128", "0.5306693", "0.53060967", "0.5301408", "0.52940804", "0.5292055", "0.5276089", "0.5269102", "0.5269102", "0.5269102", "0.5269102", "0.5269102", "0.5269102", "0.52564514", "0.52520263", "0.5244128", "0.52413416", "0.5237697", "0.5230745", "0.5223883", "0.5223192", "0.52161574", "0.5211722", "0.5194666", "0.5183823", "0.5179789", "0.51757467", "0.5170154", "0.516344", "0.51540387", "0.5149641", "0.5145837", "0.5142373", "0.5127646", "0.5113924", "0.5101511", "0.50984204" ]
0.7654986
1
Validate cost and throw exception if invalid
protected function _validateCost($cost) { /* @var $helper EW_NativePasswords_Helper_Data */ $helper = Mage::helper('ew_nativepasswords'); if(!$helper->validateCost($cost)) { throw new EW_NativePasswords_Exception_InvalidCostException( $helper->__( 'Invalid cost %d. Cost must be in interval [%d,%d].', $cost, EW_NativePasswords_Helper_Data::COST_MIN, EW_NativePasswords_Helper_Data::COST_MAX ) ); } $optimalCost = $helper->getOptimalCost(); if($optimalCost != $cost) { Mage::getSingleton('adminhtml/session')->addNotice( $helper->__( 'Native passwords cost updated to %d, but optimal cost computed to be %d.', $cost, $optimalCost ) ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCostValidation()\n {\n $aircraft = factory(\\App\\Aircraft::class)->create();\n $aircraft->cost = null;\n $this->assertFalse($aircraft->save());\n\n $aircraft->cost = 'a';\n $this->assertFalse($aircraft->save());\n\n $aircraft->cost = 0.5;\n $this->assertFalse($aircraft->save());\n\n $aircraft->cost = -3;\n $this->assertFalse($aircraft->save());\n\n $aircraft->cost = 50;\n $this->assertTrue($aircraft->save());\n }", "public function getCost();", "protected function setCost($cost)\n {\n \tif (empty($cost)) {\n \t\tthrow new Exception(\"Must have a cost\");\n \t}\n $this->cost = $cost;\n\n return $this;\n }", "public function validate()\n {\n if ($this->taxableAmount === null) {\n throw new InvalidArgumentException('Missing taxable amount');\n }\n if ($this->taxAmount === null) {\n throw new InvalidArgumentException('Missing tax amount');\n }\n if ($this->taxCategory === null) {\n throw new InvalidArgumentException('Missing tax category');\n }\n }", "function validate() {\n throw new Exception(\"Invalid validate call\");\n }", "private function validate()\n {\n if (! is_numeric($this->number)) {\n throw new \\InvalidArgumentException(\"Invalid numeric value provided ($this->number).\");\n }\n }", "public function validate()\n {\n if ($this->amount <= 0) {\n $this->errors[0] = 'Wpisz poprawną kwotę!';\n }\n \n if (!isset($this->payment)) {\n $this->errors[1] = 'Wybierz sposób płatności!';\n }\n \n if (!isset($this->category)) {\n $this->errors[2] = 'Wybierz kategorię!';\n }\n }", "function validate()\n\t{\n\t\tglobal $lng;\n\n\t\tinclude_once 'Services/Payment/exceptions/class.ilShopException.php';\n\n\t\tswitch($this->getPriceType())\n\t\t{\n\t\t\tcase self::TYPE_DURATION_MONTH:\n\t\t\t\tif(!preg_match('/^[1-9][0-9]{0,1}$/', $this->__getDuration()))\n\t\t\t\t\tthrow new ilShopException($lng->txt('paya_price_not_valid'));\n\t\t\t\tbreak;\n\n\t\t\tcase self::TYPE_DURATION_DATE:\n\t\t\t\tif(!preg_match('/^[0-9]{4,4}-[0-9]{1,2}-[0-9]{1,2}$/', $this->__getDurationFrom()))\n\t\t\t\t\tthrow new ilShopException($lng->txt('payment_price_invalid_date_from'));\n\n\t\t\t\t$from_date = explode('-', $this->__getDurationFrom());\n\t\t\t\tif(!checkdate($from_date[1], $from_date[2], $from_date[0]))\n\t \t\t\tthrow new ilShopException($lng->txt('payment_price_invalid_date_from'));\n\n\t\t\t\tif(!preg_match('/^[0-9]{4,4}-[0-9]{1,2}-[0-9]{1,2}$/', $this->__getDurationUntil()))\n\t\t\t\t\tthrow new ilShopException($lng->txt('payment_price_invalid_date_until'));\n\n\t\t\t\t$till_date = explode('-', $this->__getDurationUntil());\n\t\t\t\tif(!checkdate($till_date[1], $till_date[2], $till_date[0]))\n\t \t\t\tthrow new ilShopException($lng->txt('payment_price_invalid_date_until'));\n\n\t \t\t$from = mktime(12, 12, 12, $from_date[1], $from_date[2], $from_date[0]);\n\t \t\t$till = mktime(12, 12, 12, $till_date[1], $till_date[2], $till_date[0]);\n\n\t \t\tif($from >= $till)\n\t\t\t\t\tthrow new ilShopException($lng->txt('payment_price_invalid_date_from_gt_until'));\n\t\t\t\tbreak;\n\n\t\t\tcase self::TYPE_UNLIMITED_DURATION:\n\t\t\t\treturn true;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tthrow new ilShopException($lng->txt('payment_no_price_type_selected_sdf'));\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif(preg_match('/[0-9]/',$this->__getPrice()))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\tthrow new ilShopException($lng->txt('payment_price_invalid_price'));\n\t}", "public function validate()\n {\n $helper = Mage::helper('checkout');\n $quote = $this->getQuote();\n if ($quote->getIsMultiShipping()) {\n Mage::throwException($helper->__('Invalid checkout type.'));\n }\n\n if ($quote->getCheckoutMethod() == self::METHOD_GUEST && !Mage::helper('firecheckout')->isAllowedGuestCheckout()) {\n Mage::throwException($this->_helper->__('Sorry, guest checkout is not enabled. Please try again or contact store owner.'));\n }\n }", "function testeffectiveRateException()\n\t{\n\t\t$this->expectException(Exception::class);\n\t\tMath_Finance::effectiveRate(0.40, -13);\n\t}", "public function setCost($cost)\n {\n $this->cost = $cost;\n }", "public function validate()\n {\n $quote = $this->getQuote();\n if ($quote->getIsMultiShipping()) {\n Mage::throwException($this->_helper->__('Invalid checkout type.'));\n }\n\n if ($quote->getCheckoutMethod() == self::METHOD_GUEST && !$quote->isAllowedGuestCheckout()) {\n Mage::throwException(\n $this->_helper\n ->__('Sorry, guest checkout is not enabled. Please try again or contact store owner.')\n );\n }\n }", "public function processCostTableInput() {\n\t\n\t\t// Prevent access to method if no SESSION variables are set\n\t\tif(!isset($_SESSION['profit_dlr_id']) && !isset($_SESSION['profit_date'])) {\n\t\t\t//$_SESSION['error'][] = 'Please select a dealer before proceeding!';\n\t\t\treturn 'wksht_not_set';\n\t\t}\n\t\t// If a cost table is submitted, but the user has deleted all rows, ensure that Fatal errors do not show (for non-object)\n\t\tif (isset($_POST['cost_table_svc_id'])) {\n\t\t\tif (!isset($_POST['cost_desc'])) {\n\t\t\t\t//$_SESSION['error'][] = 'You must enter service information before submitting the Cost Average table!';\n\t\t\t\treturn 'no_rows_error';\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Instantiate InputValidation class to validate form input\n\t\t$isvalid = new InputValidation();\n\t\t\n\t\t$svc_id = (int) $_POST['cost_table_svc_id']; // No form validation necessary for svc_id as this is a hidden input field\n\t\t\n\t\t$svc_name = $_POST['cost_table_svc_name']; // No form validation necessary for svc_name as this is a hidden input field\n\t\t\n\t\tforeach ($_POST['cost_desc'] as $desc) {\n\t\t\tif ($desc == '') {\n\t\t\t\t$_SESSION['error'][] = 'You left a Description field empty!';\n\t\t\t}\n\t\t\t$cost_desc[] = htmlentities($desc, ENT_QUOTES); // No further validation necessary as this item description could be anything\n\t\t}\n\t\t\n\t\tforeach ($_POST['cost_code'] as $cost) {\n\t\t\tif ($cost == '') {\n\t\t\t\t$_SESSION['error'][] = 'You left a Code field empty!';\n\t\t\t}\n\t\t\t$cost_code[] = htmlentities($cost, ENT_QUOTES); // No further validation necessary as this item code could be anything\n\t\t}\n\t\t\n\t\tforeach ($_POST['cost_rocount'] as $ro_count) {\n\t\t\tif (!$isvalid->validWholeNumber($ro_count) || $ro_count == '') {\n\t\t\t\tif ($ro_count == '') {\n\t\t\t\t\t$_SESSION['error'][] = 'You left an RO Count field empty!';\n\t\t\t\t} else {\n\t\t\t\t\t$_SESSION['error'][] = 'You entered an invalid number in the RO Count field!';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$cost_rocount[] = htmlentities($ro_count, ENT_QUOTES);\n\t\t}\n\t\t\n\t\tforeach ($_POST['cost_parts_sale'] as $parts_sale) {\n\t\t\tif (!$isvalid->validDollarValue($parts_sale) || $parts_sale == '') {\n\t\t\t\t$_SESSION['error'][] = 'You entered an invalid Parts Sale amount!';\n\t\t\t}\n\t\t\t$cost_parts_sale[] = htmlentities($parts_sale, ENT_QUOTES);\n\t\t}\n\t\t\n\t\tforeach ($_POST['cost_parts_cost'] as $parts_cost) {\n\t\t\tif (!$isvalid->validDollarValue($parts_cost) || $parts_cost == '') {\n\t\t\t\t$_SESSION['error'][] = 'You entered an invalid Parts Cost amount!';\n\t\t\t}\n\t\t\t$cost_parts_cost[] = htmlentities($parts_cost, ENT_QUOTES);\n\t\t}\n\t\t\n\t\tforeach ($_POST['cost_labor_sale'] as $labor_sale) {\n\t\t\tif (!$isvalid->validDollarValue($labor_sale) || $labor_sale == '') {\n\t\t\t\t$_SESSION['error'][] = 'You entered an invalid Labor Sale amount!';\n\t\t\t}\n\t\t\t$cost_labor_sale[] = htmlentities($labor_sale, ENT_QUOTES);\n\t\t}\n\t\t\n\t\t// If there were any errors, return false\n\t\tif (!empty($_SESSION['error'])) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Echo values for testing purposes\n\t\t/*\n\t\techo '$svc_id: '.$svc_id.'<br> $svc_name: '.$svc_name.'<br>';\n\t\tforeach ($cost_desc as $desc) {\n\t\t\techo '$cost_desc: '.$desc.'<br>';\n\t\t}\n\t\tforeach ($cost_code as $code) {\n\t\t\techo '$cost_code: '.$code.'<br>';\n\t\t}\n\t\tforeach ($cost_rocount as $count) {\n\t\t\techo '$cost_rocount: '.$count.'<br>';\n\t\t}\n\t\tforeach ($cost_parts_sale as $parts_sale) {\n\t\t\techo '$cost_parts_sale: '.$parts_sale.'<br>';\n\t\t}\n\t\tforeach ($cost_parts_cost as $parts_cost) {\n\t\t\techo '$cost_parts_cost: '.$parts_cost.'<br>';\n\t\t}\n\t\tforeach ($cost_labor_sale as $labor_sale) {\n\t\t\techo '$cost_labor_sale: '.$labor_sale.'<br>';\n\t\t}\n\t\t*/\n\t\t\n\t\t// Check if records already exist for $_SESSION['profit_dlr_id'] and $_SESSION['profit_date'] in cost_avg_data table\n\t\t// If so, delete records in table associated with dealer_record_id, record_date, svc_id, and then re-insert record(s)\n\t\tif($this->checkTableData($_SESSION['profit_dlr_id'], $_SESSION['profit_date'])) {\n\t\t\tif(!$this->deleteCostData(array('svc_id'=>$svc_id))) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t//$this->deleteCostData(array('svc_id'=>$svc_id));\n\t\t}\n\t\t\n\t\t// Insert or update cost table\n\t\t$sql = \"INSERT INTO cost_avg_data (dealer_record_id, record_date, svc_id, cost_desc, cost_code, cost_ro_count, cost_parts_sale, cost_parts_cost, cost_labor_sale, create_date, user_id)\n\t\t\t\tVALUES (:dealer_record_id, :record_date, :svc_id, :cost_desc, :cost_code, :cost_ro_count, :cost_parts_sale, :cost_parts_cost, :cost_labor_sale, NOW(), :user_id)\";\n\t\ttry {\n\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\tfor ($i=0; $i<sizeof($cost_desc); $i++) {\n\t\t\t\t$stmt->bindParam(\":dealer_record_id\", $_SESSION['profit_dlr_id'], PDO::PARAM_INT);\n\t\t\t\t$stmt->bindParam(\":record_date\", $_SESSION['profit_date'], PDO::PARAM_STR);\n\t\t\t\t$stmt->bindParam(\":svc_id\", $svc_id, PDO::PARAM_INT);\n\t\t\t\t$stmt->bindParam(\":cost_desc\", $cost_desc[$i], PDO::PARAM_STR);\n\t\t\t\t$stmt->bindParam(\":cost_code\", $cost_code[$i], PDO::PARAM_INT);\n\t\t\t\t$stmt->bindParam(\":cost_ro_count\", $cost_rocount[$i], PDO::PARAM_INT);\n\t\t\t\t$stmt->bindParam(\":cost_parts_sale\", $cost_parts_sale[$i], PDO::PARAM_INT);\n\t\t\t\t$stmt->bindParam(\":cost_parts_cost\", $cost_parts_cost[$i], PDO::PARAM_INT);\n\t\t\t\t$stmt->bindParam(\":cost_labor_sale\", $cost_labor_sale[$i], PDO::PARAM_INT);\n\t\t\t\t$stmt->bindParam(\":user_id\", $_SESSION['user']['id'], PDO::PARAM_INT);\n\t\t\t\t$stmt->execute();\n\t\t\t\t$stmt->closeCursor();\n\t\t\t}\n\t\t} catch(Exception $e) {\n\t\t\tdie($e->getMessage());\n\t\t}\n\t\t//die();\n\t}", "private function checkItemPurchaseBounds() : void\n {\n if ($this->item->available < 1) {\n throw new InventoryException('quantity not available');\n }\n\n if ($this->coinService->getCurrenCoinCount() < $this->item->cost) {\n throw new InsufficientFundsException('insufficient funds available');\n }\n }", "public function postCost()\n {\n if(!Request::ajax()) return;\n \n // validate \n $rules = array('cottage_id' => 'required|integer',\n 'first_night' => 'required|date_format:Y-m-d',\n 'depart' => 'required|date_format:Y-m-d',\n );\n\n $validator = Validator::make(Input::all(), $rules);\n\n if ($validator->fails()) \n return Response::json(array('status' => 'error', 'messages' => $validator->messages()));\n \n $cost = $this->price->calculateByNight(Input::get('cottage_id'), Input::get('first_night'), Input::get('depart'));\n \n return Response::json(array('status' => 'success', 'cost' => $cost[0]->cost));\n }", "protected function validateOrThrow() {}", "public function validate()\n {\n if ($this->ingredient() || $this->upc()) {\n return;\n }\n\n throw new \\Exception('You must enter either an ingredient or UPC code to search for');\n }", "public function test_amount_less_than_rate_cost()\n {\n\n\n\n $data=[\"amount\"=> 100,\n \"unpaid_appliance_rates\"=> 2,\n \"appliance_rate_cost\"=> 200,\n \"tariff_fixed_costs\"=> 160,\n \"price_per_kwh\"=> 700\n ];\n\n $response = $this->post('/api/transactions', $data);\n // $response->assertStatus(200);\n $response->assertJson( [\"data\"=> [\n \"type\"=> \"transaction\",\n \"attributes\"=> [\n \"paid_for_appliance_rates\"=> 0,\n \"fully_covered_appliance_rate\"=> 0,\n \"paid_for_fixed_tariff\"=> 100,\n \"paid_for_energy\"=> 0,\n \"topup_for_energy\"=> 0,\n \"sold_energy\"=> 0\n ]\n ]]);\n }", "abstract public function validate();", "abstract public function validate();", "public function validate()\n {\n $requiredParameters = array(\n 'callbackUrl' => 'PayPal callback URL',\n );\n\n foreach ($requiredParameters as $key => $val) {\n if (!$this->getParameter($key)) {\n throw new InvalidCreditCardException(\"The $val is required\");\n }\n }\n }", "protected function performValidation()\n {\n // no required arguments\n }", "public function run()\n {\n Cost::create($this->input(1, 1, 1, 87000, 8700, 0.9));\n Cost::create($this->input(1, 2, 1, 157000, 15700, 0.9));\n Cost::create($this->input(1, 3, 1, 214000, 21400, 0.9));\n Cost::create($this->input(1, 4, 1, 158000, 15800, 0.9));\n Cost::create($this->input(1, 5, 1, 258000, 25800, 0.9));\n Cost::create($this->input(1, 6, 1, 216000, 21600, 0.9));\n Cost::create($this->input(1, 7, 1, 171000, 17100, 0.9));\n Cost::create($this->input(1, 8, 1, 157000, 15700, 0.9));\n Cost::create($this->input(1, 9, 1, 253000, 25300, 0.9));\n Cost::create($this->input(1, 10, 1, 205000, 20500, 0.9));\n Cost::create($this->input(1, 11, 1, 245000, 24500, 0.9));\n Cost::create($this->input(1, 12, 1, 246000, 24600, 0.9));\n Cost::create($this->input(1, 13, 1, 136000, 13600, 0.9));\n }", "public function checkMultipleCostAccounts()\n {\n $errors = collect();\n\n $invalid = collect();\n foreach ($this->rows as $hash => $row) {\n $activityCode = $this->activityCodes->get(trim(strtolower($row[0])));\n $resourceIds = $this->resourcesMap->get(trim(strtolower($row[7])));\n\n\n $shadows = BreakDownResourceShadow::where('code', $activityCode)->whereIn('resource_id', $resourceIds)\n ->whereRaw('coalesce(progress, 0) < 100')->whereRaw(\"coalesce(status, '') != 'closed'\")\n ->get();\n\n if ($shadows->count() > 1) {\n $row['hash'] = $hash;\n $row['resources'] = $shadows;\n $errors->push($row);\n } elseif ($shadows->count() < 1) {\n $invalid->push($row);\n }\n }\n\n if ($errors->count()) {\n return ['error' => 'cost_accounts', 'errors' => $errors, 'batch' => $this->batch];\n }\n\n $costIssues = new CostIssuesLog($this->batch);\n $costIssues->recordInvalid($invalid);\n\n return $this->save();\n }", "public function breakdown(): CostBreakdownContract;", "protected function validate() {\r\n if ($this->getBaseAmount() <= 0)\r\n $this->errors->add(\"The base amount of alicuota must be greater than 0.\");\r\n// \t\t\telse\r\n// \t\t\t{\r\n// \t\t\t\t$relativeError = (($this->getTaxAmount() / $this->getBaseAmount() * 100) - $this->getTaxPercent());\r\n// \t\t\t\t$relativeError = $relativeError / $this->getTaxPercent();\r\n// \t\t\t\t$relativeError = NumberDataTypeHelper::truncate($relativeError, 2);\r\n// \t\t\t\tif (abs($relativeError) > 0.01)\r\n// \t\t\t\t\t$this->errors->add(\"The base and tax amount do not match with the alicuota ({$this->getName()}). Diference: $relativeError\");\r\n// \t\t\t}\r\n }", "public function validate()\n {\n $requiredParameters = array(\n 'number' => 'credit card number',\n 'expiryMonth' => 'expiration month',\n 'expiryYear' => 'expiration year'\n );\n\n foreach ($requiredParameters as $key => $val) {\n if (!$this->getParameter($key)) {\n throw new InvalidCreditCardException(\"The $val is required\");\n }\n }\n\n if ($this->getExpiryDate('Ym') < gmdate('Ym')) {\n throw new InvalidCreditCardException('Card has expired');\n }\n\n if (!Helper::validateLuhn($this->getNumber())) {\n throw new InvalidCreditCardException('Card number is invalid');\n }\n\n if (!is_null($this->getNumber()) && !preg_match('/^\\d{12,19}$/i', $this->getNumber())) {\n throw new InvalidCreditCardException('Card number should have 12 to 19 digits');\n }\n }", "public function validate(): void\n {\n $errors = $this->getErrors();\n $this->throwExceptionIfErrors($errors);\n }", "public function testInvalidParams()\n {\n $distance = new Distance();\n\n $distance->between('1', 1, 'not a float', 'invalid');\n }", "public abstract function validation();", "public function testGetCostForDistance()\n {\n $cost = 20;\n $distance = 100;\n $aircraft = factory(\\App\\Aircraft::class)->create([\n 'range' => $distance,\n 'cost' => $cost,\n ]);\n\n $this->assertEquals(2000, $aircraft->getCostForDistance($distance));\n }", "public function isValid($_throwExceptionOnInvalidData = false);", "function testinternalRateOfReturnException1()\n\t{\n\t\t$this->expectException(Exception::class);\n\t\tMath_Finance::internalRateOfReturn(-70000, 12000, 15000, 18000, 21000);\n\t}", "private function validate() {\n\t\tif( empty($this->header) )\n\t\t\tthrow new Exception('ACH file header record is required.');\n\n\t\tif( empty($this->batches) )\n\t\t\tthrow new Exception('ACH file requires at least 1 batch record.');\n\n\t\tif( empty($this->control))\n\t\t\tthrow new Exception('ACH file control record is required.');\t\t\t\n\t}", "function get_cost() {\n\t\t$this->_event->log(\"get_costs\", $_SERVER['REQUEST_TIME'], 5, \"cloudprofile.class.php\", \"Calulating bill for cr $this->id\", \"\", \"\", 0, 0, 0);\n\t\t$cr_appliance_id = $this->appliance_id;\n\t\t$app_id_arr = explode(\",\", $cr_appliance_id);\n\t\t$cr_costs_final = 0;\n\t\tforeach ($app_id_arr as $app_id) {\n\t\t\t$cloud_app = new cloudappliance();\n\t\t\t$cloud_app->get_instance_by_appliance_id($app_id);\n\t\t\t// check state, only bill if active\n\t\t\tif ($cloud_app->state == 1) {\n\t\t\t\t// basic cost\n\t\t\t\t$cr_costs = 0;\n\t\t\t\t// + per cpu\n\t\t\t\t$cr_costs = $cr_costs + $this->cpu_req;\n\t\t\t\t// + per nic\n\t\t\t\t$cr_costs = $cr_costs + $this->network_req;\n\t\t\t\t// ha cost double\n\t\t\t\tif (!strcmp($this->ha_req, '1')) {\n\t\t\t\t\t$cr_costs = $cr_costs * 2;\n\t\t\t\t}\n\t\t\t\t// TODO : disk costs\n\t\t\t\t// TODO : network-traffic costs\n\n\t\t\t\t// sum\n\t\t\t\t$cr_costs_final = $cr_costs_final + $cr_costs;\n\t\t\t\t$this->_event->log(\"get_costs\", $_SERVER['REQUEST_TIME'], 5, \"cloudprofile.class.php\", \"-> Billing active appliance $app_id (cr $this->id) = $cr_costs CC-units\", \"\", \"\", 0, 0, 0);\n\t\t\t} else {\n\t\t\t\t$this->_event->log(\"get_costs\", $_SERVER['REQUEST_TIME'], 5, \"cloudprofile.class.php\", \"-> Not billing paused appliance $app_id (cr $this->id)\", \"\", \"\", 0, 0, 0);\n\t\t\t}\n\t\t}\n\t\t$this->_event->log(\"get_costs\", $_SERVER['REQUEST_TIME'], 5, \"cloudprofile.class.php\", \"-> Final bill for cr $this->id = $cr_costs_final CC-units\", \"\", \"\", 0, 0, 0);\n\t\treturn $cr_costs_final;\n\t}", "public function getCost(): double \n {\n return $this->cost;\n }", "abstract public function valid();", "function validatePrice()\n {\n return empty($this->price)?false:true;\n }", "abstract public function runValidation();", "public static function validate() {}", "public function validate(): bool\n {\n throw_if(\n is_null($amount = $this->get('amount'))\n || ! is_numeric($amount),\n new Exception(\"Invalid amount, '{$amount}' given instead of float.\")\n );\n\n return true;\n }", "public function shouldOrderRequireSolvencyValidation()\n {\n $this->store = Mage::app()->getStore(0)->load(0);\n $this->store->resetConfig();\n $pathTotalMin = 'scoring/solvency/total_min';\n $pathSkipMethods = 'scoring/solvency/skip_methods';\n\n $this->store->setConfig($pathTotalMin, 10);\n $this->store->setConfig($pathSkipMethods, 'cc_saved,paypal');\n\n $config = Mage::getModel('scoring/config');\n $quote = Mage::getModel('sales/quote');\n $quote->getPayment()->setMethod('cc_saved');\n\n /* secure payment method, but below min total */\n $quote->setBaseGrandTotal(9);\n $this->assertFalse(\n $config->isSolvencyValidationRequiredForQuote($quote),\n 'expected quote not to require solvency validation (secure method, below min)'\n );\n\n /* secure payment method, above min total */\n $quote->setBaseGrandTotal(1000);\n $this->assertFalse(\n $config->isSolvencyValidationRequiredForQuote($quote),\n 'expected quote not to require solvency validation (secure method, above min)'\n );\n\n /* insecure payment method, below min total */\n $quote->setBaseGrandTotal(9);\n $quote->getPayment()->setMethod('open_invoice');\n $this->assertFalse(\n $config->isSolvencyValidationRequiredForQuote($quote),\n 'expected quote not to require solvency validation (insecure method, below min)'\n );\n\n /* insecure payment method, above min total */\n $quote->setBaseGrandTotal(1000);\n $config->set('solvency/secure_methods', array('cc_saved'));\n $this->assertTrue(\n $config->isSolvencyValidationRequiredForQuote($quote),\n 'expected quote to require solvency validation (insecure method, above min)'\n );\n }", "private function validate_usage_limit() {\n\t\tif ( $this->usage_limit > 0 && $this->usage_count >= $this->usage_limit ) {\n\t\t\tthrow new Exception( self::E_WC_COUPON_USAGE_LIMIT_REACHED );\n\t\t}\n\t}", "public function __construct($cost, $isbn)\n {\n //assigning the instance variables using constructor\n $this->price = $cost;\n $this->isbnNumber = $isbn;\n }", "private function validate_minimum_amount() {\n\t\tif ( $this->minimum_amount > 0 && wc_format_decimal( $this->minimum_amount ) > wc_format_decimal( WC()->cart->subtotal ) ) {\n\t\t\tthrow new Exception( self::E_WC_COUPON_MIN_SPEND_LIMIT_NOT_MET );\n\t\t}\n\t}", "public function validate(){\n\t\t\n\t\tparent::validate();\n\t\t\n\t\tif (isset($this->amount_limit)){\n\t\t\t\n\t\t\tif (!is_numeric($this->amount_limit))\n\t\t\t\t$this->errorAmountLimit = \"Podaj prawidłową kwotę.\";\n\t\t\t\n\t\t\tif ($this->amount_limit < 0)\n\t\t\t\t$this->errorAmountLimit = \"Kwota limitu nie może być ujemna.\";\n\t\t}\n\t\t\n\t\tif ($this->errorName != null || $this->errorAmountLimit != null){\n\t\t\t$this->success = false;\n\t\t}\n\n\t}", "public function validate() {\n\t\tthrow new \\RuntimeException('Invalid message');\n\t}", "public function testValidateMinusOne(): void\n {\n $this->assertTrue($this->validate(-1));\n }", "protected function validateOrder()\n {\n $helper = Mage::helper('checkout');\n if ($this->getQuote()->getIsMultiShipping()) {\n Mage::throwException($helper->__('Invalid checkout type.'));\n }\n\n if (!$this->getQuote()->isVirtual()) {\n $address = $this->getQuote()->getShippingAddress();\n $addressValidation = $this->validateAddress($address);\n if ($addressValidation !== true) {\n Mage::throwException($helper->__('Please check shipping address information.'));\n }\n $method= $address->getShippingMethod();\n $rate = $address->getShippingRateByCode($method);\n if (!$this->getQuote()->isVirtual() && (!$method || !$rate)) {\n Mage::throwException($helper->__('Please specify shipping method.'));\n }\n }\n\n $addressValidation = $this->validateAddress($this->getQuote()->getBillingAddress());\n if ($addressValidation !== true) {\n Mage::throwException($helper->__('Please check billing address information.'));\n }\n\n if (!($this->getQuote()->getPayment()->getMethod())) {\n Mage::throwException($helper->__('Please select valid payment method.'));\n }\n }", "function getCost(){\n return $this->cost;\n }", "function TaxExclusivePrice(){\n\t\tuser_error(\"to be completed\");\n\t}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function cost(){\n\t\t\n\t\treturn 200;\n\t}", "function no_bankrupt($cash, $cost) {\n\tif ($cash - $cost < 0) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "private function validate($fields)\n\t{\n\t\t// Make sure all fields are set that are required by the API endpoint\n\t\tforeach($this->getRequiredFields() as $field)\n\t\t{\n\t\t\tif ( ! array_key_exists($field, $fields) )\n\t\t\t{\n\t\t\t\tthrow new Exception('Missing required field ' . $field);\n\t\t\t}\n\t\t}\n\n\t\tif ( isset($fields['product_type']) AND ($fields['product_type'] !== 'recreational' AND $fields['product_type'] !== 'medicinal'))\n\t\t\tthrow new Exception('Invalid product_type. Valid values are \"recreational\" or \"medicinal\"');\n\n\t\tif ( isset($fields['amount']) AND !is_numeric($fields['amount']))\n\t\t\tthrow new Exception('Invalid amount. amount must be numeric');\n\n\t\tif ( isset($fields['amount']) AND $fields['amount'] == 0)\n\t\t\tthrow new Exception('Invalid amount. amount can not be 0');\n\n\t\tif ( isset($fields['customer']) )\n\t\t{\n\t\t\tif ( ! isset($fields['customer']['type']) )\n\t\t\t\tthrow new Exception('Invalid customer type. Must be \"drivers_license\" or \"passport\"');\n\n\t\t\tif ( $fields['customer']['type'] !== 'drivers_license' AND $fields['customer_type'] !== 'passport')\n\t\t\t\tthrow new Exception('Invalid customer type. Must be \"drivers_license\" or \"passport\"');\n\n\t\t\tif ( ! isset($fields['customer']['id_number']) )\n\t\t\t\tthrow new Exception('Invalid customer id_number.');\n\n\t\t\tif ( $fields['customer']['type'] == 'drivers_license' AND ! isset($fields['customer']['state']) )\n\t\t\t\tthrow new Exception('Invalid customer state. Must provide customer state with a drivers_license type');\n\n\t\t\tif ( $fields['customer']['type'] == 'passport' AND ! isset($fields['customer']['country']) )\n\t\t\t\tthrow new Exception('Invalid customer state. Must provide customer country with a passport type');\n\t\t}\n\n\t\tif ( isset($fields['store_location']) AND ! isset($fields['store_location']['name']) )\n\t\t\t\tthrow new Exception('Invalid store name.');\n\n\t\tif ( isset($fields['budtender']) AND ! isset($fields['budtender']['name']) )\n\t\t\t\tthrow new Exception('Invalid budtender name.');\n\n\t\treturn true;\n\t}", "public function totalCost(): float;", "function validate_inputs($weights, $num_vertices, $src, $dest)\n{\n if (count($weights) != $num_vertices * $num_vertices)\n {\n return FALSE;\n }\n\n // Verify weights greater than equal to zero\n if (min($weights) < 0)\n {\n return FALSE;\n }\n\n # Verify any non-zero weights\n if (\n count(\n array_filter($weights, function ($weight) { return $weight != 0; })\n ) == 0\n )\n {\n return FALSE;\n }\n\n # Verify source and destination are in range\n if ($src < 0 or $src >= $num_vertices or $dest < 0 or $dest >= $num_vertices)\n {\n return FALSE;\n }\n\n return TRUE;\n}", "public function isValidLevelThrowsExceptionOnInvalidLevelIfAskedToDoSoDataProvider() {}", "protected function validateCapacity(Reserve $reserve)\n {\n $reserves = $this->repository->countRestaurantReserves($reserve);\n\n $capacity = $reserve->getAvailableRestaurant()\n ->getRestaurant()\n ->getCapacity();\n\n if ($reserves >= $capacity) {\n throw new ValidatorException(\n ['restaurant' => $reserve->getAvailableRestaurant()->getRestaurant()],\n 'The restaurant at full capacity for this date'\n );\n }\n }", "public function validate($data) {\n $data = $this->gump->sanitize($data); // You don't have to sanitize, but it's safest to do so.\n\n $this->gump->validation_rules(array(\n 'user_id' => 'required|max_len,100',\n 'plan_id' => 'required|numeric',\n 'plan_start' => 'required|date',\n 'plan_end' => 'required|date',\n 'price' => 'required|numeric',\n 'vat' => 'numeric',\n 'price_total' => 'required|numeric'\n ));\n\n $this->gump->filter_rules(array(\n 'user_id' => 'trim|sanitize_string',\n 'plan_id' => 'trim|sanitize_string',\n 'plan_start' => 'trim|sanitize_string',\n 'plan_end' => 'trim|sanitize_string',\n 'price' => 'trim|sanitize_string',\n 'vat' => 'trim|sanitize_string',\n 'price_total' => 'trim|sanitize_string',\n ));\n\n $validated_data = $this->gump->run($data);\n if ($validated_data === false) {\n $errArr = $this->gump->get_readable_errors();\n $errString = \"\";\n foreach ($errArr as $k => $err) {\n $errString .= $err . '<br>';\n }\n throw new Exception($errString);\n } else {\n return $data;\n }\n }", "public function testTotalException()\n {\n $input = [0,2,5,8];\n $coupon = 1.20;\n\n // Make the test expect a certain type of exception\n $this->expectException('BadMethodCallException');\n $this->Receipt->total($input, $coupon);\n }", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate() {\r\n // Name - this is required\r\n if ($this->description == '') {\r\n $this->errors[] = 'Description is required';\r\n } \r\n \r\n // Category number - must be a number\r\n if (!is_numeric($this->category)) {\r\n $this->category = 0;\r\n } \r\n \r\n // Item number - must be a number\r\n if (!is_numeric($this->item)) {\r\n $this->item = 0;\r\n } \r\n }", "public function checkForErrors()\n {\n if ($this->getDebtor() == '' && $this->getDebtorCode() == '') {\n throw new \\InvalidArgumentException(\n sprintf('Debtor or DebtorCode must be defined')\n );\n }\n\n if ($this->getDomain() == '') {\n throw new \\InvalidArgumentException(\n sprintf('Domain must be defined')\n );\n }\n\n if ($this->getTld() == '') {\n throw new \\InvalidArgumentException(\n sprintf('Tld must be defined')\n );\n }\n }", "public function validate(){\n\t\tif($this->address instanceof AddressObject){\n\t\t\t$this->validate1();\n\t\t}else{\n\t\t\t$this->exception = new InvalidParameterException('Address',\"Address Object\");\n\t\t}\n\t\treturn $this->exception;\n\t}", "private function validate_maximum_amount() {\n\t\tif ( $this->maximum_amount > 0 && wc_format_decimal( $this->maximum_amount ) < wc_format_decimal( WC()->cart->subtotal ) ) {\n\t\t\tthrow new Exception( self::E_WC_COUPON_MAX_SPEND_LIMIT_MET );\n\t\t}\n\t}", "abstract function validate(): void;", "public function validate()\n {\n $info = $this->getInfoInstance();\n\n $quote = $info->getQuote();\n\n $maxInstallmentsNumber = Mage::getStoreConfig('payment/vindi_creditcard/max_installments_number');\n\n if ($this->isSingleOrder($quote) && ($maxInstallmentsNumber > 1)) {\n if (! $installments = $info->getAdditionalInformation('installments')) {\n return $this->error('Você deve informar o número de parcelas.');\n }\n\n if ($installments > $maxInstallmentsNumber) {\n return $this->error('O número de parcelas selecionado é inválido.');\n }\n\n $minInstallmentsValue = Mage::getStoreConfig('payment/vindi_creditcard/min_installment_value');\n $installmentValue = ceil($quote->getGrandTotal() / $installments * 100) / 100;\n\n if (($installmentValue < $minInstallmentsValue) && ($installments > 1)) {\n return $this->error('O número de parcelas selecionado é inválido.');\n }\n }\n\n if ($info->getAdditionalInformation('use_saved_cc')) {\n return $this;\n }\n\n $availableTypes = $this->api()->getCreditCardTypes();\n\n $ccNumber = $info->getCcNumber();\n\n // remove credit card non-numbers\n $ccNumber = preg_replace('/\\D/', '', $ccNumber);\n\n $info->setCcNumber($ccNumber);\n\n if (! $this->_validateExpDate($info->getCcExpYear(), $info->getCcExpMonth())) {\n return $this->error(Mage::helper('payment')->__('Incorrect credit card expiration date.'));\n }\n\n if (! array_key_exists($info->getCcType(), $availableTypes)) {\n return $this->error(Mage::helper('payment')->__('Credit card type is not allowed for this payment method.'));\n }\n\n return $this;\n }", "function algorithmic_cost()\r\n{\r\n return ['cost' => 10];\r\n}", "function testnominalRateException()\n\t{\n\t\t$this->expectException(Exception::class);\n\t\tMath_Finance::nominalRate(0.2930, -5);\n\t}", "public function testDeviationNonNumeric()\n {\n new ComputedResult(10, 'hello');\n }", "public function getCost()\n {\n return $this->cost;\n }", "public function getCost()\n {\n return $this->cost;\n }", "public function getCost()\n {\n return $this->cost;\n }", "public function validate()\n { \n try {\n $clientToken = $this->serviceGateway->clientToken()->generate([\n \"customerId\" => '123'\n ]);\n } catch (\\Braintree_Exception_Authentication $e) {\n throw new \\Exception('Braintree Exception Authentication Failed');\n } catch (\\Exception $e) {\n // do nothing\n }\n }", "public function rules()\n {\n return [\n 'plan_title' => 'required',\n\n 'plan_limit_download_count' => 'required|numeric',\n\n \n 'plan_price'=>'required|numeric',\n 'plans_days_count'=>'required|numeric',\n ];\n }", "function testinternalRateOfReturnException2()\n\t{\n\t\t$this->expectException(Exception::class);\n\t\tMath_Finance::internalRateOfReturn(array(70000, 12000, 15000, 18000, 21000));\n\t}", "private function comparePrices()\n {\n $grandTotal = $this->quote->getGrandTotal();\n if ($this->pmtOrder->getShoppingCart()->getTotalAmount() != intval(strval(100 * $grandTotal))) {\n throw new \\Exception(self::VA_ERR_MSG);\n }\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'district_id' => ['required','unique:shippingcosts'],\n 'amount' => 'required',\n \n ],\n [\n 'district_id.required' => 'Please select district',\n 'amount.required' => 'Please enter shipping cost',\n \n ]);\n\n $shippingcost = new Shippingcost();\n $shippingcost->district_id = $request->district_id;\n $shippingcost->amount = $request->amount;\n \n $shippingcost->save();\n\n session()->flash('success', 'A new shippingcost has added successfully !!');\n return redirect()->route('shippingcost.index');\n }", "public function check_validity() {\r\n\t\t$value = $this->get_posted_value();\r\n\r\n\t\t// required field check\r\n\t\t// 0, '0', and 0.0 need special handling since they're valid, but PHP considers them falsy values.\r\n\t\tif ( $this->props['required'] && ( empty( $value ) && ! in_array( $value, [ 0, '0', 0.0 ], true ) ) ) {\r\n\t\t\t// translators: Placeholder %s is the label for the required field.\r\n\t\t\tthrow new \\Exception( sprintf( _x( '%s is a required field.', 'Add listing form', 'my-listing' ), $this->props['label'] ) );\r\n\t\t}\r\n\r\n\t\t// if field isn't required, then no validation is needed for empty values\r\n\t\tif ( empty( $value ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// otherwise, run validations\r\n\t\t$this->validate();\r\n\t}", "function calculateActualCost($product_price,$product_cost,$netamount,$othercost,$quantity)\n\t{\n\t\t//product_price = original purchase price\n\t\t//othercost = duty fee + shipping cost + other charges\n\n\t\t$actual_cost = 0;\n\t\t$price_percentage = 0;\n\t\t$other_charges_bypercentage = 0;\n\t\t$product_cost = floatval(str_replace(\",\",\"\",$product_cost));\n\t\t$netamount = floatval(str_replace(\",\",\"\",$netamount));\n\t\t$othercost = floatval(str_replace(\",\",\"\",$othercost));\n\t\t$product_price = floatval(str_replace(\",\",\"\",$product_price));\n\t\t$actual_cost += $product_price; //original purchase price \n\t\tif($netamount!=0 && $netamount!=''){\n\t\t\t$price_percentage = (((100/$netamount)*$product_cost)/100);\n\t\t}\n\t\t//calculation on other charges\n\t\tif($quantity && $quantity!=0){\n\t\t\t$other_charges_bypercentage = ($othercost/$quantity) * $price_percentage ;\n\t\t}\n\t\t$actual_cost += $other_charges_bypercentage;\n\t\treturn $actual_cost;\n\t}", "function testrateException()\n\t{\n\t\t$this->expectException(Exception::class);\n\t\tMath_Finance::rate(20, -36.157534, 255, 0, 3);\n\t}" ]
[ "0.70924926", "0.5933311", "0.58745176", "0.57979405", "0.5738085", "0.56106466", "0.5597978", "0.5583806", "0.556857", "0.55566984", "0.5554149", "0.55007094", "0.54794025", "0.54743695", "0.5444251", "0.5442854", "0.54329216", "0.54158455", "0.5400732", "0.5400732", "0.5395641", "0.5379976", "0.53469956", "0.5330869", "0.53259945", "0.5319935", "0.5307945", "0.5260377", "0.52281886", "0.52252156", "0.5212471", "0.5195896", "0.51805323", "0.5177959", "0.51582414", "0.5156593", "0.5150238", "0.513879", "0.5138426", "0.50976044", "0.50844145", "0.50806165", "0.5080308", "0.50777364", "0.50759196", "0.50737184", "0.5058787", "0.50550616", "0.50536156", "0.50509554", "0.5049231", "0.5046238", "0.5046238", "0.5046238", "0.5046238", "0.5046238", "0.5046238", "0.5046238", "0.5046238", "0.5035017", "0.5032687", "0.50322646", "0.50307345", "0.502447", "0.50170404", "0.50024307", "0.5000763", "0.4993571", "0.49927682", "0.49927682", "0.49927682", "0.49927682", "0.49927682", "0.49927682", "0.49927682", "0.49927682", "0.49927682", "0.49927682", "0.49927682", "0.49927682", "0.4992419", "0.49904242", "0.4985469", "0.49853495", "0.49853343", "0.49841782", "0.4976308", "0.49756235", "0.49716592", "0.49701035", "0.49701035", "0.49701035", "0.4965907", "0.49636185", "0.49551755", "0.49284878", "0.4927369", "0.49254328", "0.49185246", "0.4910674" ]
0.74683404
0
Ensure environment can handle native password hashing when enabling via system config. Observes: model_config_data_save_before
public function validateEnvironment(Varien_Event_Observer $observer) { $groups = $observer->getObject()->getGroups(); $enabled = false; if(isset($groups['password']) && isset($groups['password']['fields']) && isset($groups['password']['fields']['native_passwords_enabled']) && isset($groups['password']['fields']['native_passwords_enabled']['value'])) { $enabled = (bool)$groups['password']['fields']['native_passwords_enabled']['value']; } if(!$enabled) { return; //nothing to do here } /* @var $helper EW_NativePasswords_Helper_Data */ $helper = Mage::helper('ew_nativepasswords'); $oldCost = $helper->getConfiguredCost(); $cost = intval($groups['password']['fields']['native_passwords_cost']['value']); $this->_validateEnvironment(); if($oldCost != $cost) { $this->_validateCost($cost); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function configureSaltedPasswords() {}", "protected function getConfiguredPassword() {}", "public function beforeSave() {\n if(($this->getScenario() === 'register') || ($this->getScenario() === 'changePassword')) \n $this->password = md5($this->password);\n return true;\n }", "public function beforeSave() {\t\t\n\t\t// Password hashing is no longer automatic since CakePHP 2.0.0\n\t if (isset($this->data[$this->alias]['password'])) {\n\t $this->data[$this->alias]['password'] = AuthComponent::password($this->data[$this->alias]['password']);\n\t }\n \n unset($this->data[$this->alias]['confirm_password']);\n \n\t return true;\n\t}", "protected function beforeSave() {\n\t\tif (!empty($this->newPassword))\n\t\t\t$this->password = UtilHelper::encryptPwd($this->newPassword, $this->salt);\n\t\treturn true;\n\t}", "function get_config_password()\n\t{\n\t\tglobal $_CONFIG;\n\n\t\t$hash_salt = $_CONFIG->auth_hash_salt__or(WARP_DEFAULT_SALT);\n\t\treturn $_CONFIG->password_hashed ? $_CONFIG->admin_password : sha1($_CONFIG->admin_password.$hash_salt);\n\t}", "function hashPassword()\t{\n\t\t$fields = $this->_settings['fields'];\n\t\tif (!isset($this->model->data[$this->model->name][$fields['username']])) {\n\t\t\t$this->model->data[$this->model->name][$fields['password']] = Security::hash($this->model->data[$this->model->name][$fields['password']], null, true);\n\t\t}\n\t}", "public function validate_config_on_save($host) {\n\t\t\tif($host->free_shipping_enabled && !strlen($host->free_shipping_min_amount))\n\t\t\t\t$host->validation->setError('Please specify minimum order amount for free shipping or disable the free shipping option', 'free_shipping_min_amount', true);\n\t\t\t\t\n\t\t\t$hash_value = trim($host->api_key_password); \n\t\t\t\n\t\t\tif(!strlen($hash_value)) { \n\t\t\t\tif(!isset($host->fetched_data['api_key_password']) || !strlen($host->fetched_data['api_key_password'])) \n\t\t\t\t\t$host->validation->setError('Please enter your API key password', 'api_key_password', true); \n\n\t\t\t\t$host->api_key_password = $host->fetched_data['api_key_password']; \n\t\t\t}\n\t\t}", "public function beforeSave() {\n if ($this->isNewRecord) {\n if (isset($this->passwordSave, $this->repeatPassword) && ($this->passwordSave === $this->repeatPassword)) {\n $this->password = $this->hash($this->passwordSave);\n }\n $this->password_expiry_date = new CDbExpression(\"DATE_ADD(NOW(), INTERVAL \" . self::PASSWORD_EXPIRY . \" DAY) \");\n } else\n if (isset($this->passwordSave) && isset($this->repeatPassword) && ($this->passwordSave === $this->repeatPassword)) {\n //if it's not a new password, save the password only if it not empty and the two passwords match\n $this->password = $this->hash($this->passwordSave);\n $this->password_expiry_date = new CDbExpression(\"DATE_ADD(NOW(), INTERVAL \" . self::PASSWORD_EXPIRY . \" DAY) \");\n }\n $this->password_strategy = $this->encrypt_text(strtolower($this->email));\n if (!in_array(Lookup::item('AccessRole', $this->default_role), Lookup::items('AccessRole'))) {\n $this->default_role = 'member';\n }\n $this->roles = $this->roles_encrypt();\n return parent::beforeSave();\n }", "public function beforeSave($options = array()) {\n // parent::beforeSave($options);\n \n if(isset ($this->data[$this->alias]['password']));\n {\n $this->data[$this->alias]['password'] = AuthComponent::password($this->data[$this->alias]['password']);\n\n return true;\n }\n }", "public function validate_config_on_save($host_obj)\n {\n if (strlen($host_obj->password)>15) {\n $host_obj->field_error('password', 'Password must be 15 characters or shorter');\n }\n }", "private static function secureEnvConfig() {\n //check session config\n //check db, plugin, encryption\n //make sure default apps are all registered\n $titleCheck = (!isset(DSettings::$globalName[2]) || isset(DSettings::$globalName[29]));\n $routerCheck = empty(DSettings::$router['apps']) || empty(DSettings::$router['apps']);\n if ($titleCheck)\n trigger_error(DMainLang::$errorConsts['websiteTitleError']);\n elseif ($routerCheck)\n trigger_error(DMainLang::$errorConsts['routerInitError']);\n }", "function beforeSave($created = array()) {\r\n App::uses('AuthComponent', 'Controller/Component');\r\n if (isset($this->data['User']['password'])) {\r\n $this->data['User']['password'] = AuthComponent::password(\r\n $this->data['User']['password']\r\n );\r\n }\r\n }", "public function onPrePersist(LifecycleEventArgs $eventArgs) {\n\t\tparent::onPrePersist($eventArgs);\n\t\t$this->hashPassword();\n\t}", "public function afterValidationOnCreate()\n {\n $this->hash = $this->getDI()->getSecurity()->hash($this->hash);\n }", "public function beforeSave($options = array()) {\n // hash our password\n if (isset($this->data[$this->alias]['password'])) {\n $this->data[$this->alias]['password'] = Security::hash(\n $this->data[$this->alias]['password'], 'sha1', true\n );\n }\n\n // if we get a new password, hash it\n if (isset($this->data[$this->alias]['password_update'])) {\n $this->data[$this->alias]['password'] = Security::hash(\n $this->data[$this->alias]['password'], 'sha1', true\n );\n }\n\n // fallback to our parent\n return parent::beforeSave($options);\n }", "public function beforeSave() {\n\t\tif ($this->getScenario() == 'insert') {\n\t\t\t$this->password = $this->cryptPassword($this->password);\n\t\t\t$this->activekey = $this->cryptPassword(microtime() . $this->password);\n\t\t\t$this->createtime = date('Y-m-d H:i:s');\n\t\t}\n\t\treturn parent::beforeSave();\n\t}", "protected function afterValidate()\n {\n parent::afterValidate();\n if (!$this->hasErrors()) {\n $this->password = $this->hashPassword($this->password);\n }\n }", "protected function afterValidate()\n {\n parent::afterValidate();\n if (!$this->hasErrors()) {\n $this->password = $this->hashPassword($this->password);\n }\n }", "function save() {\r\n if(strlen($this->password) != 40) {\r\n $this->password = sha1($this->password);\r\n }\r\n // Call the parent save() method.\r\n return parent::save();\r\n }", "protected function afterValidate()\n {\n \tparent::afterValidate();\n \tif(!$this->hasErrors())\n \t\t$this->password = $this->hashPassword($this->password);\n }", "protected function checkInstallToolPasswordNotSet() {}", "function external_db_show_password_fields()\n{\n return 0;\n}", "function allowPasswordChange() {\n global $shib_pretend;\n\n return $shib_pretend;\n\n }", "public function beforeSave($options = array()) {\r\n\t\t$this->data['User']['password'] =\r\n\t\t\tAuthComponent::password($this->data['User']['password']);\r\n\t\t\treturn true;\r\n\t}", "protected static function bootWarnsOfPasswordChanges()\n {\n static::updating(function (Model $model) {\n $passwordAttribute = config(\n 'laravel-security-notifications.models.' . $model::class . '.password',\n 'password'\n );\n\n if (! $model->isDirty($passwordAttribute)) {\n return null;\n }\n\n return $model->fireModelEvent('updatingPassword');\n });\n\n // Register the \"updatingPassword\" event with our observer.\n static::registerModelEvent('updatingPassword', PasswordObserver::class . '@updatingPassword');\n }", "Public function configPassword() {\n return view('user.passconfig');\n }", "public function getPasswordHash() : string{\n \treturn $this->getConfig()->getAll()[\"passwordHash\"];\n }", "protected function setUp(){\n $this->hashedPass = hash('sha512', Cons::USER_PASS );\n }", "private function setEncryptPassword(){\n // Encode the new users password\n $encrpyt = $this->get('security.password_encoder');\n $password = $encrpyt->encodePassword($this->user, $this->user->getPassword());\n $this->user->setPassword($password);\n }", "public function checkBackendAccessSettingsFromInitPhp() {}", "public function needSalt();", "function can_change_password() {\n return !empty($this->config->changepasswordurl);\n }", "public function onBeforeSave(\\Netric\\ServiceManager\\AccountServiceManagerInterface $sm)\n {\n // If the password was updated for this user then encrypt it\n if ($this->fieldValueChanged(\"password\"))\n {\n $vaultService = $sm->get(\"Netric/Crypt/VaultService\");\n $blockCipher = new BlockCipher($vaultService->getSecret(\"EntityEnc\"));\n $this->setValue(\"password\", $blockCipher->encrypt($this->getValue(\"password\")));\n }\n }", "protected static function booted(): void\n {\n static::creating(static function (self $user): void {\n $user->password = $user->password ?: Hash::make(Str::random(10));\n });\n }", "public function getSecuredPassword();", "function validateCurrentPassword(&$Model, $data) {\r\n\t\t$key = key($data);\r\n\t\t$value = $data[$key];\r\n\t\tif (!$value) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\textract($this->settings[$Model->alias]);\r\n\t\treturn (Security::hash($value, null, true) === $Model->field($fields['password']));\r\n\t}", "function userCanSetDbPassword(){\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "protected function encodePasswords(LifecycleEventArgs $args)\r\n {\r\n $entity = $args->getObject();\r\n\r\n if ($this->isEnabledEntity($entity)) {\r\n $entity->setPassword($this->encoder->encode($entity->getPassword()));\r\n $entity->setSalt($this->encoder->getIv());\r\n }\r\n }", "public function getPassword()\n {\n return $this->getConfig('password');\n }", "public function validate_config_on_save($host_obj)\n\t\t{\n\t\t\t$hash_value = trim($host_obj->certificate);\n\t\t\t\n\t\t\tif (!strlen($hash_value))\n\t\t\t{\n\t\t\t\tif (!isset($host_obj->fetched_data['certificate']) || !strlen($host_obj->fetched_data['certificate']))\n\t\t\t\t\t$host_obj->validation->setError('Please paste certificate file content', 'certificate', true);\n\n\t\t\t\t$host_obj->certificate = $host_obj->fetched_data['certificate'];\n\t\t\t}\n\t\t}", "function allowPasswordChange() {\r\n\t\treturn true;\r\n\t}", "function maptcha_migrate_config(): void {\n $config = Config::current();\n\n if (isset($config->maptcha_hashkey)) {\n $set = $config->set(\n \"module_maptcha\",\n array(\"maptcha_hashkey\" => $config->maptcha_hashkey)\n );\n\n if ($set !== false)\n $set = $config->remove(\"maptcha_hashkey\");\n\n if ($set === false)\n error(\n __(\"Error\"),\n __(\"Could not write the configuration file.\")\n );\n }\n }", "function beforeSave( Model $Model)\n {\n if( empty( $Model->id))\n {\n foreach( $this->_settings as $field)\n {\n if( $Model->hasField( $field))\n {\n $Model->data [$Model->alias][$field] = Security::hash(String::uuid());\n }\n }\n }\n \n return true; \n }", "public function assignRootPassword()\n {\n $this->update(['root_password' => Str::random()]);\n }", "function createPasswordSalt() {\n\t\t$userSystem = new SpotUserSystem($this->_db, $this->_settings);\n\t\t$salt = $userSystem->generateUniqueId() . $userSystem->generateUniqueId();\n\t\t\n\t\t$this->setIfNot('pass_salt', $salt);\n\t}", "public function config_save() {\n }", "function beforeValidate(Model $Model) {\r\n\t\t$this->_setupValidation($Model);\r\n\t\textract($this->settings[$Model->alias]);\r\n\t\tif (!empty($Model->data[$Model->alias]['generate'])) {\r\n\t\t\tunset ($Model->data[$Model->alias]['generate']);\r\n\t\t\t$strengths = array_keys($passwordPolicies);\r\n\t\t\t$current = array_search($passwordPolicy, $strengths);\r\n\t\t\tif (isset($Model->data[$Model->alias]['strength'])) {\r\n\t\t\t\t$requested = array_search($Model->data[$Model->alias]['strength'], $strengths);\r\n\t\t\t\tif ($requested > $current) {\r\n\t\t\t\t\t$this->settings[$Model->alias]['passwordPolicy'] =\r\n\t\t\t\t\t\t$Model->data[$Model->alias]['strength'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$this->settings[$Model->alias]['tempPassword'] =\r\n\t\t\t\t$Model->data[$Model->alias][$fields['password_confirm']] = $this->generatePassword($Model);\r\n\t\t\t$Model->data[$Model->alias][$fields['password']] =\r\n\t\t\t\tSecurity::hash($Model->data[$Model->alias][$fields['password_confirm']], null, true);\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public function initializeBackendUser() {}", "public function initializeBackendUser() {}", "protected function getInstallToolPasswordStatus() {}", "public function canModifyPasswords()\n {\n return in_array($this->encryption, ['tls', 'ssl']);\n }", "public function validate_config_on_save($host_obj)\n\t\t{\n\t\t\t$public_key = trim($host_obj->public_key);\n\t\t\t$private_key = trim($host_obj->private_key);\n\t\t\t\n\t\t\tif (!strlen($public_key))\n\t\t\t{\n\t\t\t\tif (!isset($host_obj->fetched_data['public_key']) || !strlen($host_obj->fetched_data['public_key']))\n\t\t\t\t\t$host_obj->validation->setError('Please enter public key', 'public_key', true);\n\n\t\t\t\t$host_obj->public_key = $host_obj->fetched_data['public_key'];\n\t\t\t}\n\n\t\t\tif (!strlen($private_key))\n\t\t\t{\n\t\t\t\tif (!isset($host_obj->fetched_data['private_key']) || !strlen($host_obj->fetched_data['private_key']))\n\t\t\t\t\t$host_obj->validation->setError('Please enter private key', 'private_key', true);\n\n\t\t\t\t$host_obj->private_key = $host_obj->fetched_data['private_key'];\n\t\t\t}\n\t\t}", "function hash_password($cleartext_password) {\n if (config\\HASHING_ALGORITHM == \"crypt\") {\n return crypt($cleartext_password, \"$1$\" . \\melt\\string\\random_hex_str(8) . \"$\");\n } else if (config\\HASHING_ALGORITHM == \"sha1\") {\n $salt = \\melt\\string\\random_hex_str(40);\n return $salt . sha1($salt . $cleartext_password, false);\n } else if (config\\HASHING_ALGORITHM == \"md5\") {\n $salt = \\melt\\string\\random_hex_str(32);\n return $salt . \\md5($salt . $cleartext_password, false);\n } else\n trigger_error(\"The configured hashing algorithm '\" . config\\HASHING_ALGORITHM . \"' is not supported.\", \\E_USER_ERROR);\n}", "function beforeValidate() {\n\t\t$this->hashPassword();\n\t\t$this->_bindValidation();\n\t\treturn true;\n\t}", "public function isPasswordChangeEnabled();", "public function setPassword(){\n\t}", "function can_change_password() {\n return false;\n }", "public function legacyPassword(): HasOne;", "public function beforeSave($insert) {\n if (parent::beforeSave($insert)) {\n $this->password = Yii::$app->getSecurity()->generatePasswordHash($this->password);\n return true;\n } else {\n return false;\n }\n }", "public function can_change_password() {\n return false;\n }", "public function getAuthPassword()\n {\n \treturn $this->getGuarded('password');\n }", "public function getPassword() {\n return $this->getConfig('password', $this->defaults['password']);\n }", "public function setPassword() {\n if ($this->Password) {\n $this->Password = \\app\\components\\Utilities::setHashedValue($this->Password);\n }\n }", "function can_change_password() {\n\t\treturn false;\n\t}", "public function boot()\n {\n Validator::extend('sameAsDbPassword', function($attribute, $value, $parameter, $validator) {\n $user = \\DB::table('users')->where('id', $parameter)->first();\n if (\\Hash::check($value, $user->password))\n return true;\n else\n return false;\n });\n }", "public function isPasswordRecoveryEnabled();", "public function olvidoPassword(){\n\t}", "function instance_allow_config()\r\n\t\t{\r\n\t\t\r\n\t\t}", "public function boot()\n {\n Event::listen('translator.beforeResolve', function ($key, $replaces, $locale) {\n if ($key === 'validation.notpwned') {\n return Lang::get('luketowers.pwnedpasswords::lang.validation.notpwned');\n }\n });\n\n // Register the `notpwned:min` rule\n Validator::extend('notpwned', NotPwned::class);\n Validator::replacer('notpwned', function ($message, $attribute, $rule, $parameters) {\n return str_replace(':min', array_shift($parameters) ?? 1, $message);\n });\n\n // Enforce rule on backend users if desired\n if (Config::get('luketowers.pwnedpasswords::enforceOnBackendUsers', false) && !App::runningInConsole()) {\n User::extend(function($model) {\n $model->rules = array_merge($model->rules, ['password' => $model->rules['password'] . '|notpwned']);\n });\n\n // Force users to reset their passwords if they login with a pwned password\n Auth::extend(function ($controller) {\n $controller->bindEvent('page.beforeDisplay', function ($action, $params) use ($controller) {\n if (post('postback') &&\n ($action === 'signin' || $action === 'reset')\n ) {\n $validation = Validator::make(post(), ['password' => 'notpwned']);\n if ($validation->fails()) {\n // Force users to reset their password\n if ($action === 'signin') {\n Event::listen('backend.user.login', function ($user) use ($controller) {\n // Make sure the user is not authenticated\n BackendAuth::logout();\n\n // Send out the password reset email\n $response = $controller->restore_onSubmit();\n\n // Notify the user\n Flash::error(\"Your password has been detected in known password breaches and must be changed. An email with instructions to reset your password has been sent to your email address on file.\");\n\n // Return the response\n abort($response);\n });\n }\n\n // Ensure that they don't reset it to another terrible password\n if ($action === 'reset') {\n try {\n throw new ValidationException($validation);\n } catch (ValidationException $ex) {\n // Notify the user & reload the page\n Flash::error($ex->getMessage());\n return redirect()->refresh();\n }\n }\n }\n }\n });\n });\n }\n }", "public function onPreUpdate(PreUpdateEventArgs $eventArgs) {\n\t\tparent::onPreUpdate($eventArgs);\n\t\tif ($eventArgs->hasChangedField('password')) {\n\t\t\tif (empty($this->password)) {\n\t\t\t\t$this->password = $eventArgs->getOldValue('password');\n\t\t\t} else {\n\t\t\t\t$this->hashPassword();\n\t\t\t}\n\t\t}\n\t}", "public function setPasswordAttribute($value)\n {\n $this->attributes['password'] = Hash::make($value);\n \n }", "public function getPasswordSet(){\n\t\t$passwordSet = $this->config->getAppValue('owncollab_ganttchart', 'sharepassword', 0);\n\t\tif ($passwordSet == 0){\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn 1;\n\t\t}\n\t}", "protected function configureBackendLoginSecurity() {}", "protected function loadApplicationCredentials() {\n\t\t$appCredentials = AppConfigLoader::getInstance()->getConfig(ConfigLoader::CREDENTIALS,self::APP_CREDENTIALS_REQUIRED);\n\t\tif($this->isValidCredentialsConfig($appCredentials,self::APP_CREDENTIALS_REQUIRED)) {\n\t\t\t$this->assignCredentials($appCredentials);\n\t\t}\n\t}", "public function GetPasswordHash ();", "public function password_verifies() {\n\t\treturn AuthComponent::password($this->data[$this->alias]['old_password']) === $this->data[$this->alias]['password'];\n\t}", "function hashPasswords($data, $enforce=false) {\n\t\tif($enforce && isset($this->data[$this->alias]['password'])) {\n\t\t\tif(!empty($this->data[$this->alias]['password'])) {\n\t\t\t\t$this->data[$this->alias]['password'] = Security::hash($this->data[$this->alias]['password'], null, true);\n\t\t\t}\n\t\t}\n\t\treturn $data;\n }", "function validatePasswordSpecialChar(&$Model, $data, $compare) {\r\n\t\tif (in_array($this->settings[$Model->alias]['passwordPolicy'], array('weak', 'normal', 'medium'))) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t$key = key($data);\r\n\t\t$value = $data[$key];\r\n\t\t$compare = $Model->data[$Model->alias][$compare[0]];\r\n\t\tif (!(preg_match('/.*[^\\w].*/', $compare))) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "function sanitizePassword() {\n // If there is a password confirmation we put it to the checker, too\n $passCheckerInput = (strlen($this->passwordConf) > 0) ?\n array($this->password, $this->passwordConf) : $this->password;\n $passwordChecker = new PasswordChecker($passCheckerInput);\n if ($passwordChecker->getRelevance()) {\n $this->password = htmlspecialchars($this->password);\n } else {\n die(\"Error. Check your form data\");\n }\n }", "public final function setUp() : void {\nparent::setUp();\n\n$password = \"mypassword12\";\n$this->VALID_HASH = password_hash($password, PASSWORD_ARGON2I, [\"time_cost\" => 7]);\n$this->VALID_ACTIVATION = bin2hex(random_bytes(16));\n}", "public function setPasswordAttribute($value) {\n \t$this->attributes['password'] = Hash::make($value);\n\t}", "public function hasPasswordBrokerFactory(): bool;", "public function getPassword() {}", "function password_recovery()\n\t{\n\n\n\t}", "function allowPasswordChange() {\n return false;\n }", "public function getPasswordConf()\n\t{\n\t\treturn $this->password_conf;\n\t}", "public function allowPasswordChange()\n {\n return false;\n }", "public final function setUp(): void {\n\t\tparent::setUp();\n\t\t//\n\t\t$password = \"abc123\";\n\n\t\t$this->VALID_HASH = password_hash($password, PASSWORD_ARGON2I, [\"time_cost\" => 384]);\n\t\t$this->VALID_ACTIVATION = bin2hex(random_bytes(16));\n\t}", "public function config()\n\t{\n\t\tparent::config();\n\n\t\t// change inpu\n\t\tif(self::done_step('username'))\n\t\t{\n\t\t\t// if user go to this page from username page\n\t\t\t$this->data->mobile_username = 'eusername';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// if user go to this page from mobile page\n\t\t\t$this->data->mobile_username = 'emobile';\n\t\t}\n\n\t\t// load temp username in username field\n\t\tif(self::get_session('username', 'temp_username'))\n\t\t{\n\t\t\t$this->data->get_username = self::get_session('username', 'temp_username');\n\t\t}\n\n\t\t$this->data->page['title'] = T_('Password');\n\t\t$this->data->page['desc'] = T_('Please enter password to enter');\n\n\t\tswitch (\\lib\\router::get_url(1))\n\t\t{\n\t\t\tcase 'recovery':\n\t\t\t\t$this->data->page['title'] = T_('Recovery Password');\n\t\t\t\t$this->data->page['desc'] = T_('If forget your password, Please enter new password. after pass verification your new password is usable.');\n\t\t\t\tbreak;\n\n\t\t\tcase 'signup':\n\t\t\tcase 'set':\n\t\t\t\t$this->data->page['title'] = T_('Set Password');\n\t\t\t\t$this->data->page['desc'] = T_('Please set your password to secure signup.'). ' '. T_('Next time we only need your mobile and this password to enter');\n\t\t\t\tbreak;\n\n\t\t\tcase 'change':\n\t\t\t\t$this->data->page['title'] = T_('Change to new Password');\n\t\t\t\t$this->data->page['desc'] = T_('Please set your old and new password to change it');\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function initPassword() {\n\t\t$this->salt = mt_rand();\n\t\t$clearPassword = mt_rand();\n\t\t$this->password = sha1($this->salt . $clearPassword);\n\t\treturn $clearPassword;\t\n\t}", "function instance_allow_config() {\n return true;\n }", "public function beforeSave($object)\n {\n $password = $object->getPassword();\n\n $length = $this->string->strlen($password);\n if ($length > 0) {\n if ($length < self::MIN_PASSWORD_LENGTH) {\n throw new LocalizedException(\n __(\n 'The password needs at least %1 characters. Create a new password and try again.',\n self::MIN_PASSWORD_LENGTH\n )\n );\n }\n\n if (trim($password) !== $password) {\n throw new LocalizedException(\n __(\"The password can't begin or end with a space. Verify the password and try again.\")\n );\n }\n\n $object->setPasswordHash($object->hashPassword($password));\n }\n }", "public function beforeSave()\n {\n $this->firstname = \\Hash::make($this->firstname);\n }", "function oldPassword() {\n\t\t$fields = $this->_settings['fields'];\n\t\tif (\n\t\t\tSecurity::hash($this->model->data[$this->model->name][$fields['old_password']], null, true) \n\t\t\t== $this->model->field($fields['password'])\n\t\t) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function validate_password($hashed_password, $cleartext_password) {\n if (!is_string($hashed_password) || !is_string($cleartext_password))\n return false;\n if (config\\HASHING_ALGORITHM == \"crypt\") {\n $salt_end = strrpos($hashed_password, \"$\");\n if ($salt_end === false) {\n // DES, first two charachers is salt.\n $salt = substr($hashed_password, 0, 2);\n } else {\n // Salt before $.\n $salt_end++;\n $salt = substr($hashed_password, 0, $salt_end);\n }\n return crypt($cleartext_password, $salt) == $hashed_password;\n } else if (config\\HASHING_ALGORITHM == \"sha1\") {\n if (strlen($hashed_password) != 80)\n return false;\n $salt = substr($hashed_password, 0, 40);\n $hash = substr($hashed_password, 40);\n return $hash == sha1($salt . $cleartext_password, false);\n } else if (config\\HASHING_ALGORITHM == \"md5\") {\n if (strlen($hashed_password) != 64)\n return false;\n $salt = substr($hashed_password, 0, 32);\n $hash = substr($hashed_password, 32);\n return $hash == sha1($salt . $cleartext_password, false);\n } else\n trigger_error(\"The configured hashing algorithm '\" . config\\HASHING_ALGORITHM . \"' is not supported.\", \\E_USER_ERROR);\n}", "public function boot()\n {\n URL::forceScheme('https'); //强制 https\n JsonResource::withoutWrapping();// 资源返回不包裹在 data 里面\n $table = config('admin.extensions.config.table', 'admin_config');\n if (Schema::hasTable($table)) {\n Config::load();\n }\n Horizon::auth(function ($request) {\n return true;\n });\n }", "public static function setPasswordSpecialCharactersRequired($isRequired){\n Configuration::where('id', 1)\n ->update(['password_special_characters_required' => $isRequired]);\n }", "public function beforeValidationOnCreate()\n {\n\t // Timestamp the confirmaton\n\t $this->password_change_created = time();\n }", "public function getAuthPassword()\n {\n }", "public function getAuthPassword()\n {\n }" ]
[ "0.6914616", "0.6796443", "0.6697099", "0.665121", "0.63670254", "0.6295328", "0.6200462", "0.6172115", "0.6149906", "0.6120393", "0.6110244", "0.6080222", "0.59739685", "0.59508586", "0.594679", "0.59200305", "0.5883577", "0.5873509", "0.5873509", "0.58635956", "0.5862284", "0.58090657", "0.57847035", "0.57440823", "0.5709865", "0.57084537", "0.56958413", "0.56469226", "0.56363595", "0.561073", "0.5602007", "0.5600021", "0.5597077", "0.5580809", "0.55480635", "0.5547606", "0.5517979", "0.5485772", "0.5484624", "0.54545003", "0.5439518", "0.54297787", "0.5429415", "0.5421317", "0.5410173", "0.53926545", "0.53909934", "0.53825957", "0.5369035", "0.53680927", "0.5363083", "0.53626174", "0.53602237", "0.5359092", "0.5353419", "0.53275526", "0.5326781", "0.5326227", "0.5314013", "0.5313696", "0.5302735", "0.52973884", "0.5294989", "0.529337", "0.5288171", "0.5287534", "0.5284893", "0.5279927", "0.5277659", "0.52748346", "0.52643484", "0.5262992", "0.52608687", "0.52539366", "0.52461433", "0.52391577", "0.52354115", "0.5227716", "0.5222721", "0.5222667", "0.522195", "0.5219576", "0.52181154", "0.52074146", "0.5199328", "0.51981986", "0.5193891", "0.5190052", "0.518376", "0.5167935", "0.5142528", "0.51401275", "0.5137518", "0.5136992", "0.5136354", "0.51331615", "0.5128597", "0.51240623", "0.51174754", "0.51168454", "0.51168454" ]
0.0
-1